coordsys_backend
namespace nin {
template <coordsys_traits CT>
class coordsys_backend;
}
coordsys_backend is the abstract base class for all coordinate system backends. It enables
runtime polymorphism with value semantics through the non-virtual interface idiom: coordsys
owns a shared_ptr<coordsys_backend> and delegates tree traversal and cloning to it.
Users who need custom coordinate system behaviour — for example, reading pose from a
physics engine, a network service, or a sensor driver — derive from coordsys_backend and
implement the two pure virtual functions below. The derived backend is then wrapped in a
coordsys_generic or coordsys_child to become a fully functional coordinate system.
Virtual member functions
offset
compute transformation toward WCS
offset
compute transformation toward WCS
|
(1) |
Returns the transformation data from this coordinate system toward WCS.
For a child backend, this typically composes the local transformation with
the parent’s offset(), decrementing hop_limit at each hop. When hop_limit
reaches zero, the implementation should throw hop_limit_exceeded_error.
clone
create a deep copy
clone
create a deep copy
|
(1) |
Returns a new backend with the same state. Called by coordsys copy constructor
to implement value semantics: copying a coordinate system produces an independent
object, not a shared reference.