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

Capsule (cylinder with spherical caps) centered at origin aligned along z-axis. More...

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

Public Types

using Triangles = typename Impl::Triangles
 
using Vertices = typename Impl::Vertices
 

Public Member Functions

 CapsuleMesh (double radius=1.0, double size=0.5, int slices=32, int segments=4, int rings=8, double start=0.0, double sweep=radians(360.0))
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Types

using Impl = MergeMesh< CylinderMesh, TranslateMesh< SphereMesh >, TranslateMesh< SphereMesh > >
 

Private Attributes

Impl mMergeMesh
 

Detailed Description

Capsule (cylinder with spherical caps) centered at origin aligned along z-axis.

Member Typedef Documentation

◆ Impl

◆ Triangles

◆ Vertices

Constructor & Destructor Documentation

◆ CapsuleMesh()

CeresEngine::MeshGenerator::CapsuleMesh::CapsuleMesh ( double  radius = 1.0,
double  size = 0.5,
int  slices = 32,
int  segments = 4,
int  rings = 8,
double  start = 0.0,
double  sweep = radians(360.0) 
)
Parameters
radiusRadius of the capsule on the xy-plane.
sizeHalf of the length between centers of the caps along the z-axis.
slicesNumber of subdivisions around the z-axis.
ringsNumber of radial subdivisions in the caps.
startCounterclockwise angle relative to the x-axis.
sweepCounterclockwise angle.

Member Function Documentation

◆ triangles()

Triangles CeresEngine::MeshGenerator::CapsuleMesh::triangles ( ) const
inlinenoexcept

◆ vertices()

Vertices CeresEngine::MeshGenerator::CapsuleMesh::vertices ( ) const
inlinenoexcept

Member Data Documentation

◆ mMergeMesh

Impl CeresEngine::MeshGenerator::CapsuleMesh::mMergeMesh
private

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