/* -*- 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/. */
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(XRSpace, DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mSession) // Don't need NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER because // DOMEventTargetHelper does it for us.
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
bool XRSpace::IsPositionEmulated() const {
gfx::VRDisplayClient* display = mSession->GetDisplayClient(); if (!display) { // When there are no sensors, the position is considered emulated. returntrue;
} const gfx::VRDisplayInfo& displayInfo = display->GetDisplayInfo(); if (displayInfo.GetCapabilities() &
gfx::VRDisplayCapabilityFlags::Cap_PositionEmulated) { // Cap_PositionEmulated indicates that the position is always emulated. returntrue;
} const gfx::VRHMDSensorState& sensorState = display->GetSensorState(); // When positional tracking is lost, the position is considered emulated. return ((sensorState.flags & gfx::VRDisplayCapabilityFlags::Cap_Position) ==
gfx::VRDisplayCapabilityFlags::Cap_None);
}
} // namespace mozilla::dom
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
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.