mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-05 21:38:12 +00:00
xrt: Add xrt_space_graph
This commit is contained in:
parent
0ff1865c2e
commit
4d85db6051
4
doc/changes/xrt/mr.519.1.md
Normal file
4
doc/changes/xrt/mr.519.1.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
Add `xrt_space_graph` struct for calculating space relations. This struct and
|
||||
accompanying makes it easier to reason about space relations than just functions
|
||||
operating directly on `xrt_space_relation`. The code base is changed to use
|
||||
these new functions.
|
|
@ -368,6 +368,28 @@ struct xrt_space_relation
|
|||
struct xrt_vec3 angular_acceleration;
|
||||
};
|
||||
|
||||
/*!
|
||||
* The maximum number of steps that can be in a space graph chain.
|
||||
*
|
||||
* @see xrt_space_graph::steps
|
||||
* @ingroup xrt_iface math
|
||||
*/
|
||||
#define XRT_SPACE_GRAPHS_MAX 8
|
||||
|
||||
/*!
|
||||
* A graph of space relations, technically more of a chain of transformation
|
||||
* since it's not branching, but a flat graph is still a graph. Functions for
|
||||
* manipulating this are available in `math/m_space.h`.
|
||||
*
|
||||
* @see xrt_space_relation
|
||||
* @ingroup xrt_iface math
|
||||
*/
|
||||
struct xrt_space_graph
|
||||
{
|
||||
struct xrt_space_relation steps[XRT_SPACE_GRAPHS_MAX];
|
||||
uint32_t num_steps;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue