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
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
00049 class KFbxPatch;
00050 class KFbxSdkManager;
00051
00052
00062 class KFBX_DLL KFbxNurb : public KFbxGeometry
00063 {
00064 KFBXOBJECT_DECLARE(KFbxNurb,KFbxGeometry);
00065 public:
00067 virtual EAttributeType GetAttributeType() const;
00068
00070 void Reset();
00071
00076
00080 void SetSurfaceMode(KFbxGeometry::ESurfaceMode pMode);
00081
00085 inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
00086
00092 typedef enum
00093 {
00094 ePERIODIC,
00095 eCLOSED,
00096 eOPEN
00097 } ENurbType;
00098
00107 void InitControlPoints(int pUCount, ENurbType pUType, int pVCount, ENurbType pVType);
00108
00112 inline int GetUCount() const {return mUCount;}
00113
00117 inline int GetVCount() const {return mVCount;}
00118
00122 inline ENurbType GetNurbUType() const {return mUType;}
00123
00127 inline ENurbType GetNurbVType() const {return mVType;}
00128
00132 int GetUKnotCount() const;
00133
00137 double* GetUKnotVector() const;
00138
00142 int GetVKnotCount() const;
00143
00147 double* GetVKnotVector() const;
00148
00154 int* GetUMultiplicityVector() const;
00155
00161 int* GetVMultiplicityVector() const;
00162
00167 void SetOrder(kUInt pUOrder, kUInt pVOrder);
00168
00172 inline int GetUOrder() const {return mUOrder;}
00173
00177 inline int GetVOrder() const {return mVOrder;}
00178
00184 void SetStep(int pUStep, int pVStep);
00185
00189 inline int GetUStep() const {return mUStep;}
00190
00194 inline int GetVStep() const {return mVStep;}
00195
00200 int GetUSpanCount() const;
00201
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
00251 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00252
00253 public:
00254
00255
00256 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;
00257
00258 protected:
00259
00260 KFbxNurb(KFbxSdkManager& pManager, char const* pName);
00261 virtual ~KFbxNurb();
00262
00263 virtual void Destruct(bool pRecursive, bool pDependents);
00264
00266 KFbxNurb& operator=(KFbxNurb const& pNurb);
00267
00268 virtual KString GetTypeName() const;
00269 virtual KStringList GetTypeFlags() const;
00270
00271 kUInt mUOrder, mVOrder;
00272 int mUCount, mVCount;
00273 int mUStep, mVStep;
00274 ENurbType mUType, mVType;
00275
00276 double* mUKnotVector;
00277 double* mVKnotVector;
00278
00279 int* mUMultiplicityVector;
00280 int* mVMultiplicityVector;
00281
00282 ESurfaceMode mSurfaceMode;
00283
00284
00285 bool mApplyFlipUV;
00286 bool mApplyFlipLinks;
00287
00288 public:
00289
00290 typedef enum
00291 {
00292 eNurbTypeUnknown,
00293 eWrongNumberOfControlPoint,
00294 eWeightTooSmall,
00295 eUMultiplicityVectorError,
00296 eVMultiplicityVectorError,
00297 eUKnotVectorError,
00298 eVKnotVectorError,
00299 eErrorCount
00300 } EError;
00301
00302 protected:
00303 friend class KFbxGeometryConverter;
00304
00305 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00306
00307 };
00308
00309 typedef KFbxNurb* HKFbxNurb;
00310
00311 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00312
00313 #endif // FBXFILESDK_KFBXPLUGINS_KFBXNURB_H
00314