|
| Csg::TriangleMesh | ToTriangleMesh (const WhiteBoxMesh &whiteBox, const AZ::Transform &transform) |
| |
|
AZ::Vector3 | TriangleMeshPosition (const Csg::TriangleMesh &triangleMesh, uint32_t vertexIndex) |
| | Reconstruct the world-space position of a triangle-mesh vertex.
|
| |
|
AZ::Vector3 | TriangleNormal (const Csg::TriangleMesh &triangleMesh, size_t triangleIndex) |
| | Compute the (safe-normalized) normal of the given triangle.
|
| |
| AZStd::vector< AZStd::vector< size_t > > | GroupCoplanarTriangles (const Csg::TriangleMesh &triangleMesh) |
| |
|
double | Cross2 (const V2 &a, const V2 &b, const V2 &c) |
| | Twice the signed area of triangle (a, b, c); > 0 when CCW.
|
| |
|
bool | PointInTri (const V2 &p, const V2 &a, const V2 &b, const V2 &c) |
| | Is point p inside (or on) triangle (a, b, c)?
|
| |
|
bool | EarClip (const AZStd::vector< V2 > &pts, AZStd::vector< AZStd::array< uint32_t, 3 > > &outTris) |
| | Ear-clip a simple CCW polygon (2D), emitting triangle index-triples into outTris.
|
| |
| bool | BridgeHoles (const AZStd::vector< V2 > &outerPts, const AZStd::vector< uint32_t > &outerGid, AZStd::vector< AZStd::vector< V2 > > &holePts, AZStd::vector< AZStd::vector< uint32_t > > &holeGid, AZStd::vector< V2 > &mergedPts, AZStd::vector< uint32_t > &mergedGid) |
| |
| AZStd::unordered_set< uint32_t > | ComputeRemovableVertices (const Csg::TriangleMesh &mesh, const AZStd::vector< AZStd::vector< size_t > > &groups) |
| |
| bool | CleanCoplanarGroup (const Csg::TriangleMesh &mesh, const AZStd::vector< size_t > &group, const AZ::Vector3 &groupNormal, const AZStd::unordered_set< uint32_t > &removable, AZStd::vector< AZStd::array< uint32_t, 3 > > &outTris) |
| |
|
AZ::Vector3 | GroupNormal (const Csg::TriangleMesh &mesh, const AZStd::vector< size_t > &group) |
| | Average (area-weighted) normal of a coplanar triangle group.
|
| |
|
void | RebuildFromTriangleMesh (WhiteBoxMesh &whiteBox, const Csg::TriangleMesh &triangleMesh) |
| | Replace the contents of the white box mesh with the given triangle mesh.
|
| |
Internal helpers backing the CSG integration layer (see WhiteBoxCsg.cpp). These convert between white box meshes and the engine-agnostic Csg::TriangleMesh, group/clean the coplanar regions a boolean leaves behind, and rebuild a white box mesh from a triangulated result. Declared here so they can be unit tested and so the implementation file stays focused on definitions.