Files
Include/EgkSurfTriMesh.h
T
Dario Sassi daac83f8df Include :
- aggiunto PointGrid3d
- modifiche a interfacce.
2014-05-18 09:31:12 +00:00

71 lines
3.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 ;
//----------------------------------------------------------------------------
const int SVT_NULL = - 1 ; // vertice o triangolo nullo
const int SVT_DEL = - 2 ; // vertice o triangolo cancellato
//----------------------------------------------------------------------------
class __declspec( novtable) ISurfTriMesh : public ISurf
{
public :
virtual bool Copy( const IGeoObj* pGObjSrc) = 0 ;
virtual bool Init( int nNumVert, int nNumTria) = 0 ;
virtual void SetLinearTolerance( double dLinTol) = 0 ;
virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ;
virtual int AddVertex( const Point3d& ptVert) = 0 ;
virtual int AddTriangle( const int nIdVert[3]) = 0 ;
virtual bool AdjustTopology( void) = 0 ;
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ;
virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2) = 0 ;
virtual bool CreateByRevolution( const PolyLine& PL, const Point3d& ptAx, const Vector3d& vtAx,
double dAngRot, double dStepRot) = 0 ;
virtual bool CreateByScrewing( const PolyLine& PL, const Point3d& ptAx, const Vector3d& vtAx,
double dAngRot, double dStepRot, double dMove) = 0 ;
virtual bool DoCompacting( void) = 0 ;
virtual bool DoSewing( const ISurfTriMesh& stmOther, const Frame3d& frOther = GLOB_FRM) = 0 ;
virtual int GetVertexSize( void) const = 0 ;
virtual int GetTriangleSize( void) const = 0 ;
virtual double GetLinearTolerance( void) = 0 ;
virtual double GetSmoothAngle( void) = 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)) ; }