coordsys
namespace nin {
template <coordsys_traits CT> class coordsys;
}
coordsys is the base class for all coordinate systems, regardless of the backend.
It provides the minimum functionality common to every coordinate system:
-
Identity: two coordinate systems are equal only if they share the same backend object.
-
Tree traversal:
tf_to_WCS()andtf_from_WCS()walk the kinematic tree to compute raw transformation data relative to WCS. -
Linked copies:
linked_copy()creates a second handle to the same backend so thatcoord_value,coord_cloud, and bridges can hold a reference to a coordinate system that tracks the original. -
Origin queries:
origin()andorigin_to()express the coordinate system’s origin as a value or quantity.
Copying a coordsys clones its backend, producing an independent coordinate system.
The copy is not equal to the original — it is a new object with the same initial state.
To create a reference copy that is equal, use linked_copy().
Nested types
| Type | Definition |
|---|---|
|
|
|
|
|
|
|
|
Member functions
(Constructor)
constructs a coordinate system
(Constructor)
constructs a coordinate system
|
(1) |
|
(2) |
|
(3) |
|
(4) |
-
(1)-(2) Default and WCS constructors. Creates a coordinate system at the world origin (no backend).
-
(3) Copy constructor. Clones the backend, creating an independent coordinate system.
-
(4) Move constructor.
operator ==
identity comparison
operator ==
identity comparison
|
(1) |
Returns true if *this and rhs share the same backend object (pointer equality).
Two independently constructed coordinate systems with identical parameters are not equal.
Use linked_copy() to obtain a copy that compares equal.
tf_to_WCS
transformation to the world coordinate system
tf_to_WCS
transformation to the world coordinate system
|
(1) |
Returns the raw transformation data from *this to WCS by traversing the kinematic tree.
Throws hop_limit_exceeded_error if the number of hops exceeds hop_limit.
tf_from_WCS
transformation from the world coordinate system
tf_from_WCS
transformation from the world coordinate system
|
(1) |
Returns the raw transformation data from WCS to *this.
Equivalent to CT::invert_tf(tf_to_WCS(hop_limit)).
linked_copy
creates a linked copy
linked_copy
creates a linked copy
|
(1) |
Returns a new coordsys that shares the same backend pointer.
The returned object compares equal to *this. Mutations through one handle
(e.g. moving the coordinate system) are visible through the other.
origin
origin point of this coordinate system
origin
origin point of this coordinate system
|
(1) |
Returns the origin of this coordinate system as a coord_value in *this.
The quantity is default-constructed (zero for numeric types).
origin_to
origin expressed in another coordinate system
origin_to
origin expressed in another coordinate system
|
(1) |
Shortcut for mapCS(*this, inCS)(quantity_type{}). Returns the origin of *this
expressed in inCS as a raw quantity.