GenGeo  1.1
TriWithLines2D Class Reference

#include <TriWithLines2D.h>

Inheritance diagram for TriWithLines2D:
Collaboration diagram for TriWithLines2D:

Public Member Functions

 TriWithLines2D ()
 TriWithLines2D (const Vector3 &, const Vector3 &, const Vector3 &)
virtual ~TriWithLines2D ()
void addLine (const Line2D &)
virtual pair< Vector3, Vector3getBoundingBox ()
virtual Vector3 getAPoint (int) const
virtual bool hasPlane () const
virtual Line2D getClosestPlane (const Vector3 &)
virtual const map< double,
const Line2D * > 
getClosestPlanes (const Vector3 &, int) const
virtual bool isIn (const Vector3 &) const
virtual bool isIn (const Sphere &)
- Public Member Functions inherited from AVolume2D
virtual ~AVolume2D ()
virtual const map< double,
const AGeometricObject * > 
getClosestObjects (const Vector3 &, int) const
- 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
Vector3 m_p0
Vector3 m_p1
Vector3 m_p2
double m_a0
double m_a1
double m_a2
double m_b0
double m_b1
double m_b2
double m_c0
double m_c1
double m_c2
vector< Line2Dm_lines

Friends

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

Detailed Description

A class for the generation of random particles inside a triangle. An arbitrary number of lines can be added to which the particles are fitted.

Constructor & Destructor Documentation

TriWithLines2D::TriWithLines2D ( )
TriWithLines2D::TriWithLines2D ( const Vector3 p0,
const Vector3 p1,
const Vector3 p2 
)

Construct Triangle

Parameters
p0first corner of triangle box
p1second corner of triangle box
p2third corner of triangle box

References addLine(), m_a0, m_a1, m_a2, m_b0, m_b1, m_b2, m_c0, m_c1, m_c2, m_pmax, and m_pmin.

Here is the call graph for this function:

virtual TriWithLines2D::~TriWithLines2D ( )
inlinevirtual

Member Function Documentation

void TriWithLines2D::addLine ( const Line2D l)

add a line

Parameters
lthe line

References m_lines.

Referenced by exportTriWithLines2D(), and TriWithLines2D().

Vector3 TriWithLines2D::getAPoint ( int  ) const
virtual

get point inside the box. The Argument is ignored

Implements AVolume.

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

Here is the call graph for this function:

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

get bounding box

Implements AVolume.

References m_pmax, and m_pmin.

Line2D TriWithLines2D::getClosestPlane ( const Vector3 p)
virtual

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

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

Implements AVolume2D.

References m_lines.

const map< double, const Line2D * > TriWithLines2D::getClosestPlanes ( const Vector3 p,
int  nmax 
) const
virtual

Implements AVolume2D.

References m_lines.

virtual bool TriWithLines2D::hasPlane ( ) const
inlinevirtual

References m_lines.

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

check if point is inside

Parameters
pthe point

Implements AVolume.

References cross(), m_p0, m_p1, m_p2, m_pmax, m_pmin, Vector3::x(), Vector3::y(), and Vector3::z().

Referenced by getAPoint(), and isIn().

Here is the call graph for this function:

bool TriWithLines2D::isIn ( const Sphere S)
virtual

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

Parameters
Sthe Sphere

Implements AVolume.

References Sphere::Center(), isIn(), m_lines, and Sphere::Radius().

Here is the call graph for this function:

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

helper function, return random value between min & max

Referenced by getAPoint().

Friends And Related Function Documentation

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

Member Data Documentation

double TriWithLines2D::m_a0
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_a1
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_a2
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_b0
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_b1
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_b2
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_c0
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_c1
protected

Referenced by TriWithLines2D().

double TriWithLines2D::m_c2
protected

Referenced by TriWithLines2D().

vector<Line2D> TriWithLines2D::m_lines
protected
Vector3 TriWithLines2D::m_p0
protected

Referenced by isIn(), and operator<<().

Vector3 TriWithLines2D::m_p1
protected

Referenced by isIn(), and operator<<().

Vector3 TriWithLines2D::m_p2
protected

Referenced by isIn(), and operator<<().

Vector3 TriWithLines2D::m_pmax
protected
Vector3 TriWithLines2D::m_pmin
protected

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