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
00194
00195
00196
00197
00198
00199
00201 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00202
00203 virtual FbxObject& Copy(const FbxObject& pObject);
00204
00205 bool FullMultiplicity() const;
00206
00207
00208 enum EErrorCode
00209 {
00210 eNurbsCurveTypeUnknown,
00211 eWeightTooSmall,
00212 eKnotVectorError,
00213 eWrongNumberOfControlPoint,
00214 eErrorCount
00215 };
00216
00217 protected:
00218 FbxNurbsCurve(FbxManager& pManager, char const* pName);
00219
00220 void Reset();
00221
00222 virtual void Destruct(bool pRecursive, bool pDependents);
00223
00224 public:
00225
00226 bool mIsRational;
00227
00228 private:
00229 double* mKnotVector;
00230 EType mNurbsType;
00231 int mOrder;
00232 EDimension mDimension;
00233
00234 int mStep;
00235 #endif
00236 };
00237
00238 #include <fbxsdk/fbxsdk_nsend.h>
00239
00240 #endif