XrFrame class final
One frame of a session: when it will be shown, where the eyes and the hands will be, and what the room looks like.
Made by the runtime in XrSession.waitFrame; the engine reads it and answers with an XrFrameEnd.
Constructors
-
XrFrame({required int index, required double predictedDisplayTime, required XrSpace space, required List<
XrView> views, double predictedDisplayPeriod = 1 / 90, bool shouldRender = true, Map<String, RigidPose> poses = const <String, RigidPose>{}, List<XrInputSource> inputs = const <XrInputSource>[], List<XrPlane> planes = const <XrPlane>[], List<String> lostPlanes = const <String>[], List<XrSceneMesh> meshes = const <XrSceneMesh>[], XrLightEstimate? light, EnvironmentDepth? depth}) -
The frame
index, shown atpredictedDisplayTime.
Properties
-
controlReadings
→ Map<
String, XrControlReading> -
What each control reads this frame, by the source id an action map
binds it under (
XrActionSource.sourceId).no setter - depth → EnvironmentDepth?
-
How far the real world is, when the runtime measured it this frame.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
Counted from the session's first frame.
final
-
inputs
→ List<
XrInputSource> -
The controllers and hands, read for this frame.
final
- light → XrLightEstimate?
-
The room's light, when the runtime measured it this frame.
final
-
lostPlanes
→ List<
String> -
The ids of planes no longer tracked.
final
-
meshes
→ List<
XrSceneMesh> -
Scene meshes made or changed since the last frame.
final
-
planes
→ List<
XrPlane> -
Planes found or changed since the last frame.
final
-
poses
→ Map<
String, RigidPose> -
The tracked poses of this frame, by their tape source names
(
XrPoseSources): the head, each controller's grip and aim, each hand's joints.final - predictedDisplayPeriod → double
-
The runtime's frame period, seconds: a 90 Hz headset's is 1/90.
final
- predictedDisplayTime → double
-
When the runtime will show it, seconds on the runtime's clock: what
the loop's
DisplayTimeis told.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldRender → bool
-
Whether the runtime will show what is drawn; false while the session
is visible but hidden, when a frame is ended with no layers.
final
- space → XrSpace
-
The space views and poses are in.
final
-
views
→ List<
XrView> -
The views to draw, in order.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toInputs(
) → List< ExternalStateInput> - This frame as the simulation's input for the step that takes it: every pose, plane and mesh, with the display time as their source time. What goes on the tape, so a session replays bit for bit.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited