00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXNURB_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXNURB_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
00045 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00046
00047 class KFbxPatch;
00048 class KFbxSdkManager;
00049
00050
00060 class KFBX_DLL KFbxNurb : public KFbxGeometry
00061 {
00062 KFBXOBJECT_DECLARE(KFbxNurb,KFbxGeometry);
00063 public:
00065 virtual EAttributeType GetAttributeType() const;
00066
00068 void Reset();
00069
00074
00078 void SetSurfaceMode(KFbxGeometry::ESurfaceMode pMode);
00079
00083 inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
00084
00090 typedef enum
00091 {
00092 ePERIODIC,
00093 eCLOSED,
00094 eOPEN
00095 } ENurbType;
00096
00105 void InitControlPoints(int pUCount, ENurbType pUType, int pVCount, ENurbType pVType);
00106
00110 inline int GetUCount() const {return mUCount;}
00111
00115 inline int GetVCount() const {return mVCount;}
00116
00120 inline ENurbType GetNurbUType() const {return mUType;}
00121
00125 inline ENurbType GetNurbVType() const {return mVType;}
00126
00130 int GetUKnotCount() const;
00131
00135 double* GetUKnotVector() const;
00136
00140 int GetVKnotCount() const;
00141
00145 double* GetVKnotVector() const;
00146
00152 int* GetUMultiplicityVector() const;
00153
00159 int* GetVMultiplicityVector() const;
00160
00165 void SetOrder(kUInt pUOrder, kUInt pVOrder);
00166
00170 inline int GetUOrder() const {return mUOrder;}
00171
00175 inline int GetVOrder() const {return mVOrder;}
00176
00182 void SetStep(int pUStep, int pVStep);
00183
00187 inline int GetUStep() const {return mUStep;}
00188
00192 inline int GetVStep() const {return mVStep;}
00193
00199 int GetUSpanCount() const;
00200
00206 int GetVSpanCount() const;
00207
00209
00214
00218 void SetApplyFlipUV(bool pFlag);
00219
00223 bool GetApplyFlipUV() const;
00224
00228 void SetApplyFlipLinks(bool pFlag);
00229
00233 bool GetApplyFlipLinks() const;
00234
00238 bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
00239
00241
00243
00244
00245
00246
00247
00248
00250 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00251
00252 virtual KFbxObject& Copy(const KFbxObject& pObject);
00253 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;
00254
00255 protected:
00256
00257 KFbxNurb(KFbxSdkManager& pManager, char const* pName);
00258
00259 virtual void Destruct(bool pRecursive, bool pDependents);
00260
00261 virtual KString GetTypeName() const;
00262
00263 kUInt mUOrder, mVOrder;
00264 int mUCount, mVCount;
00265 int mUStep, mVStep;
00266 ENurbType mUType, mVType;
00267
00268 double* mUKnotVector;
00269 double* mVKnotVector;
00270
00271 int* mUMultiplicityVector;
00272 int* mVMultiplicityVector;
00273
00274 ESurfaceMode mSurfaceMode;
00275
00276
00277 bool mApplyFlipUV;
00278 bool mApplyFlipLinks;
00279
00280 public:
00281
00282 typedef enum
00283 {
00284 eNurbTypeUnknown,
00285 eWrongNumberOfControlPoint,
00286 eWeightTooSmall,
00287 eUMultiplicityVectorError,
00288 eVMultiplicityVectorError,
00289 eUKnotVectorError,
00290 eVKnotVectorError,
00291 eErrorCount
00292 } EError;
00293
00294 protected:
00295 friend class KFbxGeometryConverter;
00296
00297 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00298
00299 };
00300
00301 typedef KFbxNurb* HKFbxNurb;
00302
00303 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00304
00305 #endif // FBXFILESDK_KFBXPLUGINS_KFBXNURB_H
00306