00001
00002
00003
00005
00006
00011
00016
00021
00023
00024 #ifndef NURBSSURFACE
00025 #define NURBSSURFACE
00026
00027 #include "X3DTypes.h"
00028 #include "X3DParametricGeometryNode.h"
00029
00030 namespace X3DTK {
00031 namespace X3D {
00032
00033 class X3DTextureCoordinateNode;
00034
00039
00040 class NurbsSurface : public X3DParametricGeometryNode
00041 {
00042 public:
00044 NurbsSurface();
00046 NurbsSurface(const MFVec3f &controlPoint,
00047 const X3DTextureCoordinateNode *texCoord,
00048 SFInt32 uTesselation,
00049 SFInt32 vTesselation,
00050 const MFDouble &weight,
00051 SFBool ccw,
00052 SFBool solid,
00053 SFInt32 uDimension,
00054 SFInt32 vDimension,
00055 const MFDouble &uKnot,
00056 const MFDouble &vKnot,
00057 SFInt32 uOrder,
00058 SFInt32 vOrder);
00060 virtual SFNode clone() const;
00062 virtual ~NurbsSurface();
00063
00065 void setControlPoint(const MFVec3f &controlPoint);
00067 void setTexCoord(const X3DTextureCoordinateNode *texCoord);
00069 void setUTesselation(SFInt32 uTesselation);
00071 void setVTesselation(SFInt32 vTesselation);
00073 void setWeight(const MFDouble &weight);
00075 void setCcw(SFBool ccw);
00077 void setSolid(SFBool solid);
00079 void setUDimension(SFInt32 uDimension);
00081 void setVDimension(SFInt32 vDimension);
00083 void setUKnot(const MFDouble &uKnot);
00085 void setVKnot(const MFDouble &vKnot);
00087 void setUOrder(SFInt32 uOrder);
00089 void setVOrder(SFInt32 vOrder);
00090
00092 inline const MFVec3f &getControlPoint() const {return _controlPoint;};
00094 inline const SFNode &getTexCoord() const {return _texCoord;};
00096 inline SFInt32 getUTesselation() const {return _uTesselation;};
00098 inline SFInt32 getVTesselation() const {return _vTesselation;};
00100 inline const MFDouble &getWeight() const {return _weight;};
00102 inline SFBool getCcw() const {return _ccw;};
00104 inline SFBool getSolid() const {return _solid;};
00106 inline SFInt32 getUDimension() const {return _uDimension;};
00108 inline SFInt32 getVDimension() const {return _vDimension;};
00110 inline const MFDouble &getUKnot() const {return _uKnot;};
00112 inline const MFDouble &getVKnot() const {return _vKnot;};
00114 inline SFInt32 getUOrder() const {return _uOrder;};
00116 inline SFInt32 getVOrder() const {return _vOrder;};
00117
00119 virtual bool addChild(const SFAbstractNode &N);
00121 virtual bool setChild(const SFAbstractNode &N);
00123 virtual bool removeChild(const SFAbstractNode &N);
00124
00126 virtual void load(const X3DFileElement *element);
00128 virtual SFString write() const;
00129
00130 protected:
00132 NurbsSurface(const NurbsSurface &N);
00133
00134 private:
00136 MFVec3f _controlPoint;
00138 SFNode _texCoord;
00140 SFInt32 _uTesselation;
00142 SFInt32 _vTesselation;
00144 MFDouble _weight;
00146 SFBool _ccw;
00148 SFBool _solid;
00150 SFInt32 _uDimension;
00152 SFInt32 _vDimension;
00154 MFDouble _uKnot;
00156 MFDouble _vKnot;
00158 SFInt32 _uOrder;
00160 SFInt32 _vOrder;
00161 };
00162
00163 }
00164 }
00165
00166 #endif