Support Forum G3D Web Page |
Public Member Functions | |
ConvexPolyhedron () | |
ConvexPolyhedron (const Array< ConvexPolygon > &_face) | |
void | cut (const Plane &plane, ConvexPolyhedron &above, ConvexPolyhedron &below) |
Cuts the polyhedron at the plane. More... | |
float | getVolume () const |
O(n) in the number of edges More... | |
bool | isEmpty () const |
O(n) in the number of edges More... | |
Public Attributes | |
Array< ConvexPolygon > | face |
Zero faces indicates an empty polyhedron More... | |
|
inline |
G3D::ConvexPolyhedron::ConvexPolyhedron | ( | const Array< ConvexPolygon > & | _face | ) |
void G3D::ConvexPolyhedron::cut | ( | const Plane & | plane, |
ConvexPolyhedron & | above, | ||
ConvexPolyhedron & | below | ||
) |
Cuts the polyhedron at the plane.
If the polyhedron is entirely above or below the plane, one of the returned polyhedra will be empty.
above | The part of the polyhedron above (on the side the normal points to or in the plane) the plane |
below | The part of the polyhedron below the plane. |
float G3D::ConvexPolyhedron::getVolume | ( | ) | const |
O(n) in the number of edges
bool G3D::ConvexPolyhedron::isEmpty | ( | ) | const |
O(n) in the number of edges
Array<ConvexPolygon> G3D::ConvexPolyhedron::face |
Zero faces indicates an empty polyhedron