Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

X3DComposedGeometryNode.h

Go to the documentation of this file.
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 
00013 class X3DColorNode;
00014 class X3DCoordinateNode;
00015 class X3DNormalNode;
00016 class X3DTextureCoordinateNode;
00017 
00022 
00023 class X3DComposedGeometryNode : public X3DGeometry3DNode
00024 {
00025 public:
00027   X3DComposedGeometryNode();
00029   X3DComposedGeometryNode(const X3DColorNode *color,
00030                           const X3DCoordinateNode *coord,
00031                           const X3DNormalNode *normal,
00032                           const X3DTextureCoordinateNode *texCoord,
00033                           SFBool ccw,
00034                           SFBool colorPerVertex,
00035                           SFBool normalPerVertex,
00036                           SFBool solid);
00038   virtual SFNode clone() const;
00040   virtual ~X3DComposedGeometryNode();
00041  
00043   void setColor(const X3DColorNode *color);
00045   void setCoord(const X3DCoordinateNode *coord);
00047   void setNormal(const X3DNormalNode *normal);
00049   void setTexCoord(const X3DTextureCoordinateNode *texCoord);
00051   void setCcw(SFBool ccw);
00053   void setColorPerVertex(SFBool colorPerVertex);
00055   void setNormalPerVertex(SFBool normalPerVertex);
00057   void setSolid(SFBool solid);
00058 
00060   inline SFNode getColor() const {return color_;};
00062   inline SFNode getCoord() const {return coord_;};
00064   inline SFNode getNormal() const {return normal_;};
00066   inline SFNode getTexCoord() const {return texCoord_;};
00068   inline SFBool getCcw() const {return ccw_;};
00070   inline SFBool getColorPerVertex() const {return colorPerVertex_;};
00072   inline SFBool getNormalPerVertex() const {return normalPerVertex_;};
00074   inline SFBool getSolid() const {return solid_;};
00075   
00078   bool addChild(const SFNode &N);
00081   bool setChild(const SFNode &N);
00083   bool removeChild(const SFNode &N);
00084   
00086   virtual void loadAttributes(const X3DFileElement *element);
00088   virtual SFString writeAttributes() const; 
00089  
00090 protected:
00092   X3DComposedGeometryNode(const X3DComposedGeometryNode &N);
00093 
00095   virtual void removeScenesToChildren(const MFScene &sceneList);
00097   virtual void addScenesToChildren(const MFScene &sceneList);
00098   
00100   SFNode color_;  
00102   SFNode coord_;  
00104   SFNode normal_;
00106   SFNode texCoord_;
00108   SFBool ccw_;
00110   SFBool colorPerVertex_;
00112   SFBool normalPerVertex_;
00114   SFBool solid_;
00115 };
00116 
00117 }
00118 
00119 #endif

Generated on Wed May 14 10:38:10 2003 for X3DToolKit by doxygen1.3