Go to
the documentation of this file.
00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXTRIMNURBSSURFACE_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXTRIMNURBSSURFACE_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <fbxfilesdk/fbxfilesdk_def.h>
00042
00043 #include <fbxfilesdk/kfbxplugins/kfbxgeometry.h>
00044 #include <fbxfilesdk/kfbxplugins/kfbxnurbssurface.h>
00045 #include <fbxfilesdk/kfbxplugins/kfbxnurbscurve.h>
00046 #include <fbxfilesdk/kfbxplugins/kfbxgenericnode.h>
00047
00048 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00049
00056 class KFBX_DLL KFbxBoundary : public KFbxGeometry
00057 {
00058 KFBXOBJECT_DECLARE(KFbxBoundary,KFbxGeometry);
00059
00060 public:
00061
00063 static const char* sOuterFlag;
00064
00069 KFbxTypedProperty<fbxBool1> OuterFlag;
00070
00074 void AddCurve( KFbxNurbsCurve* pCurve );
00075
00079 int GetCurveCount() const;
00080
00087 KFbxNurbsCurve* GetCurve( int pIndex );
00088
00095 KFbxNurbsCurve const* GetCurve( int pIndex ) const;
00096
00097
00099 virtual EAttributeType GetAttributeType() const;
00100
00105 bool IsPointInControlHull(const KFbxVector4& pPoint );
00106
00110 KFbxVector4 ComputePointInBoundary();
00111
00112 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00113
00114
00115
00116
00117
00118
00119
00121
00122 virtual KFbxObject& Copy(const KFbxObject& pObject);
00123
00124 protected:
00125 KFbxBoundary(KFbxSdkManager& pManager, char const* pName);
00126 virtual void Construct(const KFbxBoundary* pFrom);
00127
00128 void Reset();
00129
00130 bool LineSegmentIntersect( const KFbxVector4 & pStart1, const KFbxVector4 & pEnd1,
00131 const KFbxVector4 & pStart2, const KFbxVector4 & pEnd2 ) const;
00132
00133 public:
00134 void ClearCurves();
00135 void CopyCurves( KFbxBoundary const& pOther );
00136 bool IsValid(bool mustClosed = true);
00137 bool IsCounterClockwise();
00138
00139 #endif // DOXYGEN_SHOULD_SKIP_THIS
00140 };
00141
00142
00146 class KFBX_DLL KFbxTrimNurbsSurface : public KFbxGeometry
00147 {
00148 KFBXOBJECT_DECLARE(KFbxTrimNurbsSurface,KFbxGeometry);
00149 public:
00151 virtual EAttributeType GetAttributeType() const;
00152
00153
00158 int GetTrimRegionCount() const;
00159
00163 void BeginTrimRegion();
00164
00169 void EndTrimRegion();
00170
00180 bool AddBoundary( KFbxBoundary* pBoundary );
00181
00189 KFbxBoundary* GetBoundary( int pIndex, int pRegionIndex = 0 );
00190
00198 KFbxBoundary const* GetBoundary( int pIndex, int pRegionIndex = 0 ) const;
00199
00204 int GetBoundaryCount(int pRegionIndex = 0) const;
00205
00209 void SetNurbsSurface( KFbxNurbsSurface const* pNurbs );
00210
00214 KFbxNurbsSurface* GetNurbsSurface();
00215
00219 KFbxNurbsSurface const* GetNurbsSurface() const;
00220
00225 inline void SetFlipNormals( bool pFlip ) { mFlipNormals = pFlip; }
00226
00230 inline bool GetFlipNormals() const { return mFlipNormals; }
00231
00232 virtual int GetControlPointsCount() const;
00233
00239 virtual void SetControlPointAt(KFbxVector4 &pCtrlPoint, KFbxVector4 &pNormal , int pIndex);
00240
00242 virtual KFbxVector4* GetControlPoints() const;
00243
00244 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00245
00246
00247
00248
00249
00250
00251
00253
00254 virtual KFbxObject& Copy(const KFbxObject& pObject);
00255
00259 bool IsValid(bool mustClosed = true);
00260
00261 protected:
00262 KFbxTrimNurbsSurface(KFbxSdkManager& pManager, char const* pName);
00263
00264 public:
00265 void ClearBoundaries();
00266
00267 void CopyBoundaries( KFbxTrimNurbsSurface const& pOther );
00268
00269 bool IsValid(int pRegion, bool mustClosed = true);
00270
00271 void RebuildRegions();
00272
00273 private:
00274 bool mFlipNormals;
00275
00276 KArrayTemplate<int> mRegionIndices;
00277
00278 bool mNewRegion;
00279
00280 #endif // DOXYGEN_SHOULD_SKIP_THIS
00281 };
00282
00283 typedef KFbxTrimNurbsSurface* HKFbxTrimNurbsSurface;
00284 typedef KFbxBoundary* HKFbxBoundary;
00285
00286 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00287
00288 #endif // FBXFILESDK_KFBXPLUGINS_KFBXTRIMNURBSSURFACE_H
00289