Unravel Engine C++ Reference
Loading...
Searching...
No Matches
generator::convex_polygon_mesh_t Class Reference

#include <convex_polygon_mesh.hpp>

Public Member Functions

 convex_polygon_mesh_t (double radius=1.0, int sides=5, int segments=4, int rings=4) noexcept
 
 convex_polygon_mesh_t (const std::vector< gml::dvec2 > &vertices, int segments=1, int rings=1) noexcept
 
 convex_polygon_mesh_t (std::vector< gml::dvec3 > vertices, int segments=1, int rings=1) noexcept
 
triangles_t triangles () const noexcept
 
vertices_t vertices () const noexcept
 

Detailed Description

A polygonal disk with arbitrary number of corners. Subdivided along each side to segments and radially to rings.

Definition at line 17 of file convex_polygon_mesh.hpp.

Constructor & Destructor Documentation

◆ convex_polygon_mesh_t() [1/3]

convex_polygon_mesh_t::convex_polygon_mesh_t ( double radius = 1.0,
int sides = 5,
int segments = 4,
int rings = 4 )
explicitnoexcept
Parameters
radiusThe radius the enclosing circle.
sidesThe number of sides. Should be >= 3. If <3 an empty mesh is generated.
segmentsThe number of segments per side. Should be >= 1. If zero an empty mesh is generated.
ringsThe number of radial segments. Should be >= 1. = yelds an empty mesh.

Definition at line 235 of file convex_polygon_mesh.cpp.

◆ convex_polygon_mesh_t() [2/3]

convex_polygon_mesh_t::convex_polygon_mesh_t ( const std::vector< gml::dvec2 > & vertices,
int segments = 1,
int rings = 1 )
explicitnoexcept

Definition at line 240 of file convex_polygon_mesh.cpp.

◆ convex_polygon_mesh_t() [3/3]

convex_polygon_mesh_t::convex_polygon_mesh_t ( std::vector< gml::dvec3 > vertices,
int segments = 1,
int rings = 1 )
explicitnoexcept
Parameters
verticesThe corner vertex coordinates. Should be coplanar and form a convex polygon. calculated as an avarage.

Definition at line 245 of file convex_polygon_mesh.cpp.

Member Function Documentation

◆ triangles()

convex_polygon_mesh_t::triangles_t convex_polygon_mesh_t::triangles ( ) const
noexcept

Definition at line 281 of file convex_polygon_mesh.cpp.

◆ vertices()

convex_polygon_mesh_t::vertices_t convex_polygon_mesh_t::vertices ( ) const
noexcept

Definition at line 286 of file convex_polygon_mesh.cpp.


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