MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / GetViewerPose

Method GetViewerPose

Plugins/NativeXr/Source/NativeXr.cpp:1130–1141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1128 Napi::ObjectReference m_jsPose{};
1129
1130 Napi::Value GetViewerPose(const Napi::CallbackInfo& info)
1131 {
1132 // TODO: Support reference spaces.
1133 // auto& space = *XRReferenceSpace::Unwrap(info[0].As<Napi::Object>());
1134
1135 // Updating the reference space is currently not supported. Until it is, we assume the
1136 // reference space is unmoving at identity (which is usually true).
1137
1138 m_xrViewerPose.Update(info, {{{0, 0, 0}, {0, 0, 0, 1}}}, m_frame->Views);
1139
1140 return m_jsXRViewerPose.Value();
1141 }
1142
1143 Napi::Value GetPose(const Napi::CallbackInfo& info)
1144 {

Callers

nothing calls this directly

Calls 2

ValueMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected