39 halp_meta(category,
"Visuals/Meshes/Primitives")
40 halp_meta(author,
"Jean-Michaël Celerier, vcglib")
41 halp_meta(manual_url,
"https://ossia.io/score-docs/processes/meshes.html#primitive")
42 halp_meta(name,
"Plane")
43 halp_meta(c_name,
"3d_plane")
44 halp_meta(uuid,
"1e923d52-3494-49e8-8698-b001405000da")
51 struct : halp::spinbox_i32<
"H divs.", halp::range{2, 200, 16}>,
Update {} hdivs;
52 struct : halp::spinbox_i32<
"V divs.", halp::range{2, 200, 16}>,
Update {} vdivs;
59 halp_meta(name,
"Geometry");
60 halp::position_normals_texcoords_geometry_plane
mesh;
61 float transform[16]{};
62 bool dirty_mesh =
false;
63 bool dirty_transform =
false;
67 void prepare(halp::setup) { update(); }
71 outputs.geometry.dirty_transform
72 = computeTRSMatrix(inputs, outputs.geometry.transform, m_cachedTRS);
75 std::vector<float> complete;
142 halp_meta(name,
"Cone")
143 halp_meta(c_name,
"3d_cone")
144 halp_meta(uuid,
"8a5718c4-07f0-476b-b720-1c99e5a379a5")
152 : halp::hslider_i32<
"Subdivisions", halp::range{1, 500, 36}>
157 : halp::hslider_f32<
"R1", halp::range{0, 1000, 1}>
162 : halp::hslider_f32<
"R2", halp::range{0, 1000, 10}>
167 : halp::hslider_f32<
"Height", halp::range{0, 1000, 5}>
173 void prepare(halp::setup) { update(); }
175 void operator()() { apply_transform(inputs, outputs.geometry); }
180 halp_meta(name,
"Cylinder")
181 halp_meta(c_name,
"3d_cylinder")
182 halp_meta(uuid,
"5992830e-80fe-4461-b357-2c9b5c5e48ae")
190 : halp::hslider_i32<
"Slices", halp::range{1, 64, 16}>
195 : halp::hslider_i32<
"Stacks", halp::range{1, 64, 16}>
201 void prepare(halp::setup) { update(); }
203 void operator()() { apply_transform(inputs, outputs.geometry); }
208 halp_meta(name,
"Torus")
209 halp_meta(c_name,
"3d_torus")
210 halp_meta(uuid,
"85c5983c-3f4f-4bfe-b8cf-fccdf6ec5faf")
218 : halp::hslider_f32<
"R1", halp::range{0, 100, 10}>
223 : halp::hslider_f32<
"R2", halp::range{0, 100, 1}>
228 : halp::hslider_i32<
"H Divisions", halp::range{1, 50, 24}>
233 : halp::hslider_i32<
"V Divisions", halp::range{1, 50, 12}>
239 void prepare(halp::setup) { update(); }
241 void operator()() { apply_transform(inputs, outputs.geometry); }