e2c8e72e22
- aggiunta gestione attributi Level, Mode e Status - aggiunti comandi per assegnarli.
106 lines
3.8 KiB
C++
106 lines
3.8 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : GdbObj.h Data : 05.03.14 Versione : 1.5c1
|
|
// Contenuto : Dichiarazione della classe GdbObj.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 28.11.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkGdbConst.h"
|
|
#include "/EgtDev/Include/EGkColor.h"
|
|
#include "/EgtDev/Include/EGnScan.h"
|
|
#include "/EgtDev/Include/EGkBBox3d.h"
|
|
#include <string>
|
|
|
|
|
|
class GdbGroup ;
|
|
class IdManager ;
|
|
class Attribs ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class GdbObj
|
|
{
|
|
public :
|
|
virtual ~GdbObj( void) ;
|
|
virtual GdbObj* Clone( int nId, IdManager& IdMgr) const = 0 ;
|
|
virtual bool Save( std::ostream& osOut) const = 0 ;
|
|
virtual bool Load( const std::string& sType, Scanner& TheScanner, int& nParentId) = 0 ;
|
|
virtual bool GetLocalBBox( BBox3d& b3Loc) const = 0 ;
|
|
virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const = 0 ;
|
|
virtual bool Translate( const Vector3d& vtMove) = 0 ;
|
|
virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) = 0 ;
|
|
virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngRad) = 0 ;
|
|
virtual bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) = 0 ;
|
|
virtual bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) = 0 ;
|
|
virtual bool ToGlob( const Frame3d& frRef) = 0 ;
|
|
virtual bool ToLoc( const Frame3d& frRef) = 0 ;
|
|
|
|
public :
|
|
GdbObj( void) ;
|
|
bool Copy( const GdbObj* pSou) ;
|
|
|
|
public :
|
|
bool SaveAttribs( std::ostream& osOut) const ;
|
|
bool LoadAttribs( Scanner& TheScanner) ;
|
|
Attribs* GetAttribs( void)
|
|
{ return m_pAttribs ; }
|
|
Attribs* GetSafeAttribs( void) ;
|
|
bool SetLevel( int nLevel) ;
|
|
bool RevertLevel( void) ;
|
|
bool GetLevel( int& nLevel) const ;
|
|
bool GetCalcLevel( int& nLevel) const ;
|
|
bool SetMode( int nMode) ;
|
|
bool RevertMode( void) ;
|
|
bool GetMode( int& nMode) const ;
|
|
bool GetCalcMode( int& nMode) const ;
|
|
bool SetStatus( int nStat) ;
|
|
bool RevertStatus( void) ;
|
|
bool GetStatus( int& nStat) const ;
|
|
bool GetCalcStatus( int& nStat, int nLev = 0) const ;
|
|
bool SetColor( Color cCol) ;
|
|
bool GetColor( Color& cCol) const ;
|
|
bool GetCalcColor( Color& cCol) const ;
|
|
bool SetName( const std::string& sName) ;
|
|
bool GetName( std::string& sName) const ;
|
|
bool RemoveName( void) ;
|
|
bool SetInfo( const std::string& sKey, const std::string& sInfo) ;
|
|
bool GetInfo( const std::string& sKey, std::string& sInfo) const ;
|
|
bool RemoveInfo( const std::string& sKey) ;
|
|
|
|
public :
|
|
GdbObj* GetNext( void)
|
|
{ return m_pNext ; }
|
|
const GdbObj* GetNext( void) const
|
|
{ return m_pNext ; }
|
|
GdbObj* GetPrev( void)
|
|
{ return m_pPrev ; }
|
|
const GdbObj* GetPrev( void) const
|
|
{ return m_pPrev ; }
|
|
GdbGroup* GetParent( void)
|
|
{ return m_pParent ; }
|
|
const GdbGroup* GetParent( void) const
|
|
{ return m_pParent ; }
|
|
int GetParentId( void) const ;
|
|
bool AddTail( GdbGroup* pParent) ;
|
|
bool AddHead( GdbGroup* pParent) ;
|
|
bool InsertAfter( GdbObj* pRef) ;
|
|
bool InsertBefore( GdbObj* pRef) ;
|
|
bool Remove( void) ;
|
|
|
|
public :
|
|
int m_nId ;
|
|
Attribs* m_pAttribs ;
|
|
|
|
private :
|
|
GdbObj* m_pNext ;
|
|
GdbObj* m_pPrev ;
|
|
GdbGroup* m_pParent ;
|
|
} ;
|