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

IndexedLineSet.h

Go to the documentation of this file.
00001 
00002 //                            IndexedLineSet.h                               //
00004 
00005 #ifndef INDEXEDLINESET_H
00006 #define INDEXEDLINESET_H
00007 
00008 #include "X3DTypes.h"
00009 #include "X3DGeometryNode.h"
00010 
00011 namespace X3DTK {
00012 
00013 class X3DColorNode;
00014 class X3DCoordinateNode;
00015 
00020 
00021 class IndexedLineSet : public X3DGeometryNode
00022 {
00023 public:
00025   IndexedLineSet();
00027   IndexedLineSet(const X3DColorNode *color,
00028                  const X3DCoordinateNode *coord,
00029                  const MFInt32 &colorIndex,
00030                  SFBool colorPerVertex,
00031                  const MFInt32 &coordIndex,
00032                  SFFloat lineWidth);
00034   virtual SFNode clone() const;
00036   ~IndexedLineSet();
00037   
00039   void setColor(const X3DColorNode *color);
00041   void setCoord(const X3DCoordinateNode *coord);
00043   void setColorIndex(const MFInt32 &colorIndex);
00045   void setColorPerVertex(SFBool colorPerVertex);
00047   void setCoordIndex(const MFInt32 &coordIndex);
00049   void setLineWidth(SFFloat lineWidth);
00050   
00052   inline SFNode getColor() const {return color_;};
00054   inline SFNode getCoord() const {return coord_;};
00056   inline MFInt32 &getColorIndex() const {return (MFInt32 &)colorIndex_;};
00058   inline SFBool getColorPerVertex() const {return colorPerVertex_;};
00060   inline MFInt32 &getCoordIndex() const {return (MFInt32 &)coordIndex_;};
00062   inline SFFloat getLineWidth() const {return lineWidth_;};
00063   
00066   bool addChild(const SFNode &N);
00069   bool setChild(const SFNode &N);
00071   bool removeChild(const SFNode &N);
00072   
00074   virtual void loadAttributes(const X3DFileElement *element);
00076   virtual SFString writeAttributes() const;
00077 
00078 protected:
00080   IndexedLineSet(const IndexedLineSet &I);
00081   
00083   virtual void removeScenesToChildren(const MFScene &sceneList);
00085   virtual void addScenesToChildren(const MFScene &sceneList);
00086   
00087 private:
00088   SFNode color_;
00089   SFNode coord_;
00090   MFInt32 colorIndex_;
00091   SFBool colorPerVertex_;
00092   MFInt32 coordIndex_;
00093   SFFloat lineWidth_;  
00094 };
00095 
00096 }
00097 
00098 #endif

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