CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MeshGenerator::ConvexPolygonMesh Class Reference

A polygonal disk with arbitrary number of corners. More...

#include <CeresEngine/Mesh/Generator/ConvexPolygonMesh.hpp>

Classes

class  Triangles
 
class  Vertices
 

Public Member Functions

 ConvexPolygonMesh (double radius=1.0, int sides=5, int segments=4, int rings=4) noexcept
 
 ConvexPolygonMesh (const Vector< Vector2 > &vertices, int segments=1, int rings=1) noexcept
 
 ConvexPolygonMesh (Vector< Vector3 > vertices, int segments=1, int rings=1) noexcept
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Attributes

Vector< Vector3mVertices
 
int mSegments
 
int mRings
 
Vector3 mCenter
 
Vector3 mNormal
 
Vector3 mTangent
 
Vector3 mBitangent
 
Vector2 mTexDelta
 

Detailed Description

A polygonal disk with arbitrary number of corners.

Subdivided along each side to segments and radially to rings.

Constructor & Destructor Documentation

◆ ConvexPolygonMesh() [1/3]

CeresEngine::MeshGenerator::ConvexPolygonMesh::ConvexPolygonMesh ( 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.

◆ ConvexPolygonMesh() [2/3]

CeresEngine::MeshGenerator::ConvexPolygonMesh::ConvexPolygonMesh ( const Vector< Vector2 > &  vertices,
int  segments = 1,
int  rings = 1 
)
explicitnoexcept

◆ ConvexPolygonMesh() [3/3]

CeresEngine::MeshGenerator::ConvexPolygonMesh::ConvexPolygonMesh ( Vector< Vector3 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.

Member Function Documentation

◆ triangles()

Triangles CeresEngine::MeshGenerator::ConvexPolygonMesh::triangles ( ) const
noexcept

◆ vertices()

Vertices CeresEngine::MeshGenerator::ConvexPolygonMesh::vertices ( ) const
noexcept

Member Data Documentation

◆ mBitangent

Vector3 CeresEngine::MeshGenerator::ConvexPolygonMesh::mBitangent
private

◆ mCenter

Vector3 CeresEngine::MeshGenerator::ConvexPolygonMesh::mCenter
private

◆ mNormal

Vector3 CeresEngine::MeshGenerator::ConvexPolygonMesh::mNormal
private

◆ mRings

int CeresEngine::MeshGenerator::ConvexPolygonMesh::mRings
private

◆ mSegments

int CeresEngine::MeshGenerator::ConvexPolygonMesh::mSegments
private

◆ mTangent

Vector3 CeresEngine::MeshGenerator::ConvexPolygonMesh::mTangent
private

◆ mTexDelta

Vector2 CeresEngine::MeshGenerator::ConvexPolygonMesh::mTexDelta
private

◆ mVertices

Vector<Vector3> CeresEngine::MeshGenerator::ConvexPolygonMesh::mVertices
private

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