Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_SCENE_GEOMETRY_NURBS_CURVE_H_
00014 #define _FBXSDK_SCENE_GEOMETRY_NURBS_CURVE_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/scene/geometry/fbxgeometry.h>
00019 #include <fbxsdk/scene/geometry/fbxline.h>
00020
00021 #include <fbxsdk/fbxsdk_nsbegin.h>
00022
00060 class FBXSDK_DLL FbxNurbsCurve : public FbxGeometry
00061 {
00062 FBXSDK_OBJECT_DECLARE(FbxNurbsCurve,FbxGeometry);
00063
00064 public:
00066 virtual FbxNodeAttribute::EType GetAttributeType() const;
00067
00072 enum EDimension
00073 {
00074 e2D = 2,
00075 e3D
00076 };
00077
00083 enum EType
00084 {
00085 eOpen,
00086 eClosed,
00087 ePeriodic
00088 };
00089
00096 void InitControlPoints( int pCount, EType pVType );
00097
00101 inline double* GetKnotVector() const { return mKnotVector; }
00102
00106 int GetKnotCount() const;
00107
00112 inline void SetOrder( int pOrder ) { mOrder = pOrder; }
00113
00117 inline int GetOrder() const { return mOrder; }
00118
00123 inline void SetStep( int pStep ) { mStep = pStep; }
00124
00129 inline int GetStep() const { return mStep; }
00130
00136 inline void SetDimension( EDimension pDimension ) { mDimension = pDimension; }
00137
00141 inline EDimension GetDimension() const { return mDimension; }
00142
00146 bool IsRational();
00147
00160 int GetSpanCount() const;
00161
00165 inline EType GetType() const { return mNurbsType; }
00166
00172 inline bool IsPolyline() const { return ( GetOrder() == 2 ); }
00173
00178 bool IsBezier() const;
00179
00185 int TessellateCurve(FbxArray<FbxVector4>& pPointArray, int pStep = 16);
00186
00191 FbxLine* TessellateCurve(int pStep = 16);
00192
00193
00194
00195
00196 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00197 virtual FbxObject& Copy(const FbxObject& pObject);
00198
00199 bool FullMultiplicity() const;
00200
00201
00202 enum EErrorCode
00203 {
00204 eNurbsCurveTypeUnknown,
00205 eWeightTooSmall,
00206 eKnotVectorError,
00207 eWrongNumberOfControlPoint,
00208 eErrorCount
00209 };
00210
00211 bool mIsRational;
00212
00213 protected:
00214 virtual void Construct(const FbxNurbsCurve* pFrom);
00215 virtual void Destruct(bool pRecursive);
00216
00217 void Reset();
00218
00219 private:
00220 double* mKnotVector;
00221 EType mNurbsType;
00222 int mOrder;
00223 EDimension mDimension;
00224 int mStep;
00225 #endif
00226 };
00227
00228 #include <fbxsdk/fbxsdk_nsend.h>
00229
00230 #endif