FBX C++ API Reference
fbxpatch.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_PATCH_H_
14 #define _FBXSDK_SCENE_GEOMETRY_PATCH_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
27 {
29 
30 public:
33 
35  void Reset();
36 
41 
45  void SetSurfaceMode(FbxGeometry::ESurfaceMode pMode);
46 
50  inline FbxGeometry::ESurfaceMode GetSurfaceMode() const {return mSurfaceMode;}
51 
59  enum EType
60  {
65  eLinear
66  };
67 
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 GetPatchUType() const {return mUType;}
90 
94  inline EType GetPatchVType () const {return mVType;}
95 
101  void SetStep(int pUStep, int pVStep);
102 
106  inline int GetUStep() const {return mUStep;}
107 
111  inline int GetVStep() const {return mVStep;}
112 
117  void SetClosed(bool pU, bool pV);
118 
122  inline bool GetUClosed() const {return mUClosed;}
123 
127  inline bool GetVClosed() const {return mVClosed;}
128 
135  void SetUCapped(bool pUBottom, bool pUTop);
136 
140  inline bool GetUCappedBottom() const {return mUCappedBottom;}
141 
145  inline bool GetUCappedTop() const {return mUCappedTop;}
146 
153  void SetVCapped(bool pVBottom, bool pVTop);
154 
158  inline bool GetVCappedBottom() const {return mVCappedBottom;}
159 
163  inline bool GetVCappedTop() const {return mVCappedTop;}
164 
166 
176  virtual bool ContentWriteTo(FbxStream& pStream) const;
177 
183  virtual bool ContentReadFrom(const FbxStream& pStream);
185 
186 /*****************************************************************************************************************************
187 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
188 *****************************************************************************************************************************/
189 #ifndef DOXYGEN_SHOULD_SKIP_THIS
190  virtual FbxObject& Copy(const FbxObject& pObject);
191  virtual void InitControlPoints(int pCount) { ParentClass::InitControlPoints(pCount); }
192  virtual void SetControlPointAt(const FbxVector4 &pCtrlPoint , int pIndex) { ParentClass::SetControlPointAt(pCtrlPoint, pIndex); }
193 
194 protected:
195  virtual void Construct(const FbxObject* pFrom);
196  virtual void Destruct(bool pRecursive);
197 
198  EType mUType, mVType;
199  int mUCount, mVCount;
200  int mUStep, mVStep;
201  bool mUClosed, mVClosed;
202  bool mUCappedBottom, mUCappedTop;
203  bool mVCappedBottom, mVCappedTop;
204 
205  FbxGeometry::ESurfaceMode mSurfaceMode;
206 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
207 };
208 
209 #include <fbxsdk/fbxsdk_nsend.h>
210 
211 #endif /* _FBXSDK_SCENE_GEOMETRY_PATCH_H_ */
bool GetVClosed() const
Returns state of the V closed flag.
Definition: fbxpatch.h:127
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
EType GetPatchUType() const
Returns the U-dimension patch type.
Definition: fbxpatch.h:89
bool GetUCappedBottom() const
Returns state of the bottom U-capped flag.
Definition: fbxpatch.h:140
FBX SDK environment definition.
virtual void InitControlPoints(int pCount)
Allocates memory space for the array of control points.
virtual FbxNodeAttribute::EType GetAttributeType() const
Returns the node attribute type.
virtual bool ContentWriteTo(FbxStream &pStream) const
Writes the content of the geometry object to the specified stream.
Abstract class for implementing I/O operations through a stream of data.
Definition: fbxstream.h:26
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 the U-dimension.
Definition: fbxpatch.h:106
EType
Node attribute types.
bool GetVCappedTop() const
Returns state of the top V-capped flag.
Definition: fbxpatch.h:163
The base class of most FBX objects.
Definition: fbxobject.h:157
EType GetPatchVType() const
Returns the V-dimension patch type.
Definition: fbxpatch.h:94
bool GetUCappedTop() const
Returns state of the top U-capped flag.
Definition: fbxpatch.h:145
A patch is a type of node attribute with parametric surface.
Definition: fbxpatch.h:26
int GetUCount() const
Returns the number of control points in the U-dimension.
Definition: fbxpatch.h:79
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
bool GetVCappedBottom() const
Returns state of the bottom V-capped flag.
Definition: fbxpatch.h:158
A four double mathematic vector class.
Definition: fbxvector4.h:25
int GetVCount() const
Returns the number of control points in the V-dimension.
Definition: fbxpatch.h:84
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.
int GetVStep() const
Returns the number of divisions between adjacent control points in the V-dimension.
Definition: fbxpatch.h:111
#define FBXSDK_DLL
Definition: fbxarch.h:173
The base class of geometric objects that support control point deformations (e.g. ...
Definition: fbxgeometry.h:45
bool GetUClosed() const
Returns state of the U closed flag.
Definition: fbxpatch.h:122
virtual void Destruct(bool pRecursive)
Optional destructor override, automatically called by default destructor.
virtual bool ContentReadFrom(const FbxStream &pStream)
Reads the content of the geometry object from the specified stream.
FbxGeometry::ESurfaceMode GetSurfaceMode() const
Returns the surface mode.
Definition: fbxpatch.h:50