00001
00004 #ifndef _FBXSDK_NURBS_CURVE_H_
00005 #define _FBXSDK_NURBS_CURVE_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 <kaydaradef.h>
00042 #ifndef KFBX_DLL
00043 #define KFBX_DLL K_DLLIMPORT
00044 #endif
00045
00046 #include <kaydara.h>
00047
00048 #include <kfbxplugins/kfbxgeometry.h>
00049
00050 #include <fbxfilesdk_nsbegin.h>
00051
00089 class KFBX_DLL KFbxNurbsCurve : public KFbxGeometry
00090 {
00091 KFBXOBJECT_DECLARE(KFbxNurbsCurve,KFbxGeometry);
00092 public:
00093
00094 virtual KFbxNodeAttribute::EAttributeType GetAttributeType() const;
00095
00100 enum EDimension
00101 {
00102 e2D = 2,
00103 e3D,
00104 eDIMENSIONS_COUNT = 2
00105 };
00106
00112 enum EType
00113 {
00114 eOPEN,
00115 eCLOSED,
00116 ePERIODIC,
00117 eTYPE_COUNT
00118 };
00119
00126 void InitControlPoints( int pCount, EType pVType );
00127
00131 inline double* GetKnotVector() const { return mKnotVector; }
00132
00136 int GetKnotCount() const;
00137
00138
00139
00140 inline void SetOrder( int pOrder ) { mOrder = pOrder; }
00141
00145 inline int GetOrder() const { return mOrder; }
00146
00152 inline void SetDimension( EDimension pDimension ) { mDimension = pDimension; }
00153
00157 inline EDimension GetDimension() const { return mDimension; }
00158
00162 bool IsRational();
00163
00176 int GetSpanCount();
00177
00181 inline EType GetType() const { return mNurbType; }
00182
00188 inline bool IsPolyline() const { return ( GetOrder() == 2 ); }
00189
00195 bool IsBezier();
00196
00197
00198
00199
00201
00202
00203
00204
00205
00206
00208
00209 public:
00210
00211 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;
00212
00213 bool FullMultiplicity();
00214
00215 protected:
00216
00217
00218 typedef enum
00219 {
00220 eNurbCurveTypeUnknown,
00221 eWeightTooSmall,
00222 eKnotVectorError,
00223 eWrongNumberOfControlPoint,
00224
00225
00226
00227
00228
00229
00230
00231 eErrorCount
00232 } EError;
00233
00234
00235 KFbxNurbsCurve(KFbxSdkManager& pManager, char const* pName);
00236 virtual ~KFbxNurbsCurve();
00237
00239 KFbxNurbsCurve& operator=(KFbxNurbsCurve const& pNurb);
00240
00241 void Reset();
00242
00243 virtual KString GetTypeName() const;
00244 virtual KStringList GetTypeFlags() const;
00245
00246 virtual void Destruct(bool pRecursive, bool pDependents);
00247
00248 private:
00249 bool mIsRational;
00250 double* mKnotVector;
00251 EType mNurbType;
00252 int mOrder;
00253 EDimension mDimension;
00254
00255 public:
00256 friend class KFbxReaderFbx;
00257 friend class KFbxReaderFbx6;
00258 friend class KFbxWriterFbx;
00259 friend class KFbxWriterFbx6;
00260 friend class KFbxReaderFbx7;
00261 friend struct KFbxReaderFbx7Impl;
00262 };
00263
00264 typedef KFbxNurbsCurve* HKFbxNurbsCurve;
00265 typedef class KFBX_DLL KArrayTemplate< KFbxNurbsCurve* > KArrayKFbxNurbsCurve;
00266
00267
00268 #include <fbxfilesdk_nsend.h>
00269
00270 #endif //_FBXSDK_NURBS_CURVE_H_
00271
00272