45 halp_meta(name,
"Instancer")
46 halp_meta(category,
"Visuals/3D/Scene")
47 halp_meta(c_name,
"instancer")
48 halp_meta(authors,
"ossia team")
51 "https://ossia.io/score-docs/processes/instancer.html")
52 halp_meta(uuid,
"5e8a2c7f-9b4d-4e3a-a1c6-2d7f0b3e8c4a")
65 halp_meta(name,
"Scene In");
66 ossia::scene_spec scene;
70 halp::gpu_buffer_input<
"Transforms"> transforms;
71 halp::gpu_buffer_input<
"Colors"> colors;
72 halp::gpu_buffer_input<
"Custom"> custom;
82 halp_meta(name,
"Points");
83 halp::dynamic_gpu_geometry
mesh;
84 float transform[16]{};
85 bool dirty_mesh =
false;
86 bool dirty_transform =
false;
92 struct : halp::combobox_t<
"Format", TransformFormat>
96 std::string_view values[3]{
"mat4",
"trs",
"translation"};
99 void update(
Instancer& n) { n.rebuild(); }
102 struct : halp::spinbox_i32<
"Count", halp::irange{1, 1000000, 1}>
103 {
void update(
Instancer& n) { n.rebuild(); } } count;
109 {
void update(
Instancer& n) { n.rebuild(); } } position;
111 {
void update(
Instancer& n) { n.rebuild(); } } rotation;
113 {
void update(
Instancer& n) { n.rebuild(); } } scale;
120 halp_meta(name,
"Scene Out");
121 ossia::scene_spec scene;
137 std::shared_ptr<ossia::scene_state> m_wrapped_state;
138 uint8_t m_pending_dirty{0xFF};
142 const ossia::scene_state* m_cached_in_state{};
151 int64_t byte_offset{};
155 static CachedView viewOf(
const halp::gpu_buffer& b)
noexcept
157 return {b.handle, (int64_t)b.byte_offset, (int64_t)b.byte_size};
159 CachedView m_cached_transforms{};
160 CachedView m_cached_colors{};
161 CachedView m_cached_custom{};
162 int32_t m_cached_count{-1};
163 int m_cached_format{-1};
167 void* m_cached_points_buf{};
168 int64_t m_cached_points_vertices{-1};
173 uintptr_t m_cached_points_fingerprint{};
174 int64_t m_version_counter{0};
177 ossia::gpu_slot_ref m_xform_ref{};