From d4fbe44da9657929856007d5b7a55555c4cb0ddc Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 4 Apr 2017 07:34:28 +0000 Subject: [PATCH] =?UTF-8?q?EgtGeomKernel=201.8c4=20:=20-=20aggiunta=20funz?= =?UTF-8?q?ione=20CopyAllInfoFrom=20per=20copiare=20tutte=20le=20info=20da?= =?UTF-8?q?=20una=20entit=C3=A0=20ad=20un'altra=20-=20corretta=20funzione?= =?UTF-8?q?=20CurveComposite::MergeTwoCurves=20con=20archi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Attribs.cpp | 14 ++ Attribs.h | 1 + CurveComposite.cpp | 3 + EgtGeomKernel.rc | Bin 11710 -> 11710 bytes GeomDB.cpp | 20 +++ GeomDB.h | 349 +++++++++++++++++++++++---------------------- 6 files changed, 213 insertions(+), 174 deletions(-) diff --git a/Attribs.cpp b/Attribs.cpp index 4d67a0c..709fc46 100644 --- a/Attribs.cpp +++ b/Attribs.cpp @@ -355,3 +355,17 @@ Attribs::RemoveInfo( const string& sKey) // non trovata, la info non richiede rimozione return true ; } + +//---------------------------------------------------------------------------- +bool +Attribs::CopyAllInfoFrom( const Attribs& attrSou) +{ + // eseguo copia di tutte le info tranne il nome + for ( auto iIter = attrSou.m_slInfo.cbegin() ; iIter != attrSou.m_slInfo.cend() ; ++ iIter) { + string sKey, sVal ; + SplitFirst( *iIter, string( "") + EQUAL, sKey, sVal) ; + if ( sKey != NAME) + SetInfo( sKey, sVal) ; + } + return true ; +} diff --git a/Attribs.h b/Attribs.h index 80062ad..7df7fd8 100644 --- a/Attribs.h +++ b/Attribs.h @@ -88,6 +88,7 @@ class Attribs bool GetInfo( const std::string& sKey, std::string& sVal) const ; bool ExistsInfo( const std::string& sKey) const ; bool RemoveInfo( const std::string& sKey) ; + bool CopyAllInfoFrom( const Attribs& attrSou) ; private : enum { LEVEL = 0, MODE = 1, STATUS = 2, MARK = 3, DIM = 4} ; diff --git a/CurveComposite.cpp b/CurveComposite.cpp index b3342a5..023a7a2 100644 --- a/CurveComposite.cpp +++ b/CurveComposite.cpp @@ -2625,6 +2625,9 @@ CurveComposite::MergeTwoCurves( ICurve* pCrvP, ICurve* pCrvC, double& dCurrLinTo // verifico la coincidenza del senso di rotazione (verso delle normali e segno angoli al centro) if ( pArcP->GetNormVersor() * pArcC->GetNormVersor() * pArcP->GetAngCenter() * pArcC->GetAngCenter() < 0) return false ; + // verifico di non superare l'angolo giro al centro + if ( abs( pArcP->GetAngCenter() + pArcC->GetAngCenter()) > ANG_FULL) + return false ; // se archi piatti if ( pArcP->IsFlat() && pArcC->IsFlat()) { // se calcolo nuovo arco ok, procedo con l'unione diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 3b3448e1bb3fb85fe3e522b2657d1a37a7b9da76..b65c56579aa92c59bad555d8faca1b321e9ec072 100644 GIT binary patch delta 94 zcmdlNy)SyhFE&P#&A-_cnHfzcD{|{@_Trkr0u;H;XNwSVW8B;$>;>dw2zN+>g;Df- LFmBFL4&ed-WjGrO delta 94 zcmdlNy)SyhFE&Qw&A-_cnHh~ID{|{@_Trkr0u;H;XNwSVW8B;$>;>dw2zN+>g;Df- LFmBFL4&ed-W11TR diff --git a/GeomDB.cpp b/GeomDB.cpp index 2def247..fbf4e3d 100644 --- a/GeomDB.cpp +++ b/GeomDB.cpp @@ -2712,6 +2712,26 @@ GeomDB::RemoveInfo( int nId, const string& sKey) return pGdbObj->RemoveInfo( sKey) ; } +//---------------------------------------------------------------------------- +bool +GeomDB::CopyAllInfoFrom( int nId, int nSouId) +{ + // recupero l'oggetto destinazione + GdbObj* pGdbObj = GetGdbObj( nId) ; + if ( pGdbObj == nullptr) + return false ; + // recupero l'oggetto sorgente + GdbObj* pGdbObjSou = GetGdbObj( nSouId) ; + if ( pGdbObjSou == nullptr) + return false ; + + // copio tutte le Info + if ( pGdbObj != pGdbObjSou && pGdbObjSou->m_pAttribs != nullptr) + return pGdbObj->m_pAttribs->CopyAllInfoFrom( *(pGdbObjSou->m_pAttribs)) ; + else + return true ; +} + //---------------------------------------------------------------------------- // TextureData //---------------------------------------------------------------------------- diff --git a/GeomDB.h b/GeomDB.h index 0efc6ff..5c16c36 100644 --- a/GeomDB.h +++ b/GeomDB.h @@ -31,187 +31,188 @@ class GeomDB : public IGeomDB friend class GdbGeo ; public : - virtual ~GeomDB( void) ; - virtual bool Init( void) ; - virtual bool Clear( void) ; - virtual bool Load( const std::string& sFileIn, int nGroupId = GDB_ID_ROOT) ; - virtual bool Save( int nId, const std::string& sFileOut, int nFlag = GDB_SV_BIN) const ; - virtual bool ExistsObj( int nId) const ; - virtual int AddGroup( int nId, int nParentId, const Frame3d& frFrame) ; - virtual int InsertGroup( int nId, int nRefId, int nSonBeforeAfter, const Frame3d& frFrame) ; - virtual int AddGeoObj( int nId, int nParentId, IGeoObj* pGeoObj) ; - virtual int InsertGeoObj( int nId, int nRefId, int nSonBeforeAfter, IGeoObj* pGeoObj) ; - virtual bool ReplaceGeoObj( int nId, IGeoObj* pGeoObj) ; - virtual int GetFirstInGroup( int nGroupId) const ; - virtual int GetNext( int nId) const ; - virtual int GetLastInGroup( int nGroupId) const ; - virtual int GetPrev( int nId) const ; - virtual int GetFirstNameInGroup( int nGroupId, const std::string& sName) const ; - virtual int GetNextName( int nId, const std::string& sName) const ; - virtual int GetLastNameInGroup( int nGroupId, const std::string& sName) const ; - virtual int GetPrevName( int nId, const std::string& sName) const ; - virtual int GetFirstGroupInGroup( int nGroupId) const ; - virtual int GetNextGroup( int nId) const ; - virtual int GetLastGroupInGroup( int nGroupId) const ; - virtual int GetPrevGroup( int nId) const ; - virtual int GetGdbType( int nId) const ; - virtual int GetGeoType( int nId) const ; - virtual IGeoObj* GetGeoObj( int nId) ; - virtual const IGeoObj* GetGeoObj( int nId) const ; - virtual Frame3d* GetGroupFrame( int nId) ; - virtual const Frame3d* GetGroupFrame( int nId) const ; - virtual bool GetGroupFrame( int nId, Frame3d& frGrp) const ; - virtual bool GetGroupGlobFrame( int nId, Frame3d& frGlob) const ; - virtual int GetGroupObjs( int nId) const ; - virtual int GetParentId( int nId) const ; - virtual bool GetGlobFrame( int nId, Frame3d& frGlob) const - { return GetGroupGlobFrame( GetParentId( nId), frGlob) ; } - virtual bool GetLocalBBox( int nId, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; - virtual bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_STANDARD) const ; - virtual bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; - virtual int Copy( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) - { return Copy( nIdSou, nIdDest, nRefId, nSonBeforeAfter, false) ; } - virtual int CopyGlob( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) - { return Copy( nIdSou, nIdDest, nRefId, nSonBeforeAfter, true) ; } - virtual bool Relocate( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) - { return Relocate( nId, nRefId, nSonBeforeAfter, false) ; } - virtual bool RelocateGlob( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) - { return Relocate( nId, nRefId, nSonBeforeAfter, true) ; } - virtual bool GroupSwap( int nId1, int nId2, bool bSwapRef, bool bMark = false) ; - virtual int GetNewId( void) const ; - virtual bool ChangeId( int nId, int nNewId) ; - virtual bool Erase( int nId) ; - virtual IGeoObj* RemoveGeoObjAndErase( int nId) ; - virtual bool EmptyGroup( int nId) ; + ~GeomDB( void) override ; + bool Init( void) override ; + bool Clear( void) override ; + bool Load( const std::string& sFileIn, int nGroupId = GDB_ID_ROOT) override ; + bool Save( int nId, const std::string& sFileOut, int nFlag = GDB_SV_BIN) const override ; + bool ExistsObj( int nId) const override ; + int AddGroup( int nId, int nParentId, const Frame3d& frFrame) override ; + int InsertGroup( int nId, int nRefId, int nSonBeforeAfter, const Frame3d& frFrame) override ; + int AddGeoObj( int nId, int nParentId, IGeoObj* pGeoObj) override ; + int InsertGeoObj( int nId, int nRefId, int nSonBeforeAfter, IGeoObj* pGeoObj) override ; + bool ReplaceGeoObj( int nId, IGeoObj* pGeoObj) override ; + int GetFirstInGroup( int nGroupId) const override ; + int GetNext( int nId) const override ; + int GetLastInGroup( int nGroupId) const override ; + int GetPrev( int nId) const override ; + int GetFirstNameInGroup( int nGroupId, const std::string& sName) const override ; + int GetNextName( int nId, const std::string& sName) const override ; + int GetLastNameInGroup( int nGroupId, const std::string& sName) const override ; + int GetPrevName( int nId, const std::string& sName) const override ; + int GetFirstGroupInGroup( int nGroupId) const override ; + int GetNextGroup( int nId) const override ; + int GetLastGroupInGroup( int nGroupId) const override ; + int GetPrevGroup( int nId) const override ; + int GetGdbType( int nId) const override ; + int GetGeoType( int nId) const override ; + IGeoObj* GetGeoObj( int nId) override ; + const IGeoObj* GetGeoObj( int nId) const override ; + Frame3d* GetGroupFrame( int nId) override ; + const Frame3d* GetGroupFrame( int nId) const override ; + bool GetGroupFrame( int nId, Frame3d& frGrp) const override ; + bool GetGroupGlobFrame( int nId, Frame3d& frGlob) const override ; + int GetGroupObjs( int nId) const override ; + int GetParentId( int nId) const override ; + bool GetGlobFrame( int nId, Frame3d& frGlob) const override + { return GetGroupGlobFrame( GetParentId( nId), frGlob) ; } + bool GetLocalBBox( int nId, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const override ; + bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_STANDARD) const override ; + bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const override ; + int Copy( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) override + { return Copy( nIdSou, nIdDest, nRefId, nSonBeforeAfter, false) ; } + int CopyGlob( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) override + { return Copy( nIdSou, nIdDest, nRefId, nSonBeforeAfter, true) ; } + bool Relocate( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) override + { return Relocate( nId, nRefId, nSonBeforeAfter, false) ; } + bool RelocateGlob( int nId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) override + { return Relocate( nId, nRefId, nSonBeforeAfter, true) ; } + bool GroupSwap( int nId1, int nId2, bool bSwapRef, bool bMark = false) override ; + int GetNewId( void) const override ; + bool ChangeId( int nId, int nNewId) override ; + bool Erase( int nId) override ; + IGeoObj* RemoveGeoObjAndErase( int nId) override ; + bool EmptyGroup( int nId) override ; // Transformations - virtual bool Translate( int nId, const Vector3d& vtMove) ; - virtual bool TranslateGlob( int nId, const Vector3d& vtMove) ; - virtual bool TranslateGroup( int nId, const Vector3d& vtMove) ; - virtual bool Rotate( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) - { double dAngRad = dAngDeg * DEGTORAD ; - return Rotate( nId, ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } - virtual bool Rotate( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ; - virtual bool RotateGlob( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) - { double dAngRad = dAngDeg * DEGTORAD ; - return RotateGlob( nId, ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } - virtual bool RotateGlob( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ; - virtual bool RotateGroup( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) - { double dAngRad = dAngDeg * DEGTORAD ; - return RotateGroup( nId, ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } - virtual bool RotateGroup( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) ; - virtual bool Scale( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ; - virtual bool ScaleGlob( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ; - virtual bool ScaleGroup( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) ; - virtual bool Mirror( int nId, const Point3d& ptOn, const Vector3d& vtNorm) ; - virtual bool MirrorGlob( int nId, const Point3d& ptOn, const Vector3d& vtNorm) ; - virtual bool MirrorGroup( int nId, const Point3d& ptOn, const Vector3d& vtNorm) ; - virtual bool Shear( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ; - virtual bool ShearGlob( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ; - virtual bool ShearGroup( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) ; + bool Translate( int nId, const Vector3d& vtMove) override ; + bool TranslateGlob( int nId, const Vector3d& vtMove) override ; + bool TranslateGroup( int nId, const Vector3d& vtMove) override ; + bool Rotate( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) override + { double dAngRad = dAngDeg * DEGTORAD ; + return Rotate( nId, ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } + bool Rotate( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) override ; + bool RotateGlob( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) override + { double dAngRad = dAngDeg * DEGTORAD ; + return RotateGlob( nId, ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } + bool RotateGlob( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) override ; + bool RotateGroup( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) override + { double dAngRad = dAngDeg * DEGTORAD ; + return RotateGroup( nId, ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } + bool RotateGroup( int nId, const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) override ; + bool Scale( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) override ; + bool ScaleGlob( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) override ; + bool ScaleGroup( int nId, const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) override ; + bool Mirror( int nId, const Point3d& ptOn, const Vector3d& vtNorm) override ; + bool MirrorGlob( int nId, const Point3d& ptOn, const Vector3d& vtNorm) override ; + bool MirrorGroup( int nId, const Point3d& ptOn, const Vector3d& vtNorm) override ; + bool Shear( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) override ; + bool ShearGlob( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) override ; + bool ShearGroup( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) override ; // Selection - virtual bool SelectObj( int nId, bool bOnlyIfVisible = false) ; - virtual bool DeselectObj( int nId) ; - virtual bool SelectGroupObjs( int nId, int nFilter = 0, bool bOnlyIfVisible = false) ; - virtual bool DeselectGroupObjs( int nId) ; - virtual bool IsSelectedObj( int nId) const ; - virtual int GetSelectedObjNbr( void) const ; - virtual int GetFirstSelectedObj( void) const ; - virtual int GetNextSelectedObj( void) const ; - virtual int GetLastSelectedObj( void) const ; - virtual int GetPrevSelectedObj( void) const ; - virtual bool ClearSelection( void) ; + bool SelectObj( int nId, bool bOnlyIfVisible = false) override ; + bool DeselectObj( int nId) override ; + bool SelectGroupObjs( int nId, int nFilter = 0, bool bOnlyIfVisible = false) override ; + bool DeselectGroupObjs( int nId) override ; + bool IsSelectedObj( int nId) const override ; + int GetSelectedObjNbr( void) const override ; + int GetFirstSelectedObj( void) const override ; + int GetNextSelectedObj( void) const override ; + int GetLastSelectedObj( void) const override ; + int GetPrevSelectedObj( void) const override ; + bool ClearSelection( void) override ; // Attributes - virtual bool DumpAttributes( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const ; - virtual bool CopyAttributes( int nIdSou, int nIdDest) ; - virtual bool SetLevel( int nId, int nLevel) ; - virtual bool RevertLevel( int nId) ; - virtual bool GetLevel( int nId, int& nLevel) const ; - virtual bool GetCalcLevel( int nId, int& nLevel) const ; - virtual bool SetMode( int nId, int nMode) ; - virtual bool RevertMode( int nId) ; - virtual bool GetMode( int nId, int& nMode) const ; - virtual bool GetCalcMode( int nId, int& nMode) const ; - virtual bool SetStatus( int nId, int nStat) ; - virtual bool RevertStatus( int nId) ; - virtual bool GetStatus( int nId, int& nStat) const ; - virtual bool GetCalcStatus( int nId, int& nStat) const ; - virtual bool SetMark( int nId) ; - virtual bool ResetMark( int nId) ; - virtual bool GetMark( int nId, int& nMark) const ; - virtual bool GetCalcMark( int nId, int& nMark) const ; - virtual bool CopyMaterial( int nIdSou, int nIdDest) ; - virtual bool SetDefaultMaterial( Color cCol) ; - virtual bool GetDefaultMaterial( Color& cCol) const ; - virtual bool SetMaterial( int nId, int nMat) ; - virtual bool SetMaterial( int nId, const std::string& sMatName) ; - virtual bool SetMaterial( int nId, Color cCol) ; - virtual bool GetMaterial( int nId, int& nMat) const ; - virtual bool GetMaterial( int nId, Material& mMat) const ; - virtual bool GetMaterial( int nId, Color& cCol) const ; - virtual bool GetCalcMaterial( int nId, int& nMat) const ; - virtual bool GetCalcMaterial( int nId, Material& mMat) const ; - virtual bool GetCalcMaterial( int nId, Color& cCol) const ; - virtual bool SetName( int nId, const std::string& sName) ; - virtual bool GetName( int nId, std::string& sName) const ; - virtual bool ExistsName( int nId) const ; - virtual bool RemoveName( int nId) ; - virtual bool SetInfo( int nId, const std::string& sKey, const std::string& sInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, bool bInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, int nInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, double dInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, const Point3d& ptInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, const Vector3d& vtInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, const BBox3d& b3Info) ; - virtual bool SetInfo( int nId, const std::string& sKey, const Frame3d& frInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, const INTVECTOR& vnInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, const DBLVECTOR& vdInfo) ; - virtual bool SetInfo( int nId, const std::string& sKey, const STRVECTOR& vsInfo) ; - virtual bool GetInfo( int nId, const std::string& sKey, std::string& sInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, bool& bInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, int& nInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, double& dInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, Point3d& ptInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, Vector3d& vtInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, BBox3d& b3Info) const ; - virtual bool GetInfo( int nId, const std::string& sKey, Frame3d& frInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, INTVECTOR& vnInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, DBLVECTOR& vdInfo) const ; - virtual bool GetInfo( int nId, const std::string& sKey, STRVECTOR& vsInfo) const ; - virtual bool ExistsInfo( int nId, const std::string& sKey) const ; - virtual bool RemoveInfo( int nId, const std::string& sKey) ; + bool DumpAttributes( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const override ; + bool CopyAttributes( int nIdSou, int nIdDest) override ; + bool SetLevel( int nId, int nLevel) override ; + bool RevertLevel( int nId) override ; + bool GetLevel( int nId, int& nLevel) const override ; + bool GetCalcLevel( int nId, int& nLevel) const override ; + bool SetMode( int nId, int nMode) override ; + bool RevertMode( int nId) override ; + bool GetMode( int nId, int& nMode) const override ; + bool GetCalcMode( int nId, int& nMode) const override ; + bool SetStatus( int nId, int nStat) override ; + bool RevertStatus( int nId) override ; + bool GetStatus( int nId, int& nStat) const override ; + bool GetCalcStatus( int nId, int& nStat) const override ; + bool SetMark( int nId) override ; + bool ResetMark( int nId) override ; + bool GetMark( int nId, int& nMark) const override ; + bool GetCalcMark( int nId, int& nMark) const override ; + bool CopyMaterial( int nIdSou, int nIdDest) override ; + bool SetDefaultMaterial( Color cCol) override ; + bool GetDefaultMaterial( Color& cCol) const override ; + bool SetMaterial( int nId, int nMat) override ; + bool SetMaterial( int nId, const std::string& sMatName) override ; + bool SetMaterial( int nId, Color cCol) override ; + bool GetMaterial( int nId, int& nMat) const override ; + bool GetMaterial( int nId, Material& mMat) const override ; + bool GetMaterial( int nId, Color& cCol) const override ; + bool GetCalcMaterial( int nId, int& nMat) const override ; + bool GetCalcMaterial( int nId, Material& mMat) const override ; + bool GetCalcMaterial( int nId, Color& cCol) const override ; + bool SetName( int nId, const std::string& sName) override ; + bool GetName( int nId, std::string& sName) const override ; + bool ExistsName( int nId) const override ; + bool RemoveName( int nId) override ; + bool SetInfo( int nId, const std::string& sKey, const std::string& sInfo) override ; + bool SetInfo( int nId, const std::string& sKey, bool bInfo) override ; + bool SetInfo( int nId, const std::string& sKey, int nInfo) override ; + bool SetInfo( int nId, const std::string& sKey, double dInfo) override ; + bool SetInfo( int nId, const std::string& sKey, const Point3d& ptInfo) override ; + bool SetInfo( int nId, const std::string& sKey, const Vector3d& vtInfo) override ; + bool SetInfo( int nId, const std::string& sKey, const BBox3d& b3Info) override ; + bool SetInfo( int nId, const std::string& sKey, const Frame3d& frInfo) override ; + bool SetInfo( int nId, const std::string& sKey, const INTVECTOR& vnInfo) override ; + bool SetInfo( int nId, const std::string& sKey, const DBLVECTOR& vdInfo) override ; + bool SetInfo( int nId, const std::string& sKey, const STRVECTOR& vsInfo) override ; + bool GetInfo( int nId, const std::string& sKey, std::string& sInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, bool& bInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, int& nInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, double& dInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, Point3d& ptInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, Vector3d& vtInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, BBox3d& b3Info) const override ; + bool GetInfo( int nId, const std::string& sKey, Frame3d& frInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, INTVECTOR& vnInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, DBLVECTOR& vdInfo) const override ; + bool GetInfo( int nId, const std::string& sKey, STRVECTOR& vsInfo) const override ; + bool ExistsInfo( int nId, const std::string& sKey) const override ; + bool RemoveInfo( int nId, const std::string& sKey) override ; + bool CopyAllInfoFrom( int nId, int nSouId) override ; // TextureData - virtual bool DumpTextureData( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const ; - virtual bool SetTextureName( int nId, const std::string& sTxrName) ; - virtual bool SetTextureFrame( int nId, const Frame3d& frTxrRef) ; - virtual bool RemoveTextureData( int nId) ; - virtual bool GetTextureName( int nId, std::string& sTxrName) const ; - virtual bool GetTextureFrame( int nId, Frame3d& frTxrRef) const ; + bool DumpTextureData( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const override ; + bool SetTextureName( int nId, const std::string& sTxrName) override ; + bool SetTextureFrame( int nId, const Frame3d& frTxrRef) override ; + bool RemoveTextureData( int nId) override ; + bool GetTextureName( int nId, std::string& sTxrName) const override ; + bool GetTextureFrame( int nId, Frame3d& frTxrRef) const override ; // UserObj - virtual bool SetUserObj( int nId, IUserObj* pUserObj) ; - virtual IUserObj* GetUserObj( int nId) ; - virtual const IUserObj* GetUserObj( int nId) const ; - virtual bool DumpUserObj( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const ; - virtual bool CopyUserObj( int nIdSou, int nIdDest) ; - virtual bool RemoveUserObj( int nId) ; + bool SetUserObj( int nId, IUserObj* pUserObj) override ; + IUserObj* GetUserObj( int nId) override ; + const IUserObj* GetUserObj( int nId) const override ; + bool DumpUserObj( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const override ; + bool CopyUserObj( int nIdSou, int nIdDest) override ; + bool RemoveUserObj( int nId) override ; // Material library - virtual int AddMaterial( const std::string& sName, const Material& matM) ; - virtual int FindMaterial( const std::string& sName) const ; - virtual bool EraseMaterial( int nMat, bool& bInUse) ; - virtual bool GetMaterialData( int nMat, Material& matM) const ; - virtual bool GetMaterialName( int nMat, std::string& sName) const ; - virtual int GetMaxMaterialId( void) const ; - virtual bool ExistsMaterial( int nMat) const ; - virtual bool IsCustomMaterial( int nMat, bool& bCustom) const ; - virtual bool ModifyMaterialData( int nMat, const Material& matM) ; - virtual bool ModifyMaterialName( int nMat, const std::string& sName) ; + int AddMaterial( const std::string& sName, const Material& matM) override ; + int FindMaterial( const std::string& sName) const override ; + bool EraseMaterial( int nMat, bool& bInUse) override ; + bool GetMaterialData( int nMat, Material& matM) const override ; + bool GetMaterialName( int nMat, std::string& sName) const override ; + int GetMaxMaterialId( void) const override ; + bool ExistsMaterial( int nMat) const override ; + bool IsCustomMaterial( int nMat, bool& bCustom) const override ; + bool ModifyMaterialData( int nMat, const Material& matM) override ; + bool ModifyMaterialName( int nMat, const std::string& sName) override ; // Grid - virtual bool SetGridFrame( const Frame3d& frFrame) - { if ( ! frFrame.IsValid()) - return false ; - m_GridFrame = frFrame ; - return true ; } - virtual const Frame3d& GetGridFrame( void) - { return m_GridFrame ; } + bool SetGridFrame( const Frame3d& frFrame) override + { if ( ! frFrame.IsValid()) + return false ; + m_GridFrame = frFrame ; + return true ; } + const Frame3d& GetGridFrame( void) override + { return m_GridFrame ; } public : GeomDB( void) ;