PPL Logo

cg3d Namespace Reference


Data Structures

class  PointSet3d
 A dynamic pointset, with each point marked with the halfspaces it contains. More...
class  Planar3d
 A convex planar polyhedron, with its vertices scattered in 3D. More...
class  Shape3d
 A convex 3D shape, described either as a set of convex planar faces or the intersection of a set of halfspaces. More...
class  Tet3d
 A 4-node tetrahedron. More...
class  Planar3dDest
 Send clipped segments of a face to here. More...
class  NonManifoldException
 Under OSL_CG3D_DEBUG, this exception is thrown by ~Volume3dDest:. More...
class  Volume3dDest
 Compute the volume of the shape bounded by these faces. More...

Functions

void testShape (const Shape3d &s)
 Test this shape for validity.
void intersect (PointSet3d *ps, const Shape3d &shape0, const Shape3d &shape1, Planar3dDest &faceDest)
 Compute the surface of the intersection of these two shapes, sending the resulting face fragments to faceDest.
double tetVolume (const CkVector3d &A, const CkVector3d &B, const CkVector3d &C, const CkVector3d &D)
 Return the volume of the tetrahedron with these vertices.
double intersectDebug (PointSet3d *ps, const Tet3d &S, const Tet3d &D)
 Debugging version of "intersect".

Variables

double epsilon = 1.0e-10
 Small roundoff-control value:.


Function Documentation

void cg3d::testShape ( const Shape3d s  ) 

Test this shape for validity.

Aborts if the shape doesn't satisfy its invariants.

Definition at line 140 of file cg3d.C.

References cg3d::Shape3d::getFace(), cg3d::Shape3d::getFaces(), cg3d::Shape3d::getHalfspace(), cg3d::Shape3d::getPoint(), cg3d::Shape3d::getPoints(), cg3d::Shape3d::getSet(), h, and CkHalfspace3d::side().

Referenced by randTet().

Here is the call graph for this function:

Here is the caller graph for this function:

void cg3d::intersect ( PointSet3d ps,
const Shape3d shape0,
const Shape3d shape1,
Planar3dDest faceDest 
)

double cg3d::tetVolume ( const CkVector3d A,
const CkVector3d B,
const CkVector3d C,
const CkVector3d D 
)

Return the volume of the tetrahedron with these vertices.

Definition at line 306 of file cg3d.C.

References dot().

Referenced by cg3d::Volume3dDest::addFace().

Here is the call graph for this function:

Here is the caller graph for this function:

double cg3d::intersectDebug ( PointSet3d *  ps,
const Tet3d &  S,
const Tet3d &  D 
)

Debugging version of "intersect".

Writes out a tecplot file if the intersection is non-manifold.

Referenced by doTest().

Here is the caller graph for this function:


Variable Documentation

double cg3d::epsilon = 1.0e-10

Small roundoff-control value:.

Roundoff control: value to compare halfspace dotproducts against.

Safe range for small-valued (unit cube) inputs appears to be between 1.0e-16 and 1.0e-8. Luckily, the degeneracy self-test seems to catch CkAbort epsilons, rather than being silently wrong.

Definition at line 20 of file cg3d.C.

Referenced by cg3d::PointSet3d::addHalf(), Dataloop_alloc_and_copy(), Dataloop_struct_alloc(), DLOOP_Type_calc_footprint_struct(), integerRoot(), cg3d::PointSet3d::isInside(), and cg3d::PointSet3d::isOutside().


Generated on Mon Sep 21 08:33:29 2020 for Charm++ by  doxygen 1.5.5