CylinderSurface Class Reference
Inheritance diagram for CylinderSurface:

List of all members.

Public Member Functions

 CylinderSurface (axis_t axis_p, double radius_p)
 CylinderSurface (axis_t axis_p, double radius_p, double trans1, double trans2)
virtual double getFarthestExtentFromOrigin () const

Protected Member Functions

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

Protected Attributes

axis_t axis
double radius
Vector3d center
bool onaxis

Detailed Description

Definition at line 167 of file volumes.cpp.

Constructor & Destructor Documentation

CylinderSurface::CylinderSurface ( axis_t  axis_p,
double  radius_p 
) [inline]

Definition at line 176 of file volumes.cpp.

    SurfaceVolume(), axis(axis_p), radius(radius_p), center(origin), onaxis(true)
CylinderSurface::CylinderSurface ( axis_t  axis_p,
double  radius_p,
double  trans1,
double  trans2 
) [inline]

Definition at line 180 of file volumes.cpp.

    SurfaceVolume(), axis(axis_p), radius(radius_p), center(origin), onaxis(false)
    case X: center.v[Y] += trans1; center.v[Z] += trans2; break;
    case Y: center.v[X] += trans1; center.v[Z] += trans2; break;
    case Z: center.v[X] += trans1; center.v[Y] += trans2; break;

Member Function Documentation

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

Implements SurfaceVolume.

Definition at line 190 of file volumes.cpp.

    return radius + center.length();
virtual iBase_EntityHandle CylinderSurface::getHandle ( bool  positive,
iGeom_Instance igm,
double  world_size 
) [inline, protected, virtual]

Implements SurfaceVolume.

Definition at line 195 of file volumes.cpp.

    int igm_result;

    iBase_EntityHandle cylinder;
    iGeom_createCylinder( igm, 2.0 * world_size, radius, 0, &cylinder, &igm_result);
    CHECK_IGEOM( igm_result, "making cylinder" );

    if( axis == X ){
      iGeom_rotateEnt( igm, cylinder, 90, 0, 1, 0, &igm_result );
      CHECK_IGEOM( igm_result, "rotating cylinder (X)" );
    else if( axis == Y ){
      iGeom_rotateEnt( igm, cylinder, 90, 1, 0, 0, &igm_result );
      CHECK_IGEOM( igm_result, "rotating cylinder (Y)" );

    if( onaxis == false ){
      iGeom_moveEnt( igm, cylinder, center.v[0], center.v[1], center.v[2], &igm_result);
      CHECK_IGEOM( igm_result, "moving cylinder" );

    iBase_EntityHandle final_cylinder = embedWithinWorld( positive, igm, world_size, cylinder, true );

    return final_cylinder;

Member Data Documentation

Definition at line 170 of file volumes.cpp.

Definition at line 172 of file volumes.cpp.

bool CylinderSurface::onaxis [protected]

Definition at line 173 of file volumes.cpp.

double CylinderSurface::radius [protected]

Definition at line 171 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