Skip to main content

Module geometry

Module geometry 

Source
Expand description

Computational Geometry Engine — real-time mathematical surface construction, manipulation, and rendering.

Provides parametric surfaces, implicit surface extraction (marching cubes), CSG operations, subdivision surfaces, Voronoi/Delaunay, convex hull, Bezier/NURBS, geodesics, curvature visualization, and topology operations.

A game can define a dungeon room as “the interior of a Klein bottle” and the engine renders it with correct topology. Boss arenas can be non-Euclidean spaces.

Re-exports§

pub use parametric::ParametricSurface;
pub use parametric::SurfaceSample;
pub use parametric::SurfaceGrid;
pub use implicit::ScalarField;
pub use implicit::MarchingCubes;
pub use implicit::IsoVertex;
pub use csg::CsgOp;
pub use csg::CsgNode;
pub use csg::CsgTree;
pub use subdivision::SubdivisionScheme;
pub use subdivision::SubdivMesh;
pub use voronoi::VoronoiDiagram;
pub use voronoi::VoronoiCell;
pub use voronoi::DelaunayTriangulation;
pub use hull::ConvexHull;
pub use bezier::BezierSurface;
pub use bezier::NurbsSurface;
pub use bezier::ControlPoint;
pub use geodesic::GeodesicSolver;
pub use curvature::CurvatureField;
pub use curvature::CurvatureType;
pub use topology::TopologyOp;
pub use topology::SurfaceTopology;
pub use topology::TopologicalSurface;
pub use deformation::Deformer;
pub use deformation::DeformField;

Modules§

bezier
Bezier and NURBS surface rendering.
csg
Constructive Solid Geometry — union, intersection, difference of mathematical volumes.
curvature
Curvature visualization — Gaussian, mean curvature rendered as glyph color.
deformation
Real-time surface deformation driven by force fields and math functions.
geodesic
Geodesic distance computation on surfaces — shortest path along a curved surface.
hull
Convex hull computation in 2D and 3D.
implicit
Implicit surface extraction — marching cubes/tetrahedra for isosurfaces from scalar fields.
parametric
Parametric surface evaluation — any f(u,v) → Vec3 mapped to glyph grids.
subdivision
Subdivision surfaces — Catmull-Clark and Loop subdivision on glyph meshes.
topology
Topology operations — genus changes, handle attachment, non-orientable surfaces.
voronoi
Voronoi diagrams and Delaunay triangulation in 2D and 3D.

Structs§

GeoMesh
A mesh of vertices and triangles produced by geometry operations.
Triangle
A triangle in 3D space with vertex indices.