740392c456
- aggiunte funzioni per gestire dati per textures su oggetti - aggiornato formato Nge per salvare questi dati.
166 lines
9.2 KiB
C++
166 lines
9.2 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2013
|
|
//----------------------------------------------------------------------------
|
|
// File : GdbIterator.h Data : 04.12.13 Versione : 1.4a3
|
|
// Contenuto : Dichiarazione della classe GdbIterator.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 04.12.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkGdbIterator.h"
|
|
#include "GeomDB.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
class GdbIterator : public IGdbIterator
|
|
{
|
|
public :
|
|
virtual ~GdbIterator( void) ;
|
|
virtual bool SetGDB( IGeomDB* pGDB) ;
|
|
virtual GeomDB* GetGDB( void) const
|
|
{ return m_pGDB ; }
|
|
virtual bool GoTo( int nId) ;
|
|
virtual bool GoToFirstInGroup( int nIdGroup) ;
|
|
virtual bool GoToFirstInGroup( const IGdbIterator& iIter) ;
|
|
virtual bool GoToNext( void) ;
|
|
virtual bool GoToLastInGroup( int nIdGroup) ;
|
|
virtual bool GoToLastInGroup( const IGdbIterator& iIter) ;
|
|
virtual bool GoToPrev( void) ;
|
|
virtual bool EraseAndGoToNext( void) ;
|
|
virtual bool EraseAndGoToPrev( void) ;
|
|
virtual bool GoToFirstNameInGroup( int nIdGroup, const std::string& sName) ;
|
|
virtual bool GoToFirstNameInGroup( const IGdbIterator& iIter, const std::string& sName) ;
|
|
virtual bool GoToNextName( const std::string& sName) ;
|
|
virtual bool GoToLastNameInGroup( int nIdGroup, const std::string& sName) ;
|
|
virtual bool GoToLastNameInGroup( const IGdbIterator& iIter, const std::string& sName) ;
|
|
virtual bool GoToPrevName( const std::string& sName) ;
|
|
virtual bool EraseAndGoToNextName( const std::string& sName) ;
|
|
virtual bool EraseAndGoToPrevName( const std::string& sName) ;
|
|
virtual bool GoToFirstGroupInGroup( int nIdGroup) ;
|
|
virtual bool GoToFirstGroupInGroup( const IGdbIterator& iIter) ;
|
|
virtual bool GoToNextGroup( void) ;
|
|
virtual bool GoToLastGroupInGroup( int nIdGroup) ;
|
|
virtual bool GoToLastGroupInGroup( const IGdbIterator& iIter) ;
|
|
virtual bool GoToPrevGroup( void) ;
|
|
virtual bool EraseAndGoToNextGroup( void) ;
|
|
virtual bool EraseAndGoToPrevGroup( void) ;
|
|
// Gets
|
|
virtual int GetGdbType( void) const ;
|
|
virtual int GetGeoType( void) const ;
|
|
virtual IGeoObj* GetGeoObj( void) ;
|
|
virtual const IGeoObj* GetGeoObj( void) const ;
|
|
virtual Frame3d* GetGroupFrame( void) ;
|
|
virtual const Frame3d* GetGroupFrame( void) const ;
|
|
virtual bool GetGroupFrame( Frame3d& frGlob) const ;
|
|
virtual bool GetGroupGlobFrame( Frame3d& frGlob) const ;
|
|
virtual int GetGroupObjs( void) const ;
|
|
virtual int GetId( void) const ;
|
|
virtual int GetParentId( void) const ;
|
|
virtual bool GetGlobFrame( Frame3d& frGlob) const ;
|
|
virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ;
|
|
virtual bool GetGlobalBBox( BBox3d& b3Glob, int nFlag = BBF_STANDARD) const ;
|
|
virtual bool GetRefBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ;
|
|
// Transformations
|
|
virtual bool Translate( const Vector3d& vtMove) ;
|
|
virtual bool TranslateGlob( const Vector3d& vtMove) ;
|
|
virtual bool TranslateGroup( const Vector3d& vtMove) ;
|
|
virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
|
|
{ double dAngRad = dAngDeg * DEGTORAD ;
|
|
return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
|
|
virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ;
|
|
virtual bool RotateGlob( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
|
|
{ double dAngRad = dAngDeg * DEGTORAD ;
|
|
return RotateGlob( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
|
|
virtual bool RotateGlob( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ;
|
|
virtual bool RotateGroup( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
|
|
{ double dAngRad = dAngDeg * DEGTORAD ;
|
|
return RotateGroup( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
|
|
virtual bool RotateGroup( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ;
|
|
virtual bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ;
|
|
virtual bool ScaleGlob( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ;
|
|
virtual bool ScaleGroup( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ;
|
|
virtual bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) ;
|
|
virtual bool MirrorGlob( const Point3d& ptOn, const Vector3d& vtNorm) ;
|
|
virtual bool MirrorGroup( const Point3d& ptOn, const Vector3d& vtNorm) ;
|
|
virtual bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ;
|
|
virtual bool ShearGlob( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ;
|
|
virtual bool ShearGroup( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ;
|
|
// Attributes
|
|
virtual bool SetLevel( int nLevel) ;
|
|
virtual bool RevertLevel( void) ;
|
|
virtual bool GetLevel( int& nLevel) const ;
|
|
virtual bool GetCalcLevel( int& nLevel) const ;
|
|
virtual bool SetMode( int nMode) ;
|
|
virtual bool RevertMode( void) ;
|
|
virtual bool GetMode( int& nMode) const ;
|
|
virtual bool GetCalcMode( int& nMode) const ;
|
|
virtual bool SetStatus( int nStat) ;
|
|
virtual bool RevertStatus( void) ;
|
|
virtual bool GetStatus( int& nStat) const ;
|
|
virtual bool GetCalcStatus( int& nStat) const ;
|
|
virtual bool SetMark( void) ;
|
|
virtual bool ResetMark( void) ;
|
|
virtual bool GetMark( int& nMark) const ;
|
|
virtual bool GetCalcMark( int& nMark) const ;
|
|
virtual bool SetMaterial( int nMat) ;
|
|
virtual bool SetMaterial( int nMat, const std::string& sMatName) ;
|
|
virtual bool SetMaterial( Color cCol) ;
|
|
virtual bool GetMaterial( int& nMat) const ;
|
|
virtual bool GetMaterial( Material& mMat) const ;
|
|
virtual bool GetMaterial( Color& cCol) const ;
|
|
virtual bool GetCalcMaterial( int& nMat) const ;
|
|
virtual bool GetCalcMaterial( Material& mMat) const ;
|
|
virtual bool GetCalcMaterial( Color& cCol) const ;
|
|
virtual bool SetName( const std::string& sName) ;
|
|
virtual bool GetName( std::string& sName) const ;
|
|
virtual bool ExistsName( void) const ;
|
|
virtual bool RemoveName( void) ;
|
|
virtual bool SetInfo( const std::string& sKey, const std::string& sInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, bool bInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, int nInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, double dInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, const Point3d& ptInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, const Vector3d& vtInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, const Frame3d& frInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, const INTVECTOR& vnInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, const DBLVECTOR& vdInfo) ;
|
|
virtual bool SetInfo( const std::string& sKey, const STRVECTOR& vsInfo) ;
|
|
virtual bool GetInfo( const std::string& sKey, std::string& sInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, bool& bInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, int& nInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, double& dInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, Point3d& ptInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, Vector3d& vtInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, Frame3d& frInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, INTVECTOR& vnInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, DBLVECTOR& vdInfo) const ;
|
|
virtual bool GetInfo( const std::string& sKey, STRVECTOR& vsInfo) const ;
|
|
virtual bool ExistsInfo( const std::string& sKey) const ;
|
|
virtual bool RemoveInfo( const std::string& sKey) ;
|
|
// TextureData
|
|
virtual bool SetTextureName( const std::string& sTxrName) ;
|
|
virtual bool SetTextureFrame( const Frame3d& frTxrRef) ;
|
|
virtual bool RemoveTextureData( void) ;
|
|
virtual bool GetTextureName( std::string& sTxrName) const ;
|
|
virtual bool GetTextureFrame( Frame3d& frTxrRef) const ;
|
|
// UserObj
|
|
virtual bool SetUserObj( IUserObj* pUserObj) ;
|
|
virtual IUserObj* GetUserObj( void) ;
|
|
virtual const IUserObj* GetUserObj( void) const ;
|
|
virtual bool RemoveUserObj( void) ;
|
|
|
|
public :
|
|
GdbIterator( IGeomDB* pGDB = nullptr) ;
|
|
void ResetCurrObjIfSame( GdbObj* pObj)
|
|
{ if ( m_pCurrObj == pObj)
|
|
m_pCurrObj = nullptr ; }
|
|
private :
|
|
GeomDB* m_pGDB ;
|
|
GdbObj* m_pCurrObj ;
|
|
} ;
|