00001 //***************************************************************************** 00014 //***************************************************************************** 00015 00016 #if (_MSC_VER > 1000) || defined(SGI_COMPILER) 00017 #pragma once 00018 #endif 00019 00020 #ifndef __XSINURBSDATA_H__ 00021 #define __XSINURBSDATA_H__ 00022 00023 #include <xsi_decl.h> 00024 #include <xsi_vector4.h> 00025 #include <xsi_doublearray.h> 00026 #include <xsi_longarray.h> 00027 00028 namespace XSI { 00029 00030 class CStatus; 00031 00032 //************************************************************************* 00039 //************************************************************************* 00040 struct CNurbsCurveData 00041 { 00043 CNurbsCurveData() 00044 : m_bClosed(false), 00045 m_lDegree(3), 00046 m_siParameterization(siNonUniformParameterization){} 00047 00052 bool operator==(const CNurbsCurveData& in_curveData)const 00053 { 00054 return ((m_aControlPoints == in_curveData.m_aControlPoints) && 00055 (m_aKnots == in_curveData.m_aKnots) && 00056 (m_bClosed == in_curveData.m_bClosed) && 00057 (m_lDegree == in_curveData.m_lDegree) && 00058 (m_siParameterization == in_curveData.m_siParameterization)); 00059 } 00060 00065 bool operator!=(const CNurbsCurveData& in_curveData)const 00066 { 00067 return !operator==(in_curveData); 00068 } 00069 00071 MATH::CVector4Array m_aControlPoints; 00072 00074 CDoubleArray m_aKnots; 00076 bool m_bClosed; 00078 LONG m_lDegree; 00079 00081 siKnotParameterization m_siParameterization; 00082 }; 00083 00084 //************************************************************************* 00094 //************************************************************************* 00095 class SICPPSDKDECL CNurbsCurveDataArray 00096 { 00097 public: 00102 CNurbsCurveDataArray( LONG in_size=0); 00103 00108 CNurbsCurveDataArray(const CNurbsCurveDataArray& in_array); 00109 00111 ~CNurbsCurveDataArray(); 00112 00117 CNurbsCurveDataArray& operator=( const CNurbsCurveDataArray& in_array ); 00118 00122 LONG GetCount() const; 00123 00128 CStatus Add( const CNurbsCurveData& in_item ); 00129 00133 CStatus Clear(); 00134 00141 CStatus Resize( LONG in_size); 00142 00149 const CNurbsCurveData& operator[]( LONG in_index ) const; 00150 00156 CNurbsCurveData& operator[]( LONG in_index ); 00157 00163 bool operator==(const CNurbsCurveDataArray& in_array) const; 00164 00170 bool operator!=(const CNurbsCurveDataArray& in_array) const; 00171 00172 private: 00173 void* m_ptr; 00174 }; 00175 00176 //************************************************************************* 00182 //************************************************************************* 00183 struct CTrimCurveData 00184 { 00186 CTrimCurveData() 00187 : m_bIsBoundary(false), 00188 m_lProjectionType(0){} 00189 00194 bool operator==(const CTrimCurveData& in_trimData)const 00195 { 00196 return ((m_bIsBoundary == in_trimData.m_bIsBoundary) && 00197 (m_lProjectionType == in_trimData.m_lProjectionType) && 00198 (m_aCurvesData == in_trimData.m_aCurvesData)); 00199 } 00200 00205 bool operator!=(const CTrimCurveData& in_trimData)const 00206 { 00207 return ! operator==(in_trimData); 00208 } 00209 00211 bool m_bIsBoundary; 00213 LONG m_lProjectionType; 00214 00216 CNurbsCurveDataArray m_aCurvesData; 00217 }; 00218 00219 //************************************************************************* 00228 //************************************************************************* 00229 class SICPPSDKDECL CTrimCurveDataArray 00230 { 00231 public: 00236 CTrimCurveDataArray( LONG in_size=0); 00237 00241 CTrimCurveDataArray(const CTrimCurveDataArray& in_array); 00242 00244 ~CTrimCurveDataArray(); 00245 00250 CTrimCurveDataArray& operator=( const CTrimCurveDataArray& in_array ); 00251 00255 LONG GetCount() const; 00256 00261 CStatus Add( const CTrimCurveData& in_item ); 00262 00266 CStatus Clear(); 00267 00274 CStatus Resize( LONG in_size); 00275 00282 const CTrimCurveData& operator[]( LONG in_index ) const; 00283 00289 CTrimCurveData& operator[]( LONG in_index ); 00290 00296 bool operator==(const CTrimCurveDataArray& in_array) const; 00297 00303 bool operator!=(const CTrimCurveDataArray& in_array) const; 00304 00305 private: 00306 00307 void* m_ptr; 00308 }; 00309 00310 00311 //************************************************************************* 00317 //************************************************************************* 00318 struct CNurbsSurfaceData 00319 { 00321 CNurbsSurfaceData() 00322 : m_bUClosed(false), 00323 m_bVClosed(false), 00324 m_lUDegree(3), 00325 m_lVDegree(3), 00326 m_siUParameterization(siNonUniformParameterization), 00327 m_siVParameterization(siNonUniformParameterization){} 00328 00333 bool operator==(const CNurbsSurfaceData& in_surfaceData)const 00334 { 00335 return ((m_aControlPoints == in_surfaceData.m_aControlPoints) && 00336 (m_lNbUControlPoints == in_surfaceData.m_lNbUControlPoints) && 00337 (m_lNbVControlPoints == in_surfaceData.m_lNbVControlPoints) && 00338 (m_aUKnots == in_surfaceData.m_aUKnots) && 00339 (m_aVKnots == in_surfaceData.m_aVKnots) && 00340 (m_bUClosed == in_surfaceData.m_bUClosed) && 00341 (m_bVClosed == in_surfaceData.m_bVClosed) && 00342 (m_lUDegree == in_surfaceData.m_lUDegree) && 00343 (m_lVDegree == in_surfaceData.m_lVDegree) && 00344 (m_siUParameterization == in_surfaceData.m_siUParameterization) && 00345 (m_siVParameterization == in_surfaceData.m_siVParameterization)); 00346 } 00347 00352 bool operator!=(const CNurbsSurfaceData& in_surfaceData)const 00353 { 00354 return ! operator==(in_surfaceData); 00355 } 00356 00371 MATH::CVector4Array m_aControlPoints; 00373 LONG m_lNbUControlPoints; 00375 LONG m_lNbVControlPoints; 00377 CDoubleArray m_aUKnots; 00379 CDoubleArray m_aVKnots; 00381 bool m_bUClosed; 00383 bool m_bVClosed; 00385 LONG m_lUDegree; 00387 LONG m_lVDegree; 00389 siKnotParameterization m_siUParameterization; 00391 siKnotParameterization m_siVParameterization; 00392 }; 00393 00394 00395 //************************************************************************* 00404 //************************************************************************* 00405 class SICPPSDKDECL CNurbsSurfaceDataArray 00406 { 00407 public: 00411 CNurbsSurfaceDataArray( LONG in_size=0); 00412 00416 CNurbsSurfaceDataArray(const CNurbsSurfaceDataArray& in_array); 00417 00419 ~CNurbsSurfaceDataArray(); 00420 00425 CNurbsSurfaceDataArray& operator=( const CNurbsSurfaceDataArray& in_array ); 00426 00430 LONG GetCount() const; 00431 00436 CStatus Add( const CNurbsSurfaceData& in_item ); 00437 00441 CStatus Clear(); 00442 00448 CStatus Resize( LONG in_size); 00449 00456 const CNurbsSurfaceData& operator[]( LONG in_index ) const; 00457 00463 CNurbsSurfaceData& operator[](LONG in_index ); 00464 00470 bool operator==(const CNurbsSurfaceDataArray& in_array) const; 00471 00477 bool operator!=(const CNurbsSurfaceDataArray& in_array) const; 00478 00479 private: 00480 00481 void* m_ptr; 00482 }; 00483 00484 00485 00486 }; 00487 00488 #endif