- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxnurbssurface.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_
    00014 #define _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/scene/geometry/fbxnode.h>
    00019 #include <fbxsdk/scene/geometry/fbxgeometry.h>
    00020
    00021 #include <fbxsdk/fbxsdk_nsbegin.h>
    00022
    00023 class FbxPatch;
    00024 class FbxManager;
    00025
    00035 class FBXSDK_DLL FbxNurbsSurface : public FbxGeometry
    00036 {
    00037     FBXSDK_OBJECT_DECLARE(FbxNurbsSurface,FbxGeometry);
    00038 public:
    00040     virtual FbxNodeAttribute::EType GetAttributeType() const;
    00041
    00043     void Reset();
    00044
    00049
    00053     void SetSurfaceMode(FbxGeometry::ESurfaceMode pMode);
    00054
    00058     inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
    00059
    00065     enum EType
    00066     {
    00067         ePeriodic,
    00068         eClosed,
    00069         eOpen
    00070     };
    00071
    00080     void InitControlPoints(int pUCount, EType pUType, int pVCount, EType pVType);
    00081
    00085     inline int GetUCount() const {return mUCount;}
    00086
    00090     inline int GetVCount() const {return mVCount;}
    00091
    00095     inline EType GetNurbsUType() const {return mUType;}
    00096
    00100     inline EType GetNurbsVType() const {return mVType;}
    00101
    00105     int GetUKnotCount() const;
    00106
    00110     double* GetUKnotVector() const;
    00111
    00115     int GetVKnotCount() const;
    00116
    00120     double* GetVKnotVector() const;
    00121
    00126     void SetOrder(FbxUInt pUOrder, FbxUInt pVOrder);
    00127
    00131     inline int GetUOrder() const {return mUOrder;}
    00132
    00136     inline int GetVOrder() const {return mVOrder;}
    00137
    00143     void SetStep(int pUStep, int pVStep);
    00144
    00148     inline int GetUStep() const {return mUStep;}
    00149
    00153     inline int GetVStep() const {return mVStep;}
    00154
    00160     int GetUSpanCount() const;
    00161
    00167     int GetVSpanCount() const;
    00168
    00170
    00175
    00179     void SetApplyFlipUV(bool pFlag);
    00180
    00184     bool GetApplyFlipUV() const;
    00185
    00189     void SetApplyFlipLinks(bool pFlag);
    00190
    00194     bool GetApplyFlipLinks() const;
    00195
    00199     bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
    00200
    00205     void AddCurveOnSurface( FbxNode* pCurve );
    00206
    00211     FbxNode* GetCurveOnSurface( int pIndex );
    00212
    00217     FbxNode const* GetCurveOnSurface( int pIndex ) const;
    00218
    00222     int GetCurveOnSurfaceCount() const;
    00223
    00228     bool RemoveCurveOnSurface( FbxNode* pCurve );
    00229
    00231
    00235     bool IsRational() const;
    00236
    00237
    00239 //
    00240 //  WARNING!
    00241 //
    00242 //  Anything beyond these lines may not be documented accurately and is
    00243 //  subject to change without notice.
    00244 //
    00246 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00247
    00248     virtual FbxObject& Copy(const FbxObject& pObject);
    00249
    00250     void SetFlipNormals(bool pFlipNormals);
    00251     bool GetFlipNormals() const;
    00252
    00253     bool IsValidKnots() const;
    00254 protected:
    00255     FbxNurbsSurface(FbxManager& pManager, char const* pName);
    00256     virtual void Destruct(bool pRecursive, bool pDependents);
    00257
    00258     FbxUInt mUOrder, mVOrder;
    00259     int mUCount, mVCount;
    00260     int mUStep, mVStep;
    00261     EType mUType, mVType;
    00262
    00263     double* mUKnotVector;
    00264     double* mVKnotVector;
    00265
    00266     //int* mUMultiplicityVector;
    00267     //int* mVMultiplicityVector;
    00268
    00269     ESurfaceMode mSurfaceMode;
    00270
    00271     // Export flags.
    00272     bool mApplyFlipUV;
    00273     bool mApplyFlipLinks;
    00274
    00275     bool mFlipNormals;
    00276
    00277 public:
    00278     // Error identifiers, these are only used internally.
    00279     enum EErrorCode
    00280     {
    00281         eNurbsTypeUnknown,
    00282         eWrongNumberOfControlPoint,
    00283         eWeightTooSmall,
    00284         eUKnotVectorError,
    00285         eVKnotVectorError,
    00286         eErrorCount
    00287     };
    00288
    00289 protected:
    00290     friend class FbxGeometryConverter;
    00291
    00292 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00293
    00294 };
    00295
    00296 #include <fbxsdk/fbxsdk_nsend.h>
    00297
    00298 #endif /* _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_ */