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

Namespaces

namespace  detail
 

Classes

class  AnyGenerator
 A type erasing container that can store any generator that generates type T. More...
 
class  AnyMesh
 A type erasing container that can store any mesh. More...
 
class  AnyPath
 A type erasing container that can store any path. More...
 
class  AnyShape
 A type erasing container that can store any shape. More...
 
class  AxisFlipMesh
 Flips (mirrors) the mesh along one or more axis. More...
 
class  AxisSwapMesh
 Swaps any number of axis in the mesh. More...
 
class  AxisSwapPath
 Swaps axis in path. More...
 
class  AxisSwapShape
 Swaps the x and y axis. More...
 
class  BezierMesh
 A bezier patch with D0xD1 control points. More...
 
class  BezierShape
 A bezier curve with D control points. More...
 
class  BoxMesh
 Rectangular box centered at origin aligned along the x, y and z axis. More...
 
class  CappedConeMesh
 A cone with a cap centered at origin pointing towards positive z-axis. More...
 
class  CappedCylinderMesh
 Like CylinderMesh but with end caps. More...
 
class  CappedTubeMesh
 Like TubeMesh but with end caps. More...
 
class  CapsuleMesh
 Capsule (cylinder with spherical caps) centered at origin aligned along z-axis. More...
 
class  CircleShape
 A circle centered at origin. More...
 
class  ConeMesh
 A cone centered at origin tip pointing towards z-axis. More...
 
class  ConvexPolygonMesh
 A polygonal disk with arbitrary number of corners. More...
 
class  CylinderMesh
 Cylinder centered at origin aligned along the z-axis. More...
 
class  DiskMesh
 A circular disk centered at origin on the xy-plane. More...
 
class  DodecahedronMesh
 A regular dodecahedron centered at origin with given radius. More...
 
class  Edge
 
class  EdgeGeneratorType
 Will have a type named "Type" that has same type as value returned by method edges() for type Primitive. More...
 
class  EmptyMesh
 Empty Mesh with zero vertices and triangles. More...
 
class  EmptyPath
 Empty path with zero vertices and edges. More...
 
class  EmptyShape
 Empty shape with zero vertices and edges. More...
 
class  ExtrudeMesh
 Extrude a shape along a path. More...
 
class  FlipMesh
 Flips mesh inside out. Reverses triangles and normals. More...
 
class  FlipPath
 Flips mesh inside out. Reverses triangles and normals. More...
 
class  FlipShape
 Flips shape direction. Reverses edges and tangents. More...
 
class  GeneratedType
 Will have a type named "Type" that has same type as value returned by method generate() of type Generator. More...
 
class  GridShape
 A 2d regular grid. More...
 
class  HelixPath
 A helix cented at origin aligned along the z-axis. More...
 
class  IcosahedronMesh
 Regular icosahedron centered at origin with given radius. More...
 
class  IcoSphereMesh
 Icosphere aka spherical subdivided icosahedron. More...
 
class  Iterator
 An iterator that can be used to "drive" a generator. More...
 
class  KnotPath
 A circle winding multiple times around. More...
 
class  LatheMesh
 Spins a shape around an axis to create a mesh. More...
 
class  LinePath
 A path from point to point. More...
 
class  LineShape
 A line from a point to a point. More...
 
class  MergeMesh
 Merges (concatenates) multiple meshes to to together. More...
 
class  MergeMesh< Head, Tail... >
 
class  MergeMesh<>
 
class  MergePath
 Merges (concatenates) multiple paths together. More...
 
class  MergePath< Head, Tail... >
 
class  MergePath<>
 
class  MergeShape
 Merges (concatenates) multiple shapes together. More...
 
class  MergeShape< Head, Tail... >
 
class  MergeShape<>
 
class  MeshVertex
 
class  MirrorMesh
 Duplicates the mesh by mirrorring it along an axis. More...
 
class  ObjWriter
 A class for generating obj files for preview and debug purposes. More...
 
class  ParametricMesh
 A mesh with values evaluated using a callback function. More...
 
class  ParametricPath
 Path generated by evaluating callback functions at even intervals. More...
 
class  ParametricShape
 A shape with values evaluated using a callback function. More...
 
class  PathVertex
 
class  PlaneMesh
 A plane (rectangular grid) on the xy -plane normal pointing towards z-axis. More...
 
class  RectangleShape
 Rectangle centered at origin aligned along the x and y axis. More...
 
class  RepeatMesh
 Repeats the same mesh a given number of time at given intervals. More...
 
class  RepeatPath
 Repeats the same path a given number of time at given intervals. More...
 
class  RepeatShape
 Repeats the same shape a given number of time at given intervals. More...
 
class  RotateMesh
 Rotates vertices and normals. More...
 
class  RotatePath
 Rotates vertices, tangents and normals. More...
 
class  RotateShape
 Rotates a shape around the origin on the xy-plane. More...
 
class  RoundedBoxMesh
 Rectangular box with rounded edges centered at origin aligned along the x, y and z axis. More...
 
class  RoundedRectangleShape
 Rectangle with rounded corners centered at origin aligned along the x and y axis. More...
 
class  ScaleMesh
 Scales a mesh (keeps normals unit length) More...
 
class  ScalePath
 Scales a path. Keeps tangents and normals unit length. More...
 
class  ScaleShape
 Scales a shape keeping tangents unit length. More...
 
class  ShapeToPath
 Converts a Shape to a Path. More...
 
class  ShapeVertex
 A point on a path. More...
 
class  SphereMesh
 A sphere of the given radius centered around the origin. More...
 
class  SphericalConeMesh
 A cone with a spherical cap centered at origin tip pointing towards z-axis. More...
 
class  SphericalTriangleMesh
 A triangular region on a surface of a sphere. More...
 
class  SpherifyMesh
 Projects vertices on a sphere centered at origin. More...
 
class  SpringMesh
 A spring aligned along the z-axis winding counterclockwise. More...
 
class  SubdivideMesh
 
class  SubdivideMesh< Mesh, 0 >
 
class  SubdivideMesh< Mesh, 1 >
 Subdivides each triangle to 4 parts by splitting edges. More...
 
class  SubdividePath
 
class  SubdivideShape
 Cuts each edge in half. More...
 
class  SvgWriter
 A simple svg writer class for generating preview and debug images. More...
 
class  TeapotMesh
 The Utah Teapot. More...
 
class  TorusKnotMesh
 A Circle extruded along a knot path. More...
 
class  TorusMesh
 Torus centered at origin on the xy-plane. More...
 
class  TransformMesh
 Apply a mutator function to each vertex. More...
 
class  TransformPath
 Apply a mutator function to each vertex. More...
 
class  TransformShape
 Apply a mutator function to each vertex. More...
 
class  TranslateMesh
 Translates the position of each vertex by given amount. More...
 
class  TranslatePath
 Translates the position of each vertex by given amount. More...
 
class  TranslateShape
 Translates the position of each vertex by given amount. More...
 
class  Triangle
 
class  TriangleGeneratorType
 Will have a type named "Type" that has same type as value returned by method triangles() for type Primitive. More...
 
class  TriangleMesh
 A triangular mesh on the xy -plane. More...
 
class  TubeMesh
 Tube (thick cylinder) centered at origin aligned along the z-axis. More...
 
class  UvFlipMesh
 Flips texture coordinate axis directions. More...
 
class  UvSwapMesh
 Swaps the texture coordinates axis u and v. More...
 
class  VertexGeneratorType
 Will have a type named "Type" that has same type as value returned by method vertices() for type Primitive. More...
 

Enumerations

enum class  Axis { X = 0 , Y = 1 , Z = 2 }
 

Functions

template<typename Mesh >
AxisFlipMesh< MeshaxisFlipMesh (Mesh mesh, bool x, bool y, bool z)
 
template<typename Mesh >
AxisSwapMesh< MeshaxisSwapMesh (Mesh mesh, Axis x, Axis y, Axis z)
 
template<typename Path >
AxisSwapPath< PathaxisSwapPath (Path path, Axis x, Axis y, Axis z)
 
template<typename Shape >
AxisSwapShape< ShapeaxisSwapShape (Shape shape)
 
template<typename Shape , typename Path >
ExtrudeMesh< Shape, PathextrudeMesh (Shape shape, Path path)
 
template<typename Mesh >
FlipMesh< MeshflipMesh (Mesh mesh)
 
template<typename Path >
FlipPath< PathflipPath (Path path)
 
template<typename Shape >
FlipShape< ShapeflipShape (Shape shape)
 
template<typename Generator >
Iterator< Generatorbegin (Generator &generator) noexcept
 Will return an iterator to the generator.
 
template<typename Generator >
Iterator< Generatorend (const Generator &) noexcept
 Returns a dummy end iterator.
 
template<typename Shape >
LatheMesh< Shapelathe (Shape shape, Axis axis=Axis::X, int slices=32, double start=0.0, double sweep=radians(360.0))
 
template<typename... Mesh>
MergeMesh< Mesh... > mergeMesh (Mesh... meshes)
 
template<typename... Path>
MergePath< Path... > mergePath (Path... paths)
 
template<typename... Shape>
MergeShape< Shape... > mergeShape (Shape... shapes)
 
template<typename Mesh >
MirrorMesh< MeshmirrorMesh (Mesh mesh)
 
template<typename Mesh >
RepeatMesh< MeshrepeatMesh (Mesh mesh, int instances, const Vector3 &delta) noexcept
 
template<typename Path >
RepeatPath< PathrepeatPath (Path path, int instances, const Vector3 &delta) noexcept
 
template<typename Shape >
RepeatShape< ShaperepeatShape (Shape shape, int instances, const Vector2 &delta) noexcept
 
template<typename Mesh >
RotateMesh< MeshrotateMesh (Mesh mesh, const Quaternion &rotation)
 
template<typename Mesh >
RotateMesh< MeshrotateMesh (Mesh mesh, double angle, const Vector3 &axis)
 
template<typename Mesh >
RotateMesh< MeshrotateMesh (Mesh mesh, double angle, Axis axis)
 
template<typename Path >
RotatePath< PathrotatePath (Path path, const Quaternion &rotation)
 
template<typename Path >
RotatePath< PathrotatePath (Path path, double angle, const Vector3 &axis)
 
template<typename Path >
RotatePath< PathrotatePath (Path path, double angle, Axis axis)
 
template<typename Shape >
RotateShape< ShaperotateShape (Shape shape, double angle)
 
template<typename Mesh >
ScaleMesh< MeshscaleMesh (Mesh mesh, const Vector3 &delta)
 
template<typename Path >
ScalePath< PathscalePath (Path path, const Vector3 &scale)
 
template<typename Shape >
ScaleShape< ShapescaleShape (Shape shape, const Vector2 &scale)
 
template<typename Shape >
ShapeToPath< ShapeshapeToPath (Shape shape)
 
template<typename Mesh >
SpherifyMesh< MeshspherifyMesh (Mesh mesh, double radius, double factor)
 
template<typename Path >
SubdividePath< PathsubdividePath (Path path)
 
template<typename Mesh >
TransformMesh< MeshtransformMesh (Mesh mesh, Function< void(MeshVertex &) const > mutate)
 
template<typename Path >
TransformPath< PathtransformPath (Path path, Function< void(PathVertex &) const > mutate)
 
template<typename Shape >
TransformShape< ShapetransformShape (Shape shape, Function< void(ShapeVertex &) const > mutate)
 
template<typename Mesh >
TranslateMesh< MeshtranslateMesh (Mesh mesh, const Vector3 &delta)
 
template<typename Path >
TranslatePath< PathtranslatePath (Path path, const Vector3 &delta)
 
template<typename Shape >
TranslateShape< ShapetranslateShape (Shape shape, const Vector2 &delta)
 
template<typename Generator >
int count (const Generator &generator) noexcept
 Counts the number of steps left in the generator.
 
template<typename Mesh >
UvFlipMesh< MeshuvFlipMesh (Mesh mesh)
 
template<typename Mesh >
UvSwapMesh< MeshuvSwapMesh (Mesh mesh)
 

Enumeration Type Documentation

◆ Axis

Enumerator

Function Documentation

◆ axisFlipMesh()

template<typename Mesh >
AxisFlipMesh< Mesh > CeresEngine::MeshGenerator::axisFlipMesh ( Mesh  mesh,
bool  x,
bool  y,
bool  z 
)

◆ axisSwapMesh()

template<typename Mesh >
AxisSwapMesh< Mesh > CeresEngine::MeshGenerator::axisSwapMesh ( Mesh  mesh,
Axis  x,
Axis  y,
Axis  z 
)

◆ axisSwapPath()

template<typename Path >
AxisSwapPath< Path > CeresEngine::MeshGenerator::axisSwapPath ( Path  path,
Axis  x,
Axis  y,
Axis  z 
)

◆ axisSwapShape()

template<typename Shape >
AxisSwapShape< Shape > CeresEngine::MeshGenerator::axisSwapShape ( Shape  shape)

◆ begin()

template<typename Generator >
Iterator< Generator > CeresEngine::MeshGenerator::begin ( Generator generator)
noexcept

Will return an iterator to the generator.

◆ count()

template<typename Generator >
int CeresEngine::MeshGenerator::count ( const Generator generator)
noexcept

Counts the number of steps left in the generator.

◆ end()

template<typename Generator >
Iterator< Generator > CeresEngine::MeshGenerator::end ( const Generator )
noexcept

Returns a dummy end iterator.

◆ extrudeMesh()

template<typename Shape , typename Path >
ExtrudeMesh< Shape, Path > CeresEngine::MeshGenerator::extrudeMesh ( Shape  shape,
Path  path 
)

◆ flipMesh()

template<typename Mesh >
FlipMesh< Mesh > CeresEngine::MeshGenerator::flipMesh ( Mesh  mesh)

◆ flipPath()

template<typename Path >
FlipPath< Path > CeresEngine::MeshGenerator::flipPath ( Path  path)

◆ flipShape()

template<typename Shape >
FlipShape< Shape > CeresEngine::MeshGenerator::flipShape ( Shape  shape)

◆ lathe()

template<typename Shape >
LatheMesh< Shape > CeresEngine::MeshGenerator::lathe ( Shape  shape,
Axis  axis = Axis::X,
int  slices = 32,
double  start = 0.0,
double  sweep = radians(360.0) 
)

◆ mergeMesh()

template<typename... Mesh>
MergeMesh< Mesh... > CeresEngine::MeshGenerator::mergeMesh ( Mesh...  meshes)

◆ mergePath()

template<typename... Path>
MergePath< Path... > CeresEngine::MeshGenerator::mergePath ( Path...  paths)

◆ mergeShape()

template<typename... Shape>
MergeShape< Shape... > CeresEngine::MeshGenerator::mergeShape ( Shape...  shapes)

◆ mirrorMesh()

template<typename Mesh >
MirrorMesh< Mesh > CeresEngine::MeshGenerator::mirrorMesh ( Mesh  mesh)

◆ repeatMesh()

template<typename Mesh >
RepeatMesh< Mesh > CeresEngine::MeshGenerator::repeatMesh ( Mesh  mesh,
int  instances,
const Vector3 delta 
)
noexcept

◆ repeatPath()

template<typename Path >
RepeatPath< Path > CeresEngine::MeshGenerator::repeatPath ( Path  path,
int  instances,
const Vector3 delta 
)
noexcept

◆ repeatShape()

template<typename Shape >
RepeatShape< Shape > CeresEngine::MeshGenerator::repeatShape ( Shape  shape,
int  instances,
const Vector2 delta 
)
noexcept

◆ rotateMesh() [1/3]

template<typename Mesh >
RotateMesh< Mesh > CeresEngine::MeshGenerator::rotateMesh ( Mesh  mesh,
const Quaternion &  rotation 
)

◆ rotateMesh() [2/3]

template<typename Mesh >
RotateMesh< Mesh > CeresEngine::MeshGenerator::rotateMesh ( Mesh  mesh,
double  angle,
Axis  axis 
)

◆ rotateMesh() [3/3]

template<typename Mesh >
RotateMesh< Mesh > CeresEngine::MeshGenerator::rotateMesh ( Mesh  mesh,
double  angle,
const Vector3 axis 
)

◆ rotatePath() [1/3]

template<typename Path >
RotatePath< Path > CeresEngine::MeshGenerator::rotatePath ( Path  path,
const Quaternion &  rotation 
)

◆ rotatePath() [2/3]

template<typename Path >
RotatePath< Path > CeresEngine::MeshGenerator::rotatePath ( Path  path,
double  angle,
Axis  axis 
)

◆ rotatePath() [3/3]

template<typename Path >
RotatePath< Path > CeresEngine::MeshGenerator::rotatePath ( Path  path,
double  angle,
const Vector3 axis 
)

◆ rotateShape()

template<typename Shape >
RotateShape< Shape > CeresEngine::MeshGenerator::rotateShape ( Shape  shape,
double  angle 
)

◆ scaleMesh()

template<typename Mesh >
ScaleMesh< Mesh > CeresEngine::MeshGenerator::scaleMesh ( Mesh  mesh,
const Vector3 delta 
)

◆ scalePath()

template<typename Path >
ScalePath< Path > CeresEngine::MeshGenerator::scalePath ( Path  path,
const Vector3 scale 
)

◆ scaleShape()

template<typename Shape >
ScaleShape< Shape > CeresEngine::MeshGenerator::scaleShape ( Shape  shape,
const Vector2 scale 
)

◆ shapeToPath()

template<typename Shape >
ShapeToPath< Shape > CeresEngine::MeshGenerator::shapeToPath ( Shape  shape)

◆ spherifyMesh()

template<typename Mesh >
SpherifyMesh< Mesh > CeresEngine::MeshGenerator::spherifyMesh ( Mesh  mesh,
double  radius,
double  factor 
)

◆ subdividePath()

template<typename Path >
SubdividePath< Path > CeresEngine::MeshGenerator::subdividePath ( Path  path)

◆ transformMesh()

template<typename Mesh >
TransformMesh< Mesh > CeresEngine::MeshGenerator::transformMesh ( Mesh  mesh,
Function< void(MeshVertex &) const mutate 
)

◆ transformPath()

template<typename Path >
TransformPath< Path > CeresEngine::MeshGenerator::transformPath ( Path  path,
Function< void(PathVertex &) const mutate 
)

◆ transformShape()

template<typename Shape >
TransformShape< Shape > CeresEngine::MeshGenerator::transformShape ( Shape  shape,
Function< void(ShapeVertex &) const mutate 
)

◆ translateMesh()

template<typename Mesh >
TranslateMesh< Mesh > CeresEngine::MeshGenerator::translateMesh ( Mesh  mesh,
const Vector3 delta 
)

◆ translatePath()

template<typename Path >
TranslatePath< Path > CeresEngine::MeshGenerator::translatePath ( Path  path,
const Vector3 delta 
)

◆ translateShape()

template<typename Shape >
TranslateShape< Shape > CeresEngine::MeshGenerator::translateShape ( Shape  shape,
const Vector2 delta 
)

◆ uvFlipMesh()

template<typename Mesh >
UvFlipMesh< Mesh > CeresEngine::MeshGenerator::uvFlipMesh ( Mesh  mesh)

◆ uvSwapMesh()

template<typename Mesh >
UvSwapMesh< Mesh > CeresEngine::MeshGenerator::uvSwapMesh ( Mesh  mesh)