# xsi_meshbuilder.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 __XSIMESHBUILDER_H__
    00018 #define __XSIMESHBUILDER_H__
    00019
    00020 #include <xsi_base.h>
    00021 #include <xsi_value.h>
    00022 #include <xsi_status.h>
    00023 #include <xsi_longarray.h>
    00024
    00025 #pragma warning(disable:4251)
    00026
    00027 namespace XSI {
    00028
    00029 //*****************************************************************************
    00111 //*****************************************************************************
    00112
    00113 class SICPPSDKDECL CMeshBuilder : public CBase
    00114 {
    00115 public:
    00116
    00117     //*************************************************************************
    00125     //*************************************************************************
    00126
    00127     class SICPPSDKDECL CErrorDescriptor : public CStatus
    00128     {
    00129         public:
    00130
    00134         CErrorDescriptor(CStatus::Code in_code);
    00135
    00138         ~CErrorDescriptor();
    00139
    00143         CLongArray m_polygonIndices;
    00144
    00148         CLongArray m_vertexIndices;
    00149
    00153         CLongArray m_edgeIndices;
    00154
    00158         CLongArray m_nodeIndices;
    00159     };
    00160
    00162     CMeshBuilder();
    00163
    00165     ~CMeshBuilder();
    00166
    00170     CMeshBuilder(const CRef& in_ref);
    00171
    00175     CMeshBuilder(const CMeshBuilder& in_obj);
    00176
    00181     bool IsA( siClassID in_ClassID) const;
    00182
    00186     siClassID GetClassID() const;
    00187
    00193     CMeshBuilder& operator=(const CMeshBuilder& in_obj);
    00194
    00200     CMeshBuilder& operator=(const CRef& in_ref);
    00201
    00212     CStatus AddVertices( LONG in_nVertices, const double* in_pPos=0 );
    00213
    00286     CStatus SetVertexPositions( LONG in_nVertices, const double* in_pPos, LONG in_nOffset=0 );
    00287
    00301     CStatus AddPolygons(
    00302         LONG in_nPolygons,
    00303         const LONG* in_pPolyVertexCounts,
    00304         const LONG* in_pVtxIndices );
    00305
    00315     CStatus AddTriangles( LONG in_nTriangles, const LONG* in_pVtxIndices );
    00316
    00324     CStatus SetEdgeCreaseValue( LONG in_nPolyID, LONG in_nPolyEdgeIndex, float in_value );
    00325
    00333     CStatus SetHardEdge( LONG in_nPolyID, LONG in_nPolyEdgeIndex, bool in_bFlag=true );
    00334
    00340     CStatus SetVertexCreaseValue( LONG in_nVtxID, float in_value );
    00341
    00453     CStatus SetPolygonsMaterial(
    00454         const CRef& in_refMat,
    00455         LONG        in_nSize,
    00456         const LONG* in_pPolyIndices );
    00457
    00491     CStatus SetPolygonsMaterial(
    00492         const CRef& in_refMat,
    00493         LONG in_nSize,
    00494         const LONG* in_pPolyIndices,
    00495         CString& io_clsName );
    00496
    00513     CErrorDescriptor Build(bool in_bUndoRequired);
    00514
    00515     private:
    00516     CMeshBuilder * operator&() const;
    00517     CMeshBuilder * operator&();
    00518 };
    00519
    00520 };
    00521
    00522 #endif // __XSIMESHBUILDER_H__