//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : ObjEGrGraphics.h Data : 13.02.14 Versione : 1.5b2 // 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 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 AddPoint( const Point3d& ptP, 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, int nAlpha, bool ShowAux) = 0 ; virtual bool GetLocalBBox( BBox3d& b3Loc) const = 0 ; } ; //---------------------------------------------------------------------------- inline const ObjEGrGraphics* GetObjEGrGraphics( const IGeoObj* pGObj) { return (dynamic_cast(pGObj->GetObjGraphics())) ; } inline ObjEGrGraphics* GetObjEGrGraphics( IGeoObj* pGObj) { return (dynamic_cast(pGObj->GetObjGraphics())) ; }