TestHeadActivityPose

class TestHeadActivityPose


A test implementation of HeadActivityPose that allows for setting custom values for the activity space pose and scales.

Summary

Public constructors

TestHeadActivityPose(
    activitySpacePose: Pose,
    worldSpaceScale: Vector3,
    activitySpaceScale: Vector3
)

Public functions

open ListenableFuture<HitTestResult>
hitTest(origin: Vector3, direction: Vector3, hitTestFilter: Int)

Creates a hit test at the from the specified origin in the specified direction into the scene.

open Pose
transformPoseTo(pose: Pose, destination: ActivityPose)

Returns a pose relative to this entity transformed into a pose relative to the destination.

Public properties

open Pose

The pose of the head in ActivitySpace.

open Vector3

The scale of the head in ActivitySpace.

open Vector3

The scale of the head in WorldSpace.

Public constructors

TestHeadActivityPose

Added in 1.0.0-alpha04
TestHeadActivityPose(
    activitySpacePose: Pose = Pose.Identity,
    worldSpaceScale: Vector3 = Vector3(1f, 1f, 1f),
    activitySpaceScale: Vector3 = Vector3(1f, 1f, 1f)
)
Parameters
activitySpacePose: Pose = Pose.Identity

The pose of the head in ActivitySpace.

worldSpaceScale: Vector3 = Vector3(1f, 1f, 1f)

The scale of the head in WorldSpace.

activitySpaceScale: Vector3 = Vector3(1f, 1f, 1f)

The scale of the head in ActivitySpace.

Public functions

hitTest

Added in 1.0.0-alpha04
open fun hitTest(origin: Vector3, direction: Vector3, hitTestFilter: Int): ListenableFuture<HitTestResult>

Creates a hit test at the from the specified origin in the specified direction into the scene.

Parameters
origin: Vector3

The translation of the origin of the hit test relative to this ActivityPose.

direction: Vector3

The direction for the hit test ray from the ActivityPose.

hitTestFilter: Int

The scenes that will be in range for the hit test.

Returns
ListenableFuture<HitTestResult>

a {@code ListenableFuture}. The HitResult describes if it hit something and where relative to this ActivityPose. Listeners will be called on the main thread if Runnable::run is supplied.

transformPoseTo

Added in 1.0.0-alpha04
open fun transformPoseTo(pose: Pose, destination: ActivityPose): Pose

Returns a pose relative to this entity transformed into a pose relative to the destination.

Parameters
pose: Pose

A pose in this entity's local coordinate space.

destination: ActivityPose

The entity which the returned pose will be relative to.

Returns
Pose

The pose relative to the destination entity.

Public properties

activitySpacePose

Added in 1.0.0-alpha04
open var activitySpacePosePose

The pose of the head in ActivitySpace.

activitySpaceScale

Added in 1.0.0-alpha04
open var activitySpaceScaleVector3

The scale of the head in ActivitySpace.

worldSpaceScale

Added in 1.0.0-alpha04
open var worldSpaceScaleVector3

The scale of the head in WorldSpace.