#include <cg3d.h>
Public Member Functions | |
Shape3d (PointSet3d *ps_, int nFaces_, int nPoints_, const int *halfspaces_, const int *points_) | |
virtual | ~Shape3d () |
PointSet3d * | getSet (void) const |
int | getFaces (void) const |
int | getPoints (void) const |
int | getPointIndex (int p) const |
Get this point on the boundary of the shape. | |
const CkVector3d & | getPoint (int p) const |
int | getHalfspaceIndex (int f) const |
Extract the halfspace of face f of this shape. | |
const CkHalfspace3d & | getHalfspace (int f) const |
virtual void | getFace (int f, Planar3d &face) const =0 |
Extract the boundary of face f of this shape. | |
bool | contains (const CkVector3d &pt) const |
Return true if this shape fully contains this point. | |
Protected Attributes | |
PointSet3d * | ps |
Private Attributes | |
int | nFaces |
int | nPoints |
const int * | halfspaces |
const int * | points |
Definition at line 145 of file cg3d.h.
cg3d::Shape3d::Shape3d | ( | PointSet3d * | ps_, | |
int | nFaces_, | |||
int | nPoints_, | |||
const int * | halfspaces_, | |||
const int * | points_ | |||
) | [inline] |
PointSet3d* cg3d::Shape3d::getSet | ( | void | ) | const [inline] |
Definition at line 159 of file cg3d.h.
References ps.
Referenced by cg3d::testShape().
int cg3d::Shape3d::getFaces | ( | void | ) | const [inline] |
Definition at line 161 of file cg3d.h.
References nFaces.
Referenced by contains(), earlyExit(), cg3d::intersect(), and cg3d::testShape().
int cg3d::Shape3d::getPoints | ( | void | ) | const [inline] |
Definition at line 162 of file cg3d.h.
References nPoints.
Referenced by earlyExit(), and cg3d::testShape().
Get this point on the boundary of the shape.
The return value is suitable for passing to PointSet3d::getPoint.
Definition at line 168 of file cg3d.h.
References points.
Referenced by earlyExit(), getPoint(), and test_vol_mgc().
const CkVector3d& cg3d::Shape3d::getPoint | ( | int | p | ) | const [inline] |
Definition at line 169 of file cg3d.h.
References cg3d::PointSet3d::getPoint(), getPointIndex(), and ps.
Referenced by cg3d::testShape().
Extract the halfspace of face f of this shape.
The halfspace normal should point into the shape's interior. The return value is suitable for passing to PointSet3d::getHalfspace.
Definition at line 177 of file cg3d.h.
References halfspaces.
Referenced by contains(), earlyExit(), getHalfspace(), and cg3d::intersect().
const CkHalfspace3d& cg3d::Shape3d::getHalfspace | ( | int | f | ) | const [inline] |
Definition at line 178 of file cg3d.h.
References cg3d::PointSet3d::getHalfspace(), getHalfspaceIndex(), and ps.
Referenced by test_vol_planes(), and cg3d::testShape().
Extract the boundary of face f of this shape.
Points in face should spiral right-handed around plane normal.
Implemented in cg3d::Tet3d.
Referenced by cg3d::intersect(), and cg3d::testShape().
bool Shape3d::contains | ( | const CkVector3d & | pt | ) | const |
Return true if this shape fully contains this point.
Works by enumerating the shape's halfspaces.
Works by enumerating the shape's halfspaces.
Definition at line 131 of file cg3d.C.
References getFaces(), getHalfspaceIndex(), cg3d::PointSet3d::isInside(), and ps.
PointSet3d* cg3d::Shape3d::ps [protected] |
Definition at line 147 of file cg3d.h.
Referenced by contains(), earlyExit(), getHalfspace(), getPoint(), getSet(), and cg3d::Tet3d::Tet3d().
int cg3d::Shape3d::nFaces [private] |
int cg3d::Shape3d::nPoints [private] |
const int* cg3d::Shape3d::halfspaces [private] |
const int* cg3d::Shape3d::points [private] |