cgma
|
Public Member Functions | |
RppVolume (const Vector3d &lower, const Vector3d &upper) | |
virtual double | getFarthestExtentFromOrigin () const |
Protected Member Functions | |
virtual iBase_EntityHandle | getHandle (bool positive, iGeom_Instance &igm, double world_size) |
Protected Attributes | |
Vector3d | dimensions |
Vector3d | center_offset |
Definition at line 538 of file volumes.cpp.
RppVolume::RppVolume | ( | const Vector3d & | lower, |
const Vector3d & | upper | ||
) | [inline] |
Definition at line 545 of file volumes.cpp.
{ for( int i = 0; i < 3; ++i ){ dimensions.v[i] = upper.v[i] - lower.v[i]; center_offset.v[i] = (upper.v[i]+lower.v[i]) / 2.0; } }
virtual double RppVolume::getFarthestExtentFromOrigin | ( | ) | const [inline, virtual] |
Implements SurfaceVolume.
Definition at line 553 of file volumes.cpp.
{ return dimensions.length() + center_offset.length(); }
virtual iBase_EntityHandle RppVolume::getHandle | ( | bool | positive, |
iGeom_Instance & | igm, | ||
double | world_size | ||
) | [inline, protected, virtual] |
Implements SurfaceVolume.
Definition at line 558 of file volumes.cpp.
{ int igm_result; iBase_EntityHandle rpp; iGeom_createBrick( igm, dimensions.v[0], dimensions.v[1], dimensions.v[2], &rpp, &igm_result ); CHECK_IGEOM( igm_result, "making rpp" ); iGeom_moveEnt( igm, rpp, center_offset.v[0], center_offset.v[1], center_offset.v[2], &igm_result ); CHECK_IGEOM( igm_result, "moving rpp" ); iBase_EntityHandle final_rpp = embedWithinWorld( positive, igm, world_size, rpp, false ); return final_rpp; }
Vector3d RppVolume::center_offset [protected] |
Definition at line 542 of file volumes.cpp.
Vector3d RppVolume::dimensions [protected] |
Definition at line 541 of file volumes.cpp.