fbxsdk/scene/geometry/fbxnurbssurface.h Source File
 
 
 
fbxsdk/scene/geometry/fbxnurbssurface.h
Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2013 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/fbxgeometry.h>
00019 
00020 #include <fbxsdk/fbxsdk_nsbegin.h>
00021 
00022 class FbxNode;
00023 
00033 class FBXSDK_DLL FbxNurbsSurface : public FbxGeometry
00034 {
00035     FBXSDK_OBJECT_DECLARE(FbxNurbsSurface, FbxGeometry);
00036 
00037 public:
00039     virtual FbxNodeAttribute::EType GetAttributeType() const;
00040 
00042     void Reset();
00043 
00048 
00052     void SetSurfaceMode(FbxGeometry::ESurfaceMode pMode);
00053 
00057     inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
00058 
00064     enum EType
00065     {
00066         ePeriodic,
00067         eClosed,
00068         eOpen
00069     };
00070 
00079     void InitControlPoints(int pUCount, EType pUType, int pVCount, EType pVType);
00080 
00084     inline int GetUCount() const {return mUCount;}
00085 
00089     inline int GetVCount() const {return mVCount;}
00090 
00094     inline EType GetNurbsUType() const {return mUType;}
00095 
00099     inline EType GetNurbsVType() const {return mVType;}
00100 
00104     int GetUKnotCount() const;
00105 
00109     double* GetUKnotVector() const;
00110 
00114     int GetVKnotCount() const;
00115 
00119     double* GetVKnotVector() const;
00120 
00125     void SetOrder(FbxUInt pUOrder, FbxUInt pVOrder);
00126 
00130     inline int GetUOrder() const {return mUOrder;}
00131 
00135     inline int GetVOrder() const {return mVOrder;}
00136 
00142     void SetStep(int pUStep, int pVStep);
00143 
00147     inline int GetUStep() const {return mUStep;}
00148 
00152     inline int GetVStep() const {return mVStep;}
00153 
00159     int GetUSpanCount() const;
00160 
00166     int GetVSpanCount() const;
00167 
00169 
00174 
00178     void SetApplyFlipUV(bool pFlag);
00179 
00183     bool GetApplyFlipUV() const;
00184 
00188     void SetApplyFlipLinks(bool pFlag);
00189 
00193     bool GetApplyFlipLinks() const;
00194 
00198     bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
00199 
00204     void AddCurveOnSurface( FbxNode* pCurve );
00205 
00210     FbxNode* GetCurveOnSurface( int pIndex );
00211 
00216     const FbxNode* GetCurveOnSurface( int pIndex ) const;
00217 
00221     int GetCurveOnSurfaceCount() const;
00222 
00227     bool RemoveCurveOnSurface( FbxNode* pCurve );
00228 
00230 
00234     bool IsRational() const;
00235 
00236 /*****************************************************************************************************************************
00237 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
00238 *****************************************************************************************************************************/
00239 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00240     // Error identifiers, these are only used internally.
00241     enum EErrorCode
00242     {
00243         eNurbsTypeUnknown,
00244         eWrongNumberOfControlPoint,
00245         eWeightTooSmall,
00246         eUKnotVectorError,
00247         eVKnotVectorError,
00248         eErrorCount
00249     };
00250 
00251     virtual FbxObject& Copy(const FbxObject& pObject);
00252 
00253     void SetFlipNormals(bool pFlipNormals);
00254     bool GetFlipNormals() const;
00255     bool IsValidKnots() const;
00256 
00257 protected:
00258         virtual void Construct(const FbxNurbsSurface* pFrom);
00259     virtual void Destruct(bool pRecursive);
00260 
00261     FbxUInt mUOrder, mVOrder;
00262     int mUCount, mVCount;
00263     int mUStep, mVStep;
00264     EType mUType, mVType;
00265 
00266     double* mUKnotVector;
00267     double* mVKnotVector;
00268 
00269     ESurfaceMode mSurfaceMode;
00270 
00271     bool mApplyFlipUV;
00272     bool mApplyFlipLinks;
00273     bool mFlipNormals;
00274 
00275     friend class FbxGeometryConverter;
00276 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
00277 };
00278 
00279 #include <fbxsdk/fbxsdk_nsend.h>
00280 
00281 #endif /* _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_ */