|
CeresEngine 0.2.0
A game development framework
|
Implementation from: http://www.geometrictools.com/Documentation/ClipMesh.pdf. More...
#include <CeresEngine/Mesh/TriangleClipper.hpp>
Classes | |
| struct | ClipEdge |
| Single edge in the clipped mesh. More... | |
| struct | ClipFace |
| Single polygon in the clipped mesh. More... | |
| struct | ClipMesh |
| Contains vertices, edges and faces of the clipped mesh. More... | |
| struct | ClipVert |
| Single vertex in the clipped mesh. More... | |
Protected Member Functions | |
| void | addEdgesAndFaces () |
| Register all edges and faces, using the mesh vertices as a basis. | |
| Int32 | clipByPlane (const TPlane< T > &plane) |
| Clips the current mesh with the provided plane. | |
| Int32 | processVertices (const TPlane< T > &plane) |
| Clips vertices of the current mesh by the provided plane. | |
| void | processEdges () |
| Clips edges of the current mesh. | |
| void | processFaces () |
| Clips the faces (polygons) of the current mesh. | |
| void | getOrderedFaces (Vector< Vector< UInt32 > > &sortedFaces) |
| Returns a set of non-culled vertex indices for every visible face in the mesh. | |
| void | getOrderedVertices (const ClipFace &face, Vector< UInt32 > &vertices) |
| Returns a set of ordered and non-culled vertices for the provided face of the mesh. | |
| TVector3< T > | getNormal (Vector< UInt32 > &sortedVertices, UInt32 numVertices) |
| Calculates the normal for vertices related to the provided vertex indices. | |
| bool | getOpenPolyline (ClipFace &face, UInt32 &start, UInt32 &end) |
| Checks is the polygon shape of the provided face open or closed. | |
Protected Attributes | |
| ClipMesh | mesh |
Implementation from: http://www.geometrictools.com/Documentation/ClipMesh.pdf.
|
protected |
Register all edges and faces, using the mesh vertices as a basis.
Assumes vertices are not indexed and that every three vertices form a face.
|
protected |
Clips the current mesh with the provided plane.
|
protected |
Calculates the normal for vertices related to the provided vertex indices.
|
protected |
Checks is the polygon shape of the provided face open or closed.
If open, returns true and outputs endpoints of the polyline.
|
protected |
Returns a set of non-culled vertex indices for every visible face in the mesh.
This should be called after clipping operation is complete to retrieve valid vertices.
|
protected |
Returns a set of ordered and non-culled vertices for the provided face of the mesh.
|
protected |
Clips edges of the current mesh.
processVertices() must be called beforehand.
|
protected |
Clips the faces (polygons) of the current mesh.
processEdges() must be called beforehand.
|
protected |
Clips vertices of the current mesh by the provided plane.
|
protected |