opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
lathe_geometry.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <cstddef>
9#include <vector>
10
11namespace osc
12{
14 friend bool operator==(const LatheGeometryParams&, const LatheGeometryParams&) = default;
15
16 std::vector<Vector2> points = {{0.0f, -0.5f}, {0.5f, 0.0f}, {0.0f, 0.5f}};
17 size_t num_segments = 12;
20 };
21
22 // returns a mesh with axial symmetry like vases. The lathe rotates around the Y axis.
23 //
24 // (ported from three.js:LatheGeometry)
26 public:
28
29 static constexpr CStringView name() { return "Lathe"; }
30
31 explicit LatheGeometry(const Params& = {});
32
33 const Mesh& mesh() const { return mesh_; }
34 operator const Mesh& () const { return mesh_; }
35 private:
36 Mesh mesh_;
37 };
38}
Definition angle.h:25
Definition c_string_view.h:12
Definition lathe_geometry.h:25
const Mesh & mesh() const
Definition lathe_geometry.h:33
static constexpr CStringView name()
Definition lathe_geometry.h:29
LatheGeometry(const Params &={})
Definition mesh.h:33
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56
Definition lathe_geometry.h:13
size_t num_segments
Definition lathe_geometry.h:17
Radians phi_start
Definition lathe_geometry.h:18
friend bool operator==(const LatheGeometryParams &, const LatheGeometryParams &)=default
Radians phi_length
Definition lathe_geometry.h:19
std::vector< Vector2 > points
Definition lathe_geometry.h:16