kfbxnurb.h
Go to the documentation of this file.00001
00004 #ifndef _FBXSDK_NURB_H_
00005 #define _FBXSDK_NURB_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 <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044 #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046
00047 #include <kaydara.h>
00048
00049 #include <kfbxplugins/kfbxgeometry.h>
00050
00051 #include <fbxfilesdk_nsbegin.h>
00052
00053 class KFbxPatch;
00054 class KFbxSdkManager;
00055 class KFbxNurb_internal;
00056
00057
00067 class KFBX_DLL KFbxNurb : public KFbxGeometry
00068 {
00069 KFBXOBJECT_DECLARE(KFbxNurb);
00070 public:
00072 virtual EAttributeType GetAttributeType() const;
00073
00075 void Reset();
00076
00081
00085 void SetSurfaceMode(KFbxGeometry::ESurfaceMode pMode);
00086
00090 inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
00091
00097 typedef enum
00098 {
00099 ePERIODIC,
00100 eCLOSED,
00101 eOPEN
00102 } ENurbType;
00103
00112 void InitControlPoints(int pUCount, ENurbType pUType, int pVCount, ENurbType pVType);
00113
00117 inline int GetUCount() const {return mUCount;}
00118
00122 inline int GetVCount() const {return mVCount;}
00123
00127 inline ENurbType GetNurbUType() const {return mUType;}
00128
00132 inline ENurbType GetNurbVType() const {return mVType;}
00133
00137 int GetUKnotCount() const;
00138
00142 double* GetUKnotVector() const;
00143
00147 int GetVKnotCount() const;
00148
00152 double* GetVKnotVector() const;
00153
00159 int* GetUMultiplicityVector() const;
00160
00166 int* GetVMultiplicityVector() const;
00167
00172 void SetOrder(kUInt pUOrder, kUInt pVOrder);
00173
00177 inline int GetUOrder() const {return mUOrder;}
00178
00182 inline int GetVOrder() const {return mVOrder;}
00183
00189 void SetStep(int pUStep, int pVStep);
00190
00194 inline int GetUStep() const {return mUStep;}
00195
00199 inline int GetVStep() const {return mVStep;}
00200
00205 int GetUSpanCount() const;
00206
00211 int GetVSpanCount() const;
00212
00214
00219
00223 void SetApplyFlipUV(bool pFlag);
00224
00228 bool GetApplyFlipUV() const;
00229
00233 void SetApplyFlipLinks(bool pFlag);
00234
00238 bool GetApplyFlipLinks() const;
00239
00243 bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
00244
00246
00248
00249
00250
00251
00252
00253
00255
00256 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00257
00258 public:
00259
00260 virtual KObject* GetFbxObject_internal();
00261 virtual KObject const* GetFbxObject_internal() const;
00262
00263
00264 virtual KFbxObject* Clone(KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;
00265
00266 protected:
00267 static char const* GetNamePrefix() { return 0; }
00268
00269 KFbxNurb(KFbxSdkManager& pManager, char const* pName);
00270 virtual ~KFbxNurb();
00271
00272 virtual void Destruct(bool pRecursive, bool pDependents);
00273
00275 KFbxNurb& operator=(KFbxNurb const& pNurb);
00276
00277 virtual KString GetTypeName() const;
00278 virtual KStringList GetTypeFlags() const;
00279
00280 kUInt mUOrder, mVOrder;
00281 int mUCount, mVCount;
00282 int mUStep, mVStep;
00283 ENurbType mUType, mVType;
00284
00285 double* mUKnotVector;
00286 double* mVKnotVector;
00287
00288 int* mUMultiplicityVector;
00289 int* mVMultiplicityVector;
00290
00291 ESurfaceMode mSurfaceMode;
00292
00293
00294 bool mApplyFlipUV;
00295 bool mApplyFlipLinks;
00296
00297
00298 typedef enum
00299 {
00300 eNurbTypeUnknown,
00301 eWrongNumberOfControlPoint,
00302 eWeightTooSmall,
00303 eUMultiplicityVectorError,
00304 eVMultiplicityVectorError,
00305 eUKnotVectorError,
00306 eVKnotVectorError,
00307 eErrorCount
00308 } EError;
00309
00310
00311 KFbxNurb_internal* mPH;
00312
00313 friend class KFbxReaderFbx;
00314 friend class KFbxReaderFbx6;
00315 friend class KFbxWriterFbx;
00316 friend class KFbxWriterFbx6;
00317 friend class KFbxGeometryConverter;
00318
00319 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00320
00321 };
00322
00323 typedef KFbxNurb* HKFbxNurb;
00324
00325 #include <fbxfilesdk_nsend.h>
00326
00327 #endif // #ifndef _FBXSDK_NURB_H_
00328
00329