FDH14 Class Reference

#include <FDH14.h>

Inheritance diagram for FDH14:

FDH Geometry ESGObject List of all members.

Public Member Functions

virtual Interval extent (const Vector3 &direction) const
virtual Geometryclone (const Matrix4 *pTrMat) const
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)
Interval extent (float x, float y, float z) const
virtual Vector3 centroid (void) const
virtual double radius (const Vector3 &centroid) const
virtual double radius (void) const
Geometryclone (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)
Meshmesh (int density=0) const

Public Attributes

 __pad0__: FDH(DIRS
 FDHMat
 matrix of directions

Static Public Attributes

static const unsigned DIRS = 7
 number of directions
static const unsigned SIZE = 14
 2 * DIRS
static const float FDHMat [14][3]
 matrix of directions
static const float EPS = 1e-03
 epsilon variation (tolerance) of zero

Protected Member Functions

virtual void _rotateX (float)
 declaration
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 Mesh_mesh (int) const
virtual void _duplicate_attributes (const Geometry &)
 FDH14 ()
int _cut_line (Vector3d &, Vector3d &) const
virtual Vector3d * _get_corners (unsigned &numCorners, unsigned(*facetVert)[100], unsigned nFacetCert[]) const
virtual void _translate (float, float, float)
void _translate (const Vector3 &v)
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

Friends

class FDH14Tree
class FDH14DistRot

Classes

class  RotInfo

Detailed Description

FDH14 = 7-DOP

Definition at line 14 of file FDH14.h.


Constructor & Destructor Documentation

FDH14  )  [inline, protected]
 

Definition at line 43 of file FDH14.h.

Referenced by FDH14::clone().


Member Function Documentation

virtual void __debug void   )  [inline, virtual, inherited]
 

For debugging purposes

Reimplemented from Geometry.

Definition at line 188 of file FDH.h.

int _cut_line Vector3d &  ,
Vector3d & 
const [protected, inherited]
 

Definition at line 13 of file FDH.cc.

References FDH::_dirs, FDH::_mat, FDH::_values, Geometry::EPS, and MAXDOUBLE.

Referenced by FDH::_get_corners().

void _duplicate_attributes const Geometry  )  [protected, virtual]
 

Reimplemented from FDH.

Definition at line 124 of file FDH14.cc.

References FDH::_duplicate_attributes().

Referenced by FDH14::clone().

Vector3d * _get_corners unsigned &  numCorners,
unsigned *  facetVert[100],
unsigned  nFacetCert[]
const [protected, virtual, inherited]
 

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().

Mesh * _mesh int   )  const [protected, virtual]
 

Reimplemented from FDH.

Definition at line 113 of file FDH14.cc.

References FDH::_mat, and FDH::_values.

void _rotate const Matrix3  )  [protected, virtual]
 

Reimplemented from FDH.

Definition at line 80 of file FDH14.cc.

References FDH::_dirs, FDH::_values, FDH14::RotInfo::fast_lp(), and FDH14::RotInfo::get().

void _rotate float  ,
const Vector3
[protected, virtual]
 

Reimplemented from FDH.

Definition at line 67 of file FDH14.cc.

References FDH::_dirs, FDH::_values, FDH14::RotInfo::fast_lp(), and FDH14::RotInfo::get().

void _rotateX float   )  [protected, virtual]
 

declaration

Reimplemented from FDH.

Definition at line 28 of file FDH14.cc.

References FDH::_dirs, FDH::_values, FDH14::RotInfo::fast_lp(), and FDH14::RotInfo::get().

void _rotateY float   )  [protected, virtual]
 

Reimplemented from FDH.

Definition at line 41 of file FDH14.cc.

References FDH::_dirs, FDH::_values, FDH14::RotInfo::fast_lp(), and FDH14::RotInfo::get().

void _rotateZ float   )  [protected, virtual]
 

Reimplemented from FDH.

Definition at line 54 of file FDH14.cc.

References FDH::_dirs, FDH::_values, FDH14::RotInfo::fast_lp(), and FDH14::RotInfo::get().

void _scale float   )  [protected, virtual, inherited]
 

Implements Geometry.

Definition at line 468 of file FDH.cc.

References FDH::_values.

void _transform const Matrix4  )  [protected, virtual]
 

Reimplemented from FDH.

Definition at line 93 of file FDH14.cc.

References FDH::_dirs, FDH::_transform(), FDH::_values, FDH14::RotInfo::fast_lp(), and FDH14::RotInfo::get().

Referenced by FDH14::clone().

void _translate const Vector3 v  )  [inline, protected, inherited]
 

Definition at line 38 of file Geometry.h.

void _translate float  ,
float  ,
float 
[protected, virtual, inherited]
 

Implements Geometry.

Definition at line 415 of file FDH.cc.

References FDH::_mat, and FDH::_values.

Vector3 centroid void   )  const [virtual, inherited]
 

Returns:
centroid (point of gravity) of the geometry

Implements Geometry.

Definition at line 724 of file FDH.cc.

References FDH::_mat, and FDH::_values.

bool checkVolume void   )  const [virtual, inherited]
 

Checks whether the volume is cor, that is wheter the lower extnts are less the their upper counterparts

Returns:
true if FDH is correct, false otherwise

Definition at line 831 of file FDH.cc.

References FDH::_values.

Geometry* clone void   )  const [inline, inherited]
 

Duplicates geometry

Returns:
duplicate (clone)

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().

Geometry * clone const Matrix4 pTrMat  )  const [virtual]
 

Duplicates and transforms geometry

Parameters:
pTrMat transformation matrix of the clone or NULL
Returns:
duplicate (clone)

Reimplemented from FDH.

Definition at line 277 of file FDH14.cc.

References FDH14::_duplicate_attributes(), FDH14::_transform(), and FDH14::FDH14().

double distance const Geometry geom,
Vector3 pDir
[virtual, inherited]
 

Computes approximate distance between this and given geometries (lower bound of distance)

Parameters:
geom geometry to check
pDir if presented then is set to normalized measured direction (vector of minimal distance)
Returns:
lower bound of distance, negative value indicates penetration, positive value indicates separation, zero indicates touch

Implements Geometry.

Definition at line 791 of file FDH.cc.

References FDH::_mat, FDH::_values, Geometry::extent(), Interval::max, MAXDOUBLE, and Interval::min.

void dump const char *  intent,
const char *  tab
[virtual, inherited]
 

Writes information about this geometry to std. out.

Parameters:
intent free space before each line
tab free space added to intent inside description of this class

Implements Geometry.

Definition at line 816 of file FDH.cc.

References FDH::_mat, and FDH::_values.

Interval extent float  x,
float  y,
float  z
const [inline, inherited]
 

Returns extent occupied by the geometry in given direction

Parameters:
x direction direction of extent - x coordinate
y direction direction of extent - y coordinate
z direction direction of extent - z coordinate
Returns:
extent of occupied space

Definition at line 124 of file Geometry.h.

Interval extent const Vector3 direction  )  const [virtual]
 

Returns extent occupied by the geometry in given direction

Parameters:
direction direction of extent
Returns:
extent of occupied space

Reimplemented from FDH.

Definition at line 258 of file FDH14.cc.

References FDH::_values, FDH14::RotInfo::fast_lp(), FDH14::RotInfo::get(), Interval::max, and Interval::min.

void insideOut bool  b  )  [inline, inherited]
 

Inverts facet normals (turns the object inside-out)

Parameters:
b determines wehether to turn the geometry inside-out

Definition at line 56 of file Geometry.h.

bool mapToUV const Vector3 v,
Vector2 uv
[virtual, inherited]
 

Maps 3D point from surface to the UV surface representation

Parameters:
v 3D point in the world coordinates
uv UV coordinates (relative to the surface)
Returns:
true on success, false otherwise (mainly if the 3D point does not lie on the surface)

Implements Geometry.

Reimplemented in FDH6.

Definition at line 665 of file FDH.cc.

Mesh * mesh int  density = 0  )  const [inherited]
 

Returns polygonal mesh computed from this geometry

Parameters:
density mesh density
Returns:
polygonal mesh

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().

virtual double radius void   )  const [inline, virtual, inherited]
 

Returns radius of minimal packing sphere with center in the ceontroid of the geometry

Parameters:
centroid center of packing sphere
Returns:
minimal packing radius

Reimplemented in Cylinder, NurbsSurface, Point3D, Sphere, and Surface.

Definition at line 148 of file Geometry.h.

double radius const Vector3 centroid  )  const [virtual, inherited]
 

Returns radius of minimal packing sphere having given center

Parameters:
centroid center of packing sphere
Returns:
minimal packing radius

Implements Geometry.

Definition at line 746 of file FDH.cc.

References FDH::_mat, FDH::_values, and MAXDOUBLE.

bool randomDirection const Vector3 pov,
Vector3 dir,
double *  pdf
[virtual, inherited]
 

Computes random direction towards the surface in accord to the point of view.

Parameters:
pov point of view
dir computed random direction
pdf if present then it is set to the value of the Probability Density Function of the random point

Implements Geometry.

Definition at line 678 of file FDH.cc.

void randomSample int  mask,
PointEnv pe,
double *  pdf
[virtual, inherited]
 

Computes random point on the surface

Parameters:
mask bitmask determining what to compute, see PointEnv.h
pe information about the computed random point on surface
pdf if present then it is set to the value of the Probability Density Function of the random point

Implements Geometry.

Definition at line 671 of file FDH.cc.

References ENV_HAVE_NOTHING, and PointEnv::mask.

void rayIntersection PointEnv pPE,
int  mask,
const Vector3 origin,
const Vector3 direction,
float  maxD = MAXFLOAT
[virtual, inherited]
 

Computes point of intersection of ray with this geometry

Parameters:
pPE structure in which the information about intersection point is stored; must be defined (not NULL)
mask bitmask determining what to compute, see PointEnv.h
origin ray's origin
direction normalized ray's direction
maxD maximal interesting distance; if the point of intersection can't be closer than this distance then the computation stops (object is too far away)

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.

bool separation Geometry geom,
Vector3 pDir
[virtual, inherited]
 

Checks if there is separation between this and given geometries

Parameters:
geom geometry to check
pDir if presented then is set to normalized direction to found separation (gap)
Returns:
true if thre is separation (gap), false otherwise

Implements Geometry.

Definition at line 762 of file FDH.cc.

References FDH::_mat, and FDH::_values.


Friends And Related Function Documentation

friend class FDH14DistRot [friend]
 

Definition at line 16 of file FDH14.h.

friend class FDH14Tree [friend]
 

Definition at line 15 of file FDH14.h.


Member Data Documentation

__pad0__
 

Constructor - makes FDH packing SG object

Parameters:
object scene graph object that is packed

Definition at line 52 of file FDH14.h.

const unsigned _dirs [protected, inherited]
 

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().

bool _insideOut [protected, inherited]
 

Definition at line 23 of file Geometry.h.

Referenced by Geometry::_duplicate_attributes(), and Geometry::mesh().

const float(* _mat)[3] [protected, inherited]
 

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().

float* _values [protected, inherited]
 

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().

const unsigned DIRS = 7 [static]
 

number of directions

Reimplemented from FDH.

Definition at line 22 of file FDH14.h.

Referenced by SphereTree::_create_list(), FDH14DistRot::_distance(), and FDH14DistRot::_separation().

const float EPS = 1e-03 [static, inherited]
 

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().

FDHMat
 

matrix of directions

Reimplemented from FDH.

Definition at line 52 of file FDH14.h.

const float FDHMat [static]
 

Initial value:

                 
{
    {      1,      0,      0 },
    {      0,      1,      0 },
    {      0,      0,      1 },
    {  SCALE,  SCALE,  SCALE },
    {  SCALE, -SCALE,  SCALE },
    { -SCALE,  SCALE,  SCALE },
    {  SCALE,  SCALE, -SCALE },
    {     -1,      0,      0 },
    {      0,     -1,      0 },
    {      0,      0,     -1 },
    { -SCALE, -SCALE, -SCALE },
    { -SCALE,  SCALE, -SCALE },
    {  SCALE, -SCALE, -SCALE },
    { -SCALE, -SCALE,  SCALE }
}
matrix of directions

Reimplemented from FDH.

Definition at line 24 of file FDH14.h.

Referenced by SphereTree::_create_list(), FDH14DistRot::_distance(), FDH14DistRot::_separation(), and FDH14::RotInfo::recompute().

const unsigned SIZE = 14 [static]
 

2 * DIRS

Reimplemented from FDH.

Definition at line 23 of file FDH14.h.

Referenced by FDH14::RotInfo::clone(), FDH14DistRot::FDH14DistRot(), and FDH14::RotInfo::recompute().


The documentation for this class was generated from the following files:
Generated on Wed Jun 28 12:24:34 2006 for esg by  doxygen 1.4.6