GenGeo  1.1
Sphere Class Reference

Simple sphere implementation. Works both 2D and 3D. More...

#include <Sphere.h>

Inheritance diagram for Sphere:
Collaboration diagram for Sphere:

Public Member Functions

 Sphere ()
 Sphere (const Vector3 &, double)
 Sphere (const Sphere &)
virtual double getDist (const Vector3 &) const
Vector3 Center () const
double Radius () const
int Id () const
int Tag () const
void setTag (int t)
void setId (int)
void shift (const Vector3 &s)
- Public Member Functions inherited from AGeometricObject
virtual ~AGeometricObject ()

Static Public Member Functions

static void SetOutputStyle (int)

Protected Attributes

Vector3 m_center
double m_rad
int m_id
int m_tag
bool m_valid

Static Protected Attributes

static double NearZero = 1e-8
static int s_output_style = 0
static unsigned int s_current_id = 0

Friends

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

Detailed Description

Simple sphere implementation. Works both 2D and 3D.

Constructor & Destructor Documentation

Sphere::Sphere ( )

construct "invalid" Sphere

References m_id, m_tag, and m_valid.

Sphere::Sphere ( const Vector3 center,
double  rad 
)

construct valid Sphere

Parameters
centerthe center of the circle
radthe radius

References m_center, m_id, m_rad, m_tag, m_valid, and s_current_id.

Sphere::Sphere ( const Sphere S)

copy constructor

Parameters
Sthe original

References m_center, m_id, m_rad, m_tag, and m_valid.

Member Function Documentation

Vector3 Sphere::Center ( ) const
inline

References m_center.

Referenced by CircMNTableXY2D::checkInsertable(), FullCircMNTable3D::checkInsertable(), CircMNTable2D::checkInsertable(), CircMNTable3D::checkInsertable(), MNTable2D::checkInsertable(), MNTable3D::checkInsertable(), exportSphere(), HexAggregateInsertGenerator2D::fillIn(), HexAggregateInsertGenerator2DRand::fillIn(), InsertGenerator3D::fillIn(), CircleVol::getAPoint(), SphereVol::getAPoint(), SphereSectionVol::getAPoint(), SphereVol::getBoundingBox(), CircleVol::getBoundingBox(), SphereSectionVol::getBoundingBox(), MNTCell::getClosestSphereFromGroup(), MNTable2D::getClosestSphereFromGroup(), MNTable3D::getClosestSphereFromGroup(), CircMNTableXY2D::insert(), FullCircMNTable3D::insert(), CircMNTable2D::insert(), CircMNTable3D::insert(), MNTable2D::insert(), MNTable3D::insert(), CircMNTableXY2D::insertChecked(), FullCircMNTable3D::insertChecked(), CircMNTable2D::insertChecked(), CircMNTable3D::insertChecked(), MNTable2D::insertChecked(), MNTable3D::insertChecked(), SphereVol::isFullyOutside(), CylinderVol::isFullyOutside(), MeshVolume::isFullyOutside(), BoxWithPlanes3D::isFullyOutside(), SphereVol::isIn(), EllipsoidVol::isIn(), SphereVolWithJointSet::isIn(), CircleVol::isIn(), SphereSectionVol::isIn(), ClippedSphereVol::isIn(), CylinderWithJointSet::isIn(), DogBone::isIn(), ConvexPolyhedron::isIn(), CylinderVol::isIn(), MeshVolWithJointSet::isIn(), BoxWithJointSet::isIn(), TriBox::isIn(), ClippedCircleVol::isIn(), MeshVolume::isIn(), BoxWithPlanes3D::isIn(), BoxWithLines2D::isIn(), TriWithLines2D::isIn(), PolygonWithLines2D::isIn(), HexAggregateInsertGenerator3D::ParticleToAggregate(), and MNTable3D::tagParticlesInSphere().

double Sphere::getDist ( const Vector3 P) const
virtual

get distance between given point and the surface of the Sphere

Parameters
Pthe point

Implements AGeometricObject.

Reimplemented in SphereIn.

References m_center, and m_rad.

Referenced by MNTCell::getClosestSphereFromGroup().

double Sphere::Radius ( ) const
inline

References m_rad.

Referenced by CircMNTableXY2D::checkInsertable(), FullCircMNTable3D::checkInsertable(), CircMNTable3D::checkInsertable(), CircMNTable2D::checkInsertable(), MNTable2D::checkInsertable(), MNTable3D::checkInsertable(), exportSphere(), HexAggregateInsertGenerator2D::fillIn(), HexAggregateInsertGenerator2DRand::fillIn(), HexAggregateInsertGenerator3D::fillIn(), InsertGenerator2D::fillIn(), InsertGenerator3D::fillIn(), SphereVol::getAPoint(), CircleVol::getAPoint(), SphereSectionVol::getAPoint(), SphereVol::getBoundingBox(), CircleVol::getBoundingBox(), SphereSectionVol::getBoundingBox(), MNTCell::getClosestSphereFromGroup(), MNTable2D::getClosestSphereFromGroup(), MNTable3D::getClosestSphereFromGroup(), MNTable3D::insert(), CircMNTableXY2D::insertChecked(), FullCircMNTable3D::insertChecked(), CircMNTable2D::insertChecked(), CircMNTable3D::insertChecked(), MNTable2D::insertChecked(), MNTable3D::insertChecked(), SphereVol::isFullyOutside(), CylinderVol::isFullyOutside(), MeshVolume::isFullyOutside(), BoxWithPlanes3D::isFullyOutside(), SphereVol::isIn(), SphereVolWithJointSet::isIn(), CircleVol::isIn(), SphereSectionVol::isIn(), ClippedSphereVol::isIn(), CylinderWithJointSet::isIn(), DogBone::isIn(), ConvexPolyhedron::isIn(), MeshVolWithJointSet::isIn(), CylinderVol::isIn(), BoxWithJointSet::isIn(), TriBox::isIn(), ClippedCircleVol::isIn(), MeshVolume::isIn(), BoxWithPlanes3D::isIn(), BoxWithLines2D::isIn(), TriWithLines2D::isIn(), PolygonWithLines2D::isIn(), HexAggregateInsertGenerator3D::ParticleToAggregate(), and MNTable3D::tagParticlesInSphere().

void Sphere::setId ( int  i)

Set id of sphere. If higher than current_id, increase current_id accordingly

Parameters
ithe new id of the sphere

References m_id, and s_current_id.

Referenced by exportSphere().

void Sphere::SetOutputStyle ( int  style)
static

Set output style

Parameters
stylethe output style: 0=Debug, 1=.geo

References s_output_style.

Referenced by operator<<().

Friends And Related Function Documentation

ostream& operator<< ( ostream &  ost,
const Sphere S 
)
friend

Member Data Documentation

int Sphere::m_id
protected

Referenced by Id(), operator<<(), setId(), and Sphere().

double Sphere::m_rad
protected
int Sphere::m_tag
protected

Referenced by operator<<(), setTag(), Sphere(), and Tag().

bool Sphere::m_valid
protected

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

double Sphere::NearZero = 1e-8
staticprotected
unsigned int Sphere::s_current_id = 0
staticprotected

Referenced by setId(), and Sphere().

int Sphere::s_output_style = 0
staticprotected

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


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