#include <Sphere.h>
Inheritance diagram for Sphere:
Public Member Functions | |
Sphere () | |
Sphere (const Vector3 &c, float r) | |
Sphere (float x, float y, float z, float r) | |
Sphere (const Geometry &g) | |
Sphere (const Geometry &g1, const Geometry &g2) | |
Sphere (SceneGraphObject &obj) | |
Sphere (List< SceneGraphObject > &list) | |
virtual void | rayIntersection (PointEnv *pPE, int mask, const Vector3 &origin, const Vector3 &direction, float maxD=MAXFLOAT) |
virtual bool | mapToUV (const Vector3 &v, Vector2 &uv) |
virtual void | randomSample (int mask, PointEnv &pe, double *pdf) |
virtual bool | randomDirection (const Vector3 &pov, Vector3 &dir, double *pdf) |
virtual Interval | extent (const Vector3 &direction) const |
virtual Vector3 | centroid (void) const |
virtual double | radius (void) const |
virtual double | radius (const Vector3 ¢roid) const |
virtual Geometry * | clone (const Matrix4 *pTrMat) const |
virtual bool | separation (Geometry &geom, Vector3 *pDir) |
virtual double | distance (const Geometry &geom, Vector3 *pDir) |
virtual void | dump (const char *intent, const char *tab) |
Vector3 | centre (void) const |
void | setCentre (const Vector3 &) |
void | setCentre (float x, float y, float z) |
void | setRadius (float radius) |
virtual void | __debug () |
void | insideOut (bool b) |
Interval | extent (float x, float y, float z) const |
Geometry * | clone (void) const |
Mesh * | mesh (int density=0) const |
Static Public Attributes | |
static const float | EPS = 1e-03 |
epsilon variation (tolerance) of zero | |
Protected Member Functions | |
virtual Mesh * | _mesh (int) const |
virtual void | _duplicate_attributes (const Geometry &) |
virtual void | _rotateX (float) |
virtual void | _rotateY (float) |
virtual void | _rotateZ (float) |
virtual void | _rotate (float, const Vector3 &) |
virtual void | _rotate (const Matrix3 &) |
virtual void | _translate (float, float, float) |
virtual void | _transform (const Matrix4 &) |
virtual void | _scale (float) |
void | _translate (const Vector3 &v) |
Protected Attributes | |
float | _radius |
float | _radius2 |
_radius^2 | |
double | _epsPlus |
(_radius + Geometry::EPS)^2 | |
double | _epsMinus |
(_radius - Geometry::EPS)^2 | |
Vector3 | _centre |
bool | _insideOut |
Definition at line 15 of file Sphere.h.
|
Constructor - unit sphere with center in the origin Definition at line 83 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. Referenced by Sphere::clone(). |
|
Constructor
Definition at line 92 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. |
|
Constructor
Definition at line 102 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. |
|
Constructor - sphere packing some geometry
Definition at line 111 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, Geometry::centroid(), Geometry::EPS, and Geometry::radius(). |
|
Constructor - sphere packing two geometries
Definition at line 120 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, Geometry::centroid(), Geometry::EPS, and Geometry::radius(). |
|
Constructor - sphere packing SG object
Definition at line 151 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, Geometry::EPS, Explorer::explore(), RadiusExplorer::result(), and POGExplorer::result(). |
|
Constructor - sphere packing many SG objects stored in list
Definition at line 167 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, Geometry::EPS, Explorer::explore(), List::firstItem(), MAXFLOAT, List::nextItem(), RadiusExplorer::result(), and POGExplorer::result(). |
|
For debugging purposes Reimplemented from Geometry. |
|
Reimplemented from Geometry. Reimplemented in Hemisphere. Definition at line 19 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. Referenced by Hemisphere::_duplicate_attributes(), and Sphere::clone(). |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 8 of file Sphere.cc. References Sphere::_centre, Sphere::_radius, Mesh::scale(), and Mesh::translate(). |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 56 of file Sphere.cc. References Sphere::_centre. |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 49 of file Sphere.cc. References Sphere::_centre. |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 28 of file Sphere.cc. References Sphere::_centre. |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 35 of file Sphere.cc. References Sphere::_centre. |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 42 of file Sphere.cc. References Sphere::_centre. |
|
Implements Geometry. Definition at line 71 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. |
|
Implements Geometry. Reimplemented in Hemisphere. Definition at line 66 of file Sphere.cc. References Sphere::_centre. Referenced by Sphere::clone(). |
|
Definition at line 38 of file Geometry.h. |
|
Implements Geometry. Definition at line 61 of file Sphere.cc. References Sphere::_centre. |
|
Definition at line 123 of file Sphere.h. Referenced by POVRayExporter::_write_sphere(). |
|
Implements Geometry. Definition at line 400 of file Sphere.cc. References Sphere::_centre. |
|
Duplicates geometry
Reimplemented in _Surface, and OSGPolygon. Definition at line 155 of file Geometry.h. Referenced by BVH::__get_edges(), BVH::__get_meshes(), ObjsInAreaExplorer::_accept_new_transformation(), SphereTree::_enlarge_bv(), FDHTree::_enlarge_bv(), BVExplorer::_iterate(), BVDistRot::BVDistRot(), and ObjsInAreaExplorer::ObjsInAreaExplorer(). |
|
Duplicates and transforms geometry
Implements Geometry. Reimplemented in Hemisphere. Definition at line 392 of file Sphere.cc. References Sphere::_duplicate_attributes(), Sphere::_transform(), and Sphere::Sphere(). |
|
Computes approximate distance between this and given geometries (lower bound of distance)
Implements Geometry. Reimplemented in Hemisphere. Definition at line 429 of file Sphere.cc. References Sphere::_centre, Sphere::_radius, Geometry::centroid(), and Geometry::radius(). Referenced by Cylinder::distance(). |
|
Writes information about this geometry to std. out.
Implements Geometry. Reimplemented in Hemisphere. Definition at line 439 of file Sphere.cc. References Sphere::_centre, and Sphere::_radius. |
|
Returns extent occupied by the geometry in given direction
Definition at line 124 of file Geometry.h. |
|
Returns extent occupied by the geometry in given direction
Implements Geometry. Reimplemented in Hemisphere. Definition at line 381 of file Sphere.cc. References Sphere::_centre, Sphere::_radius, Interval::max, and Interval::min. |
|
Inverts facet normals (turns the object inside-out)
Definition at line 56 of file Geometry.h. |
|
Maps 3D point from surface to the UV surface representation
Implements Geometry. Reimplemented in Hemisphere. Definition at line 257 of file Sphere.cc. References Sphere::_centre, and PI. Referenced by Sphere::randomSample(). |
|
Returns polygonal mesh computed from this geometry
Definition at line 24 of file Geometry.cc. References Geometry::_insideOut, Geometry::_mesh(), and Mesh::turnInsideOut(). Referenced by BVH::__get_edges(), BVH::__get_meshes(), NurbsSurface::_mesh(), and POVRayExporter::_process_leaf(). |
|
Returns radius of minimal packing sphere having given center
Implements Geometry. Reimplemented in Hemisphere. Definition at line 410 of file Sphere.cc. References Sphere::_centre, and Sphere::_radius. |
|
Returns radius of minimal packing sphere with center in the ceontroid of the geometry
Reimplemented from Geometry. Definition at line 405 of file Sphere.cc. References Sphere::_radius. Referenced by POVRayExporter::_write_sphere(). |
|
Computes random direction towards the surface in accord to the point of view.
Implements Geometry. Reimplemented in Hemisphere. Definition at line 337 of file Sphere.cc. References Sphere::_centre, Sphere::_radius, ESG_DBL_RAND, and M_PI. |
|
Computes random point on the surface
Implements Geometry. Reimplemented in Hemisphere. Definition at line 307 of file Sphere.cc. References Sphere::_centre, Sphere::_radius, Sphere::_radius2, ENV_HAVE_NORMAL, ENV_HAVE_NOTHING, ENV_HAVE_SURFACE_POINT, ENV_HAVE_UV_COORD, ENV_WANT_NORMAL, ENV_WANT_SURFACE_POINT, ENV_WANT_UV_COORD, ESG_DBL_RAND, PointEnv::intersection, M_PI, Sphere::mapToUV(), PointEnv::mask, PointEnv::normal, PointEnv::normalOrientation, PointEnv::OUTWARDS_NORMAL, and PointEnv::uvCoord. Referenced by PointEmittance::stochasticEmission(). |
|
Computes point of intersection of ray with this geometry
Implements Geometry. Reimplemented in Hemisphere. Definition at line 199 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, PointEnv::distance, ENV_HAVE_DISTANCE, ENV_HAVE_INTERFERENCE, ENV_HAVE_INTERSECTION, ENV_HAVE_NORMAL, ENV_HAVE_NOTHING, ENV_HAVE_UV_COORD, ENV_WANT_INTERSECTION, ENV_WANT_NORMAL, ENV_WANT_UV_COORD, Geometry::EPS, PointEnv::intersection, PointEnv::mask, PointEnv::normal, PointEnv::normalOrientation, PointEnv::OUTWARDS_NORMAL, PI, and PointEnv::uvCoord. |
|
Checks if there is separation between this and given geometries
Implements Geometry. Reimplemented in Hemisphere. Definition at line 415 of file Sphere.cc. References Sphere::_centre, Sphere::_radius, Geometry::centroid(), and Geometry::radius(). |
|
Definition at line 454 of file Sphere.cc. References Sphere::_centre. |
|
Definition at line 448 of file Sphere.cc. References Sphere::_centre. |
|
Definition at line 459 of file Sphere.cc. References Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. |
|
|
(_radius - Geometry::EPS)^2
Definition at line 20 of file Sphere.h. Referenced by Sphere::_duplicate_attributes(), Sphere::_scale(), Sphere::rayIntersection(), Hemisphere::rayIntersection(), Sphere::setRadius(), and Sphere::Sphere(). |
|
(_radius + Geometry::EPS)^2
Definition at line 19 of file Sphere.h. Referenced by Sphere::_duplicate_attributes(), Sphere::_scale(), Sphere::rayIntersection(), Hemisphere::rayIntersection(), Sphere::setRadius(), and Sphere::Sphere(). |
|
Definition at line 23 of file Geometry.h. Referenced by Geometry::_duplicate_attributes(), and Geometry::mesh(). |
|
|
_radius^2
Definition at line 18 of file Sphere.h. Referenced by Sphere::_duplicate_attributes(), Sphere::_scale(), Sphere::randomSample(), Hemisphere::randomSample(), Sphere::rayIntersection(), Hemisphere::rayIntersection(), Sphere::setRadius(), and Sphere::Sphere(). |
|
epsilon variation (tolerance) of zero
Definition at line 20 of file Geometry.h. Referenced by FDH::_cut_line(), Sphere::_duplicate_attributes(), FDH::_get_corners(), FDH::_mesh(), Sphere::_scale(), Polygon::_triTriCollision(), Sphere::rayIntersection(), Polygon::rayIntersection(), Point3D::rayIntersection(), Hemisphere::rayIntersection(), Sphere::setRadius(), and Sphere::Sphere(). |