00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COIN_SOMARKERSET_H
00021 #define COIN_SOMARKERSET_H
00022
00023 #include <Inventor/nodes/SoSubNode.h>
00024 #include <Inventor/nodes/SoPointSet.h>
00025 #include <Inventor/fields/SoMFInt32.h>
00026
00027
00028 class COIN_DLL_API SoMarkerSet : public SoPointSet {
00029 typedef SoPointSet inherited;
00030
00031 SO_NODE_HEADER(SoMarkerSet);
00032
00033 public:
00034 static void initClass(void);
00035 SoMarkerSet(void);
00036
00037 enum MarkerType {
00038 CROSS_5_5, PLUS_5_5, MINUS_5_5, SLASH_5_5, BACKSLASH_5_5, BAR_5_5,
00039 STAR_5_5, Y_5_5, LIGHTNING_5_5, WELL_5_5,
00040
00041 CIRCLE_LINE_5_5, SQUARE_LINE_5_5, DIAMOND_LINE_5_5, TRIANGLE_LINE_5_5,
00042 RHOMBUS_LINE_5_5, HOURGLASS_LINE_5_5, SATELLITE_LINE_5_5,
00043 PINE_TREE_LINE_5_5, CAUTION_LINE_5_5, SHIP_LINE_5_5,
00044
00045 CIRCLE_FILLED_5_5, SQUARE_FILLED_5_5, DIAMOND_FILLED_5_5,
00046 TRIANGLE_FILLED_5_5, RHOMBUS_FILLED_5_5, HOURGLASS_FILLED_5_5,
00047 SATELLITE_FILLED_5_5, PINE_TREE_FILLED_5_5, CAUTION_FILLED_5_5,
00048 SHIP_FILLED_5_5,
00049
00050 CROSS_7_7, PLUS_7_7, MINUS_7_7, SLASH_7_7, BACKSLASH_7_7, BAR_7_7,
00051 STAR_7_7, Y_7_7, LIGHTNING_7_7, WELL_7_7,
00052
00053 CIRCLE_LINE_7_7, SQUARE_LINE_7_7, DIAMOND_LINE_7_7, TRIANGLE_LINE_7_7,
00054 RHOMBUS_LINE_7_7, HOURGLASS_LINE_7_7, SATELLITE_LINE_7_7,
00055 PINE_TREE_LINE_7_7, CAUTION_LINE_7_7, SHIP_LINE_7_7,
00056
00057 CIRCLE_FILLED_7_7, SQUARE_FILLED_7_7, DIAMOND_FILLED_7_7,
00058 TRIANGLE_FILLED_7_7, RHOMBUS_FILLED_7_7, HOURGLASS_FILLED_7_7,
00059 SATELLITE_FILLED_7_7, PINE_TREE_FILLED_7_7, CAUTION_FILLED_7_7,
00060 SHIP_FILLED_7_7,
00061
00062 CROSS_9_9, PLUS_9_9, MINUS_9_9, SLASH_9_9, BACKSLASH_9_9, BAR_9_9,
00063 STAR_9_9, Y_9_9, LIGHTNING_9_9, WELL_9_9,
00064
00065 CIRCLE_LINE_9_9, SQUARE_LINE_9_9, DIAMOND_LINE_9_9, TRIANGLE_LINE_9_9,
00066 RHOMBUS_LINE_9_9, HOURGLASS_LINE_9_9, SATELLITE_LINE_9_9,
00067 PINE_TREE_LINE_9_9, CAUTION_LINE_9_9, SHIP_LINE_9_9,
00068
00069 CIRCLE_FILLED_9_9, SQUARE_FILLED_9_9, DIAMOND_FILLED_9_9,
00070 TRIANGLE_FILLED_9_9, RHOMBUS_FILLED_9_9, HOURGLASS_FILLED_9_9,
00071 SATELLITE_FILLED_9_9, PINE_TREE_FILLED_9_9, CAUTION_FILLED_9_9,
00072 SHIP_FILLED_9_9,
00073 NUM_MARKERS
00074 };
00075
00076 SoMFInt32 markerIndex;
00077
00078 virtual void GLRender(SoGLRenderAction * action);
00079 virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
00080
00081 static int getNumDefinedMarkers(void);
00082 static void addMarker(int markerIndex, const SbVec2s & size,
00083 const unsigned char * bytes, SbBool isLSBFirst = TRUE,
00084 SbBool isUpToDown = TRUE);
00085 static SbBool getMarker(int markerIndex, SbVec2s & size,
00086 const unsigned char *& bytes, SbBool & isLSBFirst);
00087 static SbBool removeMarker(int markerIndex);
00088 static SbBool isMarkerBitSet(int markerIndex, int bitNumber);
00089
00090 protected:
00091 virtual ~SoMarkerSet();
00092
00093 private:
00094 enum Binding {
00095 OVERALL = 0,
00096 PER_VERTEX
00097 };
00098 Binding findMaterialBinding(SoState * const state) const;
00099 };
00100
00101 #endif // !COIN_SOMARKERSET_H