Polygon Class Reference

#include <Polygon.h>

Inheritance diagram for Polygon:

Geometry ESGObject _Surface Rectangle Triangle OSGPolygon List of all members.

Public Types

enum  edgeProjection { XY, YZ, XZ, NONE_PROJ }

Public Member Functions

 Polygon ()
 Polygon (const Vector3 *va, const Vector3 *na, const Vector2 *uva, unsigned n)
 Polygon (const Vector3 *va, const Vector3 *na, const Vector2 *uva, unsigned n, const Vector3 &norm, bool fixedn)
virtual ~Polygon ()
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 (const Vector3 &centroid) const
virtual Geometryclone (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)
bool pointInsidePolygon (const Vector3 &p, Vector3 *n, Vector2 *u)
virtual Vector3 getFacetNormal (void) const
virtual bool haveFixedNormal (void) const
virtual Vector3 getVertex (unsigned index) const
virtual Vector3 getVertNormal (unsigned index) const
virtual bool haveVertNormals (void) const
virtual Vector2 getVertUVCoord (unsigned) const
virtual bool haveVertUVCoords (void) const
virtual unsigned numVertices (void) const
virtual double getFXYZ (void) const
virtual edgeProjection getEdgeProjection (void) const
bool setVertices (const Vector3 *va, unsigned n)
bool setNormals (const Vector3 *na)
bool setUVCoords (const Vector2 *uva)
void setFacetNormal (const Vector3 &norm, bool fixedn)
virtual void __debug (void)
void insideOut (bool b)
Interval extent (float x, float y, float z) const
virtual double radius (void) const
Geometryclone (void) const
Meshmesh (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 Vector3 _get_facet_normal (void) const
virtual Vector3 _get_vertex (unsigned) const
virtual Vector3 _get_vert_normal (unsigned) const
virtual Vector2 _get_vert_uv_coord (unsigned) const
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 _set_edge_projection (void)
double * _precompute_proj (void))[6];bool_separation_by_plane(const Geometry &) const ;bool_separation_by_edges(Geometry &) const ;bool_point_inside_polygon(const Vector3 &, Vector3 *, Vector2 *
bool _coplanar_tri_collision (Polygon &, const Vector3 &v0, const Vector3 &v1, const Vector3 &v2, const Vector3 &u0, const Vector3 &u1, const Vector3 &u2)
int _triTriCollision (Polygon &)
void _translate (const Vector3 &v)

Protected Attributes

Vector3_vertices
 array of vertices
Vector3_normals
 vertex normals, can be NULL
Vector2_uvCoords
 UV coordinates (e.g. texture coords.).
unsigned _nVert
 number of polygon's vertices
Vector3 _normal
 facet normal, NEVER ACCESS DIRECTLY BUT THROUGH THE _get_facet_normal()
bool _normalFixed
 fixed/random orientation of facet normal
double _fxyz
edgeProjection _edgeProjection
 best projection plane
double _area
double(* _proj )[6]
 speed up of ray intersection calculations
bool _insideOut

Detailed Description

Convex planar polygon with the private (not shared) array of vertices.

Definition at line 14 of file Polygon.h.


Member Enumeration Documentation

enum edgeProjection
 

Enumerator:
XY 
YZ 
XZ 
NONE_PROJ 

Definition at line 16 of file Polygon.h.


Constructor & Destructor Documentation

Polygon  ) 
 

Implicit constructor with all attributes set to zero/null

Definition at line 574 of file Polygon.cc.

References Polygon::_area, Polygon::_fxyz, Polygon::_normals, Polygon::_proj, Polygon::_uvCoords, and Polygon::_vertices.

Polygon const Vector3 va,
const Vector3 na,
const Vector2 uva,
unsigned  n
 

Constructor. Facet normal is computed from vertices.

Parameters:
va array of vertices
na array of vertex normals, can be NULL
uva array of UV (e.g. texture) coordinates
n number of vertices

Definition at line 585 of file Polygon.cc.

References Polygon::_normals, Polygon::_proj, Polygon::_uvCoords, Polygon::_vertices, Polygon::setNormals(), Polygon::setUVCoords(), and Polygon::setVertices().

Polygon const Vector3 va,
const Vector3 na,
const Vector2 uva,
unsigned  n,
const Vector3 norm,
bool  fixedn
 

Constructor.

Parameters:
va array of vertices
na array of vertex normals, can be NULL
uva array of UV (e.g. texture) coordinates
n number of vertices
norm normalized facet normal
fixedn whether the facet normal has fixed orientation

Definition at line 599 of file Polygon.cc.

References Polygon::_normals, Polygon::_proj, Polygon::_uvCoords, Polygon::_vertices, Polygon::setFacetNormal(), Polygon::setNormals(), Polygon::setUVCoords(), and Polygon::setVertices().

~Polygon  )  [virtual]
 

Destructor.

Definition at line 616 of file Polygon.cc.

References Polygon::_normals, Polygon::_proj, Polygon::_uvCoords, and Polygon::_vertices.


Member Function Documentation

void __debug void   )  [virtual]
 

for debugging purposes.

Reimplemented from Geometry.

Reimplemented in _Surface.

Definition at line 1009 of file Polygon.cc.

References Polygon::_normal, and Polygon::getVertex().

bool _coplanar_tri_collision Polygon ,
const Vector3 v0,
const Vector3 v1,
const Vector3 v2,
const Vector3 u0,
const Vector3 u1,
const Vector3 u2
[protected]
 

Definition at line 302 of file Polygon.cc.

References ESG_EDGE_AGAINST_TRI_EDGES.

void _duplicate_attributes const Geometry  )  [protected, virtual]
 

Reimplemented from Geometry.

Reimplemented in _Surface, Rectangle, and OSGPolygon.

Definition at line 45 of file Polygon.cc.

References Geometry::_duplicate_attributes(), Polygon::_normals, Polygon::_nVert, Polygon::_uvCoords, and Polygon::_vertices.

Referenced by Rectangle::_duplicate_attributes(), Triangle::clone(), and Polygon::clone().

Vector3 _get_facet_normal void   )  const [protected, virtual]
 

Definition at line 80 of file Polygon.cc.

References Polygon::_get_vertex(), and Polygon::_nVert.

Referenced by _Surface::_Surface(), OSGPolygon::OSGPolygon(), Rectangle::Rectangle(), and Polygon::setVertices().

Vertex3 _get_vert_normal unsigned   )  const [protected, virtual]
 

Reimplemented in _Surface, and OSGPolygon.

Definition at line 94 of file Polygon.cc.

References Polygon::_normals.

Referenced by Polygon::getVertNormal().

Vertex2 _get_vert_uv_coord unsigned   )  const [protected, virtual]
 

Reimplemented in _Surface.

Definition at line 99 of file Polygon.cc.

References Polygon::_uvCoords.

Referenced by Polygon::getVertUVCoord().

Vertex3 _get_vertex unsigned   )  const [protected, virtual]
 

Reimplemented in _Surface, and OSGPolygon.

Definition at line 89 of file Polygon.cc.

References Polygon::_vertices.

Referenced by Polygon::_get_facet_normal(), Polygon::_triTriCollision(), Polygon::centroid(), Polygon::extent(), Polygon::getVertex(), Polygon::radius(), Triangle::randomSample(), Rectangle::randomSample(), Polygon::randomSample(), Rectangle::Rectangle(), Polygon::setFacetNormal(), and Polygon::setVertices().

Mesh * _mesh int   )  const [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface.

Definition at line 7 of file Polygon.cc.

References Polygon::_fxyz, Polygon::_normal, Polygon::_normals, Polygon::_nVert, Polygon::_vertices, and Polygon::haveVertNormals().

double * _precompute_proj void   )  const [protected]
 

Referenced by Rectangle::_scale().

void _rotate const Matrix3  )  [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 528 of file Polygon.cc.

References Polygon::_normals, Polygon::_vertices, and Polygon::haveVertNormals().

void _rotate float  ,
const Vector3
[protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 512 of file Polygon.cc.

References Polygon::_normals, Polygon::_vertices, and Polygon::haveVertNormals().

void _rotateX float   )  [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 469 of file Polygon.cc.

References Polygon::_normals, Polygon::_vertices, and Polygon::haveVertNormals().

void _rotateY float   )  [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 484 of file Polygon.cc.

References Polygon::_normals, Polygon::_vertices, and Polygon::haveVertNormals().

void _rotateZ float   )  [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 498 of file Polygon.cc.

References Polygon::_normals, Polygon::_vertices, and Polygon::haveVertNormals().

void _scale float   )  [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 562 of file Polygon.cc.

References Polygon::_proj, and Polygon::_vertices.

void _set_edge_projection void   )  [protected]
 

Definition at line 104 of file Polygon.cc.

References Polygon::_edgeProjection, Polygon::_normal, Polygon::XY, Polygon::XZ, and Polygon::YZ.

Referenced by _Surface::_rotate(), _Surface::_rotateX(), _Surface::_rotateY(), _Surface::_rotateZ(), _Surface::_transform(), OSGPolygon::OSGPolygon(), Rectangle::Rectangle(), Polygon::setFacetNormal(), and Polygon::setVertices().

void _transform const Matrix4  )  [protected, virtual]
 

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 548 of file Polygon.cc.

References Polygon::_normals, Polygon::_vertices, and Polygon::haveVertNormals().

Referenced by Triangle::clone(), and Polygon::clone().

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

Definition at line 38 of file Geometry.h.

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

Implements Geometry.

Reimplemented in _Surface, and Rectangle.

Definition at line 540 of file Polygon.cc.

References Polygon::_vertices.

int _triTriCollision Polygon  )  [protected]
 

Triangle-triangle intersection test.

Reference: Tomas Moller, 1997. "A Fast Triangle-Triangle Intersection Test", Journal of Graphics Tools, 2(2), 1997

Although the input parametters are polygons, collision works with only triangles. That is, only the first three coordinates of both polygons are used!

Returns: -1 = detection failed (not triangles?) 0 = separation 1 = collision

Definition at line 351 of file Polygon.cc.

References Polygon::_fxyz, Polygon::_get_vertex(), Polygon::_normal, Geometry::EPS, ESG_COMPUTE_INTERVALS, ESG_SORT, and Polygon::numVertices().

Referenced by Polygon::separation().

Vertex3 centroid void   )  const [virtual]
 

Returns:
centroid (point of gravity) of the geometry

Implements Geometry.

Definition at line 795 of file Polygon.cc.

References Polygon::_get_vertex().

Referenced by SurfaceMesh::getActPlaneCentroid().

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)

Implements Geometry.

Reimplemented in _Surface, Triangle, and OSGPolygon.

Definition at line 787 of file Polygon.cc.

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

double distance const Geometry geom,
Vector3 pDir
[virtual]
 

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 841 of file Polygon.cc.

References MINDOUBLE.

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

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.

Reimplemented in _Surface.

Definition at line 846 of file Polygon.cc.

References Polygon::_normal, Polygon::_normalFixed, Polygon::_normals, Polygon::_uvCoords, Polygon::_vertices, and Polygon::haveVertNormals().

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

Implements Geometry.

Definition at line 769 of file Polygon.cc.

References Polygon::_get_vertex(), Interval::max, MAXFLOAT, and Interval::min.

esg::Polygon::edgeProjection getEdgeProjection void   )  const [virtual]
 

Returns:
the best projection plane for the polygon

Definition at line 922 of file Polygon.cc.

Vector3 getFacetNormal void   )  const [virtual]
 

Returns:
facet normal

Definition at line 873 of file Polygon.cc.

References Polygon::_normal.

Referenced by Surface::_mesh(), SurfaceMesh::getActPlane(), and SurfaceMesh::getActPlaneNormal().

double getFXYZ void   )  const [virtual]
 

Returns:
$ N*V_0 $, where $N$ is facet normal and $V_0$ is first vertex of the polygon

Definition at line 917 of file Polygon.cc.

References Polygon::_fxyz.

Referenced by SurfaceMesh::getActPlane().

Vertex3 getVertex unsigned  index  )  const [virtual]
 

Parameters:
index index of required vertex
Returns:
indexed vertex or (0,0,0)

Reimplemented in _Surface, and OSGPolygon.

Definition at line 883 of file Polygon.cc.

References Polygon::_get_vertex().

Referenced by Polygon::__debug().

Vertex3 getVertNormal unsigned  index  )  const [virtual]
 

Parameters:
index index of required vertex
Returns:
indexed normal or (0,0,0)

Reimplemented in _Surface, and OSGPolygon.

Definition at line 888 of file Polygon.cc.

References Polygon::_get_vert_normal(), and Polygon::haveVertNormals().

Vertex2 getVertUVCoord unsigned   )  const [virtual]
 

Parameters:
index index of required vertex
Returns:
UV coordinates of index vertex or (0,0)

Reimplemented in _Surface, and OSGPolygon.

Definition at line 900 of file Polygon.cc.

References Polygon::_get_vert_uv_coord(), and Polygon::haveVertUVCoords().

bool haveFixedNormal void   )  const [virtual]
 

Returns:
true if the facet normal has fixed direction, false otherwise

Definition at line 878 of file Polygon.cc.

References Polygon::_normalFixed.

Referenced by Surface::_mesh().

bool haveVertNormals void   )  const [virtual]
 

Returns:
true if the polygon has vertex normals, false otherwise

Reimplemented in _Surface, and OSGPolygon.

Definition at line 895 of file Polygon.cc.

References Polygon::_normals.

Referenced by Polygon::_mesh(), Rectangle::_rotate(), Polygon::_rotate(), Rectangle::_rotateX(), Polygon::_rotateX(), Rectangle::_rotateY(), Polygon::_rotateY(), Rectangle::_rotateZ(), Polygon::_rotateZ(), Rectangle::_transform(), Polygon::_transform(), Polygon::dump(), Polygon::getVertNormal(), and Polygon::rayIntersection().

bool haveVertUVCoords void   )  const [virtual]
 

Returns:
true if the polygon has UV coordinates set, false otherwise

Reimplemented in _Surface, and OSGPolygon.

Definition at line 907 of file Polygon.cc.

References Polygon::_uvCoords.

Referenced by Polygon::getVertUVCoord(), and Polygon::rayIntersection().

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]
 

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.

Definition at line 687 of file Polygon.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().

unsigned numVertices void   )  const [virtual]
 

Returns:
umber of polygon's vertices

Definition at line 912 of file Polygon.cc.

Referenced by Surface::_mesh(), Polygon::_triTriCollision(), SurfaceMesh::getActVert2(), SurfaceMesh::getActVertNormal2(), SurfaceMesh::goToNextEdge(), and Surface::numEdges().

bool pointInsidePolygon const Vector3 p,
Vector3 n,
Vector2 u
[inline]
 

Parameters:
p (in) 3D surface point
n (out) interpolated normal
u (out) local UV coordinate of p
Returns:
true point lies in the area of the polygon, false otherwise

Definition at line 156 of file Polygon.h.

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]
 

Returns radius of minimal packing sphere having given center

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

Implements Geometry.

Definition at line 806 of file Polygon.cc.

References Polygon::_get_vertex(), and MAXDOUBLE.

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

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 762 of file Polygon.cc.

References Polygon::_fxyz, Polygon::_normal, and Polygon::_normalFixed.

Referenced by Surface::randomDirection().

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

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.

Reimplemented in Rectangle, and Triangle.

Definition at line 692 of file Polygon.cc.

References Polygon::_get_vertex(), Polygon::_normal, ENV_HAVE_NOTHING, ENV_WANT_NORMAL, ENV_WANT_SURFACE_POINT, ENV_WANT_UV_COORD, PointEnv::mask, Interval::max, and Interval::min.

Referenced by Surface::randomSample().

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

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 624 of file Polygon.cc.

References Polygon::_fxyz, Polygon::_normal, Polygon::_normalFixed, PointEnv::distance, ENV_HAVE_DISTANCE, ENV_HAVE_INTERFERENCE, ENV_HAVE_INTERSECTION, ENV_HAVE_N_DOT_D, ENV_HAVE_N_DOT_O, ENV_HAVE_NORMAL, ENV_HAVE_NOTHING, ENV_HAVE_UV_COORD, ENV_WANT_NORMAL, ENV_WANT_UV_COORD, Geometry::EPS, Polygon::haveVertNormals(), Polygon::haveVertUVCoords(), PointEnv::intersection, PointEnv::mask, PointEnv::nd, PointEnv::no, PointEnv::normal, PointEnv::normalOrientation, PointEnv::OUTWARDS_NORMAL, PointEnv::RANDOM_NORMAL, and PointEnv::uvCoord.

bool separation Geometry geom,
Vector3 pDir
[virtual]
 

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 820 of file Polygon.cc.

References Polygon::_normal, and Polygon::_triTriCollision().

void setFacetNormal const Vector3 norm,
bool  fixedn
 

Sets facet normal.

Parameters:
norm normalized facet normal
fixedn whether the facet normal has fixed orientation

Definition at line 1000 of file Polygon.cc.

References Polygon::_fxyz, Polygon::_get_vertex(), Polygon::_normal, Polygon::_normalFixed, and Polygon::_set_edge_projection().

Referenced by Polygon::Polygon().

bool setNormals const Vector3 na  ) 
 

Sets normals of polygon's vertices. Old normals are deleted, if any.

Parameters:
na array of new normal, size is supposed to be the same as the array of vertices
Returns:
true on success, false otherwise

Definition at line 960 of file Polygon.cc.

References Polygon::_normals.

Referenced by Polygon::Polygon().

bool setUVCoords const Vector2 uva  ) 
 

Sets UV coordinates of polygon's vertices. Old coords are deleted, if any.

Parameters:
uva array of new UV coords, size is supposed to be the same as the array of vertices
Returns:
true on success, false otherwise

Definition at line 980 of file Polygon.cc.

References Polygon::_uvCoords.

Referenced by Polygon::Polygon().

bool setVertices const Vector3 va,
unsigned  n
 

Sets polygon's vertices. Old vertices, their normals and UV coordinates are deleted. Facet normal is computed from vertices.

Parameters:
va array of new vertices
n number of vertices
Returns:
true on success, false otherwise

Definition at line 927 of file Polygon.cc.

References Polygon::_area, Polygon::_fxyz, Polygon::_get_facet_normal(), Polygon::_get_vertex(), Polygon::_normal, Polygon::_normalFixed, Polygon::_normals, Polygon::_proj, Polygon::_set_edge_projection(), Polygon::_uvCoords, and Polygon::_vertices.

Referenced by Polygon::Polygon().


Member Data Documentation

double _area [protected]
 

Definition at line 27 of file Polygon.h.

Referenced by Polygon::Polygon(), Triangle::randomSample(), and Polygon::setVertices().

edgeProjection _edgeProjection [protected]
 

best projection plane

Definition at line 26 of file Polygon.h.

Referenced by OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), and Polygon::_set_edge_projection().

double _fxyz [protected]
 

Definition at line 25 of file Polygon.h.

Referenced by OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), Polygon::_mesh(), _Surface::_rotate(), _Surface::_rotateX(), _Surface::_rotateY(), _Surface::_rotateZ(), Rectangle::_scale(), _Surface::_scale(), _Surface::_Surface(), _Surface::_transform(), _Surface::_translate(), Polygon::_triTriCollision(), Polygon::getFXYZ(), OSGPolygon::OSGPolygon(), Polygon::Polygon(), Polygon::randomDirection(), Polygon::rayIntersection(), Rectangle::Rectangle(), Polygon::setFacetNormal(), and Polygon::setVertices().

bool _insideOut [protected, inherited]
 

Definition at line 23 of file Geometry.h.

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

Vector3 _normal [protected]
 

facet normal, NEVER ACCESS DIRECTLY BUT THROUGH THE _get_facet_normal()

Definition at line 23 of file Polygon.h.

Referenced by Polygon::__debug(), OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), Polygon::_mesh(), _Surface::_rotate(), _Surface::_rotateX(), _Surface::_rotateY(), _Surface::_rotateZ(), Polygon::_set_edge_projection(), _Surface::_Surface(), _Surface::_transform(), _Surface::_translate(), Polygon::_triTriCollision(), Polygon::dump(), _Surface::dump(), Polygon::getFacetNormal(), OSGPolygon::OSGPolygon(), Polygon::randomDirection(), Triangle::randomSample(), Rectangle::randomSample(), Polygon::randomSample(), Polygon::rayIntersection(), Rectangle::Rectangle(), Polygon::separation(), Polygon::setFacetNormal(), and Polygon::setVertices().

bool _normalFixed [protected]
 

fixed/random orientation of facet normal

Definition at line 24 of file Polygon.h.

Referenced by OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), _Surface::_Surface(), Polygon::dump(), _Surface::dump(), Polygon::haveFixedNormal(), OSGPolygon::OSGPolygon(), Polygon::randomDirection(), Triangle::randomSample(), Rectangle::randomSample(), Polygon::rayIntersection(), Rectangle::Rectangle(), Polygon::setFacetNormal(), and Polygon::setVertices().

Vector3* _normals [protected]
 

vertex normals, can be NULL

Definition at line 20 of file Polygon.h.

Referenced by Polygon::_duplicate_attributes(), OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), Polygon::_get_vert_normal(), Polygon::_mesh(), Rectangle::_rotate(), Polygon::_rotate(), Rectangle::_rotateX(), Polygon::_rotateX(), Rectangle::_rotateY(), Polygon::_rotateY(), Rectangle::_rotateZ(), Polygon::_rotateZ(), Rectangle::_transform(), Polygon::_transform(), Polygon::dump(), Polygon::haveVertNormals(), OSGPolygon::OSGPolygon(), Polygon::Polygon(), Triangle::randomSample(), Rectangle::Rectangle(), Polygon::setNormals(), Polygon::setVertices(), and Polygon::~Polygon().

unsigned _nVert [protected]
 

number of polygon's vertices

Definition at line 22 of file Polygon.h.

Referenced by Polygon::_duplicate_attributes(), OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), Polygon::_get_facet_normal(), Polygon::_mesh(), Rectangle::_rotate(), Rectangle::_rotateX(), Rectangle::_rotateY(), Rectangle::_rotateZ(), Rectangle::_scale(), Rectangle::_transform(), Rectangle::_translate(), OSGPolygon::OSGPolygon(), and Rectangle::Rectangle().

double(* _proj)[6] [protected]
 

speed up of ray intersection calculations

Definition at line 29 of file Polygon.h.

Referenced by OSGPolygon::_duplicate_attributes(), _Surface::_rotate(), _Surface::_rotateX(), _Surface::_rotateY(), _Surface::_rotateZ(), Polygon::_scale(), _Surface::_scale(), _Surface::_Surface(), _Surface::_transform(), Polygon::Polygon(), Rectangle::Rectangle(), Polygon::setVertices(), and Polygon::~Polygon().

Vector2* _uvCoords [protected]
 

UV coordinates (e.g. texture coords.).

Definition at line 21 of file Polygon.h.

Referenced by Polygon::_duplicate_attributes(), Polygon::_get_vert_uv_coord(), Polygon::dump(), Polygon::haveVertUVCoords(), Polygon::Polygon(), Triangle::randomSample(), Rectangle::Rectangle(), Polygon::setUVCoords(), Polygon::setVertices(), and Polygon::~Polygon().

Vector3* _vertices [protected]
 

array of vertices

Definition at line 19 of file Polygon.h.

Referenced by Polygon::_duplicate_attributes(), OSGPolygon::_duplicate_attributes(), _Surface::_duplicate_attributes(), Polygon::_get_vertex(), _Surface::_get_vertex(), Polygon::_mesh(), Rectangle::_rotate(), Polygon::_rotate(), Rectangle::_rotateX(), Polygon::_rotateX(), Rectangle::_rotateY(), Polygon::_rotateY(), Rectangle::_rotateZ(), Polygon::_rotateZ(), Rectangle::_scale(), Polygon::_scale(), _Surface::_Surface(), Rectangle::_transform(), Polygon::_transform(), Rectangle::_translate(), Polygon::_translate(), Polygon::dump(), _Surface::getVertex(), OSGPolygon::OSGPolygon(), Polygon::Polygon(), Rectangle::Rectangle(), Polygon::setVertices(), and Polygon::~Polygon().

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


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