Expand description
Geometric shape types for collision detection and physics simulation.
Provides primitives (sphere, box, capsule, cylinder, cone) and complex shapes (convex hull, triangle mesh, compound, height field) with support point queries, volume/inertia computation, and ray casting.
Re-exports§
pub use shape::RayHit;pub use shape::Shape;pub use sphere::Sphere;pub use box_shape::BoxShape;pub use capsule::Capsule;pub use cylinder::Cylinder;pub use cone::Cone;pub use convex_hull::functions::approximate_convex_decomposition;pub use convex_hull::functions::box_support;pub use convex_hull::functions::capsule_support;pub use convex_hull::functions::chamfer_build;pub use convex_hull::functions::chamfer_hull;pub use convex_hull::functions::cylinder_support;pub use convex_hull::functions::deduplicate_points;pub use convex_hull::functions::ellipsoid_support;pub use convex_hull::functions::gjk_intersect;pub use convex_hull::functions::hull_aspect_ratio;pub use convex_hull::functions::hull_face_normals;pub use convex_hull::functions::hull_face_offsets;pub use convex_hull::functions::hull_sphericity;pub use convex_hull::functions::icosahedron_vertices;pub use convex_hull::functions::lower_hull_2d;pub use convex_hull::functions::minkowski_difference_hull;pub use convex_hull::functions::minkowski_difference_hulls;pub use convex_hull::functions::minkowski_sum_hull;pub use convex_hull::functions::minkowski_sum_hulls;pub use convex_hull::functions::monotone_chain_hull_2d;pub use convex_hull::functions::octahedron_vertices;pub use convex_hull::functions::point_cloud_aabb;pub use convex_hull::functions::point_cloud_centroid;pub use convex_hull::functions::point_cloud_covariance;pub use convex_hull::functions::simplify_hull_points;pub use convex_hull::functions::sphere_support;pub use convex_hull::functions::tetrahedron_vertices;pub use convex_hull::functions::upper_hull_2d;pub use convex_hull::functions::vertex_decimation;pub use convex_hull::types::ConvexHull;pub use convex_hull::types::ConvexHull3D;pub use convex_hull::types::ConvexHullAabb;pub use convex_hull::types::HullWithQuality;pub use convex_hull::types::IncrementalConvexHull;pub use triangle_mesh::TriangleMesh;pub use heightfield::HeightField;pub use compound::Compound;pub use torus::Torus;pub use mesh_ops::TriMesh;pub use quickhull::ConvexHull3DVec;pub use offset_surface::OffsetMesh;pub use offset_surface::Sdf;pub use offset_surface::SdfBox;pub use offset_surface::SdfCapsule;pub use offset_surface::SdfCone;pub use offset_surface::SdfCylinder;pub use offset_surface::SdfDifference;pub use offset_surface::SdfIntersection;pub use offset_surface::SdfOffset;pub use offset_surface::SdfPlane;pub use offset_surface::SdfScaled;pub use offset_surface::SdfSmoothIntersection;pub use offset_surface::SdfSmoothUnion;pub use offset_surface::SdfSphere;pub use offset_surface::SdfTorus;pub use offset_surface::SdfTranslated;pub use offset_surface::SdfUnion;pub use offset_surface::VoxelSdf;pub use offset_surface::approximate_medial_axis;pub use offset_surface::detect_edge_features;pub use offset_surface::extract_zero_crossings_slice;pub use offset_surface::generate_shell;pub use offset_surface::inward_offset;pub use offset_surface::offset_curve_3d;pub use offset_surface::offset_polyhedron;pub use offset_surface::outward_offset;pub use offset_surface::variable_offset;pub use point_cloud::functions::aabb_extent;pub use point_cloud::functions::compute_bounding_box;pub use point_cloud::functions::compute_point_cloud_normals;pub use point_cloud::functions::estimate_normals;pub use point_cloud::functions::farthest_point_sampling;pub use point_cloud::functions::fpfh_feature;pub use point_cloud::functions::icp_align;pub use point_cloud::functions::icp_point_to_point;pub use point_cloud::functions::pca_obb;pub use point_cloud::functions::ransac_fit_plane;pub use point_cloud::functions::statistical_outlier_removal;pub use point_cloud::functions::voxel_downsample;pub use point_cloud::types::IcpRegistration;pub use point_cloud::types::IcpResult;pub use point_cloud::types::KdNode3D;pub use point_cloud::types::KdTree3D;pub use point_cloud::types::NormalEstimation;pub use point_cloud::types::PointCloud;pub use point_cloud::types::PointCloudFilter;pub use point_cloud::types::RansacPlaneResult;pub use mesh_param::LscmParameterization;pub use mesh_param::ParamTriMesh;pub use mesh_param::TutteParameterization;pub use mesh_param::boundary_vertices;pub use mesh_param::build_halfedge;pub use mesh_param::fill_holes;pub use mesh_param::is_boundary_vertex;pub use mesh_param::loop_subdivision;pub use mesh_param::midpoint_subdivision;pub use mesh_param::remove_duplicate_vertices;pub use mesh_param::texture_distortion;pub use mesh_param::uv_overlap_check;pub use mesh_param::uv_stretch;pub use mesh_param::vertex_neighbors;pub use voronoi::DelaunayTriangle;pub use voronoi::DelaunayTriangulation;pub use voronoi::LegacyVoronoiCell;pub use voronoi::Point2D;pub use voronoi::VoronoiCell;pub use voronoi::VoronoiDiagram;pub use voronoi::VoronoiSite;pub use voronoi::bowyer_watson;pub use voronoi::circumcircle;pub use voronoi::delaunay_to_voronoi;pub use voronoi::in_circumcircle;pub use voronoi::is_delaunay;pub use voronoi::lloyd_relaxation;pub use voronoi::nearest_site;pub use voronoi::power_diagram;pub use voronoi::voronoi_area;pub use voxel_grid::VoxelGrid;pub use vhacd::VHacdConfig;pub use vhacd::VHacdError;pub use vhacd::VHacdVoxel;
Modules§
- architectural_
geometry - Architectural geometry — free-form surfaces, panelization, grid shells, tensile structures, geodesic domes, structural glass, and parametric facades.
- boolean_
ops - Auto-generated module structure
- box_
shape - Axis-aligned box shape.
- bspline
- Auto-generated module structure
- capsule
- Capsule shape (sphere-swept line segment along Y axis).
- cell_
complex - CW complex and cell complex geometry.
- compound
- Auto-generated module structure
- computational_
geometry - Auto-generated module structure
- cone
- Cone shape (Y-axis aligned, apex at top).
- convex_
decomposition - Convex decomposition of concave meshes for collision detection.
- convex_
hull - Auto-generated module structure
- csg
- Auto-generated module structure
- cylinder
- Cylinder shape (Y-axis aligned).
- decimation
- Auto-generated module structure
- discrete_
geometry - Discrete differential geometry on triangle meshes.
- fractal_
geometry - Auto-generated module structure
- geodesic
- Auto-generated module structure
- geodesic_
geometry - Auto-generated module structure
- heightfield
- Auto-generated module structure
- implicit
- Implicit surfaces and signed distance fields (SDF).
- implicit_
geometry - Auto-generated module structure
- implicit_
surfaces - Implicit surface representations and operations.
- level_
set - Auto-generated module structure
- medial_
axis - Medial axis transform, skeleton computation, and related distance-transform utilities.
- medical_
geometry - Medical imaging geometry — DICOM coordinate systems, CT/MRI volume reconstruction, bone segmentation, vessel centerline extraction, organ bounding volumes, anatomical coordinate systems (RAS/LPS), surgical planning geometry, marching-cubes mesh extraction, measurement tools, and mesh smoothing for medical applications.
- mesh_
boolean - Mesh boolean operations on triangle meshes.
- mesh_
ops - Triangle mesh operations: normals, volume, surface area, point containment.
- mesh_
param - Triangle mesh parameterization (UV unwrapping) and mesh processing utilities.
- mesh_
processing - Auto-generated module structure
- mesh_
quality - Mesh quality metrics and repair operations.
- mesh_
repair - Auto-generated module structure
- mesh_
repair_ ext - Extended mesh repair: remeshing, smoothing, simplification, quality metrics.
- mesh_
simplification - Auto-generated module structure
- nurbs_
geometry - NURBS (Non-Uniform Rational B-Splines) geometry module.
- offset_
geometry - Offset / buffer geometry operations.
- offset_
surface - Offset surface generation and signed distance field (SDF) operations.
- origami
- Origami and kirigami mechanics — fold pattern geometry, rigid origami kinematics, and tessellation analysis.
- parametric
- Auto-generated module structure
- point_
cloud - Auto-generated module structure
- procedural_
geometry - Auto-generated module structure
- quickhull
- 3D Convex Hull via QuickHull algorithm.
- remesh
- Mesh remeshing algorithms.
- robot_
geometry - Robot geometry: DH parameters, forward/inverse kinematics, Jacobians, workspace computation, collision checking, and self-collision detection.
- shape
- Shape trait and raycast types.
- signed_
distance_ field - Signed Distance Field (SDF) geometry module.
- spatial_
hash - Spatial hashing, loose octree, k-nearest neighbours, ray grid traversal, and spatial statistics.
- sphere
- Sphere shape.
- sphere_
packing - Auto-generated module structure
- spline_
geometry - Auto-generated module structure
- subdivision
- Mesh subdivision schemes.
- swept
- Auto-generated module structure
- terrain_
processing - Terrain processing and analysis algorithms.
- topology
- Auto-generated module structure
- topology_
geometry - Computational topology for geometry: persistent homology, Reeb graphs.
- torus
- Torus shape.
- triangle_
mesh - Triangle mesh shape with adjacency queries, vertex normals, Laplacian, geodesic distance, Loop subdivision, and watertight checks.
- vhacd
- V-HACD: Voxel-based Hierarchical Approximate Convex Decomposition (v0.1).
- voronoi
- Auto-generated module structure
- voxel_
grid - Axis-aligned voxel grid backed by a compact bit vector.
Structs§
- Convergence
Tracker - Tracks residual progress for an iterative solver and raises
Error::ConvergenceFailurewhen the iteration limit is exceeded.
Enums§
- Error
- Main error type for the geometry module.
Traits§
- With
Context - Attach a context string to a
Result, wrapping the error in a newGeneralmessage that includes the original error’s display text.
Functions§
- check_
dim_ match - Assert that
lhs_len == rhs_len, returningErr(Error::DimensionMismatch). - check_
finite - Assert that a value is finite (not NaN, not infinite).
- check_
finite_ slice - Check all values in a slice are finite.
- check_
index - Assert that
index < len, returningErr(Error::IndexOutOfBounds)if not. - check_
len - Assert that
len == expected, returningErr(Error::LengthMismatch)if not. - check_
min_ points - Assert that
count >= required, returningErr(Error::TooFewPoints)if not. - check_
non_ negative - Assert that a value is non-negative, returning
Err(Error::OutOfRange). - check_
positive - Assert that a value is strictly positive, returning
Err(Error::OutOfRange). - check_
range - Assert that
valuelies in[min, max], returningErr(Error::OutOfRange)if it does not. - validate_
heightfield - Validate a height-field descriptor.
- validate_
mesh - Validate that a triangle mesh has consistent vertex/index arrays.
- validate_
point_ cloud - Validate a point cloud: non-empty, all coordinates finite.
- validate_
ray_ dir - Validate that a ray direction is non-zero and finite.
Type Aliases§
- Result
- Result type alias for geometry operations.