00001 00002 // X3DComposedGeometryNode.h // 00004 00005 #ifndef X3DCOMPOSEDGEOMETRYNODE_H 00006 #define X3DCOMPOSEDGEOMETRYNODE_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3DGeometry3DNode.h" 00010 00011 namespace X3DTK { 00012 namespace X3D { 00013 00014 class X3DColorNode; 00015 class X3DCoordinateNode; 00016 class X3DNormalNode; 00017 class X3DTextureCoordinateNode; 00018 00023 00024 class X3DComposedGeometryNode : public X3DGeometry3DNode 00025 { 00026 public: 00028 X3DComposedGeometryNode(); 00030 X3DComposedGeometryNode(const X3DColorNode *color, 00031 const X3DCoordinateNode *coord, 00032 const X3DNormalNode *normal, 00033 const X3DTextureCoordinateNode *texCoord, 00034 SFBool ccw, 00035 SFBool colorPerVertex, 00036 SFBool normalPerVertex, 00037 SFBool solid); 00039 virtual SFNode clone() const; 00041 virtual ~X3DComposedGeometryNode(); 00042 00044 void setColor(const X3DColorNode *color); 00046 void setCoord(const X3DCoordinateNode *coord); 00048 void setNormal(const X3DNormalNode *normal); 00050 void setTexCoord(const X3DTextureCoordinateNode *texCoord); 00052 void setCcw(SFBool ccw); 00054 void setColorPerVertex(SFBool colorPerVertex); 00056 void setNormalPerVertex(SFBool normalPerVertex); 00058 void setSolid(SFBool solid); 00059 00061 inline SFNode getColor() const {return _color;}; 00063 inline SFNode getCoord() const {return _coord;}; 00065 inline SFNode getNormal() const {return _normal;}; 00067 inline SFNode getTexCoord() const {return _texCoord;}; 00069 inline SFBool getCcw() const {return _ccw;}; 00071 inline SFBool getColorPerVertex() const {return _colorPerVertex;}; 00073 inline SFBool getNormalPerVertex() const {return _normalPerVertex;}; 00075 inline SFBool getSolid() const {return _solid;}; 00076 00079 bool addChild(const SFAbstractNode &N); 00082 bool setChild(const SFAbstractNode &N); 00084 bool removeChild(const SFAbstractNode &N); 00085 00087 virtual void load(const X3DFileElement *element); 00089 virtual SFString write() const; 00090 00091 protected: 00093 X3DComposedGeometryNode(const X3DComposedGeometryNode &N); 00094 00095 private: 00097 SFNode _color; 00099 SFNode _coord; 00101 SFNode _normal; 00103 SFNode _texCoord; 00105 SFBool _ccw; 00107 SFBool _colorPerVertex; 00109 SFBool _normalPerVertex; 00111 SFBool _solid; 00112 }; 00113 00114 } 00115 } 00116 00117 #endif