FBX C++ API Reference
fbxtrimnurbssurface.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_TRIM_NURBS_SURFACE_H_
14 #define _FBXSDK_SCENE_GEOMETRY_TRIM_NURBS_SURFACE_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
21 
22 #include <fbxsdk/fbxsdk_nsbegin.h>
23 
31 {
33 
34 public:
35 
37  static const char* sOuterFlag;
38 
44 
48  void AddCurve( FbxNurbsCurve* pCurve );
49 
53  int GetCurveCount() const;
54 
61  FbxNurbsCurve* GetCurve( int pIndex );
62 
69  const FbxNurbsCurve* GetCurve( int pIndex ) const;
70 
71 
74 
79  bool IsPointInControlHull(const FbxVector4& pPoint );
80 
84  FbxVector4 ComputePointInBoundary();
85 
86 /*****************************************************************************************************************************
87 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
88 *****************************************************************************************************************************/
89 #ifndef DOXYGEN_SHOULD_SKIP_THIS
90  FbxObject& Copy(const FbxObject& pObject) override;
91 
92  void ClearCurves();
93  void CopyCurves( FbxBoundary const& pOther );
94  bool IsValid(bool mustClosed = true);
95  bool IsCounterClockwise();
96  void Reset();
97 
98 protected:
99  void ConstructProperties(bool pForceSet) override;
100  bool LineSegmentIntersect(const FbxVector4 & pStart1, const FbxVector4 & pEnd1, const FbxVector4 & pStart2, const FbxVector4 & pEnd2 ) const;
101 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
102 };
103 
104 
109 {
111 public:
113  FbxNodeAttribute::EType GetAttributeType() const override;
114 
115 
120  int GetTrimRegionCount() const;
121 
125  void BeginTrimRegion();
126 
131  void EndTrimRegion();
132 
142  bool AddBoundary( FbxBoundary* pBoundary );
143 
151  FbxBoundary* GetBoundary( int pIndex, int pRegionIndex = 0 );
152 
160  const FbxBoundary* GetBoundary( int pIndex, int pRegionIndex = 0 ) const;
161 
166  int GetBoundaryCount(int pRegionIndex = 0) const;
167 
171  void SetNurbsSurface( const FbxNurbsSurface* pNurbs );
172 
176  FbxNurbsSurface* GetNurbsSurface();
177 
181  const FbxNurbsSurface* GetNurbsSurface() const;
182 
187  inline void SetFlipNormals( bool pFlip ) { mFlipNormals = pFlip; }
188 
192  inline bool GetFlipNormals() const { return mFlipNormals; }
193 
194  int GetControlPointsCount() const override;
195 
202  void SetControlPointAt(const FbxVector4 &pCtrlPoint, const FbxVector4 &pNormal , int pIndex, bool pI2DSearch = false) override;
203 
208  void SetControlPointAt(const FbxVector4 &pCtrlPoint, int pIndex) override { ParentClass::SetControlPointAt(pCtrlPoint, pIndex); }
209 
213  FbxVector4* GetControlPoints(FbxStatus* pStatus = NULL) const override;
214 
215 /*****************************************************************************************************************************
216 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
217 *****************************************************************************************************************************/
218 #ifndef DOXYGEN_SHOULD_SKIP_THIS
219  FbxObject& Copy(const FbxObject& pObject) override;
220 
221  bool IsValid(bool mustClosed = true);
222  void ClearBoundaries();
223  void CopyBoundaries( FbxTrimNurbsSurface const& pOther );
224  bool IsValid(int pRegion, bool mustClosed = true);
225  void RebuildRegions();
226  void Reset();
227 
228 protected:
229  void Construct(const FbxObject* pFrom) override;
230 
231 private:
232  bool mFlipNormals;
233  FbxArray<int> mRegionIndices;
234  bool mNewRegion;
235 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
236 };
237 
238 #include <fbxsdk/fbxsdk_nsend.h>
239 
240 #endif /* _FBXSDK_SCENE_GEOMETRY_TRIM_NURBS_SURFACE_H_ */
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
FbxNodeAttribute::EType GetAttributeType() const override
Returns the node attribute type.
FbxPropertyT< FbxBool > OuterFlag
This property handles outer flag.
FBX SDK environment definition.
virtual int GetControlPointsCount() const
Returns the number of control points.
#define NULL
Definition: fbxarch.h:213
virtual FbxObject & Copy(const FbxObject &pObject)
Copy an object content into this object.
void SetFlipNormals(bool pFlip)
Sets the flag which indicates whether the surface normals are flipped.
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:29
EType
Node attribute types.
The base class of most FBX objects.
Definition: fbxobject.h:157
FbxTrimNurbsSurface describes a NURBS surface with regions trimmed or cut away with trimming boundari...
A NURBS surface is a type of parametric geometry.
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
void SetControlPointAt(const FbxVector4 &pCtrlPoint, int pIndex) override
Sets the control point for a specified index.
FbxBoundary describes a trimming boundary for a trimmed NURBS object.
bool GetFlipNormals() const
Checks if the normals are flipped.
virtual FbxVector4 * GetControlPoints(FbxStatus *pStatus=((void *) 0)) const
Returns a pointer to the array of control points.
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:176
A Non-Uniform Rational B-Spline (NURBS) curve is a type of parametric geometry.
Definition: fbxnurbscurve.h:60
The base class of geometric objects that support control point deformations (e.g. ...
Definition: fbxgeometry.h:45
virtual void ConstructProperties(bool pForceSet)
Optional property constructor override, automatically called by default constructor.