- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxtrimnurbssurface.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_TRIM_NURBS_SURFACE_H_
    00014 #define _FBXSDK_SCENE_GEOMETRY_TRIM_NURBS_SURFACE_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/scene/geometry/fbxgeometry.h>
    00019 #include <fbxsdk/scene/geometry/fbxnurbscurve.h>
    00020 #include <fbxsdk/scene/geometry/fbxnurbssurface.h>
    00021
    00022 #include <fbxsdk/fbxsdk_nsbegin.h>
    00023
    00030 class FBXSDK_DLL FbxBoundary : public FbxGeometry
    00031 {
    00032     FBXSDK_OBJECT_DECLARE(FbxBoundary, FbxGeometry);
    00033
    00034 public:
    00035
    00037     static const char* sOuterFlag;
    00038
    00043     FbxPropertyT<FbxBool> OuterFlag;
    00044
    00048     void AddCurve( FbxNurbsCurve* pCurve );
    00049
    00053     int GetCurveCount() const;
    00054
    00061     FbxNurbsCurve* GetCurve( int pIndex );
    00062
    00069     FbxNurbsCurve const* GetCurve( int pIndex ) const;
    00070
    00071
    00073     virtual FbxNodeAttribute::EType GetAttributeType() const;
    00074
    00079     bool IsPointInControlHull(const FbxVector4& pPoint );
    00080
    00084     FbxVector4 ComputePointInBoundary();
    00085
    00086 /*****************************************************************************************************************************
    00087 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00088 *****************************************************************************************************************************/
    00089 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00090     virtual FbxObject& Copy(const FbxObject& pObject);
    00091
    00092     void ClearCurves();
    00093     void CopyCurves( FbxBoundary const& pOther );
    00094     bool IsValid(bool mustClosed = true);
    00095     bool IsCounterClockwise();
    00096
    00097 protected:
    00098     virtual void ConstructProperties(bool pForceSet);
    00099
    00100     void Reset();
    00101     bool LineSegmentIntersect(const FbxVector4 & pStart1, const FbxVector4 & pEnd1, const FbxVector4 & pStart2, const FbxVector4 & pEnd2 ) const;
    00102 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00103 };
    00104
    00105
    00109 class FBXSDK_DLL FbxTrimNurbsSurface : public FbxGeometry
    00110 {
    00111     FBXSDK_OBJECT_DECLARE(FbxTrimNurbsSurface,FbxGeometry);
    00112 public:
    00114     virtual FbxNodeAttribute::EType GetAttributeType() const;
    00115
    00116
    00121     int GetTrimRegionCount() const;
    00122
    00126     void BeginTrimRegion();
    00127
    00132     void EndTrimRegion();
    00133
    00143     bool              AddBoundary( FbxBoundary* pBoundary );
    00144
    00152     FbxBoundary*     GetBoundary( int pIndex, int pRegionIndex = 0 );
    00153
    00161     FbxBoundary const*     GetBoundary( int pIndex, int pRegionIndex = 0 ) const;
    00162
    00167     int               GetBoundaryCount(int pRegionIndex = 0) const;
    00168
    00172     void       SetNurbsSurface( FbxNurbsSurface const* pNurbs );
    00173
    00177     FbxNurbsSurface* GetNurbsSurface();
    00178
    00182     FbxNurbsSurface const* GetNurbsSurface() const;
    00183
    00188     inline void SetFlipNormals( bool pFlip ) { mFlipNormals = pFlip; }
    00189
    00193     inline bool GetFlipNormals() const { return  mFlipNormals; }
    00194
    00195     virtual int GetControlPointsCount() const;
    00196
    00202     virtual void SetControlPointAt(FbxVector4 &pCtrlPoint, FbxVector4 &pNormal , int pIndex);
    00203
    00207     virtual FbxVector4* GetControlPoints(FbxStatus* pStatus = NULL) const;
    00208
    00209 /*****************************************************************************************************************************
    00210 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00211 *****************************************************************************************************************************/
    00212 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00213     virtual FbxObject& Copy(const FbxObject& pObject);
    00214
    00215     bool IsValid(bool mustClosed = true);
    00216     void ClearBoundaries();
    00217     void CopyBoundaries( FbxTrimNurbsSurface const& pOther );
    00218     bool IsValid(int pRegion, bool mustClosed = true);
    00219     void RebuildRegions();
    00220
    00221 protected:
    00222     virtual void Construct(const FbxTrimNurbsSurface* pFrom);
    00223
    00224 private:
    00225     bool            mFlipNormals;
    00226     FbxArray<int>   mRegionIndices;
    00227     bool            mNewRegion;
    00228 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00229 };
    00230
    00231 #include <fbxsdk/fbxsdk_nsend.h>
    00232
    00233 #endif /* _FBXSDK_SCENE_GEOMETRY_TRIM_NURBS_SURFACE_H_ */