Loading...
Searching...
No Matches
ArrayToGeometry.hpp
1#pragma once
2
3#include <Threedim/TinyObj.hpp>
4#include <boost/container/vector.hpp>
5#include <halp/controls.hpp>
6#include <halp/geometry.hpp>
7#include <halp/meta.hpp>
8#include <ossia/detail/pod_vector.hpp>
9
10namespace Threedim
11{
12
14{
15public:
16 halp_meta(name, "Array to mesh")
17 halp_meta(category, "Visuals/Utilities")
18 halp_meta(c_name, "array_to_mesh")
19 halp_meta(description, "Convert an array of vertex coordinates into a mesh with optional triangulation.")
20 halp_meta(manual_url, "https://ossia.io/score-docs/processes/array-to-mesh.html")
21 halp_meta(uuid, "dfc5bae9-c75c-4180-b4e8-be3063c8d8f2")
22
23 struct ins
24 {
25 struct : halp::val_port<"Input", std::vector<float>>
26 {
27 void update(ArrayToMesh& self) { self.create_mesh(value); }
28 } in;
29 PositionControl position;
30 RotationControl rotation;
31 ScaleControl scale;
32
33 halp::toggle<"Triangulate"> triangulate;
34 } inputs;
35
36 PrimitiveOutputs outputs;
37 void create_mesh(std::span<float> v);
38
39 std::vector<float> complete;
40};
41
42}
Definition ArrayToGeometry.hpp:14
Definition ArrayToGeometry.hpp:24
Definition TinyObj.hpp:98
Definition TinyObj.hpp:117
Definition TinyObj.hpp:103
Definition TinyObj.hpp:107