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§
- Surface
Curvature - 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.
- Surface
Jet - A surface’s point and its derivatives through second order, at one place.
Enums§
- Continuity
- How smooth a curve or surface is.
- Curve
Kind - What kind of curve this is, for analytic fast paths.
- Surface
Kind - 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.