A convex volume built from polygon faces. More...

#include <Polyhedron.h>

Collaboration diagram for Urho3D::Polyhedron:
[legend]

Public Member Functions

 Polyhedron ()
 Construct empty.
 
 Polyhedron (const Polyhedron &polyhedron)
 Copy-construct from another polyhedron.
 
 Polyhedron (const Vector< PODVector< Vector3 > > &faces)
 Construct from a list of faces.
 
 Polyhedron (const BoundingBox &box)
 Construct from a bounding box.
 
 Polyhedron (const Frustum &frustum)
 Construct from a frustum.
 
 ~Polyhedron ()
 Destruct.
 
void Define (const BoundingBox &box)
 Define from a bounding box.
 
void Define (const Frustum &frustum)
 Define from a frustum.
 
void AddFace (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
 Add a triangle face.
 
void AddFace (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
 Add a quadrilateral face.
 
void AddFace (const PODVector< Vector3 > &face)
 Add an arbitrary face.
 
void Clip (const Plane &plane)
 Clip with a plane.
 
void Clip (const BoundingBox &box)
 Clip with a bounding box.
 
void Clip (const Frustum &box)
 Clip with a frustum.
 
void Clear ()
 Clear all faces.
 
void Transform (const Matrix3 &transform)
 Transform with a 3x3 matrix.
 
void Transform (const Matrix3x4 &transform)
 Transform with a 3x4 matrix.
 
Polyhedron Transformed (const Matrix3 &transform) const
 Return transformed with a 3x3 matrix.
 
Polyhedron Transformed (const Matrix3x4 &transform) const
 Return transformed with a 3x4 matrix.
 
bool Empty () const
 Return whether is empty.
 

Public Attributes

Vector< PODVector< Vector3 > > faces_
 Polygon faces.
 

Private Member Functions

void SetFace (unsigned index, const Vector3 &v0, const Vector3 &v1, const Vector3 &v2)
 Set a triangle face by index.
 
void SetFace (unsigned index, const Vector3 &v0, const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
 Set a quadrilateral face by index.
 

Private Attributes

PODVector< Vector3clippedVertices_
 Internal vector for clipped vertices.
 
PODVector< Vector3outFace_
 Internal vector for the new face being constructed.
 

Detailed Description

A convex volume built from polygon faces.


The documentation for this class was generated from the following files:
  • /home/travis/build/urho3d/Urho3D/Source/Urho3D/Math/Polyhedron.h
  • /home/travis/build/urho3d/Urho3D/Source/Urho3D/Math/Polyhedron.cpp