cgma
PlaneSurface Class Reference
Inheritance diagram for PlaneSurface:
SurfaceVolume

List of all members.

Public Member Functions

 PlaneSurface (const Vector3d &normal_p, double offset_p)
virtual double getFarthestExtentFromOrigin () const

Protected Member Functions

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

Protected Attributes

Vector3d normal
double offset

Detailed Description

Definition at line 128 of file volumes.cpp.


Constructor & Destructor Documentation

PlaneSurface::PlaneSurface ( const Vector3d normal_p,
double  offset_p 
) [inline]

Definition at line 135 of file volumes.cpp.

                                                            :
    SurfaceVolume(), normal(normal_p), offset(offset_p) 
  {}

Member Function Documentation

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

Implements SurfaceVolume.

Definition at line 139 of file volumes.cpp.

                                                    {
    // this is a funny situation, since planes are technically infinte...
    // in order to have a sane answer, we just return the offset from the origin.
    // (multiplied by root 3, which was done in the old converter, why?)
    return sqrt(3.0) *  std::fabs(offset);
  }
virtual iBase_EntityHandle PlaneSurface::getHandle ( bool  positive,
iGeom_Instance igm,
double  world_size 
) [inline, protected, virtual]

Implements SurfaceVolume.

Definition at line 147 of file volumes.cpp.

                                                                                              {

    int igm_result;
    iBase_EntityHandle world_sphere = makeWorldSphere(igm, world_size);
    iBase_EntityHandle hemisphere;
    // note the reversal of sense in this call; mcnp and igeom define it differently.
    iGeom_sectionEnt( igm, world_sphere, 
                      normal.v[0], normal.v[1], normal.v[2], offset, !positive, &hemisphere, &igm_result);
    CHECK_IGEOM( igm_result, "Sectioning world for a plane" );
    return hemisphere;


  }

Member Data Documentation

Definition at line 131 of file volumes.cpp.

double PlaneSurface::offset [protected]

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