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
00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044
00045 #include <fbxfilesdk/kfbxplugins/kfbxgeometry.h>
00046
00047 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00048
00086 class KFBX_DLL KFbxNurbsCurve : public KFbxGeometry
00087 {
00088 KFBXOBJECT_DECLARE(KFbxNurbsCurve,KFbxGeometry);
00089 public:
00090
00091 virtual KFbxNodeAttribute::EAttributeType GetAttributeType() const;
00092
00097 enum EDimension
00098 {
00099 e2D = 2,
00100 e3D,
00101 eDIMENSIONS_COUNT = 2
00102 };
00103
00109 enum EType
00110 {
00111 eOPEN,
00112 eCLOSED,
00113 ePERIODIC,
00114 eTYPE_COUNT
00115 };
00116
00123 void InitControlPoints( int pCount, EType pVType );
00124
00128 inline double* GetKnotVector() const { return mKnotVector; }
00129
00133 int GetKnotCount() const;
00134
00135
00136
00137 inline void SetOrder( int pOrder ) { mOrder = pOrder; }
00138
00142 inline int GetOrder() const { return mOrder; }
00143
00149 inline void SetDimension( EDimension pDimension ) { mDimension = pDimension; }
00150
00154 inline EDimension GetDimension() const { return mDimension; }
00155
00159 bool IsRational();
00160
00161 void SetRational(bool pValue);
00162
00175 int GetSpanCount();
00176
00180 inline EType GetType() const { return mNurbType; }
00181
00187 inline bool IsPolyline() const { return ( GetOrder() == 2 ); }
00188
00194 bool IsBezier();
00195
00196
00197
00198
00200
00201
00202
00203
00204
00205
00207
00208 public:
00209
00210 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;
00211
00212 bool FullMultiplicity();
00213
00214
00215 typedef enum
00216 {
00217 eNurbCurveTypeUnknown,
00218 eWeightTooSmall,
00219 eKnotVectorError,
00220 eWrongNumberOfControlPoint,
00221
00222
00223
00224
00225
00226
00227
00228 eErrorCount
00229 } EError;
00230
00231 protected:
00232 KFbxNurbsCurve(KFbxSdkManager& pManager, char const* pName);
00233 virtual ~KFbxNurbsCurve();
00234
00238 KFbxNurbsCurve& operator=(KFbxNurbsCurve const& pNurb);
00239
00240 void Reset();
00241
00242 virtual KString GetTypeName() const;
00243 virtual KStringList GetTypeFlags() const;
00244
00245 virtual void Destruct(bool pRecursive, bool pDependents);
00246
00247 public:
00248
00249 bool mIsRational;
00250
00251 private:
00252 double* mKnotVector;
00253 EType mNurbType;
00254 int mOrder;
00255 EDimension mDimension;
00256 };
00257
00258 typedef KFbxNurbsCurve* HKFbxNurbsCurve;
00259 typedef class KFBX_DLL KArrayTemplate< KFbxNurbsCurve* > KArrayKFbxNurbsCurve;
00260
00261
00262 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00263
00264 #endif // FBXFILESDK_KFBXPLUGINS_KFBXNURBSCURVE_H
00265