/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
already_AddRefed<XRViewerPose> XRFrame::GetViewerPose( const XRReferenceSpace& aReferenceSpace, ErrorResult& aRv) { if (!mActive || !mAnimationFrame) {
aRv.ThrowInvalidStateError( "GetViewerPose can only be called on an XRFrame during an " "XRSession.requestAnimationFrame callback."); return nullptr;
}
if (aReferenceSpace.GetSession() != mSession) {
aRv.ThrowInvalidStateError( "The XRReferenceSpace passed to GetViewerPose must belong to the " "XRSession that GetViewerPose is called on."); return nullptr;
}
if (!mSession->CanReportPoses()) {
aRv.ThrowSecurityError( "The visibilityState of the XRSpace's XRSession " "that is passed to GetViewerPose must be 'visible'."); return nullptr;
}
already_AddRefed<XRPose> XRFrame::GetPose(const XRSpace& aSpace, const XRSpace& aBaseSpace,
ErrorResult& aRv) { if (!mActive) {
aRv.ThrowInvalidStateError( "GetPose can not be called on an XRFrame that is not active."); return nullptr;
}
if (aSpace.GetSession() != mSession || aBaseSpace.GetSession() != mSession) {
aRv.ThrowInvalidStateError( "The XRSpace passed to GetPose must belong to the " "XRSession that GetPose is called on."); return nullptr;
}
if (!mSession->CanReportPoses()) {
aRv.ThrowSecurityError( "The visibilityState of the XRSpace's XRSession " "that is passed to GetPose must be 'visible'."); return nullptr;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.