Unravel Engine C++ Reference
Loading...
Searching...
No Matches
capsule_mesh.hpp
Go to the documentation of this file.
1#ifndef GENERATOR_CAPSULEMESH_HPP
2#define GENERATOR_CAPSULEMESH_HPP
3
4#include "cylinder_mesh.hpp"
5#include "merge_mesh.hpp"
6#include "sphere_mesh.hpp"
7#include "translate_mesh.hpp"
8
9namespace generator
10{
11
15{
16private:
18 impl_t merge_mesh_;
19
20public:
27 capsule_mesh_t(double radius = 1.0,
28 double size = 0.5,
29 int slices = 32,
30 int segments = 4,
31 int rings = 8,
32 double start = 0.0,
33 double sweep = gml::radians(360.0));
34
35 using triangles_t = typename impl_t::triangles_t;
36
37 triangles_t triangles() const noexcept
38 {
39 return merge_mesh_.triangles();
40 }
41
42 using vertices_t = typename impl_t::vertices_t;
43
44 vertices_t vertices() const noexcept
45 {
46 return merge_mesh_.vertices();
47 }
48};
49} // namespace generator
50
51#endif
vertices_t vertices() const noexcept
typename impl_t::triangles_t triangles_t
capsule_mesh_t(double radius=1.0, double size=0.5, int slices=32, int segments=4, int rings=8, double start=0.0, double sweep=gml::radians(360.0))
triangles_t triangles() const noexcept
typename impl_t::vertices_t vertices_t
Translates the position of each vertex by given amount.
const segment_list * segments