61 int segments,
const Color &color);
83 int segments,
const Color &color);
109 float shaft_radius,
float head_radius,
float head_length,
110 int segments,
const Color &color);
170 float half_width,
const Color &color);
215 int major_segments,
int minor_segments,
238 float half_size_x,
float half_size_y,
266 const std::vector<float> &radii,
267 const std::vector<Color> &colors,
293 const std::vector<Vec3> &ends,
294 const std::vector<float> &radii,
295 const std::vector<Color> &colors,
The Mesh — the central data structure for 3D geometry in scimesh.
Mesh generate_pyramid(const Vec3 &base_center, const Vec3 &apex, float hw, const Color &color)
Generate a square-based pyramid.
Mesh generate_tetrahedron(const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Color &color)
Generate a tetrahedron (triangular pyramid) from four points.
Mesh generate_sphere(const Vec3 ¢er, float radius, int segments, const Color &color)
Generate a UV-sphere (latitude/longitude tessellation).
glm::vec3 Vec3
3-component floating-point vector (xyz).
Mesh generate_cuboid(const Vec3 ¢er, const Vec3 &half, const Color &color)
Generate an axis-aligned cuboid (rectangular box).
void merge_mesh(Mesh &dst, const Mesh &src)
Merge one mesh into another (append geometry).
Mesh generate_arrow(const Vec3 &from, const Vec3 &to, float shaft_radius, float head_radius, float head_length, int segments, const Color &color)
Generate a 3D arrow from from to to.
Mesh generate_cylinder(const Vec3 &start, const Vec3 &end, float radius, int segments, const Color &color)
Generate a cylinder between two endpoints.
Mesh generate_torus(const Vec3 ¢er, float R, float r, int seg_major, int seg_minor, const Color &color)
Generate a torus (donut shape).
Mesh generate_multi_spheres(const std::vector< Vec3 > ¢ers, const std::vector< float > &radii, const std::vector< Color > &colors, int segments)
Generate multiple spheres in a single mesh (efficient batching).
Mesh generate_plane(const Vec3 ¢er, const Vec3 &normal, float hx, float hy, const Color &color)
Generate a flat rectangular plane.
Mesh generate_cone(const Vec3 &base, const Vec3 &tip, float radius, int segments, const Color &color)
Generate a cone from a base circle to a tip point.
Mesh generate_multi_cylinders(const std::vector< Vec3 > &starts, const std::vector< Vec3 > &ends, const std::vector< float > &radii, const std::vector< Color > &colors, int segments)
Generate multiple cylinders in a single mesh (efficient batching).