00a81d6e04
- aggiunta gestione Stipple per GeoPoint3d, GeoVector3d e GeoCurve.
59 lines
2.6 KiB
C++
59 lines
2.6 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2023
|
|
//----------------------------------------------------------------------------
|
|
// File : ObjEGrGraphics.h Data : 08.07.23 Versione : 2.5g1
|
|
// Contenuto : Dichiarazione della classe grafica di un oggetto geometrico.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 13.02.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkGeoCollection.h"
|
|
#include "/EgtDev/Include/EGkObjGraphics.h"
|
|
#include "/EgtDev/Include/EGkGeoObj.h"
|
|
|
|
class Scene ;
|
|
class Color ;
|
|
class PolyLine ;
|
|
class Triangle3d ;
|
|
class TriFlags3d ;
|
|
class TriNormals3d ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class ObjEGrGraphics : public IObjGraphics
|
|
{
|
|
public :
|
|
virtual bool IsValid( void) = 0 ;
|
|
virtual void SetScene( Scene* pScene) = 0 ;
|
|
virtual Scene* GetScene( void) = 0 ;
|
|
virtual bool SetCurrent( int nCurr) { return false ; }
|
|
virtual void Clear( void) = 0 ;
|
|
virtual bool AddColor( const Color& colC) = 0 ;
|
|
virtual bool AddMaterial( const Color& colAmb, const Color& colDiff,
|
|
const Color& colSpec, float fShin) = 0 ;
|
|
virtual bool AddBackMaterial( const Color& colAmbDiff) = 0 ;
|
|
virtual bool AddLineStipple( int nFactor, int nPattern) = 0 ;
|
|
virtual bool AddPoint( const Point3d& ptP, bool bAux = false) = 0 ;
|
|
virtual bool AddPoints( const PNTVECTOR& vPnt, bool bAux = false) = 0 ;
|
|
virtual bool AddLines( const PNTVECTOR& vPnt, bool bAux = false) = 0 ;
|
|
virtual bool AddPolyLine( const PolyLine& PL, bool bAux = false) = 0 ;
|
|
virtual bool StartTriangles( int nNum, bool bAux = false) = 0 ;
|
|
virtual bool AddTriangle( const Triangle3d& Tria, const TriFlags3d& TFlags, const TriNormals3d& TNrms) = 0 ;
|
|
virtual bool EndTriangles( void) = 0 ;
|
|
virtual bool Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlpha, bool ShowAux) = 0 ;
|
|
virtual bool GetLocalBBox( BBox3d& b3Loc) const = 0 ;
|
|
virtual bool SetCounter( int nCnt) { return false ; }
|
|
virtual int GetCounter( void) const { return -1 ; }
|
|
} ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
inline const ObjEGrGraphics* GetObjEGrGraphics( const IGeoObj* pGObj)
|
|
{ return (dynamic_cast<const ObjEGrGraphics*>(pGObj->GetObjGraphics())) ; }
|
|
inline ObjEGrGraphics* GetObjEGrGraphics( IGeoObj* pGObj)
|
|
{ return (dynamic_cast<ObjEGrGraphics*>(pGObj->GetObjGraphics())) ; }
|