14#ifdef LAGRANGE_ENABLE_LEGACY_FUNCTIONS
15 #include <lagrange/primitive/legacy/generate_torus.h>
18#include <lagrange/SurfaceMesh.h>
19#include <lagrange/internal/constants.h>
20#include <lagrange/primitive/PrimitiveOptions.h>
22namespace lagrange::primitive {
32 using Scalar = PrimitiveOptions::Scalar;
98template <
typename Scalar,
typename Index>
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
SurfaceMesh< Scalar, Index > generate_torus(TorusOptions setting)
Generate a torus mesh.
Definition generate_torus.cpp:42
Common settings shared by all primitives.
Definition PrimitiveOptions.h:28
Options for generating a torus mesh.
Definition generate_torus.h:31
void project_to_valid_range()
Clamps all parameters to valid ranges.
Definition generate_torus.h:70
Scalar start_sweep_angle
Starting angle for partial torus generation (in radians).
Definition generate_torus.h:53
Index ring_segments
Number of subdivisions around the major circumference (around the donut hole).
Definition generate_torus.h:45
Scalar minor_radius
Radius of the tube that forms the torus (thickness of the donut).
Definition generate_torus.h:41
Scalar major_radius
Distance from the center of the torus to the center of the tube (donut hole to tube center).
Definition generate_torus.h:37
Scalar end_sweep_angle
Ending angle for partial torus generation (in radians).
Definition generate_torus.h:57
Index pipe_segments
Number of subdivisions around the minor circumference (around the tube).
Definition generate_torus.h:49