00001 00002 // NurbsPositionInterpolator.h // 00004 00005 #ifndef NURBSPOSITIONINTERPOLATOR 00006 #define NURBSPOSITIONINTERPOLATOR 00007 00008 #include "X3DTypes.h" 00009 #include "X3DInterpolatorNode.h" 00010 00011 namespace X3DTK { 00012 namespace X3D { 00013 00018 00019 class NurbsPositionInterpolator : public X3DInterpolatorNode 00020 { 00021 public: 00023 NurbsPositionInterpolator(); 00025 NurbsPositionInterpolator(SFBool fractionAbsolute, 00026 SFInt32 dimension, 00027 const MFFloat &key, 00028 const MFVec3f &keyValue, 00029 const MFDouble &keyWeight, 00030 const MFDouble &knot, 00031 SFInt32 order); 00033 virtual SFNode clone() const; 00035 virtual ~NurbsPositionInterpolator(); 00036 00038 void setFractionAbsolute(SFBool fractionAbsolute); 00040 void setDimension(SFInt32 dimension); 00042 void setKeyValue(const MFVec3f &keyValue); 00044 void setKeyWeight(const MFDouble &keyWeight); 00046 void setKnot(const MFDouble &knot); 00048 void setOrder(SFInt32 order); 00049 00051 inline SFBool getFractionAbsolute() const {return _fractionAbsolute;}; 00053 inline SFInt32 getDimenstion() const {return _dimension;}; 00055 inline const MFVec3f &getKeyValue() const {return _keyValue;}; 00057 inline const MFDouble &getKeyWeight() const {return _keyWeight;}; 00059 inline const MFDouble &getKnot() const {return _knot;}; 00061 inline SFInt32 getOrder() const {return _order;}; 00062 00064 virtual void load(const X3DFileElement *element); 00066 virtual SFString write() const; 00067 00068 protected: 00070 NurbsPositionInterpolator(const NurbsPositionInterpolator &N); 00071 00072 private: 00074 SFBool _fractionAbsolute; 00076 SFInt32 _dimension; 00078 MFVec3f _keyValue; 00080 MFDouble _keyWeight; 00082 MFDouble _knot; 00084 SFInt32 _order; 00085 }; 00086 00087 } 00088 } 00089 00090 #endif