Go to the
documentation of this file.
00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXNURBSCURVE_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXNURBSCURVE_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <fbxfilesdk/fbxfilesdk_def.h>
00042
00043 #include <fbxfilesdk/kfbxplugins/kfbxgeometry.h>
00044 #include <fbxfilesdk/kfbxplugins/kfbxline.h>
00045
00046 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00047
00085 class KFBX_DLL KFbxNurbsCurve : public KFbxGeometry
00086 {
00087 KFBXOBJECT_DECLARE(KFbxNurbsCurve,KFbxGeometry);
00088 public:
00090 virtual KFbxNodeAttribute::EAttributeType GetAttributeType() const;
00091
00096 enum EDimension
00097 {
00098 e2D = 2,
00099 e3D,
00100 eDIMENSIONS_COUNT = 2
00101 };
00102
00108 enum EType
00109 {
00110 eOPEN,
00111 eCLOSED,
00112 ePERIODIC,
00113 eTYPE_COUNT
00114 };
00115
00122 void InitControlPoints( int pCount, EType pVType );
00123
00127 inline double* GetKnotVector() const { return mKnotVector; }
00128
00132 int GetKnotCount() const;
00133
00138 inline void SetOrder( int pOrder ) { mOrder = pOrder; }
00139
00143 inline int GetOrder() const { return mOrder; }
00144
00149 inline void SetStep( int pStep ) { mStep = pStep; }
00150
00155 inline int GetStep() const { return mStep; }
00156
00162 inline void SetDimension( EDimension pDimension ) { mDimension = pDimension; }
00163
00167 inline EDimension GetDimension() const { return mDimension; }
00168
00172 bool IsRational();
00173
00186 int GetSpanCount() const;
00187
00191 inline EType GetType() const { return mNurbType; }
00192
00198 inline bool IsPolyline() const { return ( GetOrder() == 2 ); }
00199
00204 bool IsBezier() const;
00205
00211 int TessellateCurve(KArrayTemplate<KFbxVector4>& pPointArray, int pStep = 16);
00212
00217 KFbxLine* TessellateCurve(int pStep = 16);
00218
00220
00221
00222
00223
00224
00225
00227 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00228
00229 virtual KFbxObject& Copy(const KFbxObject& pObject);
00230
00231 bool FullMultiplicity() const;
00232
00233
00234 typedef enum
00235 {
00236 eNurbCurveTypeUnknown,
00237 eWeightTooSmall,
00238 eKnotVectorError,
00239 eWrongNumberOfControlPoint,
00240
00241
00242
00243
00244
00245
00246
00247 eErrorCount
00248 } EError;
00249
00250 protected:
00251 KFbxNurbsCurve(KFbxSdkManager& pManager, char const* pName);
00252
00253 void Reset();
00254
00255 virtual void Destruct(bool pRecursive, bool pDependents);
00256
00257 public:
00258
00259 bool mIsRational;
00260
00261 private:
00262 double* mKnotVector;
00263 EType mNurbType;
00264 int mOrder;
00265 EDimension mDimension;
00266
00267 int mStep;
00268 #endif
00269 };
00270
00271 typedef KFbxNurbsCurve* HKFbxNurbsCurve;
00272 typedef class KFBX_DLL KArrayTemplate< KFbxNurbsCurve* > KArrayKFbxNurbsCurve;
00273
00274
00275 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00276
00277 #endif // FBXFILESDK_KFBXPLUGINS_KFBXNURBSCURVE_H
00278