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


| void cg3d::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.
Definition at line 232 of file cg3d.C.
References cg3d::Planar3d::addConstraint(), cg3d::Planar3dDest::addFace(), cg3d::PointSet3d::calculateHalfspaces(), earlyExit(), cg3d::Shape3d::getFace(), cg3d::Shape3d::getFaces(), cg3d::Shape3d::getHalfspaceIndex(), cg3d::Planar3d::getPointIndex(), cg3d::Planar3d::getPoints(), h, cg3d::PointSet3d::isInside(), cg3d::PointSet3d::isOutside(), p, cg3d::PointSet3d::popPoints(), and cg3d::PointSet3d::pushPoints().

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


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

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