Go to
the documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
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/fbxnurbssurface.h>
00020 #include <fbxsdk/scene/geometry/fbxnurbscurve.h>
00021 #include <fbxsdk/scene/geometry/fbxgenericnode.h>
00022
00023 #include <fbxsdk/fbxsdk_nsbegin.h>
00024
00031 class FBXSDK_DLL FbxBoundary : public FbxGeometry
00032 {
00033 FBXSDK_OBJECT_DECLARE(FbxBoundary,FbxGeometry);
00034
00035 public:
00036
00038 static const char* sOuterFlag;
00039
00044 FbxPropertyT<FbxBool> OuterFlag;
00045
00049 void AddCurve( FbxNurbsCurve* pCurve );
00050
00054 int GetCurveCount() const;
00055
00062 FbxNurbsCurve* GetCurve( int pIndex );
00063
00070 FbxNurbsCurve const* GetCurve( int pIndex ) const;
00071
00072
00074 virtual FbxNodeAttribute::EType GetAttributeType() const;
00075
00080 bool IsPointInControlHull(const FbxVector4& pPoint );
00081
00085 FbxVector4 ComputePointInBoundary();
00086
00087 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00088
00089
00090
00091
00092
00093
00094
00096
00097 virtual FbxObject& Copy(const FbxObject& pObject);
00098
00099 protected:
00100 FbxBoundary(FbxManager& pManager, char const* pName);
00101 virtual void Construct(const FbxBoundary* pFrom);
00102
00103 void Reset();
00104
00105 bool LineSegmentIntersect( const FbxVector4 & pStart1, const FbxVector4 & pEnd1,
00106 const FbxVector4 & pStart2, const FbxVector4 & pEnd2 ) const;
00107
00108 public:
00109 void ClearCurves();
00110 void CopyCurves( FbxBoundary const& pOther );
00111 bool IsValid(bool mustClosed = true);
00112 bool IsCounterClockwise();
00113
00114 #endif // DOXYGEN_SHOULD_SKIP_THIS
00115 };
00116
00117
00121 class FBXSDK_DLL FbxTrimNurbsSurface : public FbxGeometry
00122 {
00123 FBXSDK_OBJECT_DECLARE(FbxTrimNurbsSurface,FbxGeometry);
00124 public:
00126 virtual FbxNodeAttribute::EType GetAttributeType() const;
00127
00128
00133 int GetTrimRegionCount() const;
00134
00138 void BeginTrimRegion();
00139
00144 void EndTrimRegion();
00145
00155 bool AddBoundary( FbxBoundary* pBoundary );
00156
00164 FbxBoundary* GetBoundary( int pIndex, int pRegionIndex = 0 );
00165
00173 FbxBoundary const* GetBoundary( int pIndex, int pRegionIndex = 0 ) const;
00174
00179 int GetBoundaryCount(int pRegionIndex = 0) const;
00180
00184 void SetNurbsSurface( FbxNurbsSurface const* pNurbs );
00185
00189 FbxNurbsSurface* GetNurbsSurface();
00190
00194 FbxNurbsSurface const* GetNurbsSurface() const;
00195
00200 inline void SetFlipNormals( bool pFlip ) { mFlipNormals = pFlip; }
00201
00205 inline bool GetFlipNormals() const { return mFlipNormals; }
00206
00207 virtual int GetControlPointsCount() const;
00208
00214 virtual void SetControlPointAt(FbxVector4 &pCtrlPoint, FbxVector4 &pNormal , int pIndex);
00215
00217 virtual FbxVector4* GetControlPoints() const;
00218
00219 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00220
00221
00222
00223
00224
00225
00226
00228
00229 virtual FbxObject& Copy(const FbxObject& pObject);
00230
00234 bool IsValid(bool mustClosed = true);
00235
00236 protected:
00237 FbxTrimNurbsSurface(FbxManager& pManager, char const* pName);
00238
00239 public:
00240 void ClearBoundaries();
00241
00242 void CopyBoundaries( FbxTrimNurbsSurface const& pOther );
00243
00244 bool IsValid(int pRegion, bool mustClosed = true);
00245
00246 void RebuildRegions();
00247
00248 private:
00249 bool mFlipNormals;
00250
00251 FbxArray<int> mRegionIndices;
00252
00253 bool mNewRegion;
00254
00255 #endif // DOXYGEN_SHOULD_SKIP_THIS
00256 };
00257
00258 #include <fbxsdk/fbxsdk_nsend.h>
00259
00260 #endif