Open 3D Engine PhysX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
PolygonPrismMeshUtils::Mesh2D Class Reference

A collection of Face and HalfEdge objects used to represent a 2d mesh. More...

#include <PolygonPrismMeshUtils.h>

Public Member Functions

void CreateFromPoly2Tri (const std::vector< p2t::Triangle * > &triangles)
 Populates this mesh from a set of triangles obtained from poly2tri.
 
void CreateFromSimpleConvexPolygon (const AZStd::vector< AZ::Vector2 > &vertices)
 Populates this mesh from a simple convex polygon.
 
size_t ConvexMerge ()
 
const AZStd::vector< Face > & GetFaces () const
 
const AZStd::vector< AZ::Vector3 > & GetDebugDrawPoints (float height, const AZ::Vector3 &nonUniformScale) const
 
void SetDebugDrawDirty ()
 
void Clear ()
 

Detailed Description

A collection of Face and HalfEdge objects used to represent a 2d mesh.

Member Function Documentation

◆ ConvexMerge()

size_t PolygonPrismMeshUtils::Mesh2D::ConvexMerge ( )

Iteratively merges faces in the mesh if it is possible to do so while maintaining convexity. Internal edges of the mesh are considered for removal in an order based on

Returns
The number of faces which have been removed during the merging process.

The documentation for this class was generated from the following file: