Skip to main content

Module common

Module common 

Source
Expand description

Shared foundational traits used across all geometry dimensions. Shared foundational traits used by all geometry primitives.

Structs§

FaceId
Stable identifier for entries in the root polygon-face table.
LineId
Stable identifier for entries in the root line table.
PointId
Stable identifier for entries in the root point table.
TetrahedronId
Stable identifier for entries in the root tetrahedron table.
TriangleId
Stable identifier for entries in the root triangle table.

Traits§

ApproxEq
Provides approximate equality comparisons with a caller-supplied epsilon.
CanNormalize
Normalizes a primitive in place.
CanProject
Projects a primitive onto another target type.
CanScale
Uniformly scales a primitive in place.
CanScaleNonUniform
Applies non-uniform scaling using a separate scale vector.
Canonicalize
Reorders or normalizes an in-memory representation in place.
Contains
Tests whether a primitive contains another value.
CoordinatePrimitive
A coordinate-bearing primitive that supports indexed scalar access.
CrossProduct
Computes a cross product between two values.
DotProduct
Computes a dot product between two values.
GeometricPrimitive
Base trait implemented by all geometry primitives in this module tree.
GeometricPrimitive2D
Marker trait for primitives that live in a 2D space.
GeometricPrimitive3D
Marker trait for primitives that live in a 3D space.
GeometricPrimitive4D
Marker trait for primitives that live in a 4D space.
HasBoundingBox
Provides access to a primitive’s bounding box.
HasCenter
Exposes a geometric center point.
HasCentroid
Exposes a centroid point for the primitive.
HasDimension
Exposes the dimensionality of a primitive as a compile-time constant.
HasDistanceTo
Computes a distance from self to another value.
HasEdges
Provides indexed access to a shape’s derived geometric edges.
HasEpsilon
Supplies a default epsilon for approximate comparisons.
HasFaces
Provides access to a borrowed polygon-face table.
HasLines
Provides access to a borrowed line table.
HasMeasure
Provides a canonical scalar measure for a primitive.
HasNorm
Computes the norm or magnitude of a value.
HasTetrahedra
Provides access to a borrowed tetrahedron table.
HasTriangles
Provides access to a borrowed triangle table.
HasVertices
Provides access to a borrowed point table.
Intersects
Tests whether two values intersect.
IsGeometryKey
Base trait for stable geometry table keys.
IsGeometryTable
Abstraction over a keyed mutable collection of geometry primitives.
IsGeometryTableBase
Root registry that owns or exposes the current core geometry tables.
IsPlane
A plane-like primitive represented by a point and a unit normal.
IsUnitVector
Marker trait for vectors guaranteed to have unit magnitude.
IsValid
Indicates whether a primitive satisfies its invariants.
MaybeSerialize
serde::Serialize when the serde feature is enabled, and no requirement otherwise. Used in trait bounds so that geometry types are serializable exactly when serialization is available.
Normalize
Produces a normalized copy without mutating the original value.
Repair
Attempts to repair an invalid or non-canonical primitive in place.
ScalarOperable
Supports scalar arithmetic against the geometry measurement type.
SelfAddition
Supports primitive-to-primitive addition and subtraction.
SelfProductInner
Supports an inner-product-like multiplication producing a scalar measure.

Type Aliases§

GeometryMeasure
Canonical scalar type used for geometric measurements.