00001
00002
00003
00005
00006
00011
00016
00021
00023
00024 #ifndef NURBSCURVE2D
00025 #define NURBSCURVE2D
00026
00027 #include "X3DTypes.h"
00028 #include "X3DParametricGeometryNode.h"
00029
00030 namespace X3DTK {
00031 namespace X3D {
00032
00037
00038 class NurbsCurve2D : public X3DParametricGeometryNode
00039 {
00040 public:
00042 NurbsCurve2D();
00044 NurbsCurve2D(const MFVec2f &controlPoint,
00045 SFInt32 tesselation,
00046 const MFDouble &weight,
00047 const MFDouble &knot,
00048 SFInt32 order);
00050 virtual SFNode clone() const;
00052 virtual ~NurbsCurve2D();
00053
00055 void setControlPoint(const MFVec2f &controlPoint);
00057 void setTesselation(SFInt32 tesselation);
00059 void setWeight(const MFDouble &weight);
00061 void setKnot(const MFDouble &knot);
00063 void setOrder(SFInt32 order);
00064
00066 inline const MFVec2f &getControlPoint() const {return _controlPoint;};
00068 inline SFInt32 getTesselation() const {return _tesselation;};
00070 inline const MFDouble &getWeight() const {return _weight;};
00072 inline const MFDouble &getKnot() const {return _knot;};
00074 inline SFInt32 getOrder() const {return _order;};
00075
00077 virtual void load(const X3DFileElement *element);
00079 virtual SFString write() const;
00080
00081 protected:
00083 NurbsCurve2D(const NurbsCurve2D &N);
00084
00085 private:
00087 MFVec2f _controlPoint;
00089 SFInt32 _tesselation;
00091 MFDouble _weight;
00093 MFDouble _knot;
00095 SFInt32 _order;
00096 };
00097
00098 }
00099 }
00100
00101 #endif