chromium/third_party/blink/renderer/modules/xr/xr_frame.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/modules/xr/xr_frame.h"

#include "third_party/blink/renderer/bindings/core/v8/frozen_array.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/modules/xr/xr_hit_test_result.h"
#include "third_party/blink/renderer/modules/xr/xr_hit_test_source.h"
#include "third_party/blink/renderer/modules/xr/xr_input_source.h"
#include "third_party/blink/renderer/modules/xr/xr_joint_space.h"
#include "third_party/blink/renderer/modules/xr/xr_light_estimate.h"
#include "third_party/blink/renderer/modules/xr/xr_light_probe.h"
#include "third_party/blink/renderer/modules/xr/xr_plane_set.h"
#include "third_party/blink/renderer/modules/xr/xr_reference_space.h"
#include "third_party/blink/renderer/modules/xr/xr_session.h"
#include "third_party/blink/renderer/modules/xr/xr_transient_input_hit_test_result.h"
#include "third_party/blink/renderer/modules/xr/xr_transient_input_hit_test_source.h"
#include "third_party/blink/renderer/modules/xr/xr_view.h"
#include "third_party/blink/renderer/modules/xr/xr_viewer_pose.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"

namespace blink {

namespace {

const char kInvalidView[] =;

const char kSessionMismatch[] =;

const char kHitTestSourceUnavailable[] =;

const char kCannotObtainNativeOrigin[] =;

const char kSpacesSequenceTooLarge[] =;

const char kMismatchedBufferSizes[] =;

std::optional<uint64_t> GetPlaneId(
    const device::mojom::blink::XRNativeOriginInformation& native_origin) {}

}  // namespace

constexpr char XRFrame::kInactiveFrame[];
constexpr char XRFrame::kNonAnimationFrame[];

XRFrame::XRFrame(XRSession* session, bool is_animation_frame)
    :{}

XRViewerPose* XRFrame::getViewerPose(XRReferenceSpace* reference_space,
                                     ExceptionState& exception_state) {}

XRAnchorSet* XRFrame::trackedAnchors() const {}

XRPlaneSet* XRFrame::detectedPlanes(ExceptionState& exception_state) const {}

XRLightEstimate* XRFrame::getLightEstimate(
    XRLightProbe* light_probe,
    ExceptionState& exception_state) const {}

XRCPUDepthInformation* XRFrame::getDepthInformation(
    XRView* view,
    ExceptionState& exception_state) const {}

XRPose* XRFrame::getPose(XRSpace* space,
                         XRSpace* basespace,
                         ExceptionState& exception_state) {}

void XRFrame::Deactivate() {}

bool XRFrame::IsActive() const {}

const FrozenArray<XRHitTestResult>& XRFrame::getHitTestResults(
    XRHitTestSource* hit_test_source,
    ExceptionState& exception_state) {}

const FrozenArray<XRTransientInputHitTestResult>&
XRFrame::getHitTestResultsForTransientInput(
    XRTransientInputHitTestSource* hit_test_source,
    ExceptionState& exception_state) {}

ScriptPromise<XRAnchor> XRFrame::createAnchor(
    ScriptState* script_state,
    XRRigidTransform* offset_space_from_anchor,
    XRSpace* space,
    ExceptionState& exception_state) {}

ScriptPromise<XRAnchor> XRFrame::CreateAnchorFromNonStationarySpace(
    ScriptState* script_state,
    const gfx::Transform& native_origin_from_anchor,
    XRSpace* space,
    std::optional<uint64_t> maybe_plane_id,
    ExceptionState& exception_state) {}

bool XRFrame::IsSameSession(XRSession* space_session,
                            ExceptionState& exception_state) const {}

const FrozenArray<XRImageTrackingResult>& XRFrame::getImageTrackingResults(
    ExceptionState& exception_state) {}

XRJointPose* XRFrame::getJointPose(XRJointSpace* joint,
                                   XRSpace* baseSpace,
                                   ExceptionState& exception_state) const {}

bool XRFrame::fillJointRadii(HeapVector<Member<XRJointSpace>>& jointSpaces,
                             NotShared<DOMFloat32Array> radii,
                             ExceptionState& exception_state) const {}

bool XRFrame::fillPoses(HeapVector<Member<XRSpace>>& spaces,
                        XRSpace* baseSpace,
                        NotShared<DOMFloat32Array> transforms,
                        ExceptionState& exception_state) const {}

void XRFrame::Trace(Visitor* visitor) const {}

}  // namespace blink