Loading...
Searching...
No Matches
PCLToGeometry.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 <halp/texture.hpp>
9#include <ossia/detail/pod_vector.hpp>
10
11namespace Threedim
12{
14{
15 unsigned char* bytes{};
16 std::size_t bytesize{};
17
18 enum format
19 {
20 Raw
21 };
22 bool changed{};
23};
24
26{
27public:
28 halp_meta(name, "Pointcloud to mesh")
29 halp_meta(category, "Visuals/3D")
30 halp_meta(c_name, "pointcloud_to_mesh")
31 halp_meta(manual_url, "https://ossia.io/score-docs/processes/pointcloud-to-mesh.html")
32 halp_meta(uuid, "2450ffbf-04ed-4b42-8848-69f200d2742a")
33
34 struct ins
35 {
36 struct pcl_in
37 {
38 static constexpr auto name() { return "Texture"; }
39 raw_texture texture;
40 } in;
41 // halp::texture_input<"Texture"> inx;
42 PositionControl position;
43 RotationControl rotation;
44 ScaleControl scale;
45 } inputs;
46
47 struct
48 {
49 struct
50 {
51 halp_meta(name, "Geometry");
52 halp::position_color_packed_geometry mesh;
53 float transform[16]{};
54 bool dirty_mesh = false;
55 bool dirty_transform = false;
56 } geometry;
57 } outputs;
58
59 PCLToMesh() { rebuild_transform(inputs, outputs); }
60 void create_mesh(std::span<float> v);
61 void operator()();
62
63 std::vector<float> complete;
64};
65
66}
Definition PCLToGeometry.hpp:26
Definition PCLToGeometry.hpp:37
Definition PCLToGeometry.hpp:35
Definition TinyObj.hpp:63
Definition TinyObj.hpp:68
Definition TinyObj.hpp:72
Definition TinyObj.hpp:18
Definition PCLToGeometry.hpp:14