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

A sphere of the given radius centered around the origin. More...

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

Public Types

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

Public Member Functions

 SphereMesh (double radius=1.0, int slices=32, int segments=16, double sliceStart=0.0, double sliceSweep=radians(360.0), double segmentStart=0.0, double segmentSweep=radians(180.0))
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Types

using Impl = AxisSwapMesh< LatheMesh< CircleShape > >
 

Private Attributes

Impl mAxisSwapMesh
 

Detailed Description

A sphere of the given radius centered around the origin.

Subdivided around the z-axis in slices and along the z-axis in segments.

Member Typedef Documentation

◆ Impl

◆ Triangles

◆ Vertices

Constructor & Destructor Documentation

◆ SphereMesh()

CeresEngine::MeshGenerator::SphereMesh::SphereMesh ( double  radius = 1.0,
int  slices = 32,
int  segments = 16,
double  sliceStart = 0.0,
double  sliceSweep = radians(360.0),
double  segmentStart = 0.0,
double  segmentSweep = radians(180.0) 
)
Parameters
radiusThe radius of the sphere
slicesSubdivisions around the z-azis (longitudes).
segmentsSubdivisions along the z-azis (latitudes).
sliceStartCounterclockwise angle around the z-axis relative to x-axis.
sliceSweepCounterclockwise angle.
segmentStartCounterclockwise angle relative to the z-axis.
segmentSweepCounterclockwise angle.

Member Function Documentation

◆ triangles()

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

◆ vertices()

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

Member Data Documentation

◆ mAxisSwapMesh

Impl CeresEngine::MeshGenerator::SphereMesh::mAxisSwapMesh
private

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