xsi_nurbssurfacemesh.h Source File
 
 
 
xsi_nurbssurfacemesh.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSINURBSSURFACEMESH_H__
00018 #define __XSINURBSSURFACEMESH_H__
00019 
00020 #include <xsi_geometry.h>
00021 #include <xsi_nurbsdata.h>
00022 #include <xsi_pointlocatordata.h>
00023 
00024 namespace XSI {
00025 
00026 class CControlPointRefArray;
00027 class CNurbsSurfaceRefArray;
00028 class CKnotArray;
00029 class CTrimDataArray;
00030 class NurbsSurface;
00031 
00032 //*****************************************************************************
00056 //*****************************************************************************
00057 
00058 class SICPPSDKDECL NurbsSurfaceMesh : public Geometry
00059 {
00060 public:
00062         NurbsSurfaceMesh();
00063 
00065         ~NurbsSurfaceMesh();
00066 
00070         NurbsSurfaceMesh(const CRef& in_ref);
00071 
00075         NurbsSurfaceMesh(const NurbsSurfaceMesh& in_obj);
00076 
00080         NurbsSurfaceMesh(const Geometry& in_obj);
00081 
00086         bool IsA( siClassID in_ClassID) const;
00087 
00091         siClassID GetClassID() const;
00092 
00098         NurbsSurfaceMesh& operator=(const NurbsSurfaceMesh& in_obj);
00099 
00105         NurbsSurfaceMesh& operator=(const Geometry& in_geom);
00106 
00112         NurbsSurfaceMesh& operator=(const CRef& in_ref);
00113 
00117         CNurbsSurfaceRefArray GetSurfaces()const;
00118 
00130         CStatus GetClosestSurfacePosition
00131         (
00132                 MATH::CVector3&                 in_vPosition,
00133                 LONG&                                   out_lSurfaceIndex,
00134                 double&                                 out_dSquaredDistance,
00135                 double&                                 out_dUValue,
00136                 double&                                 out_dVValue,
00137                 MATH::CVector3&                 out_vPosition
00138         )const;
00139 
00140 
00147         CStatus Get
00148         (
00149                 siNurbsFormat                           in_siNurbsFormat,
00150                 CNurbsSurfaceDataArray&         out_surfaces
00151         )const;
00152 
00165         CStatus Set
00166         (
00167                 const CNurbsSurfaceDataArray&   in_surfaces,
00168                 siNurbsFormat                                   in_siNurbsFormat = siSINurbs
00169         );
00170 
00171 
00181         CStatus AddSurfaceWithTrim
00182         (
00183                 const CNurbsSurfaceData&        in_surface,
00184                 const CTrimCurveDataArray&      in_trims,
00185                 siNurbsFormat                           in_siNurbsFormat,
00186                 NurbsSurface&                           out_Surface
00187         );
00188 
00196         CStatus AddSurface
00197         (
00198                 const CNurbsSurfaceData&        in_surface,
00199                 siNurbsFormat                           in_siNurbsFormat,
00200                 NurbsSurface&                           out_Surface
00201         );
00202 
00262         CStatus GetSubSurfaceIndexArray
00263         (
00264                 const PointLocatorData& in_ptLocators,
00265                 LONG in_nbPointLocatorsIndices, //-1 if all
00266                 const LONG* in_pPointLocatorsIndices, // 0 if all
00267                 LONG* out_pIndices
00268         ) const;
00269 
00365         CStatus GetNormalizedUVArray
00366         (
00367                 const PointLocatorData& in_ptLocators,
00368                 LONG in_nbPointLocatorsIndices, //-1 if all
00369                 const LONG* in_pPointLocatorsIndices, // 0 if all
00370                 float* out_pNormalizedUVs
00371         ) const;
00372 
00390         PointLocatorData ConstructPointLocators
00391         (
00392                 LONG                    in_nbPointLocators,
00393                 const LONG*             in_pSubSurfaceIndices,
00394                 const float*    in_pNormalizedUVs
00395         ) const;
00396 
00397         private:
00398         NurbsSurfaceMesh * operator&() const;
00399         NurbsSurfaceMesh * operator&();
00400 };
00401 
00402 };
00403 
00404 #endif // __XSINURBSSURFACEMESH_H__