BaseScenePose
public abstract class BaseScenePose<RtScenePoseType extends ScenePose> implements ScenePose
Entity |
An Entity is the fundamental building block of a SceneCore |
PerceptionSpace |
PerceptionSpace is an |
ActivityPanelEntity |
ActivityPanelEntity creates a spatial panel for embedding an |
ActivitySpace |
ActivitySpace is a |
AnchorSpace |
An AnchorSpace is a |
GltfModelEntity |
GltfModelEntity is a concrete implementation of Entity that hosts a glTF model. |
MainPanelEntity |
Represents the main spatialized panel in a |
MeshEntity |
A renderable entity in the scene graph that renders a |
PanelEntity |
PanelEntity contains an arbitrary 2D Android |
SpaceEntity |
A SpaceEntity is a special Entity subtype whose position is independent of other SpaceEntity. |
SurfaceEntity |
SurfaceEntity is an |
The BaseScenePose implements the ScenePose interface.
Summary
Protected constructors |
|---|
<RtScenePoseType extends ScenePose> BaseScenePose( |
Public methods |
|
|---|---|
@NonNull Pose |
The current |
HitTestResult |
Perform a hit test from the specified origin in the specified direction into the Scene. |
HitTestResult |
Creates a hit test from the specified origin in the specified direction into the scene. |
@NonNull Vector3 |
transformDirectionTo(Transforms a direction from this ScenePose's local space to the destination ScenePose's local space. |
@NonNull Pose |
transformPoseTo(@NonNull Pose pose, @NonNull ScenePose destination)Returns a |
@NonNull Vector3 |
transformPositionTo(Transforms a position from this ScenePose's local space to the destination ScenePose's local space. |
@NonNull Vector3 |
transformVectorTo(@NonNull Vector3 vector, @NonNull ScenePose destination)Transforms a vector from this ScenePose's local space to the destination ScenePose's local space. |
Protected constructors
BaseScenePose
protected <RtScenePoseType extends ScenePose> BaseScenePose(
@NonNull RtScenePoseType rtScenePose
)
Public methods
getPoseInActivitySpace
public @NonNull Pose getPoseInActivitySpace()
The current Pose relative to the activity space root.
hitTest
public HitTestResult hitTest(@NonNull Vector3 origin, @NonNull Vector3 direction)
Perform a hit test from the specified origin in the specified direction into the Scene.
| Parameters | |
|---|---|
@NonNull Vector3 origin |
The translation of the origin of the hit test relative to this ScenePose. |
@NonNull Vector3 direction |
The direction for the hit test ray from the origin. |
| Returns | |
|---|---|
HitTestResult |
The |
hitTest
public HitTestResult hitTest(
@NonNull Vector3 origin,
@NonNull Vector3 direction,
int hitTestFilter
)
Creates a hit test from the specified origin in the specified direction into the scene.
| Parameters | |
|---|---|
@NonNull Vector3 origin |
The translation of the origin of the hit test relative to this ScenePose. |
@NonNull Vector3 direction |
The direction for the hit test ray from the origin |
int hitTestFilter |
Filter for which scenes to hit test. Hitting other scenes is only allowed for apps with the |
| Returns | |
|---|---|
HitTestResult |
The |
transformDirectionTo
public @NonNull Vector3 transformDirectionTo(
@NonNull Vector3 direction,
@NonNull ScenePose destination
)
Transforms a direction from this ScenePose's local space to the destination ScenePose's local space. This operation ignores relative scaling; the output vector will have the same magnitude as direction.
This operation is not affected by either ScenePose's scale or position.
transformPoseTo
public @NonNull Pose transformPoseTo(@NonNull Pose pose, @NonNull ScenePose destination)
Returns a Pose relative to this ScenePose, transformed into a Pose relative to the destination.
transformPositionTo
public @NonNull Vector3 transformPositionTo(
@NonNull Vector3 position,
@NonNull ScenePose destination
)
Transforms a position from this ScenePose's local space to the destination ScenePose's local space.
This operation is affected by both ScenePose's position, rotation, and scale.
transformVectorTo
public @NonNull Vector3 transformVectorTo(@NonNull Vector3 vector, @NonNull ScenePose destination)
Transforms a vector from this ScenePose's local space to the destination ScenePose's local space. This operation accounts for scale. The magnitude of the output vector might be different from the magnitude of the input vector.
This operation is not affected by either ScenePose's position.