Expand description
Geometric representations of common shapes in N-dimensional space.
Geometric primitives defined in this package are designed to be lightweight representations of geometry, independent of a global reference. This design makes struct suitible for use with simulation code, and ensures shapes are constructible from minimal information.
For shapes with parameterizable dimension, a const N: usize generic parameter
encodes the dimensionality.
Structs§
- Capsule
- All points less than or equal to a distance
rfrom a line segment of lengthh. - Convex
Polytope - A faceted solid defined by the convex hull of its vertices.
- Cylinder
- A circle with normal
[0 0 1]swept byh/2in the+zand-zdirections. - Eight
Eight - A regular octagon in two-dimensional hyperbolic space.
- Hyperbolic
Convex Polytope - A faceted hyperbolic solid defined by the convex hull of its vertices.
- Hypercuboid
- A shape with with all perpendicular angles made from axis-aligned edges.
- Hyperellipsoid
- The geometry resulting from an Hypersphere that is scaled along the Cartesian axes.
- Hypersphere
- All points within a given
radiusfrom the origin. - Simplex3
- The hull of any 4 noncoplanar points in three dimensions.
- Sphero
- Round a shape with a given radius.
Type Aliases§
- Circle
- A circle in two dimensions.
- Convex
Polygon - A faceted convex body in two dimensions.
- Convex
Polyhedron - A faceted convex body in three dimensions.
- Cuboid
- An axis-aligned cuboid.
- Ellipse
- A circle scaled along the x and y axes.
- Ellipsoid
- A sphere scaled along the x, y, and z axes.
- Hyperbolic
Convex Polygon - A two-dimensional hyperbolic convex polytope.
- Rectangle
- An axis-aligned rectangle.
- Sphere
- A sphere in three dimensions.
- Spherocylinder
- A sphere swept along a line segment in $
\mathbb{R}^3$.