Unravel Engine C++ Reference
Loading...
Searching...
No Matches
capped_cylinder_mesh.hpp
Go to the documentation of this file.
1#ifndef GENERATOR_CAPPEDCYLINDERMESH_HPP
2#define GENERATOR_CAPPEDCYLINDERMESH_HPP
3
4#include "cylinder_mesh.hpp"
5#include "disk_mesh.hpp"
6#include "flip_mesh.hpp"
7#include "lathe_mesh.hpp"
8#include "line_shape.hpp"
9#include "merge_mesh.hpp"
10#include "rotate_mesh.hpp"
11#include "translate_mesh.hpp"
12#include "uv_flip_mesh.hpp"
13
14namespace generator
15{
16
17namespace detail
18{
19
20class cap_t
21{
22private:
24 impl_t translate_mesh_;
25
26public:
27 cap_t(double radius, double distance, int slices, int rings, double start, double sweep);
28
30
31 triangles_t triangles() const noexcept
32 {
33 return translate_mesh_.triangles();
34 }
35
37
38 vertices_t vertices() const noexcept
39 {
40 return translate_mesh_.vertices();
41 }
42};
43} // namespace detail
44
48{
49private:
51 impl_t merge_mesh_;
52
53public:
61 capped_cylinder_mesh_t(double radius = 1.0,
62 double size = 1.0,
63 int slices = 32,
64 int segments = 8,
65 int rings = 4,
66 double start = 0.0,
67 double sweep = gml::radians(360.0));
68
69 using triangles_t = typename impl_t::triangles_t;
70
71 triangles_t triangles() const noexcept
72 {
73 return merge_mesh_.triangles();
74 }
75
76 using vertices_t = typename impl_t::vertices_t;
77
78 vertices_t vertices() const noexcept
79 {
80 return merge_mesh_.vertices();
81 }
82};
83} // namespace generator
84
85#endif
triangles_t triangles() const noexcept
vertices_t vertices() const noexcept
capped_cylinder_mesh_t(double radius=1.0, double size=1.0, int slices=32, int segments=8, int rings=4, double start=0.0, double sweep=gml::radians(360.0))
typename impl_t::vertices_t vertices_t
typename impl_t::triangles_t triangles_t
vertices_t vertices() const noexcept
typename impl_t::triangles_t triangles_t
typename impl_t::vertices_t vertices_t
cap_t(double radius, double distance, int slices, int rings, double start, double sweep)
triangles_t triangles() const noexcept
vertices_t vertices() const noexcept
typename impl_t::triangles_t triangles_t
triangles_t triangles() const noexcept
const segment_list * segments
float distance