GenGeo  1.1
ConvexPolyhedron Class Reference

#include <ConvexPolyhedron.h>

Inheritance diagram for ConvexPolyhedron:
Collaboration diagram for ConvexPolyhedron:

Public Member Functions

 ConvexPolyhedron ()
 ConvexPolyhedron (const Vector3 &, const Vector3 &)
virtual ~ConvexPolyhedron ()
virtual Vector3 getAPoint (int) const
virtual bool isIn (const Vector3 &) const
virtual bool isIn (const Sphere &)
- Public Member Functions inherited from BoxWithPlanes3D
 BoxWithPlanes3D ()
 BoxWithPlanes3D (const Vector3 &, const Vector3 &)
virtual ~BoxWithPlanes3D ()
void addPlane (const Plane &)
virtual pair< Vector3, Vector3getBoundingBox ()
virtual bool hasPlane () const
virtual Plane getClosestPlane (const Vector3 &)
virtual const map< double,
const AGeometricObject * > 
getClosestObjects (const Vector3 &, int) const
virtual bool isFullyOutside (const Sphere &)
- Public Member Functions inherited from AVolume3D
virtual ~AVolume3D ()
- Public Member Functions inherited from AVolume
virtual ~AVolume ()
virtual int getNumberSubVolumes () const

Additional Inherited Members

- Protected Member Functions inherited from BoxWithPlanes3D
double m_random (double, double) const
- Protected Attributes inherited from BoxWithPlanes3D
Vector3 m_pmin
Vector3 m_pmax
vector< Planem_planes

Detailed Description

A class for the generation of random particles inside a convex polyhedron. The polyhedron defined by a bounding box and an arbitrary number of planes to which the particles are fitted. The bounding box is largely there to prevent the generation of infinite polyhedra.

Constructor & Destructor Documentation

ConvexPolyhedron::ConvexPolyhedron ( )
ConvexPolyhedron::ConvexPolyhedron ( const Vector3 pmin,
const Vector3 pmax 

Construct polyhedron - without planes its just a box

pminminimum point of bounding box
pmaxmaximum point of bounding box
ConvexPolyhedron::~ConvexPolyhedron ( )

Member Function Documentation

Vector3 ConvexPolyhedron::getAPoint ( int  ) const

get point inside the box. The Argument is ignored

Reimplemented from BoxWithPlanes3D.

References isIn(), BoxWithPlanes3D::m_pmax, BoxWithPlanes3D::m_pmin, BoxWithPlanes3D::m_random(), Vector3::x(), Vector3::y(), and Vector3::z().

Here is the call graph for this function:

bool ConvexPolyhedron::isIn ( const Vector3 p) const

check if point is inside

pthe point

Reimplemented from BoxWithPlanes3D.

References BoxWithPlanes3D::m_planes, BoxWithPlanes3D::m_pmax, BoxWithPlanes3D::m_pmin, Vector3::x(), Vector3::y(), and Vector3::z().

Referenced by getAPoint().

Here is the call graph for this function:

bool ConvexPolyhedron::isIn ( const Sphere S)

check if a Sphere is inside and doesn't intersect any planes

Sthe Sphere

Reimplemented from BoxWithPlanes3D.

References Sphere::Center(), BoxWithPlanes3D::m_planes, BoxWithPlanes3D::m_pmax, BoxWithPlanes3D::m_pmin, Sphere::Radius(), Vector3::X(), Vector3::Y(), and Vector3::Z().

Here is the call graph for this function:

The documentation for this class was generated from the following files: