CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MeshGenerator::LatheMesh< Shape > Class Template Reference

Spins a shape around an axis to create a mesh. More...

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

Classes

class  Triangles
 
class  Vertices
 

Public Member Functions

 LatheMesh (Shape shape, const Vector2 &axis, const int slices=32, const double start=0.0, const double sweep=radians(360.0))
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Attributes

Vector3 axis_
 
Shape mShape
 
int mSlices
 
double start_
 
double sweep_
 

Detailed Description

template<typename Shape>
class CeresEngine::MeshGenerator::LatheMesh< Shape >

Spins a shape around an axis to create a mesh.

u-texture coordinate is taken from the shape and v runs from 0 to 1 around the axis counterclockwise.

Constructor & Destructor Documentation

◆ LatheMesh()

template<typename Shape >
CeresEngine::MeshGenerator::LatheMesh< Shape >::LatheMesh ( Shape  shape,
const Vector2 axis,
const int  slices = 32,
const double  start = 0.0,
const double  sweep = radians(360.0) 
)
inline
Parameters
shapeThe shape to spin.
axisUnit length axis to spin around.
slicesNumber of subdivisions around the axis.
startCounterclockwise angle around the given axis relative to the xy-plane. relative to the xy-plane.
sweepCounterclockwise angle around the given axis.

Member Function Documentation

◆ triangles()

template<typename Shape >
Triangles CeresEngine::MeshGenerator::LatheMesh< Shape >::triangles ( ) const
inlinenoexcept

◆ vertices()

template<typename Shape >
Vertices CeresEngine::MeshGenerator::LatheMesh< Shape >::vertices ( ) const
inlinenoexcept

Member Data Documentation

◆ axis_

◆ mShape

◆ mSlices

◆ start_

◆ sweep_


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