kfbxnurbssurface.h
Go to the documentation of this file.00001
00004 #ifndef _FBXSDK_NURBS_SURFACE_H_
00005 #define _FBXSDK_NURBS_SURFACE_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/kfbxnode.h>
00050 #include <kfbxplugins/kfbxgeometry.h>
00051
00052 #include <fbxfilesdk_nsbegin.h>
00053
00054 class KFbxPatch;
00055 class KFbxSdkManager;
00056 class KFbxNurbsSurface_internal;
00057
00067 class KFBX_DLL KFbxNurbsSurface : public KFbxGeometry
00068 {
00069 KFBXOBJECT_DECLARE(KFbxNurbsSurface);
00070 public:
00072 virtual EAttributeType GetAttributeType() const { return KFbxNodeAttribute::eNURBS_SURFACE; }
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
00160
00166
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
00201
00202
00203
00204
00205 int GetUSpanCount() const;
00206
00207
00208
00209
00210
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
00249 void AddCurveOnSurface( KFbxNode* pCurve );
00250
00251
00252
00253
00254
00255 KFbxNode* GetCurveOnSurface( int pIndex );
00256 KFbxNode const* GetCurveOnSurface( int pIndex ) const;
00257
00258
00259
00260 int GetCurveOnSurfaceCount() const;
00261
00262
00263
00264
00265
00266 bool RemoveCurveOnSurface( KFbxNode* pCurve );
00267
00269
00273 bool IsRational();
00274
00275
00277
00278
00279
00280
00281
00282
00284
00285
00286 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00287
00288 public:
00289
00290 void SetFlipNormals(bool pFlipNormals);
00291
00292 bool GetFlipNormals() const;
00293
00294
00295 virtual KObject* GetFbxObject_internal();
00296 virtual KObject const* GetFbxObject_internal() const;
00297
00298
00299 virtual KFbxObject* Clone(KFbxObject::ECloneType pCloneType = eDEEP_CLONE) const;
00300
00301 protected:
00302
00303 static char const* GetNamePrefix() { return 0; }
00304
00305 KFbxNurbsSurface(KFbxSdkManager& pManager, char const* pName);
00306 virtual ~KFbxNurbsSurface();
00307
00308 virtual void Destruct(bool pRecursive, bool pDependents);
00309
00311 KFbxNurbsSurface& operator=(KFbxNurbsSurface const& pNurb);
00312
00313 virtual KString GetTypeName() const;
00314 virtual KStringList GetTypeFlags() const;
00315
00316 kUInt mUOrder, mVOrder;
00317 int mUCount, mVCount;
00318 int mUStep, mVStep;
00319 ENurbType mUType, mVType;
00320
00321 double* mUKnotVector;
00322 double* mVKnotVector;
00323
00324
00325
00326
00327 ESurfaceMode mSurfaceMode;
00328
00329
00330 bool mApplyFlipUV;
00331 bool mApplyFlipLinks;
00332
00333 bool mFlipNormals;
00334
00335
00336 typedef enum
00337 {
00338 eNurbTypeUnknown,
00339 eWrongNumberOfControlPoint,
00340 eWeightTooSmall,
00341
00342
00343 eUKnotVectorError,
00344 eVKnotVectorError,
00345 eErrorCount
00346 } EError;
00347
00348
00349 KFbxNurbsSurface_internal* mPH;
00350
00351 friend class KFbxReaderFbx;
00352 friend class KFbxReaderFbx6;
00353 friend class KFbxWriterFbx;
00354 friend class KFbxWriterFbx6;
00355 friend class KFbxGeometryConverter;
00356
00357 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00358
00359 };
00360
00361 typedef KFbxNurbsSurface* HKFbxNurbsSurface;
00362
00363 #include <fbxfilesdk_nsend.h>
00364
00365 #endif // #ifndef _FBXSDK_NURBS_SURFACE_H_
00366
00367