41a38fef3b
- aggiunta entità testo (con font Nfe e di sistema) - in tutte le rotate ora l'angolo è in gradi - aggiunta trasformazione Shear (scorrimento) - aggiunta trsformazione LocToLoc - Set/GetInfo specializzate per i diversi tipi di informazioni - Copy e Relocate con possibilità di indicare l'entità di riferimento rispetto a cui inserire - aggiunte trasformazioni a PolyLine.
94 lines
4.4 KiB
C++
94 lines
4.4 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2013
|
|
//----------------------------------------------------------------------------
|
|
// File : GeoFrame3d.h Data : 02.12.13 Versione : 1.4a3
|
|
// Contenuto : Dichiarazione della classe Riferimento Geometrico 3d.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 02.12.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "ObjGraphicsMgr.h"
|
|
#include "DllMain.h"
|
|
#include "GeoObjRW.h"
|
|
#include "/EgtDev/Include/EGkGeoFrame3d.h"
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
class GeoFrame3d : public IGeoFrame3d, public IGeoObjRW
|
|
{
|
|
public : // IGeoObj
|
|
virtual ~GeoFrame3d( void) ;
|
|
virtual GeoFrame3d* Clone( void) const ;
|
|
virtual GeoObjType GetType( void) const ;
|
|
virtual bool IsValid( void) const
|
|
{ return ( m_frF.GetType() != Frame3d::ERR) ; }
|
|
virtual const std::string& GetTitle( void) const ;
|
|
virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ;
|
|
virtual bool GetLocalBBox( BBox3d& b3Loc) const ;
|
|
virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ;
|
|
virtual bool GetFrame( Frame3d& frF) const
|
|
{ frF = m_frF ; return true ;}
|
|
virtual bool Translate( const Vector3d& vtMove)
|
|
{ m_OGrMgr.Reset() ; m_frF.Translate( vtMove) ; return true ; }
|
|
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)
|
|
{ m_OGrMgr.Reset() ; return m_frF.Rotate( ptAx, vtAx, dCosAng, dSinAng) ; }
|
|
virtual bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ)
|
|
{ return false ; }
|
|
virtual bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
|
|
{ return false ; }
|
|
virtual bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff)
|
|
{ return false ; }
|
|
virtual bool ToGlob( const Frame3d& frRef)
|
|
{ m_OGrMgr.Reset() ; return m_frF.ToGlob( frRef) ;}
|
|
virtual bool ToLoc( const Frame3d& frRef)
|
|
{ m_OGrMgr.Reset() ; return m_frF.ToLoc( frRef) ;}
|
|
virtual bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest)
|
|
{ m_OGrMgr.Reset() ; return m_frF.LocToLoc( frOri, frDest) ;}
|
|
virtual void SetObjGraphics( IObjGraphics* pOGr)
|
|
{ m_OGrMgr.SetObjGraphics( pOGr) ; }
|
|
virtual IObjGraphics* GetObjGraphics( void)
|
|
{ return m_OGrMgr.GetObjGraphics() ; }
|
|
virtual const IObjGraphics* GetObjGraphics( void) const
|
|
{ return m_OGrMgr.GetObjGraphics() ; }
|
|
|
|
public : // IGeoFrame3d
|
|
virtual bool Copy( const IGeoObj* pGObjSrc) ;
|
|
virtual bool Set( const Point3d& ptOrig, const Vector3d& vtDirX,
|
|
const Vector3d& vtDirY, const Vector3d& vtDirZ) ;
|
|
virtual bool Set( const Point3d& ptOrig, const Point3d& ptOnX, const Point3d& ptNearY) ;
|
|
virtual bool Set( const Point3d& ptOrig, const Vector3d& vtDirZ) ;
|
|
virtual bool Set( const Frame3d& frF) ;
|
|
virtual const Frame3d& GetFrame( void) const
|
|
{ return m_frF ; }
|
|
virtual bool GetDrawWithArrowHeads( double dLenA, double dFrazLenAH,
|
|
PolyLine& plX, PolyLine& plY, PolyLine& plZ) const ;
|
|
|
|
public : // IGeoObjRW
|
|
virtual int GetNgeId( void) const ;
|
|
virtual bool Save( NgeWriter& ngeOut) const ;
|
|
virtual bool Load( NgeReader& ngeIn) ;
|
|
|
|
public :
|
|
GeoFrame3d( void) ;
|
|
inline const GeoFrame3d& operator =( const GeoFrame3d& gfSrc)
|
|
{ if ( ! Copy( gfSrc))
|
|
LOG_ERROR( GetEGkLogger(), "GeoFrame3d : copy error")
|
|
return *this ; }
|
|
|
|
private :
|
|
bool Copy( const GeoFrame3d& gfSrc) ;
|
|
|
|
private :
|
|
ObjGraphicsMgr m_OGrMgr ; // gestore grafica dell'oggetto
|
|
Frame3d m_frF ; // oggetto
|
|
} ;
|