xsi_icegeometry.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 __XSIICEGEOMETRY_H__
00018 #define __XSIICEGEOMETRY_H__
00019 
00020 namespace XSI {
00021 
00022 class MATH::CMatrix4f;
00023 class CLongArray;
00024 class CDoubleArray;
00025 class ICENodeContext;
00026 
00027 //*****************************************************************************
00271 //*****************************************************************************
00272 
00273 class SICPPSDKDECL CICEGeometry
00274 {
00275     public:
00276     friend class ICENodeContext;
00277 
00280     enum Type
00281     {
00282         siNoneType          =0, 
00283         siGroupType         =1, 
00284         siMeshSurfaceType   =2, 
00285         siNurbsSurfaceType  =3, 
00286         siNurbsCurveType    =4, 
00287         siPointCloudType    =5  
00288     };
00289 
00292     enum DirtyState
00293     {
00294         siGeometryTypeDirtyState    = 1<<0, 
00296         siTransformationDirtyState  = 1<<1, 
00298         siPointPositionDirtyState   = 1<<2, 
00299         siTopologyDirtyState        = 1<<3, 
00302         siAnyDirtyState             = siGeometryTypeDirtyState|
00303                                       siTransformationDirtyState|
00304                                       siPointPositionDirtyState|
00305                                       siTopologyDirtyState 
00306     };
00307 
00313     CICEGeometry( ICENodeContext& in_ctxt, ULONG in_nInputPortID, ULONG in_nInstanceIndex=0 ) ;
00314 
00317     CICEGeometry( const CICEGeometry& in_geom );
00318 
00321     CICEGeometry( );
00322 
00325     ~CICEGeometry();
00326 
00338     bool IsValid() const;
00339 
00343     Type GetGeometryType() const;
00344 
00350     bool operator == (const CICEGeometry& in_geom) const;
00351 
00357     bool operator != (const CICEGeometry& in_geom) const;
00358 
00364     CICEGeometry& operator = (const CICEGeometry& in_geom) ;
00365 
00369     ULONG GetSubGeometryCount() const;
00370 
00375     CICEGeometry GetSubGeometry( ULONG in_index ) const;
00376 
00380     ULONG GetPointPositionCount() const;
00381 
00419     CStatus GetPointPositions( CDoubleArray& out_points ) const;
00420 
00424     ULONG GetTriangleCount() const;
00425 
00464     CStatus GetTrianglePointIndices( CLongArray& out_indices ) const;
00465 
00469     ULONG GetPolygonCount() const;
00470 
00508     CStatus GetPolygonIndices( CLongArray& out_sizes, CLongArray& out_indices ) const;
00509 
00514     ULONG GetSegmentCount() const;
00515 
00553     CStatus GetSegmentIndices( CLongArray& out_indices ) const;
00554 
00563     CStatus GetTransformation( XSI::MATH::CMatrix4f& out_mat44 ) const;
00564 
00573     bool IsDirty( unsigned short in_flag=siAnyDirtyState ) const;
00574 
00579     void ClearState( );
00580 
00581     private:
00582     CStatus Init( const ICENodeContext& in_ctxt, ULONG in_nInputPortID, ULONG in_nInstanceIndex );
00583 
00584     Type    m_geomType;
00585     ULONG   m_nInputPortID;
00586     ULONG   m_nID;
00587     void*   m_pParent;
00588     void*   m_pGeom;
00589     void*   m_pCtxt;
00590 };
00591 
00592 };
00593 
00594 #endif // __XSIICEGEOMETRY_H__