#include <Hemisphere.h>
Inheritance diagram for Hemisphere:
Public Member Functions | |
Hemisphere (const Vector3 &c, float r, const Vector3 &z, bool bfc=false) | |
Hemisphere (const Vector3 &z, bool bfc=false) | |
Hemisphere (bool bfc=false) | |
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 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 | getZenith (void) const |
void | setZenith (const Vector3 &zenith) |
Vector3 | world2local3D (const Vector3 &dir) const |
Vector2 | world2local2D (const Vector3 &dir) const |
Vector3 | sampleUniformly (double elevationRand, double azimuthRand, double *pPDFval) const |
Vector2 | sampleUniformly2D (double elevationRand, double azimuthRand, double *pPDFval) const |
Vector2 | dir2uvUniformly (const Vector3 &dir) const |
Vector3 | samplePriorToZenith (double elevationRand, double azimuthRand, double *pPDFVal) const |
Vector2 | samplePriorToZenith2D (double elevationRand, double azimuthRand, double *pPDFVal) const |
Vector2 | dir2uvPriorToZenith (const Vector3 &dir) const |
Vector3 | samplePriorToPoweredZenith (double elevationRand, double azimuthRand, int power, double *pPDFVal) const |
Vector2 | samplePriorToPoweredZenith2D (double elevationRand, double azimuthRand, int power, double *pPDFVal) const |
Vector2 | dir2uvPriorToPoweredZenith (const Vector3 &dir, int power) const |
Interval | extent (float x, float y, float z) const |
virtual Vector3 | centroid (void) const |
virtual double | radius (void) const |
Geometry * | clone (void) const |
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) |
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 | _transform (const Matrix4 &) |
virtual void | _translate (float, float, float) |
void | _translate (const Vector3 &v) |
virtual void | _scale (float) |
Protected Attributes | |
Vector3 | _xAxis |
Vector3 | _yAxis |
Vector3 | _zAxis |
bool | _backfaceCulling |
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 14 of file Hemisphere.h.
|
Constructor
Definition at line 81 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. Referenced by Hemisphere::clone(). |
|
Constructor - unit hemisphere in the origin
Definition at line 91 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Constructor - unit hemisphere in the origin with (0,1,0) zenith
Definition at line 101 of file Hemisphere.cc. |
|
For debugging purposes Reimplemented from Geometry. |
|
Reimplemented from Sphere. Definition at line 11 of file Hemisphere.cc. References Hemisphere::_backfaceCulling, Sphere::_duplicate_attributes(), Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. Referenced by Hemisphere::clone(). |
|
Reimplemented from Sphere. Definition at line 5 of file Hemisphere.cc. |
|
Reimplemented from Sphere. Definition at line 60 of file Hemisphere.cc. References Sphere::_centre, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Reimplemented from Sphere. Definition at line 50 of file Hemisphere.cc. References Sphere::_centre, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Reimplemented from Sphere. Definition at line 20 of file Hemisphere.cc. References Sphere::_centre, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Reimplemented from Sphere. Definition at line 30 of file Hemisphere.cc. References Sphere::_centre, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Reimplemented from Sphere. Definition at line 40 of file Hemisphere.cc. References Sphere::_centre, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Implements Geometry. Definition at line 71 of file Sphere.cc. References Sphere::_centre, Sphere::_epsMinus, Sphere::_epsPlus, Sphere::_radius, Sphere::_radius2, and Geometry::EPS. |
|
Reimplemented from Sphere. Definition at line 68 of file Hemisphere.cc. References Sphere::_centre, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. Referenced by Hemisphere::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
Reimplemented from Sphere. Definition at line 211 of file Hemisphere.cc. References Hemisphere::_duplicate_attributes(), Hemisphere::_transform(), and Hemisphere::Hemisphere(). |
|
Gets direction in global coords and returns its generating "random" numbers (i.e. the inverse function to samplePriorToPoweredZenith()).
Definition at line 404 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, Hemisphere::_zAxis, and M_PI. Referenced by PhongBRDF::dir2uv(). |
|
Gets direction in global coords and returns its generating "random" numbers (i.e. the inverse function to samplePriorToZenith()).
Definition at line 357 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, Hemisphere::_zAxis, and M_PI. |
|
Gets direction in global coords and returns its generating "random" numbers (i.e. the inverse function to sampleUniformly()).
Definition at line 314 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, Hemisphere::_zAxis, and M_PI. Referenced by LambertianBRDF::dir2uv(). |
|
Computes approximate distance between this and given geometries (lower bound of distance)
Reimplemented from Sphere. Definition at line 231 of file Hemisphere.cc. References MAXDOUBLE. |
|
Writes information about this geometry to std. out.
Reimplemented from Sphere. Definition at line 237 of file Hemisphere.cc. References Hemisphere::_backfaceCulling, Sphere::_centre, Sphere::_radius, Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
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
Reimplemented from Sphere. Definition at line 205 of file Hemisphere.cc. |
|
Definition at line 91 of file Hemisphere.h. References Hemisphere::_zAxis. |
|
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
Reimplemented from Sphere. Definition at line 169 of file Hemisphere.cc. Referenced by Hemisphere::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 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(). |
|
Returns radius of minimal packing sphere having given center
Reimplemented from Sphere. Definition at line 219 of file Hemisphere.cc. References MAXDOUBLE. |
|
Computes random direction towards the surface in accord to the point of view.
Reimplemented from Sphere. Definition at line 199 of file Hemisphere.cc. |
|
Computes random point on the surface
Reimplemented from Sphere. Definition at line 175 of file Hemisphere.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, Hemisphere::mapToUV(), PointEnv::mask, PointEnv::normal, PointEnv::normalOrientation, PointEnv::OUTWARDS_NORMAL, Hemisphere::sampleUniformly(), and PointEnv::uvCoord. |
|
Computes point of intersection of ray with this geometry
Reimplemented from Sphere. Definition at line 110 of file Hemisphere.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. |
|
Returns random direction ditributed over the hemisphere according to powered elevation angle theta. Direction is in the world coordinate system.
If elevationRand = 0 then
If elevationRand = 1 then
Definition at line 374 of file Hemisphere.cc. References ESG_ANGLES_TO_VECTOR, and PI. Referenced by PhongBRDF::importanceSample(). |
|
Returns random direction ditributed over the hemisphere according to powered elevation angle theta. Deriction is described by relative elevation and azimuth angles in the local coordinate system of the hemicube.
If elevationRand = 0 then
If elevationRand = 1 then
Definition at line 393 of file Hemisphere.cc. References PI. |
|
Returns random direction ditributed over the hemisphere according to elevation angle. Direction is in the world coordinate system.
If elevationRand = 0 then
If elevationRand = 1 then
Definition at line 331 of file Hemisphere.cc. References ESG_ANGLES_TO_VECTOR, and PI. Referenced by DirEmittance::stochasticEmission(). |
|
Returns random direction ditributed over the hemisphere according to elevation angle. Deriction is described by relative elevation and azimuth angles in the local coordinate system of the hemicube.
If elevationRand = 0 then
If elevationRand = 1 then
Definition at line 348 of file Hemisphere.cc. References PI. |
|
Returns random direction uniformly ditributed over the hemisphere. Direction is in the world coordinate system.
If elevationRand = 0 then
If elevationRand = 1 then
Definition at line 289 of file Hemisphere.cc. References ESG_ANGLES_TO_VECTOR, and PI. Referenced by LambertianBRDF::importanceSample(), and Hemisphere::randomSample(). |
|
Returns random direction uniformly ditributed over the hemisphere. Deriction is described by relative elevation and azimuth angles in the local coordinate system of the hemicube.
If elevationRand = 0 then
If elevationRand = 1 then
Definition at line 306 of file Hemisphere.cc. References PI. |
|
Checks if there is separation between this and given geometries
Reimplemented from Sphere. Definition at line 225 of file Hemisphere.cc. |
|
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. |
|
Definition at line 251 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Transforms 3D vector with world coordinates to (local) angles: (theta, phi) = (angle between dir and _zAxis, azimuth in local XY plane)
Definition at line 264 of file Hemisphere.cc. References Hemisphere::_xAxis, Hemisphere::_yAxis, Hemisphere::_zAxis, and M_PI. |
|
Transforms 3D vector with the world coordinates to 3D vector with local coordinates of the hemisphere
Definition at line 106 of file Hemisphere.h. References Hemisphere::_xAxis, Hemisphere::_yAxis, and Hemisphere::_zAxis. |
|
Definition at line 17 of file Hemisphere.h. Referenced by Hemisphere::_duplicate_attributes(), and Hemisphere::dump(). |
|
|
(_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(). |