Skip to main content

Module traits

Module traits 

Source
Expand description

The adaptor traits: what every algorithm sees geometry through.

Intersection, projection, extrema and tessellation are written against Curve3d, Curve2d and Surface, never against a concrete type. Nothing downstream needs to know whether it holds an analytic cylinder or a NURBS patch, which is what keeps one implementation of each algorithm rather than one per surface type.

§Fast paths, opted into

Curve3d::kind and Surface::kind let an algorithm ask. Plane/plane intersection is two lines of algebra and should never go through a marching intersector; a caller that wants that shortcut matches on the kind and takes it. The general path never has to know what it is looking at, so adding a surface type does not break existing algorithms; it only forgoes a shortcut until someone writes one.

Structs§

SurfaceCurvature
A surface’s curvature at one place: the principal curvatures and the directions they are taken in, with the mean and Gaussian curvatures they combine to.
SurfaceJet
A surface’s point and its derivatives through second order, at one place.

Enums§

Continuity
How smooth a curve or surface is.
CurveKind
What kind of curve this is, for analytic fast paths.
SurfaceKind
What kind of surface this is, for analytic fast paths.

Traits§

Curve2d
A parametric curve in the plane.
Curve3d
A parametric curve in space.
Reversible
Reversible geometry: the same point set, traversed the other way.
Surface
A parametric surface.
Transformable
Geometry that can be moved by a similarity.