Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | List of all members
G3D::ConvexPolyhedron Class Reference

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< ConvexPolygonface
 
Zero faces indicates an empty polyhedron More...
 

Constructor & Destructor Documentation

◆ ConvexPolyhedron() [1/2]

G3D::ConvexPolyhedron::ConvexPolyhedron ( )
inline

◆ ConvexPolyhedron() [2/2]

G3D::ConvexPolyhedron::ConvexPolyhedron ( const Array< ConvexPolygon > &  _face)

Member Function Documentation

◆ cut()

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.

Parameters
aboveThe part of the polyhedron above (on the side the normal points to or in the plane) the plane
belowThe part of the polyhedron below the plane.

◆ getVolume()

float G3D::ConvexPolyhedron::getVolume ( ) const


O(n) in the number of edges

◆ isEmpty()

bool G3D::ConvexPolyhedron::isEmpty ( ) const


O(n) in the number of edges

Member Data Documentation

◆ face

Array<ConvexPolygon> G3D::ConvexPolyhedron::face


Zero faces indicates an empty polyhedron


documentation generated on Wed Nov 24 2021 08:01:54 using doxygen 1.8.15