coordsys_traits
namespace nin {
template <typename CT>
concept coordsys_traits;
}
Any space of coordinate systems must satisfy the coordsys_traits concept.
A traits type defines three things: what coordinates look like, what transformations look
like, and how to apply and compose those transformations. This is the extension point for
defining entirely new kinds of coordinate systems — R2, R3, or any user-defined space.
Requirements
A type CT satisfies coordsys_traits if it provides:
| Requirement | Description |
|---|---|
|
The generalized coordinate type. Must be |
|
The transformation data type. Must be |
|
Static function. Returns the inverse of a transformation. |
|
Static function. Composes two transformations so that applying the result is equivalent to
applying |
|
Static function ( |
quantity_type and tf_data_type must be distinct types to prevent accidental misuse — a transformation is not a coordinate and vice versa.
See also
For a step-by-step recipe on introducing a new coordinate space, see How to define a new coordinate-system traits type.