//---------------------------------------------------------------------------- // EgalTech 2013-2013 //---------------------------------------------------------------------------- // File : GeoPoint3d.h Data : 22.11.13 Versione : 1.3a1 // Contenuto : Dichiarazione della classe Punto Geometrico 3d. // // // // Modifiche : 10.10.13 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "ObjGraphicsMgr.h" #include "DllMain.h" #include "GeoObjRW.h" #include "/EgtDev/Include/EGkGeoPoint3d.h" //---------------------------------------------------------------------------- class GeoPoint3d : public IGeoPoint3d, public IGeoObjRW { public : // IGeoObj virtual ~GeoPoint3d( void) ; virtual GeoPoint3d* Clone( void) const ; virtual GeoObjType GetType( void) const ; virtual bool IsValid( void) const { return true ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const ; virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) { m_OGrMgr.Reset() ; m_ptP.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_ptP.Rotate( ptAx, vtAx, dCosAng, dSinAng) ; } virtual bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) { m_OGrMgr.Reset() ; return m_ptP.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;} virtual bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) { m_OGrMgr.Reset() ; return m_ptP.Mirror( ptOn, vtNorm) ;} virtual bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) { m_OGrMgr.Reset() ; return m_ptP.Shear( ptOn, vtNorm, vtDir, dCoeff) ;} virtual bool ToGlob( const Frame3d& frRef) { m_OGrMgr.Reset() ; return m_ptP.ToGlob( frRef) ;} virtual bool ToLoc( const Frame3d& frRef) { m_OGrMgr.Reset() ; return m_ptP.ToLoc( frRef) ;} virtual bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) { m_OGrMgr.Reset() ; return m_ptP.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() ; } virtual void SetTempProp( int nProp) { m_nTempProp = nProp ; } virtual int GetTempProp( void) { return m_nTempProp ; } public : // IGeoPoint3d virtual bool CopyFrom( const IGeoObj* pGObjSrc) ; virtual bool Set( const Point3d& ptP) ; virtual const Point3d& GetPoint( void) const { return m_ptP ; } public : // IGeoObjRW virtual int GetNgeId( void) const ; virtual bool Save( NgeWriter& ngeOut) const ; virtual bool Load( NgeReader& ngeIn) ; public : GeoPoint3d( void) ; GeoPoint3d( const GeoPoint3d& gpSrc) { if ( ! CopyFrom( gpSrc)) LOG_ERROR( GetEGkLogger(), "GeoPoint3d : copy constructor error") } GeoPoint3d& operator =( const GeoPoint3d& gpSrc) { if ( ! CopyFrom( gpSrc)) LOG_ERROR( GetEGkLogger(), "GeoPoint3d : copy error") return *this ; } private : bool CopyFrom( const GeoPoint3d& gpSrc) ; private : ObjGraphicsMgr m_OGrMgr ; // gestore grafica dell'oggetto Point3d m_ptP ; // oggetto int m_nTempProp ; // proprietà temporanea } ;