cgma
RecVolume Class Reference
Inheritance diagram for RecVolume:
SurfaceVolume

List of all members.

Public Member Functions

 RecVolume (const Vector3d &center_p, const Vector3d &axis, const Vector3d &v1, const Vector3d &v2)
 RecVolume (const Vector3d &center_p, const Vector3d &axis, const Vector3d &v1, double length2)
virtual double getFarthestExtentFromOrigin () const

Protected Member Functions

virtual iBase_EntityHandle getHandle (bool positive, iGeom_Instance &igm, double world_size)

Protected Attributes

Vector3d base_center
Transform transform
double length
double radius1
double radius2

Detailed Description

Definition at line 576 of file volumes.cpp.


Constructor & Destructor Documentation

RecVolume::RecVolume ( const Vector3d center_p,
const Vector3d axis,
const Vector3d v1,
const Vector3d v2 
) [inline]

Definition at line 584 of file volumes.cpp.

                                                                                                      :
    base_center( center_p ), transform( axesImage( v1, v2, axis, center_p ) ), 
    length( axis.length() ), radius1( v1.length() ), radius2( v2.length() )
  {}
RecVolume::RecVolume ( const Vector3d center_p,
const Vector3d axis,
const Vector3d v1,
double  length2 
) [inline]

Definition at line 589 of file volumes.cpp.

                                                                                                  :
    base_center( center_p ), transform( axesImage( v1, v1.cross(axis), axis, center_p ) ), 
    length( axis.length() ), radius1( v1.length() ), radius2( length2 )
  {}

Member Function Documentation

virtual double RecVolume::getFarthestExtentFromOrigin ( ) const [inline, virtual]

Implements SurfaceVolume.

Definition at line 594 of file volumes.cpp.

                                                       {
    return base_center.length() + length + std::max( radius1, radius2 );
  }
virtual iBase_EntityHandle RecVolume::getHandle ( bool  positive,
iGeom_Instance igm,
double  world_size 
) [inline, protected, virtual]

Implements SurfaceVolume.

Definition at line 599 of file volumes.cpp.

                                                                                               {
    int igm_result;
    iBase_EntityHandle rec;
    
    iGeom_createCylinder( igm, length, radius1, radius2, &rec, &igm_result );
    CHECK_IGEOM( igm_result, "creating rec" );
    

    double movement_factor = length / 2.0;
    iGeom_moveEnt( igm, rec, 0, 0, movement_factor, &igm_result );
    CHECK_IGEOM( igm_result, "moving rec" );
    
    rec = applyTransform( transform, igm, rec );
    iBase_EntityHandle final_rec = embedWithinWorld( positive, igm, world_size, rec, false );
    return final_rec;
  }

Member Data Documentation

Definition at line 579 of file volumes.cpp.

double RecVolume::length [protected]

Definition at line 581 of file volumes.cpp.

double RecVolume::radius1 [protected]

Definition at line 581 of file volumes.cpp.

double RecVolume::radius2 [protected]

Definition at line 581 of file volumes.cpp.

Reimplemented from SurfaceVolume.

Definition at line 580 of file volumes.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines