xsi_polygonmesh.h Source File
 
 
 
xsi_polygonmesh.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 __XSIPOLYGONMESH_H__
00018 #define __XSIPOLYGONMESH_H__
00019 
00020 #include <xsi_geometry.h>
00021 #include <xsi_clusterproperty.h>
00022 #include <xsi_pointlocatordata.h>
00023 
00024 namespace XSI {
00025 
00026 class CVertexRefArray;
00027 class CEdgeRefArray;
00028 class CPolygonFaceRefArray;
00029 class CPolygonNodeRefArray;
00030 class CGeometryAccessor;
00031 class CMeshBuilder;
00032 class CClusterPropertyBuilder;
00033 
00034 //*****************************************************************************
00064 //*****************************************************************************
00065 
00066 class SICPPSDKDECL PolygonMesh : public Geometry
00067 {
00068 public:
00070         PolygonMesh();
00071 
00073         ~PolygonMesh();
00074 
00078         PolygonMesh(const CRef& in_ref);
00079 
00083         PolygonMesh(const PolygonMesh& in_obj);
00084 
00088         PolygonMesh(const Geometry& in_obj);
00089 
00094         bool IsA( siClassID in_ClassID) const;
00095 
00099         siClassID GetClassID() const;
00100 
00106         PolygonMesh& operator=(const PolygonMesh& in_obj);
00107 
00113         PolygonMesh& operator=(const Geometry& in_geom);
00114 
00120         PolygonMesh& operator=(const CRef& in_ref);
00121 
00125         CVertexRefArray GetVertices() const;
00126 
00130         CEdgeRefArray GetEdges() const;
00131 
00135         CPolygonFaceRefArray GetPolygons() const;
00136 
00140         CPolygonNodeRefArray GetNodes() const;
00141 
00192         CStatus Set( const MATH::CVector3Array& in_vertices,
00193                         const CLongArray& in_polygonDescr );
00194 
00209         CStatus Get( MATH::CVector3Array& io_vertices, CLongArray& io_polygonDescr ) const;
00210 
00216         CStatus PutCurrentVertexColor( const ClusterProperty& = ClusterProperty());
00217 
00228         ClusterProperty GetCurrentVertexColor( void ) const;
00229 
00234         ClusterProperty AddVertexColor( const CString& name = CString() );
00235 
00239         CRefArray GetVertexColors( void ) const;
00240 
00283         CGeometryAccessor GetGeometryAccessor
00284         (
00285                 siConstructionMode              in_mode = siConstructionModeModeling,
00286                 siSubdivisionRuleType   in_type = siCatmullClark,
00287                 LONG                                    in_subdLevel = 0,
00288                 bool                                    in_bUseLoopForTriangles = false,
00289                 bool                                    in_bUseDiscontinuity = true,
00290                 double                                  in_discontinuityAngle = 60.0
00291         ) const;
00292 
00297         CMeshBuilder GetMeshBuilder() const;
00298 
00303         CClusterPropertyBuilder GetClusterPropertyBuilder() const;
00304 
00389         CStatus GetPolygonIndexArray
00390         (
00391                 const PointLocatorData& in_ptLocators,
00392                 LONG in_nbPointLocatorsIndices, //-1 if all
00393                 const LONG* in_pPointLocatorsIndices, // 0 if all
00394                 LONG* out_pIndices
00395         ) const;
00396 
00426         CStatus GetTriangleVertexIndexArray
00427         (
00428                 const PointLocatorData& in_ptLocators,
00429                 LONG in_nbPointLocatorsIndices, //-1 if all
00430                 const LONG* in_pPointLocatorsIndices, // 0 if all
00431                 LONG* out_pIndices
00432         ) const;
00433 
00463         CStatus GetTriangleNodeIndexArray
00464         (
00465                 const PointLocatorData& in_ptLocators,
00466                 LONG in_nbPointLocatorsIndices, //-1 if all
00467                 const LONG* in_pPointLocatorsIndices, // 0 if all
00468                 LONG* out_pIndices
00469         ) const;
00470 
00499         CStatus GetTriangleWeightArray
00500         (
00501                 const PointLocatorData& in_ptLocators,
00502                 LONG in_nbPointLocatorsIndices, //-1 if all
00503                 const LONG* in_pPointLocatorsIndices, // 0 if all
00504                 float* out_pWeights
00505         ) const;
00506 
00627         PointLocatorData ConstructPointLocators
00628         (
00629                 LONG                                    in_nbPointLocators,
00630                 const LONG*                             in_pPolygonIndices,
00631                 const LONG*                             in_pSubTriangleVertexIndices,
00632                 const float*                    in_pSubTriangleWeights
00633         ) const;
00634 
00635         private:
00636         PolygonMesh * operator&() const;
00637         PolygonMesh * operator&();
00638 };
00639 
00640 };
00641 
00642 #endif // __XSIPOLYGONMESH_H__