Loading...
Searching...
No Matches
GeometryInfo.hpp
1#pragma once
2#include <ossia/detail/pod_vector.hpp>
3
4#include <halp/controls.hpp>
5#include <halp/geometry.hpp>
6#include <halp/meta.hpp>
7
8namespace Threedim
9{
10
12{
13public:
14 halp_meta(name, "Geometry Info")
15 halp_meta(category, "Visuals/3D")
16 halp_meta(c_name, "geometry_info")
17 halp_meta(manual_url, "https://ossia.io/score-docs/processes/geometry-info.html")
18 halp_meta(uuid, "c4deb797-8d5f-4ffb-b25b-b541f5c54099")
19
20 struct
21 {
22 struct
23 {
24 halp_meta(name, "Geometry");
25 halp::dynamic_gpu_geometry mesh;
26 float transform[16]{};
27 bool dirty_mesh = false;
28 bool dirty_transform = false;
29 } geometry;
30 } inputs;
31
32 struct
33 {
34 halp::val_port<"Vertices", int> vertices;
35 halp::val_port<"Indices", int> indices;
36 halp::val_port<"Instances", int> instances;
37
38 // halp::val_port<"Buffers", std::vector<halp::geometry_gpu_buffer>> buffers;
39 halp::val_port<"Attributes", std::vector<halp::geometry_attribute>> attributes;
40 halp::val_port<"Bindings", std::vector<halp::geometry_binding>> bindings;
41 halp::val_port<"Inputs", std::vector<halp::geometry_input>> inputs;
42 } outputs;
43
44 void operator()()
45 {
46 outputs.vertices.value = inputs.geometry.mesh.vertices;
47 outputs.indices.value = inputs.geometry.mesh.indices;
48 outputs.instances.value = inputs.geometry.mesh.instances;
49 // outputs.buffers.value = inputs.geometry.mesh.buffers;
50 outputs.attributes.value = inputs.geometry.mesh.attributes;
51 outputs.bindings.value = inputs.geometry.mesh.bindings;
52 outputs.inputs.value = inputs.geometry.mesh.input;
53 }
54};
55
56}
Definition GeometryInfo.hpp:12
Definition TinyObj.hpp:19