mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-19 13:18:32 +00:00
st/oxr: Fix pure_relation_from_space
Fixes in particular the space transform submitted in composition layers in local reference space. Consider a pose given with a pose offset to an XrSpace as its origin. To construct the Pose in global space, simply add up XrSpace pose in global space, XrSpace pose offset and the given pose. Given pose with a pose offset to XrSpace as origin /|\ /|\ / | / | XrSpace pose offset | /|\ | | | | | XrSpace pose | in global space | /|\ | \ | \ | Global Space origin
This commit is contained in:
parent
922fdff62d
commit
068bf05057
|
@ -259,9 +259,9 @@ oxr_space_pure_relation_from_space(struct oxr_logger *log,
|
|||
}
|
||||
|
||||
struct xrt_relation_chain xrc = {0};
|
||||
m_relation_chain_push_relation(&xrc, &pure_space_relation);
|
||||
m_relation_chain_push_inverted_pose_if_not_identity(&xrc, &spc->pose);
|
||||
m_relation_chain_push_relation(&xrc, relation);
|
||||
m_relation_chain_push_pose_if_not_identity(&xrc, &spc->pose);
|
||||
m_relation_chain_push_relation(&xrc, &pure_space_relation);
|
||||
m_relation_chain_resolve(&xrc, out_relation);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue