EgtGeomKernel :
- modifiche per Copy di oggetti Geo.
This commit is contained in:
+28
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user