14#ifdef LAGRANGE_ENABLE_LEGACY_HEADERS
15 #include <lagrange/primitive/legacy/generate_rounded_plane.h>
18#include <lagrange/primitive/api.h>
20#include <lagrange/SurfaceMesh.h>
21#include <lagrange/primitive/PrimitiveOptions.h>
23namespace lagrange::primitive {
33 using Scalar = PrimitiveOptions::Scalar;
64 std::array<Scalar, 3>
normal = {0, 0, 1};
77 width = std::max(
width,
static_cast<Scalar
>(0));
81 (std::min(
width,
height)) /
static_cast<Scalar
>(2));
125template <
typename Scalar,
typename Index>
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:73
SurfaceMesh< Scalar, Index > generate_rounded_plane(RoundedPlaneOptions settings)
Generate a rounded plane mesh.
Definition generate_rounded_plane.cpp:126
Common settings shared by all primitives.
Definition PrimitiveOptions.h:28
Scalar epsilon
Numerical tolerance used for comparing Scalar values.
Definition PrimitiveOptions.h:76
Options for generating a rounded plane mesh.
Definition generate_rounded_plane.h:32
void project_to_valid_range()
Clamps all parameters to valid ranges.
Definition generate_rounded_plane.h:75
Index width_segments
Number of subdivisions along the width (X-axis).
Definition generate_rounded_plane.h:51
Index height_segments
Number of subdivisions along the height (Z-axis).
Definition generate_rounded_plane.h:55
Scalar height
Height of the plane along the Z-axis.
Definition generate_rounded_plane.h:42
Scalar width
Width of the plane along the X-axis.
Definition generate_rounded_plane.h:38
Scalar bevel_radius
Radius of the bevel/rounding applied to the plane corners.
Definition generate_rounded_plane.h:47
std::array< Scalar, 3 > normal
Unit normal vector for the plane.
Definition generate_rounded_plane.h:64
Index bevel_segments
Number of subdivisions for the bevel/rounded corners.
Definition generate_rounded_plane.h:61