Go to the
documentation of this file.
00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXNURBSSURFACE_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXNURBSSURFACE_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/kfbxnode.h>
00044 #include <fbxfilesdk/kfbxplugins/kfbxgeometry.h>
00045
00046 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00047
00048 class KFbxPatch;
00049 class KFbxSdkManager;
00050
00060 class KFBX_DLL KFbxNurbsSurface : public KFbxGeometry
00061 {
00062 KFBXOBJECT_DECLARE(KFbxNurbsSurface,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
00151 void SetOrder(kUInt pUOrder, kUInt pVOrder);
00152
00156 inline int GetUOrder() const {return mUOrder;}
00157
00161 inline int GetVOrder() const {return mVOrder;}
00162
00168 void SetStep(int pUStep, int pVStep);
00169
00173 inline int GetUStep() const {return mUStep;}
00174
00178 inline int GetVStep() const {return mVStep;}
00179
00185 int GetUSpanCount() const;
00186
00192 int GetVSpanCount() const;
00193
00195
00200
00204 void SetApplyFlipUV(bool pFlag);
00205
00209 bool GetApplyFlipUV() const;
00210
00214 void SetApplyFlipLinks(bool pFlag);
00215
00219 bool GetApplyFlipLinks() const;
00220
00224 bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
00225
00230 void AddCurveOnSurface( KFbxNode* pCurve );
00231
00236 KFbxNode* GetCurveOnSurface( int pIndex );
00237
00242 KFbxNode const* GetCurveOnSurface( int pIndex ) const;
00243
00247 int GetCurveOnSurfaceCount() const;
00248
00253 bool RemoveCurveOnSurface( KFbxNode* pCurve );
00254
00256
00260 bool IsRational() const;
00261
00262
00264
00265
00266
00267
00268
00269
00271 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00272
00273 virtual KFbxObject& Copy(const KFbxObject& pObject);
00274
00275 void SetFlipNormals(bool pFlipNormals);
00276 bool GetFlipNormals() const;
00277
00278 bool IsValidKnots() const;
00279 protected:
00280 KFbxNurbsSurface(KFbxSdkManager& pManager, char const* pName);
00281 virtual void Destruct(bool pRecursive, bool pDependents);
00282
00283 kUInt mUOrder, mVOrder;
00284 int mUCount, mVCount;
00285 int mUStep, mVStep;
00286 ENurbType mUType, mVType;
00287
00288 double* mUKnotVector;
00289 double* mVKnotVector;
00290
00291
00292
00293
00294 ESurfaceMode mSurfaceMode;
00295
00296
00297 bool mApplyFlipUV;
00298 bool mApplyFlipLinks;
00299
00300 bool mFlipNormals;
00301
00302 public:
00303
00304 typedef enum
00305 {
00306 eNurbTypeUnknown,
00307 eWrongNumberOfControlPoint,
00308 eWeightTooSmall,
00309
00310
00311 eUKnotVectorError,
00312 eVKnotVectorError,
00313 eErrorCount
00314 } EError;
00315
00316 protected:
00317 friend class KFbxGeometryConverter;
00318
00319 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00320
00321 };
00322
00323 typedef KFbxNurbsSurface* HKFbxNurbsSurface;
00324
00325 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00326
00327 #endif // FBXFILESDK_KFBXPLUGINS_KFBXNURBSSURFACE_H
00328