cgma
EllipsoidSurface Class Reference
Inheritance diagram for EllipsoidSurface:
SurfaceVolume

List of all members.

Public Member Functions

 EllipsoidSurface (const Vector3d &center_p, const Vector3d &axes_p)
virtual ~EllipsoidSurface ()
virtual double getFarthestExtentFromOrigin () const

Protected Member Functions

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

Protected Attributes

Vector3d center
Vector3d axes

Detailed Description

Definition at line 420 of file volumes.cpp.


Constructor & Destructor Documentation

EllipsoidSurface::EllipsoidSurface ( const Vector3d center_p,
const Vector3d axes_p 
) [inline]

Definition at line 427 of file volumes.cpp.

                                                                       :
    SurfaceVolume(), center(center_p), axes(axes_p)
  {}
virtual EllipsoidSurface::~EllipsoidSurface ( ) [inline, virtual]

Definition at line 431 of file volumes.cpp.

{}

Member Function Documentation

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

Implements SurfaceVolume.

Definition at line 433 of file volumes.cpp.

                                                       {
    return (center.length() + axes.length());
  }
virtual iBase_EntityHandle EllipsoidSurface::getHandle ( bool  positive,
iGeom_Instance igm,
double  world_size 
) [inline, protected, virtual]

Implements SurfaceVolume.

Definition at line 438 of file volumes.cpp.

                                                                                               {

    int igm_result;
    iBase_EntityHandle sphere;
    double radius = 1;

    iGeom_createSphere( igm, radius, &sphere, &igm_result);
    CHECK_IGEOM( igm_result, "making sphere" );

    iGeom_scaleEnt( igm, sphere, 0, 0, 0, sqrt(1/axes.v[0]), sqrt(1/axes.v[1]), sqrt(1/axes.v[2]), &igm_result);
    CHECK_IGEOM( igm_result, "scaling sphere to ellipsoid" );

    iGeom_moveEnt( igm, sphere, center.v[0], center.v[1], center.v[2], &igm_result );
    CHECK_IGEOM( igm_result, "moving sphere" );


    iBase_EntityHandle final_sphere = embedWithinWorld( positive, igm, world_size, sphere, false );
    
    return final_sphere; 
  }

Member Data Documentation

Definition at line 424 of file volumes.cpp.

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