Unravel Engine C++ Reference
Loading...
Searching...
No Matches
generator Namespace Reference

Namespaces

namespace  detail
 

Classes

class  any_generator
 
class  any_mesh
 A type erasing container that can store any mesh. More...
 
class  any_path
 A type erasing container that can store any path. More...
 
class  any_shape
 A type erasing container that can store any shape. More...
 
class  axis_flip_mesh_t
 
class  axis_swap_mesh_t
 Swaps any number of axis in the mesh. More...
 
class  axis_swap_path_t
 Swaps axis in path. More...
 
class  axis_swap_shape_t
 Swaps the x and y axis. More...
 
class  bezier_mesh_t
 
class  bezier_shape_t
 
class  box_mesh_t
 
class  capped_cone_mesh_t
 
class  capped_cylinder_mesh_t
 
class  capped_tube_mesh_t
 
class  capsule_mesh_t
 
class  circle_shape_t
 
class  cone_mesh_t
 
class  convex_polygon_mesh_t
 
class  cylinder_mesh_t
 
class  disk_mesh_t
 
class  dodecahedron_mesh_t
 
struct  edge_generator_type
 
struct  edge_generator_type< primitive_t, std::void_t< decltype(std::declval< const primitive_t >().edges())> >
 
class  edge_t
 
class  empty_mesh
 Empty Mesh with zero vertices and triangles. More...
 
class  empty_path_t
 Empty path with zero vertices and edges. More...
 
class  empty_shape_t
 Empty shape with zero vertices and edges. More...
 
class  extrude_mesh_t
 
class  flip_mesh_t
 Flips mesh inside out. Reverses triangles and normals. More...
 
class  flip_path_t
 Flips mesh inside out. Reverses triangles and normals. More...
 
class  flip_shape_t
 Flips shape direction. Reverses edges and tangents. More...
 
class  gen_iterator_t
 
struct  generated_type
 
struct  generated_type< generator_t, std::void_t< decltype(std::declval< const generator_t >().generate())> >
 
class  grid_shape_t
 
class  helix_path_t
 
class  ico_sphere_mesh_t
 
class  icosahedron_mesh_t
 
class  knot_path_t
 
class  lathe_mesh_t
 
class  line_path_t
 
class  line_shape_t
 
class  merge_mesh_t
 Merges (concatenates) multiple meshes to to together. More...
 
class  merge_mesh_t< Head, Tail... >
 
class  merge_mesh_t<>
 
class  merge_path_t
 Merges (concatenates) multiple paths together. More...
 
class  merge_path_t< Head, Tail... >
 
class  merge_path_t<>
 
class  merge_shape_t
 Merges (concatenates) multiple shapes together. More...
 
class  merge_shape_t< Head, Tail... >
 
class  merge_shape_t<>
 
class  mesh_vertex_t
 
class  mirror_mesh_t
 Duplicates the mesh by mirrorring it along an axis. More...
 
class  obj_writer_t
 A class for generating obj files for preview and debug purposes. More...
 
class  parametric_mesh_t
 A mesh with values evaluated using a callback function. More...
 
class  parametric_path_t
 Path generated by evaluating callback functions at even intervals. More...
 
class  parametric_shape_t
 A shape with values evaluated using a callback function. More...
 
class  path_vertex_t
 
class  plane_mesh_t
 
class  rectangle_shape_t
 
class  repeat_mesh_t
 
class  repeat_path_t
 
class  repeat_shape_t
 
class  rotate_mesh_t
 Rotates vertices and normals. More...
 
class  rotate_path_t
 Rotates vertices, tangents and normals. More...
 
class  rotate_shape_t
 Rotates a shape around the origin on the xy-plane. More...
 
class  rounded_box_mesh_t
 
class  rounded_rectangle_shape_t
 Rectangle with rounded corners centered at origin aligned along the x and y axis. More...
 
class  scale_mesh_t
 Scales a mesh (keeps normals unit length) More...
 
class  scale_path_t
 Scales a path. Keeps tangents and normals unit length. More...
 
class  scale_shape_t
 Scales a shape keeping tangents unit length. More...
 
class  shape_to_path_t
 
class  shape_vertex_t
 
class  sphere_mesh_t
 
class  spherical_cone_mesh_t
 
class  spherical_triangle_mesh_t
 
class  spherify_mesh_t
 Projects vertices on a sphere centered at origin. More...
 
class  spring_mesh_t
 
class  subdivide_mesh_t
 
class  subdivide_mesh_t< mesh_t, 0 >
 
class  subdivide_mesh_t< mesh_t, 1 >
 Subdivides each triangle to 4 parts by splitting edges. More...
 
class  subdivide_path_t
 
class  subdivide_shape_t
 Cuts each edge in half. More...
 
class  svg_writer_t
 A simple svg writer class for generating preview and debug images. More...
 
class  teapot_mesh_t
 
class  torus_knot_mesh_t
 
class  torus_mesh_t
 
class  transform_mesh_t
 Apply a mutator function to each vertex. More...
 
class  transform_path_t
 Apply a mutator function to each vertex. More...
 
class  transform_shape_t
 Apply a mutator function to each vertex. More...
 
class  translate_mesh_t
 Translates the position of each vertex by given amount. More...
 
class  translate_path_t
 Translates the position of each vertex by given amount. More...
 
class  translate_shape_t
 Translates the position of each vertex by given amount. More...
 
struct  triangle_generator_type
 
struct  triangle_generator_type< primitive_t, std::void_t< decltype(std::declval< const primitive_t >().triangles())> >
 
class  triangle_mesh_t
 
class  triangle_t
 
class  tube_mesh_t
 
class  uv_flip_mesh_t
 Flips texture coordinate axis directions. More...
 
class  uv_swap_mesh_t
 Swaps the texture coordinates axis u and v. More...
 
struct  vertex_generator_type
 
struct  vertex_generator_type< primitive_t, std::void_t< decltype(std::declval< const primitive_t >().vertices())> >
 

Enumerations

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

Functions

template<typename mesh_t >
axis_flip_mesh_t< mesh_t > axis_flip_mesh (mesh_t mesh, bool x, bool y, bool z)
 
template<typename mesh_t >
axis_swap_mesh_t< mesh_t > axis_swap_mesh (mesh_t mesh, axis_t x, axis_t y, axis_t z)
 
template<typename path_t >
axis_swap_path_t< path_t > axis_swap_path (path_t path, axis_t x, axis_t y, axis_t z)
 
template<typename shape_t >
axis_swap_shape_t< shape_t > axis_swap_shape (shape_t shape)
 
template<typename shape_t , typename path_t >
extrude_mesh_t< shape_t, path_t > extrude_mesh (shape_t shape, path_t path)
 
template<typename mesh_t >
flip_mesh_t< mesh_t > flip_mesh (mesh_t mesh)
 
template<typename path_t >
flip_path_t< path_t > flip_path (path_t path)
 
template<typename shape_t >
flip_shape_t< shape_t > flip_shape (shape_t shape)
 
template<typename generator_t , typename = std::void_t<decltype(std::declval<const generator_t>().generate())>>
gen_iterator_t< generator_t > begin (generator_t &generator) noexcept
 Will return an iterator to the generator.
 
template<typename generator_t , typename = std::void_t<decltype(std::declval<const generator_t>().generate())>>
gen_iterator_t< generator_t > end (const generator_t &) noexcept
 Returns a dummy end iterator.
 
template<typename shape_t >
lathe_mesh_t< shape_t > lathe (shape_t shape, axis_t axis=axis_t::X, int slices=32, double start=0.0, double sweep=gml::radians(360.0))
 
template<typename... Mesh>
merge_mesh_t< Mesh... > merge_mesh (Mesh... meshes)
 
template<typename... Path>
merge_path_t< Path... > merge_path (Path... paths)
 
template<typename... shape_t>
merge_shape_t< shape_t... > merge_shape (shape_t... shapes)
 
template<typename Mesh >
mirror_mesh_t< Mesh > mirror_mesh (Mesh mesh)
 
template<typename mesh_t >
repeat_mesh_t< mesh_t > repeat_mesh (mesh_t mesh, int instances, const gml::dvec3 &delta) noexcept
 
template<typename path_t >
repeat_path_t< path_t > repeat_path (path_t path, int instances, const gml::dvec3 &delta) noexcept
 
template<typename shape_t >
repeat_shape_t< shape_t > repeat_shape (shape_t shape, int instances, const gml::dvec2 &delta) noexcept
 
template<typename mesh_t >
rotate_mesh_t< mesh_t > rotate_mesh (mesh_t mesh, const gml::dquat &rotation)
 
template<typename mesh_t >
rotate_mesh_t< mesh_t > rotate_mesh (mesh_t mesh, double angle, const gml::dvec3 &axis)
 
template<typename mesh_t >
rotate_mesh_t< mesh_t > rotate_mesh (mesh_t mesh, double angle, axis_t axis)
 
template<typename path_t >
rotate_path_t< path_t > rotate_path (path_t path, const gml::dquat &rotation)
 
template<typename path_t >
rotate_path_t< path_t > rotate_path (path_t path, double angle, const gml::dvec3 &axis)
 
template<typename path_t >
rotate_path_t< path_t > rotate_path (path_t path, double angle, axis_t axis)
 
template<typename shape_t >
rotate_shape_t< shape_t > rotate_shape (shape_t shape, double angle)
 
template<typename mesh_t >
scale_mesh_t< mesh_t > scale_mesh (mesh_t mesh, const gml::dvec3 &delta)
 
template<typename path_t >
scale_path_t< path_t > scale_path (path_t path, const gml::dvec3 &scale)
 
template<typename shape_t >
scale_shape_t< shape_t > scale_shape (shape_t shape, const gml::dvec2 &scale)
 
template<typename shape_t >
shape_to_path_t< shape_t > shape_to_path (shape_t shape)
 
template<typename mesh_t >
spherify_mesh_t< mesh_t > spherify_mesh (mesh_t mesh, double radius, double factor)
 
template<typename path_t >
subdivide_path_t< path_t > subdivide_path (path_t path)
 
template<typename mesh_t >
transform_mesh_t< mesh_t > transform_mesh (mesh_t mesh, std::function< void(mesh_vertex_t &)> mutate)
 
template<typename path_t >
transform_path_t< path_t > transform_path (path_t path, const std::function< void(path_vertex_t &)> &mutate)
 
template<typename shape_t >
transform_shape_t< shape_t > transform_shape (shape_t shape, const std::function< void(shape_vertex_t &)> &mutate)
 
template<typename mesh_t >
translate_mesh_t< mesh_t > translate_mesh (mesh_t mesh, const gml::dvec3 &delta)
 
template<typename path_t >
translate_path_t< path_t > translate_path (path_t path, const gml::dvec3 &delta)
 
template<typename shape_t >
translate_shape_t< shape_t > translate_shape (shape_t shape, const gml::dvec2 &delta)
 
template<typename generator_t >
int count (const generator_t &generator) noexcept
 Counts the number of steps left in the generator.
 
template<typename mesh_t >
uv_flip_mesh_t< mesh_t > uv_flip_mesh (mesh_t mesh)
 
template<typename mesh_t >
uv_swap_mesh_t< mesh_t > uv_swap_mesh (mesh_t mesh)
 

Enumeration Type Documentation

◆ axis_t

enum class generator::axis_t
strong
Enumerator

Definition at line 7 of file axis.hpp.

Function Documentation

◆ axis_flip_mesh()

template<typename mesh_t >
axis_flip_mesh_t< mesh_t > generator::axis_flip_mesh ( mesh_t mesh,
bool x,
bool y,
bool z )

Definition at line 107 of file axis_flip_mesh.hpp.

◆ axis_swap_mesh()

template<typename mesh_t >
axis_swap_mesh_t< mesh_t > generator::axis_swap_mesh ( mesh_t mesh,
axis_t x,
axis_t y,
axis_t z )

Definition at line 95 of file axis_swap_mesh.hpp.

◆ axis_swap_path()

template<typename path_t >
axis_swap_path_t< path_t > generator::axis_swap_path ( path_t path,
axis_t x,
axis_t y,
axis_t z )

Definition at line 56 of file axis_swap_path.hpp.

◆ axis_swap_shape()

template<typename shape_t >
axis_swap_shape_t< shape_t > generator::axis_swap_shape ( shape_t shape)

Definition at line 45 of file axis_swap_shape.hpp.

◆ begin()

template<typename generator_t , typename = std::void_t<decltype(std::declval<const generator_t>().generate())>>
gen_iterator_t< generator_t > generator::begin ( generator_t & generator)
noexcept

Will return an iterator to the generator.

Definition at line 97 of file iterator.hpp.

◆ count()

template<typename generator_t >
int generator::count ( const generator_t & generator)
noexcept

Counts the number of steps left in the generator.

Definition at line 70 of file utils.hpp.

◆ end()

template<typename generator_t , typename = std::void_t<decltype(std::declval<const generator_t>().generate())>>
gen_iterator_t< generator_t > generator::end ( const generator_t & )
noexcept

Returns a dummy end iterator.

Definition at line 104 of file iterator.hpp.

◆ extrude_mesh()

template<typename shape_t , typename path_t >
extrude_mesh_t< shape_t, path_t > generator::extrude_mesh ( shape_t shape,
path_t path )

Definition at line 170 of file extrude_mesh.hpp.

◆ flip_mesh()

template<typename mesh_t >
flip_mesh_t< mesh_t > generator::flip_mesh ( mesh_t mesh)

Definition at line 73 of file flip_mesh.hpp.

◆ flip_path()

template<typename path_t >
flip_path_t< path_t > generator::flip_path ( path_t path)

Definition at line 74 of file flip_path.hpp.

◆ flip_shape()

template<typename shape_t >
flip_shape_t< shape_t > generator::flip_shape ( shape_t shape)

Definition at line 73 of file flip_shape.hpp.

◆ lathe()

template<typename shape_t >
lathe_mesh_t< shape_t > generator::lathe ( shape_t shape,
axis_t axis = axis_t::X,
int slices = 32,
double start = 0.0,
double sweep = gml::radians(360.0) )

Definition at line 177 of file lathe_mesh.hpp.

◆ merge_mesh()

template<typename... Mesh>
merge_mesh_t< Mesh... > generator::merge_mesh ( Mesh... meshes)

Definition at line 132 of file merge_mesh.hpp.

◆ merge_path()

template<typename... Path>
merge_path_t< Path... > generator::merge_path ( Path... paths)

Definition at line 128 of file merge_path.hpp.

◆ merge_shape()

template<typename... shape_t>
merge_shape_t< shape_t... > generator::merge_shape ( shape_t... shapes)

Definition at line 131 of file merge_shape.hpp.

◆ mirror_mesh()

template<typename Mesh >
mirror_mesh_t< Mesh > generator::mirror_mesh ( Mesh mesh)

Definition at line 43 of file mirror_mesh.hpp.

◆ repeat_mesh()

template<typename mesh_t >
repeat_mesh_t< mesh_t > generator::repeat_mesh ( mesh_t mesh,
int instances,
const gml::dvec3 & delta )
noexcept

Definition at line 170 of file repeat_mesh.hpp.

◆ repeat_path()

template<typename path_t >
repeat_path_t< path_t > generator::repeat_path ( path_t path,
int instances,
const gml::dvec3 & delta )
noexcept

Definition at line 157 of file repeat_path.hpp.

◆ repeat_shape()

template<typename shape_t >
repeat_shape_t< shape_t > generator::repeat_shape ( shape_t shape,
int instances,
const gml::dvec2 & delta )
noexcept

Definition at line 170 of file repeat_shape.hpp.

◆ rotate_mesh() [1/3]

template<typename mesh_t >
rotate_mesh_t< mesh_t > generator::rotate_mesh ( mesh_t mesh,
const gml::dquat & rotation )

Definition at line 64 of file rotate_mesh.hpp.

◆ rotate_mesh() [2/3]

template<typename mesh_t >
rotate_mesh_t< mesh_t > generator::rotate_mesh ( mesh_t mesh,
double angle,
axis_t axis )

Definition at line 76 of file rotate_mesh.hpp.

◆ rotate_mesh() [3/3]

template<typename mesh_t >
rotate_mesh_t< mesh_t > generator::rotate_mesh ( mesh_t mesh,
double angle,
const gml::dvec3 & axis )

Definition at line 70 of file rotate_mesh.hpp.

◆ rotate_path() [1/3]

template<typename path_t >
rotate_path_t< path_t > generator::rotate_path ( path_t path,
const gml::dquat & rotation )

Definition at line 59 of file rotate_path.hpp.

◆ rotate_path() [2/3]

template<typename path_t >
rotate_path_t< path_t > generator::rotate_path ( path_t path,
double angle,
axis_t axis )

Definition at line 71 of file rotate_path.hpp.

◆ rotate_path() [3/3]

template<typename path_t >
rotate_path_t< path_t > generator::rotate_path ( path_t path,
double angle,
const gml::dvec3 & axis )

Definition at line 65 of file rotate_path.hpp.

◆ rotate_shape()

template<typename shape_t >
rotate_shape_t< shape_t > generator::rotate_shape ( shape_t shape,
double angle )

Definition at line 47 of file rotate_shape.hpp.

◆ scale_mesh()

template<typename mesh_t >
scale_mesh_t< mesh_t > generator::scale_mesh ( mesh_t mesh,
const gml::dvec3 & delta )

Definition at line 46 of file scale_mesh.hpp.

◆ scale_path()

template<typename path_t >
scale_path_t< path_t > generator::scale_path ( path_t path,
const gml::dvec3 & scale )

Definition at line 47 of file scale_path.hpp.

◆ scale_shape()

template<typename shape_t >
scale_shape_t< shape_t > generator::scale_shape ( shape_t shape,
const gml::dvec2 & scale )

Definition at line 46 of file scale_shape.hpp.

◆ shape_to_path()

template<typename shape_t >
shape_to_path_t< shape_t > generator::shape_to_path ( shape_t shape)

Definition at line 80 of file shape_to_path.hpp.

◆ spherify_mesh()

template<typename mesh_t >
spherify_mesh_t< mesh_t > generator::spherify_mesh ( mesh_t mesh,
double radius,
double factor )

Definition at line 46 of file spherify_mesh.hpp.

◆ subdivide_path()

template<typename path_t >
subdivide_path_t< path_t > generator::subdivide_path ( path_t path)

Definition at line 127 of file subdivide_path.hpp.

◆ transform_mesh()

template<typename mesh_t >
transform_mesh_t< mesh_t > generator::transform_mesh ( mesh_t mesh,
std::function< void(mesh_vertex_t &)> mutate )

Definition at line 78 of file transform_mesh.hpp.

◆ transform_path()

template<typename path_t >
transform_path_t< path_t > generator::transform_path ( path_t path,
const std::function< void(path_vertex_t &)> & mutate )

Definition at line 78 of file transform_path.hpp.

◆ transform_shape()

template<typename shape_t >
transform_shape_t< shape_t > generator::transform_shape ( shape_t shape,
const std::function< void(shape_vertex_t &)> & mutate )

Definition at line 77 of file transform_shape.hpp.

◆ translate_mesh()

template<typename mesh_t >
translate_mesh_t< mesh_t > generator::translate_mesh ( mesh_t mesh,
const gml::dvec3 & delta )

Definition at line 45 of file translate_mesh.hpp.

◆ translate_path()

template<typename path_t >
translate_path_t< path_t > generator::translate_path ( path_t path,
const gml::dvec3 & delta )

Definition at line 47 of file translate_path.hpp.

◆ translate_shape()

template<typename shape_t >
translate_shape_t< shape_t > generator::translate_shape ( shape_t shape,
const gml::dvec2 & delta )

Definition at line 47 of file translate_shape.hpp.

◆ uv_flip_mesh()

template<typename mesh_t >
uv_flip_mesh_t< mesh_t > generator::uv_flip_mesh ( mesh_t mesh)

Definition at line 49 of file uv_flip_mesh.hpp.

◆ uv_swap_mesh()

template<typename mesh_t >
uv_swap_mesh_t< mesh_t > generator::uv_swap_mesh ( mesh_t mesh)

Definition at line 44 of file uv_swap_mesh.hpp.