EgtExecutor 2.1k5 :
- aggiunte funzioni Exe/Lua VolZmapGetPartBBox e VolZmapGetPartBBoxGlob.
This commit is contained in:
+33
-1
@@ -96,13 +96,45 @@ ExeExplodeVolume( int nId, int* pnCount)
|
||||
return nFirstId ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapGetPartBBox( int nId, int nPart, int nFlag, BBox3d& b3Box)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pVZM == nullptr)
|
||||
return false ;
|
||||
// recupero il bounding box della parte dell'oggetto in locale
|
||||
return pVZM->GetPartLocalBBox( nPart, b3Box, nFlag) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapGetPartBBoxGlob( int nId, int nPart, int nFlag, BBox3d& b3Box)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pVZM == nullptr)
|
||||
return false ;
|
||||
// recupero il riferimento globale del gruppo cui appartiene
|
||||
Frame3d frGlob ;
|
||||
if ( nId != GDB_ID_ROOT && ! pGeomDB->GetGroupGlobFrame( pGeomDB->GetParentId( nId), frGlob))
|
||||
return false ;
|
||||
// recupero il bounding box della parte dell'oggetto in globale
|
||||
return pVZM->GetPartBBox( nPart, frGlob, b3Box, nFlag) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
ExeCopyVolZmapPart( int nId, int nPart, int nDestGrpId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero lo Zmap e copio la parte indicata
|
||||
// recupero lo Zmap
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pVZM == nullptr)
|
||||
return GDB_ID_NULL ;
|
||||
|
||||
Reference in New Issue
Block a user