fbxsdk/scene/geometry/fbxnurbssurface.h Source File

fbxnurbssurface.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_
14 #define _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 class FbxNode;
23 
34 {
36 
37 public:
40 
42  void Reset();
43 
48 
52  void SetSurfaceMode(FbxGeometry::ESurfaceMode pMode);
53 
57  inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
58 
64  enum EType
65  {
68  eOpen
69  };
70 
79  void InitControlPoints(int pUCount, EType pUType, int pVCount, EType pVType);
80 
84  inline int GetUCount() const {return mUCount;}
85 
89  inline int GetVCount() const {return mVCount;}
90 
94  inline EType GetNurbsUType() const {return mUType;}
95 
99  inline EType GetNurbsVType() const {return mVType;}
100 
104  int GetUKnotCount() const;
105 
109  double* GetUKnotVector() const;
110 
114  int GetVKnotCount() const;
115 
119  double* GetVKnotVector() const;
120 
125  void SetOrder(FbxUInt pUOrder, FbxUInt pVOrder);
126 
130  inline int GetUOrder() const {return mUOrder;}
131 
135  inline int GetVOrder() const {return mVOrder;}
136 
142  void SetStep(int pUStep, int pVStep);
143 
147  inline int GetUStep() const {return mUStep;}
148 
152  inline int GetVStep() const {return mVStep;}
153 
159  int GetUSpanCount() const;
160 
166  int GetVSpanCount() const;
167 
169 
174 
178  void SetApplyFlipUV(bool pFlag);
179 
183  bool GetApplyFlipUV() const;
184 
188  void SetApplyFlipLinks(bool pFlag);
189 
193  bool GetApplyFlipLinks() const;
194 
198  bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
199 
204  void AddCurveOnSurface( FbxNode* pCurve );
205 
210  FbxNode* GetCurveOnSurface( int pIndex );
211 
216  const FbxNode* GetCurveOnSurface( int pIndex ) const;
217 
221  int GetCurveOnSurfaceCount() const;
222 
227  bool RemoveCurveOnSurface( FbxNode* pCurve );
228 
230 
234  bool IsRational() const;
235 
236 /*****************************************************************************************************************************
237 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
238 *****************************************************************************************************************************/
239 #ifndef DOXYGEN_SHOULD_SKIP_THIS
240  // Error identifiers, these are only used internally.
241  enum EErrorCode
242  {
243  eNurbsTypeUnknown,
244  eWrongNumberOfControlPoint,
245  eWeightTooSmall,
246  eUKnotVectorError,
247  eVKnotVectorError,
248  eErrorCount
249  };
250 
251  virtual FbxObject& Copy(const FbxObject& pObject);
252  virtual void InitControlPoints(int pCount) { ParentClass::InitControlPoints(pCount); }
253 
254  void SetFlipNormals(bool pFlipNormals);
255  bool GetFlipNormals() const;
256  bool IsValidKnots() const;
257 
258 protected:
259  virtual void Construct(const FbxObject* pFrom);
260  virtual void Destruct(bool pRecursive);
261 
262  FbxUInt mUOrder, mVOrder;
263  int mUCount, mVCount;
264  int mUStep, mVStep;
265  EType mUType, mVType;
266 
267  double* mUKnotVector;
268  double* mVKnotVector;
269 
270  ESurfaceMode mSurfaceMode;
271 
272  bool mApplyFlipUV;
273  bool mApplyFlipLinks;
274  bool mFlipNormals;
275 
276  friend class FbxGeometryConverter;
277 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
278 };
279 
280 #include <fbxsdk/fbxsdk_nsend.h>
281 
282 #endif /* _FBXSDK_SCENE_GEOMETRY_NURBS_SURFACE_H_ */
unsigned int FbxUInt
Definition: fbxtypes.h:40
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
FBX SDK environment definition.
virtual void InitControlPoints(int pCount)
Allocates memory space for the array of control points.
virtual FbxObject & Copy(const FbxObject &pObject)
Copy an object content into this object.
ESurfaceMode
NURBS and Patches surface modes.
Definition: fbxgeometry.h:200
int GetUStep() const
Returns the number of divisions between adjacent control points in U dimension.
EType
Node attribute types.
virtual FbxNodeAttribute::EType GetAttributeType() const
Returns the node attribute type.
int GetUCount() const
Returns the number of U-dimension control points.
The base class of most FBX objects.
Definition: fbxobject.h:157
EType GetNurbsVType() const
Returns the V-dimension NURBS type.
Represents an element in the scene graph.
Definition: fbxnode.h:72
int GetVOrder() const
Returns the NURBS order in V dimension.
int GetUOrder() const
Returns the NURBS order in U dimension.
A NURBS surface is a type of parametric geometry.
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
EType GetNurbsUType() const
Returns the U-dimension NURBS type.
int GetVCount() const
Returns the number of V-dimension control points.
ESurfaceMode GetSurfaceMode() const
Returns the surface mode.
bool GetApplyFlip() const
Returns flip flags state.
#define FBXSDK_DLL
Definition: fbxarch.h:173
int GetVStep() const
Returns the number of divisions between adjacent control points in V dimension.
The base class of geometric objects that support control point deformations (e.g. ...
Definition: fbxgeometry.h:45
This class provides the functionality to convert geometry nodes attributes (FbxMesh, FbxNurbs and FbxPatch) and mainly focuses on the two major categories: Triangulation and conversion between NURBS and Patches surfaces.
virtual void Destruct(bool pRecursive)
Optional destructor override, automatically called by default destructor.