00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SO_POLYGON_OFFSET_ELEMENT_
00026 #define _SO_POLYGON_OFFSET_ELEMENT_
00027
00028 #include <Inventor/elements/SoReplacedElement.h>
00029 #include <Inventor/SbEnums.h>
00030
00042 SoEXTENDER_Documented class SoPolygonOffsetElement : public SoReplacedElement {
00043
00044 SO_ELEMENT_HEADER(SoPolygonOffsetElement) ;
00045
00046 public:
00048 enum Style {
00050 FILLED = SbEnums::OFFSET_SOLID,
00052 LINES = SbEnums::OFFSET_WIREFRAME,
00054 POINTS = SbEnums::OFFSET_WIREFRAME
00055 } ;
00056
00058 static void set(SoState *state, SoNode *node, float factor, float units, Style styles, SbBool on) ;
00060 static void get(SoState *state, float &factor, float &units, Style &styles, SbBool &on) ;
00061
00063 virtual void push(SoState *state) ;
00064
00066 static void getDefault(float &factor, float &units, Style &styles, SbBool &on) ;
00067
00068 private:
00069
00071 virtual void init(SoState *state);
00072
00074 virtual SbBool matches(const SoElement* elt) const;
00075
00077 virtual SoElement* copyMatchInfo() const;
00078
00079 private:
00080
00081 static void initClass() ;
00082 static void exitClass() ;
00083
00084 private:
00085 float m_factor ;
00086 float m_units ;
00087 Style m_stylesMask ;
00088 SbBool m_on ;
00089
00090 virtual void setElt(float factor, float units, Style styles, SbBool on) ;
00091
00092 virtual ~SoPolygonOffsetElement() ;
00093 } ;
00094
00095 #endif
00096
00097
00098