Files
Include/EGkSurfFlatRegion.h
T
Dario Sassi 4fc451c445 Include :
- aggiornamento interfacce.
2018-07-10 09:15:37 +00:00

75 lines
3.9 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2015-2015
//----------------------------------------------------------------------------
// File : EgkSurfFlatRegion.h Data : 05.08.15 Versione : 1.6h2
// Contenuto : Dichiarazione della interfaccia ISurfFlatRegion.
//
//
//
// Modifiche : 05.08.15 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurf.h"
#include "/EgtDev/Include/EGkIntersCurves.h"
class ISurfTriMesh ;
//----------------------------------------------------------------------------
class __declspec( novtable) ISurfFlatRegion : public ISurf
{
public : // IGeoObj
ISurfFlatRegion* Clone( void) const override = 0 ;
public :
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
virtual bool Clear( void) ;
virtual bool AddExtLoop( const ICurve& cCrv) = 0 ;
virtual bool AddExtLoop( ICurve* pCrv) = 0 ;
virtual bool AddIntLoop( const ICurve& cCrv) = 0 ;
virtual bool AddIntLoop( ICurve* pCrv) = 0 ;
virtual bool Add( const ISurfFlatRegion& Other) = 0 ;
virtual bool Subtract( const ISurfFlatRegion& Other) = 0 ;
virtual bool Intersect( const ISurfFlatRegion& Other) = 0 ;
virtual bool Offset( double dDist, int nType) = 0 ;
virtual bool GetGrossArea( double& dArea) const = 0 ;
virtual const Point3d& GetPlanePoint( void) const = 0 ;
virtual const Vector3d& GetNormVersor( void) const = 0 ;
virtual int GetChunkCount( void) const = 0 ;
virtual int GetLoopCount( int nChunk) const = 0 ;
virtual ICurve* GetLoop( int nChunk, int nLoop) const = 0 ; // nChunk 0-based, nLoop 0-based (1°esterno, successivi interni)
virtual bool ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const = 0 ;
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
virtual ISurfFlatRegion* CloneChunk( int nChunk) const = 0 ;
virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const ;
virtual bool GetCurveClassification( const ICurve& Crv, CRVCVECTOR& ccClass) const = 0 ;
virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides
} ;
//-----------------------------------------------------------------------------
inline ISurfFlatRegion* CreateSurfFlatRegion( void)
{ return (static_cast<ISurfFlatRegion*>( CreateGeoObj( SRF_FLATRGN))) ; }
inline ISurfFlatRegion* CloneSurfFlatRegion( const IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != SRF_FLATRGN)
return nullptr ;
return (static_cast<ISurfFlatRegion*>(pGObj->Clone())) ; }
inline const ISurfFlatRegion* GetSurfFlatRegion( const IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != SRF_FLATRGN)
return nullptr ;
return (static_cast<const ISurfFlatRegion*>(pGObj)) ; }
inline ISurfFlatRegion* GetSurfFlatRegion( IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != SRF_FLATRGN)
return nullptr ;
return (static_cast<ISurfFlatRegion*>(pGObj)) ; }
//-----------------------------------------------------------------------------
// Costanti per classificazione di regioni
const int REGC_NULL = 0 ; //!< Non classificabili
const int REGC_IN1 = 1 ; //!< La prima regione è inclusa nella seconda
const int REGC_IN2 = 2 ; //!< La seconda regione è inclusa nella prima
const int REGC_SAME = 3 ; //!< Le due regioni coincidono
const int REGC_OUT = 4 ; //!< Le due regioni sono esterne
const int REGC_INTERS = 5 ; //!< Le due regioni si intersecano