EgtGeomKernel 1.5a4 : Implementazione BoundingBox.
This commit is contained in:
@@ -149,6 +149,38 @@ GdbGroup::Load( const string& sType, Scanner& TheScanner, int& nParentId)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbGroup::GetLocalBBox( BBox3d& b3Loc) const
|
||||
{
|
||||
b3Loc.Reset() ;
|
||||
const GdbNode* pGdbNode = GetFirstNode() ;
|
||||
while ( pGdbNode != nullptr) {
|
||||
BBox3d b3B ;
|
||||
// voglio il box come appare nel frame del gruppo, quindi passo frame identità
|
||||
if ( pGdbNode->GetBBox( GLOB_FRM, b3B))
|
||||
b3Loc.Add( b3B) ;
|
||||
pGdbNode = pGdbNode->GetNext() ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbGroup::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const
|
||||
{
|
||||
Frame3d frCurr = m_gfrFrame.m_frF * frRef ;
|
||||
b3Ref.Reset() ;
|
||||
const GdbNode* pGdbNode = GetFirstNode() ;
|
||||
while ( pGdbNode != nullptr) {
|
||||
BBox3d b3B ;
|
||||
if ( pGdbNode->GetBBox( frCurr, b3B))
|
||||
b3Ref.Add( b3B) ;
|
||||
pGdbNode = pGdbNode->GetNext() ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbGroup::Translate( const Vector3d& vtMove)
|
||||
|
||||
Reference in New Issue
Block a user