|
Lagrange
|
Parametric primitive shape generation. More...
Classes | |
| struct | DiscOptions |
| struct | IcosahedronOptions |
| Options for generating an icosahedron mesh. More... | |
| struct | OctahedronOptions |
| Options for generating an octahedron mesh. More... | |
| struct | RoundedConeOptions |
| Options for generating a rounded cone mesh. More... | |
| struct | RoundedCubeOptions |
| Options for generating a rounded cube mesh. More... | |
| struct | RoundedPlaneOptions |
| Options for generating a rounded plane mesh. More... | |
| struct | SphereOptions |
| Options for generating a sphere mesh. More... | |
| struct | SubdividedSphereOptions |
| struct | SweptSurfaceOptions |
| struct | TorusOptions |
| Options for generating a torus mesh. More... | |
| struct | PrimitiveOptions |
| Common settings shared by all primitives. More... | |
| class | SweepOptions< Scalar > |
| Configuration class for sweep operations on 3D geometry. More... | |
Enumerations | |
| enum class | SemanticLabel : uint8_t { Side = 0 , Top = 1 , Bottom = 2 , Bevel = 3 , CrossSection = 4 , Unknown = 5 } |
| Semantic labels are used to classify different parts of a primitive mesh. More... | |
Functions | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_disc (DiscOptions setting) |
| Generates a disc mesh with the specified settings. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_icosahedron (IcosahedronOptions settings) |
| Generate an icosahedron mesh. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_octahedron (OctahedronOptions settings) |
| Generate an octahedron mesh. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_rounded_cone (RoundedConeOptions setting) |
| Generate a rounded cone mesh. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_rounded_cube (RoundedCubeOptions setting) |
| Generate a rounded cube mesh. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_rounded_plane (RoundedPlaneOptions settings) |
| Generate a rounded plane mesh. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_sphere (SphereOptions setting) |
| Generate a sphere mesh based on the specified settings. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_subdivided_sphere (const SurfaceMesh< Scalar, Index > &base_shape, SubdividedSphereOptions setting) |
| Generate a subdivided sphere mesh from a base shape. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_swept_surface (span< const Scalar > profile, const SweepOptions< Scalar > &sweep_setting, const SweptSurfaceOptions &options={}) |
| Generate a swept surface from a profile curve and a sequence of transforms. | |
| template<typename Scalar, typename Index> | |
| SurfaceMesh< Scalar, Index > | generate_torus (TorusOptions setting) |
| Generate a torus mesh. | |
Parametric primitive shape generation.
|
strong |
#include <lagrange/primitive/SemanticLabel.h>
Semantic labels are used to classify different parts of a primitive mesh.
| SurfaceMesh< Scalar, Index > generate_disc | ( | DiscOptions | setting | ) |
#include <lagrange/primitive/generate_disc.h>
Generates a disc mesh with the specified settings.
The disc will be centered at setting.center, with its normal pointing along setting.normal.
| setting | The settings for the disc mesh. |
SurfaceMesh object representing the generated disc. | SurfaceMesh< Scalar, Index > generate_icosahedron | ( | IcosahedronOptions | settings | ) |
#include <lagrange/primitive/generate_icosahedron.h>
Generate an icosahedron mesh.
Creates an icosahedron mesh with the specified radius. An icosahedron is a regular polyhedron with 20 equilateral triangular faces, 30 edges, and 12 vertices. It is one of the five Platonic solids and exhibits icosahedral symmetry (Ih).
| Scalar | The scalar type for vertex coordinates |
| Index | The index type for face indices |
| settings | Configuration parameters for the icosahedron generation |
| SurfaceMesh< Scalar, Index > generate_octahedron | ( | OctahedronOptions | settings | ) |
#include <lagrange/primitive/generate_octahedron.h>
Generate an octahedron mesh.
Creates an octahedron mesh with the specified radius. An octahedron is a regular polyhedron with 8 triangular faces, 12 edges, and 6 vertices. It is one of the five Platonic solids and exhibits octahedral symmetry (Oh).
| Scalar | The scalar type for vertex coordinates |
| Index | The index type for face indices |
| settings | Configuration parameters for the octahedron generation |
| SurfaceMesh< Scalar, Index > generate_rounded_cone | ( | RoundedConeOptions | setting | ) |
#include <lagrange/primitive/generate_rounded_cone.h>
Generate a rounded cone mesh.
Creates a cone mesh with optionally rounded edges at the top and bottom. The cone is centered at 1/2 of its height along its center axis. The cone can have different radii at the top and bottom, making it suitable for generating cones, cylinders, truncated cones and even sphere.
When bevel_radius_top or bevel_radius_bottom > 0, the respective edges are rounded using toroidal patches. The smoothness of the rounding is controlled by the corresponding bevel_segments parameters.
Partial cones can be generated by specifying start_sweep_angle and end_sweep_angle different from 0 and 2π respectively.
| Scalar | The scalar type for vertex coordinates |
| Index | The index type for face indices |
| setting | Configuration parameters for the rounded cone generation |
| SurfaceMesh< Scalar, Index > generate_rounded_cube | ( | RoundedCubeOptions | setting | ) |
#include <lagrange/primitive/generate_rounded_cube.h>
Generate a rounded cube mesh.
Creates a cube mesh with optionally rounded edges. The cube is centered at the origin and extends from -width/2 to +width/2 along the X-axis, -height/2 to +height/2 along the Y-axis, and -depth/2 to +depth/2 along the Z-axis.
When bevel_radius > 0, the edges and corners of the cube are rounded using cylindrical and spherical patches respectively. The smoothness of the rounding is controlled by the bevel_segments parameter.
| Scalar | The scalar type for vertex coordinates (e.g., float, double) |
| Index | The index type for face indices (e.g., uint32_t, uint64_t) |
| setting | Configuration parameters for the rounded cube generation |
| SurfaceMesh< Scalar, Index > generate_rounded_plane | ( | RoundedPlaneOptions | settings | ) |
#include <lagrange/primitive/generate_rounded_plane.h>
Generate a rounded plane mesh.
The mesh will be centered at setting.center, with its normal pointing along setting.normal.
The generated mesh includes:
| Scalar | Floating-point type for vertex coordinates. |
| Index | Integer type for vertex and face indices. |
| settings | Configuration options for the rounded plane generation. The settings are automatically validated and clamped to valid ranges. |
| SurfaceMesh< Scalar, Index > generate_sphere | ( | SphereOptions | setting | ) |
#include <lagrange/primitive/generate_sphere.h>
Generate a sphere mesh based on the specified settings.
| Scalar | The scalar type of the mesh. |
| Index | The index type of the mesh. |
| setting | The settings for the sphere mesh generation. |
| SurfaceMesh< Scalar, Index > generate_subdivided_sphere | ( | const SurfaceMesh< Scalar, Index > & | base_shape, |
| SubdividedSphereOptions | setting ) |
#include <lagrange/primitive/generate_subdivided_sphere.h>
Generate a subdivided sphere mesh from a base shape.
The function takes a base shape (e.g., an icosahedron or octahedron) and performs subdivision followed by normalization to create a smoother sphere mesh.
| Scalar | The scalar type for vertex coordinates. |
| Index | The index type for face indices. |
| base_shape | The initial coarse mesh to be subdivided. |
| setting | Configuration parameters for the subdivided sphere generation. |
| SurfaceMesh< Scalar, Index > generate_swept_surface | ( | span< const Scalar > | profile, |
| const SweepOptions< Scalar > & | sweep_setting, | ||
| const SweptSurfaceOptions & | options = {} ) |
#include <lagrange/primitive/generate_swept_surface.h>
Generate a swept surface from a profile curve and a sequence of transforms.
| [in] | profile | A simply connected 2D curve (flattened N by 2 array in row major) serving as sweep profile. |
| [in] | sweep_setting | A set of sweep settings defining the sweep path. |
| [in] | options | Options for generating the swept surface. |
| SurfaceMesh< Scalar, Index > generate_torus | ( | TorusOptions | setting | ) |
#include <lagrange/primitive/generate_torus.h>
Generate a torus mesh.
Creates a torus (donut-shaped) mesh with the specified parameters. The torus is centered at setting.center with its center ring parallel to the XZ plane.
Partial tori can be generated by specifying start_sweep_angle and end_sweep_angle different from 0 and 2π respectively.
| Scalar | The scalar type for vertex coordinates |
| Index | The index type for face indices |
| setting | Configuration parameters for the torus generation |