#include <Box.h>
Inheritance diagram for Box:
Public Member Functions | |
Box () | |
Box (const Interval &extentX, const Interval &extentY, const Interval &extentZ) | |
Box (double minX, double maxX, double minY, double maxY, double minZ, double maxZ) | |
virtual bool | mapToUV (const Vector3 &v, Vector2 &uv) |
virtual Geometry * | clone (const Matrix4 *pTrMat) const |
Geometry * | clone (void) const |
virtual void | setExtentX (double min, double max) |
virtual void | setExtentY (double min, double max) |
virtual void | setExtentZ (double min, double max) |
virtual void | rayIntersection (PointEnv *pPE, int mask, const Vector3 &origin, const Vector3 &direction, float maxD=MAXFLOAT) |
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 |
Interval | extent (float x, float y, float z) const |
virtual Vector3 | centroid (void) const |
virtual double | radius (const Vector3 ¢roid) const |
virtual double | radius (void) 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) |
virtual bool | checkVolume (void) const |
virtual void | __debug () |
void | insideOut (bool b) |
Mesh * | mesh (int density=0) const |
Public Attributes | |
FDHMat | |
matrix of directions | |
__pad0__: FDH(DIRS | |
Static Public Attributes | |
static const unsigned | DIRS = 3 |
number of directions | |
static const unsigned | SIZE = 6 |
2 * DIRS | |
static const float | FDHMat [6][3] |
matrix of directions | |
static const float | EPS = 1e-03 |
epsilon variation (tolerance) of zero | |
Protected Member Functions | |
virtual Mesh * | _mesh (int) const |
virtual Vector3d * | _get_corners (unsigned &, unsigned(*)[100], unsigned[]) const |
virtual Vector3d * | _get_corners (unsigned &numCorners, unsigned(*facetVert)[100], unsigned nFacetCert[]) const |
int | _cut_line (Vector3d &, Vector3d &) 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) |
void | _translate (const Vector3 &v) |
virtual void | _transform (const Matrix4 &) |
virtual void | _scale (float) |
Protected Attributes | |
float * | _values |
array of FDH's values (+max,-min) | |
const unsigned | _dirs |
number of directions | |
const float(* | _mat )[3] |
matrix of FDH | |
bool | _insideOut |
Definition at line 14 of file Box.h.
|
Contructor for unit box |
|
Contructor
Definition at line 32 of file Box.h. References Interval::max, and Interval::min. |
|
Contructor
|
|
For debugging purposes Reimplemented from Geometry. |
|
Definition at line 13 of file FDH.cc. References FDH::_dirs, FDH::_mat, FDH::_values, Geometry::EPS, and MAXDOUBLE. Referenced by FDH::_get_corners(). |
|
Reimplemented from Geometry. Reimplemented in FDH14. Definition at line 262 of file FDH.cc. References FDH::_dirs, Geometry::_duplicate_attributes(), and FDH::_values. Referenced by FDH14::_duplicate_attributes(), FDH6::clone(), and FDH::clone(). |
|
Definition at line 65 of file FDH.cc. References FDH::_cut_line(), FDH::_dirs, FDH::_mat, FDH::_values, Geometry::EPS, and FDH_UPDATE_FACET. Referenced by FDH::_mesh(), FDH::_rotate(), FDH::_rotateX(), FDH::_rotateY(), FDH::_rotateZ(), and FDH::_transform(). |
|
|
|
Reimplemented from FDH. Definition at line 70 of file FDH6.cc. References FDH::_values, and Mesh::translate(). |
|
Implements Geometry. Reimplemented in FDH14. Definition at line 391 of file FDH.cc. References FDH::_get_corners(), FDH::_values, and MAXFLOAT. |
|
Implements Geometry. Reimplemented in FDH14. Definition at line 362 of file FDH.cc. References FDH::_get_corners(), FDH::_values, and MAXFLOAT. |
|
Implements Geometry. Reimplemented in FDH14. Definition at line 270 of file FDH.cc. References FDH::_dirs, FDH::_get_corners(), FDH::_values, and MAXFLOAT. |
|
Implements Geometry. Reimplemented in FDH14. Definition at line 297 of file FDH.cc. References FDH::_get_corners(), FDH::_mat, FDH::_values, and MAXFLOAT. |
|
Implements Geometry. Reimplemented in FDH14. Definition at line 335 of file FDH.cc. References FDH::_get_corners(), FDH::_values, and MAXFLOAT. |
|
Implements Geometry. Definition at line 468 of file FDH.cc. References FDH::_values. |
|
Implements Geometry. Reimplemented in FDH14. Definition at line 427 of file FDH.cc. References FDH::_get_corners(), FDH::_mat, FDH::_values, and MAXFLOAT. Referenced by FDH14::_transform(), FDH6::clone(), and FDH::clone(). |
|
Definition at line 38 of file Geometry.h. |
|
Implements Geometry. Definition at line 415 of file FDH.cc. References FDH::_mat, and FDH::_values. |
|
Implements Geometry. Definition at line 724 of file FDH.cc. References FDH::_mat, and FDH::_values. |
|
Checks whether the volume is cor, that is wheter the lower extnts are less the their upper counterparts
Definition at line 831 of file FDH.cc. References FDH::_values. |
|
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 FDH. Definition at line 178 of file FDH6.cc. References FDH::_duplicate_attributes(), and FDH::_transform(). |
|
Computes approximate distance between this and given geometries (lower bound of distance)
Implements Geometry. Definition at line 791 of file FDH.cc. References FDH::_mat, FDH::_values, Geometry::extent(), Interval::max, MAXDOUBLE, and Interval::min. |
|
Writes information about this geometry to std. out.
Implements Geometry. Definition at line 816 of file FDH.cc. References FDH::_mat, and FDH::_values. |
|
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 FDH14. Definition at line 684 of file FDH.cc. References FDH::_mat, FDH::_values, 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
Reimplemented from FDH. Definition at line 135 of file FDH6.cc. References FDH::_values. |
|
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 in Cylinder, NurbsSurface, Point3D, Sphere, and Surface. Definition at line 148 of file Geometry.h. |
|
Returns radius of minimal packing sphere having given center
Implements Geometry. Definition at line 746 of file FDH.cc. References FDH::_mat, FDH::_values, and MAXDOUBLE. |
|
Computes random direction towards the surface in accord to the point of view.
Implements Geometry. |
|
Computes random point on the surface
Implements Geometry. Definition at line 671 of file FDH.cc. References ENV_HAVE_NOTHING, and PointEnv::mask. |
|
Computes point of intersection of ray with this geometry
Implements Geometry. Definition at line 567 of file FDH.cc. References FDH::_mat, FDH::FDHCache::dval, ENV_HAVE_NOTHING, ENV_USE_CACHE, ENV_WANT_NORMAL, ENV_WANT_UV_COORD, FDH_CLIP_LINE_CONT, FDH_CLIP_LINE_INDEX_CONT, FDH_CLIP_LINE_INDEX_INIT, FDH_CLIP_LINE_INIT, PointEnv::mask, MAXFLOAT, FDH::FDHCache::oval, and PointEnv::pCache. |
|
Checks if there is separation between this and given geometries
Implements Geometry. Definition at line 762 of file FDH.cc. References FDH::_mat, and FDH::_values. |
|
Chages extent
|
|
Chages extent
|
|
Chages extent
|
|
Constructor - makes FDH packing SG objects stored in list
|
|
number of directions
Definition at line 57 of file FDH.h. Referenced by FDH::_cut_line(), FDH::_duplicate_attributes(), FDH::_get_corners(), FDH::_mesh(), FDH14::_rotate(), FDH14::_rotateX(), FDH::_rotateX(), FDH14::_rotateY(), FDH14::_rotateZ(), and FDH14::_transform(). |
|
Definition at line 23 of file Geometry.h. Referenced by Geometry::_duplicate_attributes(), and Geometry::mesh(). |
|
matrix of FDH
Definition at line 58 of file FDH.h. Referenced by FDH::_cut_line(), FDH::_get_corners(), FDH14::_mesh(), FDH::_mesh(), FDH::_rotateY(), FDH::_transform(), FDH::_translate(), FDH::centroid(), FDH::clone(), FDH::distance(), FDH::dump(), FDH::extent(), FDH::FDH(), FDH::radius(), FDH::rayIntersection(), and FDH::separation(). |
|
array of FDH's values (+max,-min)
Definition at line 56 of file FDH.h. Referenced by FDH::_cut_line(), FDH14DistRot::_distance(), FDH::_duplicate_attributes(), FDH::_get_corners(), FDH6::_mesh(), FDH14::_mesh(), FDH14::_rotate(), FDH::_rotate(), FDH14::_rotateX(), FDH::_rotateX(), FDH14::_rotateY(), FDH::_rotateY(), FDH14::_rotateZ(), FDH::_rotateZ(), FDH::_scale(), FDH14DistRot::_separation(), FDH14::_transform(), FDH::_transform(), FDH::_translate(), FDH::centroid(), FDH::checkVolume(), FDH::distance(), FDH::dump(), FDH14::extent(), FDH::extent(), FDH::FDH(), FDH6::mapToUV(), FDH::radius(), FDH::separation(), and FDH::~FDH(). |
|
number of directions
Reimplemented from FDH. |
|
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(). |
|
matrix of directions
Reimplemented from FDH. |
|
Initial value: { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { -1, 0, 0 }, { 0, -1, 0 }, { 0, 0, -1 }, }
Reimplemented from FDH. |
|
2 * DIRS
Reimplemented from FDH. |