Files
DarioS ab8ec30e29 Include :
- sistemato minuscole/maiuscole.
2022-02-26 17:46:21 +01:00

51 lines
2.1 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2019
//----------------------------------------------------------------------------
// File : EGkSurf.h Data : 06.06.19 Versione : 2.1f1
// Contenuto : Dichiarazione della interfaccia ISurf.
//
//
//
// Modifiche : 26.03.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeoObj.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
#include <vector>
#include <list>
//----------------------------------------------------------------------------
class __declspec( novtable) ISurf : public IGeoObj
{
public : // IGeoObj
ISurf* Clone( void) const override = 0 ;
public :
virtual bool IsSimple( void) const = 0 ;
virtual bool IsClosed( void) const = 0 ;
virtual bool GetArea( double& dArea) const = 0 ;
virtual bool GetVolume( double& dVolume) const = 0 ;
virtual bool GetCentroid( Point3d& ptCen) const = 0 ;
virtual bool Invert( void) = 0 ;
} ;
//----------------------------------------------------------------------------
inline const ISurf* GetSurf( const IGeoObj* pGObj)
{ if ( pGObj == nullptr || ( pGObj->GetType() & GEO_SURF) == 0)
return nullptr ;
return (static_cast<const ISurf*>(pGObj)) ; }
inline ISurf* GetSurf( IGeoObj* pGObj)
{ if ( pGObj == nullptr || ( pGObj->GetType() & GEO_SURF) == 0)
return nullptr ;
return (static_cast<ISurf*>(pGObj)) ; }
//----------------------------------------------------------------------------
// Raccolte di puntatori a ISurf
typedef std::vector<const ISurf*> CISURFPVECTOR ; // vettore di puntatori a const ISurf
typedef std::vector<ISurf*> ISURFPVECTOR ; // vettore di puntatori a ISurf
typedef std::list<ISurf*> ISURFPLIST ; // lista di puntatori a ISurf
typedef std::vector<PtrOwner<ISurf>> ISURFPOVECTOR ; // vettore di puntatori esclusivi a ISurf