TestCameraViewActivityPose

class TestCameraViewActivityPose


A test implementation of CameraViewActivityPose that allows for setting custom values for the cameraType, field of view, ActivitySpace pose, and scales.

Summary

Public constructors

TestCameraViewActivityPose(
    cameraType: Int,
    fov: CameraViewActivityPose.Fov,
    activitySpacePose: Pose,
    activitySpaceScale: Vector3,
    worldSpaceScale: 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 camera in ActivitySpace.

open Vector3

The scale of the camera in ActivitySpace.

open Int

The type of camera.

open CameraViewActivityPose.Fov

The field of view of the camera.

open Vector3

The scale of the camera in WorldSpace.

Public constructors

TestCameraViewActivityPose

Added in 1.0.0-alpha04
TestCameraViewActivityPose(
    cameraType: Int,
    fov: CameraViewActivityPose.Fov = Fov(angleLeft = -1.57f, angleRight = 1.57f, angleUp = 1.57f, angleDown = -1.57f),
    activitySpacePose: Pose = Pose.Identity,
    activitySpaceScale: Vector3 = Vector3(1f, 1f, 1f),
    worldSpaceScale: Vector3 = Vector3(1f, 1f, 1f)
)
Parameters
cameraType: Int

The type of camera.

fov: CameraViewActivityPose.Fov = Fov(angleLeft = -1.57f, angleRight = 1.57f, angleUp = 1.57f, angleDown = -1.57f)

The field of view of the camera.

activitySpacePose: Pose = Pose.Identity

The pose of the camera in ActivitySpace.

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

The scale of the camera in ActivitySpace.

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

The scale of the camera in WorldSpace.

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 camera in ActivitySpace.

activitySpaceScale

Added in 1.0.0-alpha04
open var activitySpaceScaleVector3

The scale of the camera in ActivitySpace.

cameraType

Added in 1.0.0-alpha04
open val cameraTypeInt

The type of camera.

fov

Added in 1.0.0-alpha04
open var fovCameraViewActivityPose.Fov

The field of view of the camera.

worldSpaceScale

Added in 1.0.0-alpha04
open val worldSpaceScaleVector3

The scale of the camera in WorldSpace.