EgtGeomKernel :

- modifiche per Copy di oggetti Geo.
This commit is contained in:
Dario Sassi
2014-03-26 18:28:52 +00:00
parent 0a1c571048
commit 7d64584eba
22 changed files with 1803 additions and 112 deletions
+28 -10
View File
@@ -50,12 +50,10 @@ GeoFrame3d::Set( const Point3d& ptOrig, const Vector3d& vtDirX,
bool
GeoFrame3d::Set( const Frame3d& frF)
{
// assegno i dati
m_frF = frF ;
// imposto ricalcolo della grafica
m_OGrMgr.Reset() ;
// assegno i dati
m_frF = frF ;
return true ;
}
@@ -63,17 +61,37 @@ GeoFrame3d::Set( const Frame3d& frF)
GeoFrame3d*
GeoFrame3d::Clone( void) const
{
GeoFrame3d* pGFr ;
// alloco oggetto
pGFr = new(nothrow) GeoFrame3d ;
if ( pGFr != nullptr)
*pGFr = *(const_cast<GeoFrame3d*>(this)) ;
GeoFrame3d* pGFr = new(nothrow) GeoFrame3d ;
if ( pGFr != nullptr) {
if ( ! pGFr->Copy( *this)) {
delete pGFr ;
return nullptr ;
}
}
return pGFr ;
}
//----------------------------------------------------------------------------
bool
GeoFrame3d::Copy( const IGeoObj* pGObjSrc)
{
const GeoFrame3d* pGFr = dynamic_cast<const GeoFrame3d*>( pGObjSrc) ;
if ( pGFr == nullptr)
return false ;
return Copy( *pGFr) ;
}
//----------------------------------------------------------------------------
bool
GeoFrame3d::Copy( const GeoFrame3d& gfSrc)
{
if ( &gfSrc == this)
return true ;
return Set( gfSrc.m_frF) ;
}
//----------------------------------------------------------------------------
const string&
GeoFrame3d::GetTitle( void) const