fbxsdk/scene/geometry/fbxnurbs.h Source File

fbxnurbs.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_H_
14 #define _FBXSDK_SCENE_GEOMETRY_NURBS_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
32 {
34 
35 public:
38 
40  void Reset();
41 
46 
50  void SetSurfaceMode(FbxGeometry::ESurfaceMode pMode);
51 
55  inline ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
56 
59  enum EType
60  {
63  eOpen
64  };
65 
74  void InitControlPoints(int pUCount, EType pUType, int pVCount, EType pVType);
75 
79  inline int GetUCount() const {return mUCount;}
80 
84  inline int GetVCount() const {return mVCount;}
85 
89  inline EType GetNurbsUType() const {return mUType;}
90 
94  inline EType GetNurbsVType() const {return mVType;}
95 
99  int GetUKnotCount() const;
100 
104  double* GetUKnotVector() const;
105 
109  int GetVKnotCount() const;
110 
114  double* GetVKnotVector() const;
115 
121  int* GetUMultiplicityVector() const;
122 
128  int* GetVMultiplicityVector() const;
129 
134  void SetOrder(FbxUInt pUOrder, FbxUInt pVOrder);
135 
139  inline int GetUOrder() const {return mUOrder;}
140 
144  inline int GetVOrder() const {return mVOrder;}
145 
151  void SetStep(int pUStep, int pVStep);
152 
156  inline int GetUStep() const {return mUStep;}
157 
161  inline int GetVStep() const {return mVStep;}
162 
168  int GetUSpanCount() const;
169 
175  int GetVSpanCount() const;
176 
178 
183 
187  void SetApplyFlipUV(bool pFlag);
188 
192  bool GetApplyFlipUV() const;
193 
197  void SetApplyFlipLinks(bool pFlag);
198 
202  bool GetApplyFlipLinks() const;
203 
207  bool GetApplyFlip() const { return GetApplyFlipUV() || GetApplyFlipLinks(); }
208 
210 
211 /*****************************************************************************************************************************
212 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
213 *****************************************************************************************************************************/
214 #ifndef DOXYGEN_SHOULD_SKIP_THIS
215  // Error identifiers, these are only used internally.
216  enum EErrorCode
217  {
218  eNurbsTypeUnknown,
219  eWrongNumberOfControlPoint,
220  eWeightTooSmall,
221  eUMultiplicityVectorError,
222  eVMultiplicityVectorError,
223  eUKnotVectorError,
224  eVKnotVectorError,
225  eErrorCount
226  };
227 
228  virtual FbxObject& Copy(const FbxObject& pObject);
229  virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint , int pIndex) { ParentClass::SetControlPointAt(pCtrlPoint, pIndex); }
230  virtual void InitControlPoints(int pCount) { ParentClass::InitControlPoints(pCount); }
231 
232 protected:
233  virtual void Construct(const FbxObject* pFrom);
234  virtual void Destruct(bool pRecursive);
235 
236  FbxUInt mUOrder, mVOrder;
237  int mUCount, mVCount;
238  int mUStep, mVStep;
239  EType mUType, mVType;
240 
241  double* mUKnotVector;
242  double* mVKnotVector;
243 
244  int* mUMultiplicityVector;
245  int* mVMultiplicityVector;
246 
247  ESurfaceMode mSurfaceMode;
248 
249  // Export flags.
250  bool mApplyFlipUV;
251  bool mApplyFlipLinks;
252 
253  friend class FbxGeometryConverter;
254 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
255 };
256 
257 #include <fbxsdk/fbxsdk_nsend.h>
258 
259 #endif /* _FBXSDK_SCENE_GEOMETRY_NURBS_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.
Periodic.
Definition: fbxnurbs.h:61
ESurfaceMode
NURBS and Patches surface modes.
Definition: fbxgeometry.h:200
EType
Node attribute types.
int GetVOrder() const
Returns the NURBS order in V dimension.
Definition: fbxnurbs.h:144
virtual FbxNodeAttribute::EType GetAttributeType() const
Returns the node attribute type.
int GetVCount() const
Returns the number of V-dimension control points.
Definition: fbxnurbs.h:84
int GetUStep() const
Returns the number of divisions between adjacent control points in U dimension.
Definition: fbxnurbs.h:156
The base class of most FBX objects.
Definition: fbxobject.h:157
ESurfaceMode GetSurfaceMode() const
Returns the surface mode.
Definition: fbxnurbs.h:55
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
Closed.
Definition: fbxnurbs.h:62
int GetUCount() const
Returns the number of U-dimension control points.
Definition: fbxnurbs.h:79
EType GetNurbsVType() const
Returns the V-dimension NURBS type.
Definition: fbxnurbs.h:94
A four double mathematic vector class.
Definition: fbxvector4.h:25
virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint, const FbxVector4 &pNormal, int pIndex, bool pI2DSearch=false)
Sets the control point and the normal values at the specified index.
#define FBXSDK_DLL
Definition: fbxarch.h:173
A NURBS surface is a type of parametric geometry.
Definition: fbxnurbs.h:31
int GetVStep() const
Returns the number of divisions between adjacent control points in V dimension.
Definition: fbxnurbs.h:161
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.
bool GetApplyFlip() const
Returns flip flags state.
Definition: fbxnurbs.h:207
int GetUOrder() const
Returns the NURBS order in U dimension.
Definition: fbxnurbs.h:139
EType GetNurbsUType() const
Returns the U-dimension NURBS type.
Definition: fbxnurbs.h:89