00001 00002 // X3D_X3DComposedGeometryNode.h // 00004 00005 #ifndef X3DCOMPOSEDGEOMETRYNODE_H 00006 #define X3DCOMPOSEDGEOMETRYNODE_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3D_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(X3DColorNode *color, 00031 X3DCoordinateNode *coord, 00032 X3DNormalNode *normal, 00033 X3DTextureCoordinateNode *texCoord, 00034 const SFBool &ccw, 00035 const SFBool &colorPerVertex, 00036 const SFBool &normalPerVertex, 00037 const SFBool &solid); 00039 virtual ~X3DComposedGeometryNode(); 00040 00042 void setColor(X3DColorNode *color); 00044 void setCoord(X3DCoordinateNode *coord); 00046 void setNormal(X3DNormalNode *normal); 00048 void setTexCoord(X3DTextureCoordinateNode *texCoord); 00050 void setCcw(const SFBool &ccw); 00052 void setColorPerVertex(const SFBool &colorPerVertex); 00054 void setNormalPerVertex(const SFBool &normalPerVertex); 00056 void setSolid(const SFBool &solid); 00057 00059 inline SFNode getColor() const {return _color;}; 00061 inline SFNode getCoord() const {return _coord;}; 00063 inline SFNode getNormal() const {return _normal;}; 00065 inline SFNode getTexCoord() const {return _texCoord;}; 00067 inline const SFBool &getCcw() const {return _ccw;}; 00069 inline const SFBool &getColorPerVertex() const {return _colorPerVertex;}; 00071 inline const SFBool &getNormalPerVertex() const {return _normalPerVertex;}; 00073 inline const SFBool &getSolid() const {return _solid;}; 00074 00076 virtual MFAbstractNode getChildrenList() const; 00077 00080 virtual bool addChild(const SFAbstractNode &N); 00083 virtual bool setChild(const SFAbstractNode &N); 00085 virtual bool removeChild(const SFAbstractNode &N); 00086 00088 virtual void load(const X3DFileElement *element); 00090 virtual SFString &write(SFString &output) const; 00091 00092 protected: 00094 X3DComposedGeometryNode(const X3DComposedGeometryNode &N); 00095 00096 private: 00098 SFNode _color; 00100 SFNode _coord; 00102 SFNode _normal; 00104 SFNode _texCoord; 00106 SFBool _ccw; 00108 SFBool _colorPerVertex; 00110 SFBool _normalPerVertex; 00112 SFBool _solid; 00113 }; 00114 00115 } 00116 } 00117 00118 #endif