GenGeo  1.1
BoxWithPlanes3D Class Reference

#include <BoxWithPlanes3D.h>

Inheritance diagram for BoxWithPlanes3D:
Collaboration diagram for BoxWithPlanes3D:

Public Member Functions

 BoxWithPlanes3D ()
 BoxWithPlanes3D (const Vector3 &, const Vector3 &)
virtual ~BoxWithPlanes3D ()
void addPlane (const Plane &)
virtual pair< Vector3, Vector3getBoundingBox ()
virtual Vector3 getAPoint (int) const
virtual bool hasPlane () const
virtual Plane getClosestPlane (const Vector3 &)
virtual const map< double,
const AGeometricObject * > 
getClosestObjects (const Vector3 &, int) const
virtual bool isIn (const Vector3 &) const
virtual bool isIn (const Sphere &)
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

Protected Member Functions

double m_random (double, double) const

Protected Attributes

Vector3 m_pmin
Vector3 m_pmax
vector< Planem_planes

Friends

ostream & operator<< (ostream &, const BoxWithPlanes3D &)

Detailed Description

A class for the generation of random particles inside a 3D box. An arbitrary number of planes can be added to which the particles are fitted.

Constructor & Destructor Documentation

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

Construct box

Parameters
pminminimum point of bounding box
pmaxmaximum point of bounding box
virtual BoxWithPlanes3D::~BoxWithPlanes3D ( )
inlinevirtual

Member Function Documentation

void BoxWithPlanes3D::addPlane ( const Plane P)
Vector3 BoxWithPlanes3D::getAPoint ( int  ) const
virtual

get point inside the box. The Argument is ignored

Implements AVolume.

Reimplemented in ConvexPolyhedron.

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

Here is the call graph for this function:

pair< Vector3, Vector3 > BoxWithPlanes3D::getBoundingBox ( )
virtual

get bounding box

Implements AVolume.

References m_pmax, and m_pmin.

const map< double, const AGeometricObject * > BoxWithPlanes3D::getClosestObjects ( const Vector3 p,
int  nmax 
) const
virtual

get the n closes planes to a given point

Parameters
pthe point
nmaxthe max. nr. of planes

Implements AVolume3D.

Reimplemented in BoxWithJointSet.

References m_planes.

Plane BoxWithPlanes3D::getClosestPlane ( const Vector3 p)
virtual

Return closest plane to a given point. Assumes that the list of Planes is not empty.

Parameters
pthe point
Warning
check non-empty list of lines (via hasPlane()) before invoking

References m_planes.

virtual bool BoxWithPlanes3D::hasPlane ( ) const
inlinevirtual

References m_planes.

bool BoxWithPlanes3D::isFullyOutside ( const Sphere S)
virtual

Implements AVolume3D.

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

Here is the call graph for this function:

bool BoxWithPlanes3D::isIn ( const Vector3 p) const
virtual

check if point is inside

Parameters
pthe point

Implements AVolume.

Reimplemented in ConvexPolyhedron.

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

Here is the call graph for this function:

bool BoxWithPlanes3D::isIn ( const Sphere S)
virtual

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

Parameters
Sthe Sphere

Implements AVolume.

Reimplemented in BoxWithJointSet, and ConvexPolyhedron.

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

Here is the call graph for this function:

double BoxWithPlanes3D::m_random ( double  imin,
double  imax 
) const
protected

helper function, return random value between min & max

Referenced by ConvexPolyhedron::getAPoint(), and getAPoint().

Friends And Related Function Documentation

ostream& operator<< ( ostream &  ost,
const BoxWithPlanes3D L 
)
friend

Member Data Documentation


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