00001 00002 00003 00005 00006 00011 00016 00021 // X3DComposedGeometryNode.h // 00023 00024 #ifndef X3DCOMPOSEDGEOMETRYNODE_H 00025 #define X3DCOMPOSEDGEOMETRYNODE_H 00026 00027 #include "X3DTypes.h" 00028 #include "X3DGeometry3DNode.h" 00029 00030 namespace X3DTK { 00031 namespace X3D { 00032 00033 class X3DColorNode; 00034 class X3DCoordinateNode; 00035 class X3DNormalNode; 00036 class X3DTextureCoordinateNode; 00037 00042 00043 class X3DComposedGeometryNode : public X3DGeometry3DNode 00044 { 00045 public: 00047 X3DComposedGeometryNode(); 00049 X3DComposedGeometryNode(const X3DColorNode *color, 00050 const X3DCoordinateNode *coord, 00051 const X3DNormalNode *normal, 00052 const X3DTextureCoordinateNode *texCoord, 00053 SFBool ccw, 00054 SFBool colorPerVertex, 00055 SFBool normalPerVertex, 00056 SFBool solid); 00058 virtual SFNode clone() const; 00060 virtual ~X3DComposedGeometryNode(); 00061 00063 void setColor(const X3DColorNode *color); 00065 void setCoord(const X3DCoordinateNode *coord); 00067 void setNormal(const X3DNormalNode *normal); 00069 void setTexCoord(const X3DTextureCoordinateNode *texCoord); 00071 void setCcw(SFBool ccw); 00073 void setColorPerVertex(SFBool colorPerVertex); 00075 void setNormalPerVertex(SFBool normalPerVertex); 00077 void setSolid(SFBool solid); 00078 00080 inline SFNode getColor() const {return _color;}; 00082 inline SFNode getCoord() const {return _coord;}; 00084 inline SFNode getNormal() const {return _normal;}; 00086 inline SFNode getTexCoord() const {return _texCoord;}; 00088 inline SFBool getCcw() const {return _ccw;}; 00090 inline SFBool getColorPerVertex() const {return _colorPerVertex;}; 00092 inline SFBool getNormalPerVertex() const {return _normalPerVertex;}; 00094 inline SFBool getSolid() const {return _solid;}; 00095 00098 virtual bool addChild(const SFAbstractNode &N); 00101 virtual bool setChild(const SFAbstractNode &N); 00103 virtual bool removeChild(const SFAbstractNode &N); 00104 00106 virtual void load(const X3DFileElement *element); 00108 virtual SFString write() const; 00109 00110 protected: 00112 X3DComposedGeometryNode(const X3DComposedGeometryNode &N); 00113 00114 private: 00116 SFNode _color; 00118 SFNode _coord; 00120 SFNode _normal; 00122 SFNode _texCoord; 00124 SFBool _ccw; 00126 SFBool _colorPerVertex; 00128 SFBool _normalPerVertex; 00130 SFBool _solid; 00131 }; 00132 00133 } 00134 } 00135 00136 #endif