Files
Include/EgkSurfTriMesh.h
T
Dario Sassi fcd7fab8a8 Include :
- modifiche a Vector3d e Point3d
- migliorie a FromString
- aggiunta struttura Plane3d
- migliorie varie.
2014-04-09 13:02:22 +00:00

56 lines
2.6 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2014
//----------------------------------------------------------------------------
// File : EgkSurfTriMesh.h Data : 26.03.14 Versione : 1.5c9
// Contenuto : Dichiarazione della interfaccia ISurfTriMesh.
//
//
//
// Modifiche : 26.03.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurf.h"
#include "/EgtDev/Include/EGkTriangle3d.h"
class PolyLine ;
//----------------------------------------------------------------------------
class __declspec( novtable) ISurfTriMesh : public ISurf
{
public :
virtual bool Copy( const IGeoObj* pGObjSrc) = 0 ;
virtual bool Init( int nNumVert, int nNumTria) = 0 ;
virtual int AddVertex( const Point3d& ptVert) = 0 ;
virtual int AddTriangle( const int nIdVert[3]) = 0 ;
virtual bool AdjustTopology( void) = 0 ;
virtual bool CreateByTriangulation( const PolyLine& PL) = 0 ;
virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ;
virtual int GetVertexNum( void) const = 0 ;
virtual int GetTriangleNum( void) const = 0 ;
virtual int GetFirstVertex( Point3d& ptP) const = 0 ;
virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ;
virtual int GetFirstTriangle( Triangle3d& Tria) const = 0 ;
virtual int GetNextTriangle( int nId, Triangle3d& Tria) const = 0 ;
virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ;
} ;
//-----------------------------------------------------------------------------
inline ISurfTriMesh* CreateSurfTriMesh( void)
{ return (static_cast<ISurfTriMesh*>( CreateGeoObj( SRF_TRIMESH))) ; }
inline ISurfTriMesh* CloneSurfTriMesh( const IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != SRF_TRIMESH)
return nullptr ;
return (static_cast<ISurfTriMesh*>(pGObj->Clone())) ; }
inline const ISurfTriMesh* GetSurfTriMesh( const IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != SRF_TRIMESH)
return nullptr ;
return (static_cast<const ISurfTriMesh*>(pGObj)) ; }
inline ISurfTriMesh* GetSurfTriMesh( IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != SRF_TRIMESH)
return nullptr ;
return (static_cast<ISurfTriMesh*>(pGObj)) ; }