00001 00002 00003 00005 00006 00011 00016 00021 // NurbsPositionInterpolator.h // 00023 00024 #ifndef NURBSPOSITIONINTERPOLATOR 00025 #define NURBSPOSITIONINTERPOLATOR 00026 00027 #include "X3DTypes.h" 00028 #include "X3DInterpolatorNode.h" 00029 00030 namespace X3DTK { 00031 namespace X3D { 00032 00037 00038 class NurbsPositionInterpolator : public X3DInterpolatorNode 00039 { 00040 public: 00042 NurbsPositionInterpolator(); 00044 NurbsPositionInterpolator(SFBool fractionAbsolute, 00045 SFInt32 dimension, 00046 const MFFloat &key, 00047 const MFVec3f &keyValue, 00048 const MFDouble &keyWeight, 00049 const MFDouble &knot, 00050 SFInt32 order); 00052 virtual SFNode clone() const; 00054 virtual ~NurbsPositionInterpolator(); 00055 00057 void setFractionAbsolute(SFBool fractionAbsolute); 00059 void setDimension(SFInt32 dimension); 00061 void setKeyValue(const MFVec3f &keyValue); 00063 void setKeyWeight(const MFDouble &keyWeight); 00065 void setKnot(const MFDouble &knot); 00067 void setOrder(SFInt32 order); 00068 00070 inline SFBool getFractionAbsolute() const {return _fractionAbsolute;}; 00072 inline SFInt32 getDimenstion() const {return _dimension;}; 00074 inline const MFVec3f &getKeyValue() const {return _keyValue;}; 00076 inline const MFDouble &getKeyWeight() const {return _keyWeight;}; 00078 inline const MFDouble &getKnot() const {return _knot;}; 00080 inline SFInt32 getOrder() const {return _order;}; 00081 00083 virtual void load(const X3DFileElement *element); 00085 virtual SFString write() const; 00086 00087 protected: 00089 NurbsPositionInterpolator(const NurbsPositionInterpolator &N); 00090 00091 private: 00093 SFBool _fractionAbsolute; 00095 SFInt32 _dimension; 00097 MFVec3f _keyValue; 00099 MFDouble _keyWeight; 00101 MFDouble _knot; 00103 SFInt32 _order; 00104 }; 00105 00106 } 00107 } 00108 00109 #endif