open class FakeEntity : FakeActivityPose

Known direct subclasses
FakeGltfEntity

Test-only implementation of GltfEntity

FakePanelEntity

Test-only implementation of PanelEntity

FakeSubspaceNodeEntity
FakeSurfaceEntity

Test-only implementation of SurfaceEntity

FakeSystemSpaceEntity

Test-only implementation of SystemSpaceEntity

Known indirect subclasses
FakeActivityPanelEntity

Test-only implementation of ActivityPanelEntity

FakeActivitySpace

Test-only implementation of ActivitySpace

FakeAnchorEntity

Test-only implementation of AnchorEntity


Test-only implementation of Entity

Summary

Public constructors

Public functions

open Unit
addChild(child: Entity)

Add given Entity as child.

open Unit
addChildren(children: List<Entity>)

Sets the provided Entities to be children of the Entity.

open Boolean
addComponent(component: Component)

Add given component to entity.

open Unit

Adds the listener to the set of active input listeners, for input events targeted to this entity or its child entities.

open Unit

Dispose any system resources held by this entity, and transitively calls dispose() on all the children.

open Float
getAlpha(relativeTo: Int)

Returns the effective alpha transparency level of the entity, relative to the given space.

open List<Component>

Retrieves all components attached to this Entity.

open List<T>

Retrieves all Components of the given type T and its sub-types attached to this Entity.

open Pose
getPose(relativeTo: Int)

Returns the pose for this entity, relative to the given space.

open Vector3
getScale(relativeTo: Int)

Returns the scale of this entity, relative to the given space.

open Boolean
isHidden(includeParents: Boolean)

Returns the hidden status of this Entity.

open Unit

Remove all components from this entity.

open Unit

Remove the given component from the entity.

open Unit

Removes the given listener from the set of active input listeners.

open Unit
setAlpha(alpha: Float, relativeTo: Int)

Sets the alpha transparency for the given Entity, relative to the given space.

open Unit
setHidden(hidden: Boolean)

Sets the local hidden state of this Entity.

open Unit
setPose(pose: Pose, relativeTo: Int)

Updates the pose (position and rotation) of the Entity relative to the given space.

open Unit
setScale(scale: Vector3, relativeTo: Int)

Sets the scale of this entity relative to the given space.

Public properties

open List<Entity>

Sets the provided Entities to be children of the Entity.

open String

Sets context-text for this entity to be consumed by Accessibility systems.

open Entity?

Sets the parent Entity for this Entity.

Public constructors

FakeEntity

Added in 1.0.0-alpha04
FakeEntity()

Public functions

addChild

Added in 1.0.0-alpha04
open fun addChild(child: Entity): Unit

Add given Entity as child. The child Entity's pose will be relative to the pose of its parent

Parameters
child: Entity

The child entity.

addChildren

open fun addChildren(children: List<Entity>): Unit

Sets the provided Entities to be children of the Entity.

addComponent

Added in 1.0.0-alpha04
open fun addComponent(component: Component): Boolean

Add given component to entity.

Parameters
component: Component

Component to add to the Entity.

Returns
Boolean

True if the given component is added to the Entity.

addInputEventListener

Added in 1.0.0-alpha04
open fun addInputEventListener(executor: Executor, listener: InputEventListener): Unit

Adds the listener to the set of active input listeners, for input events targeted to this entity or its child entities.

Parameters
executor: Executor

The executor to run the listener on.

listener: InputEventListener

The input event listener to add.

dispose

Added in 1.0.0-alpha04
open fun dispose(): Unit

Dispose any system resources held by this entity, and transitively calls dispose() on all the children. Once disposed, Entity shouldn't be used again.

getAlpha

Added in 1.0.0-alpha04
open fun getAlpha(relativeTo: Int): Float

Returns the effective alpha transparency level of the entity, relative to the given space.

Parameters
relativeTo: Int

The space in which to evaluate the alpha.

getComponents

Added in 1.0.0-alpha04
open fun getComponents(): List<Component>

Retrieves all components attached to this Entity.

Returns
List<Component>

List attached to this Entity.

getComponentsOfType

Added in 1.0.0-alpha04
open fun <T : Component> getComponentsOfType(type: Class<T>): List<T>

Retrieves all Components of the given type T and its sub-types attached to this Entity.

Parameters
type: Class<T>

The type of Component to retrieve.

Returns
List<T>

List of the given type attached to this Entity.

getPose

Added in 1.0.0-alpha04
open fun getPose(relativeTo: Int): Pose

Returns the pose for this entity, relative to the given space.

getScale

Added in 1.0.0-alpha04
open fun getScale(relativeTo: Int): Vector3

Returns the scale of this entity, relative to the given space.

Returns
Vector3

Current Vector3 scale relative to the given space.

isHidden

Added in 1.0.0-alpha04
open fun isHidden(includeParents: Boolean): Boolean

Returns the hidden status of this Entity.

Parameters
includeParents: Boolean

Whether to include the hidden status of parents in the returned value.

Returns
Boolean

If includeParents is true, the returned value will be true if this Entity or any of its ancestors is hidden. If includeParents is false, the local hidden state is returned. Regardless of the local hidden state, an entity will not be rendered if any of its ancestors are hidden.

removeAllComponents

Added in 1.0.0-alpha04
open fun removeAllComponents(): Unit

Remove all components from this entity.

removeComponent

Added in 1.0.0-alpha04
open fun removeComponent(component: Component): Unit

Remove the given component from the entity.

Parameters
component: Component

Component to remove from the entity.

removeInputEventListener

Added in 1.0.0-alpha04
open fun removeInputEventListener(listener: InputEventListener): Unit

Removes the given listener from the set of active input listeners.

setAlpha

Added in 1.0.0-alpha04
open fun setAlpha(alpha: Float, relativeTo: Int): Unit

Sets the alpha transparency for the given Entity, relative to the given space.

Parameters
alpha: Float

Alpha transparency level for the Entity.

relativeTo: Int

The space in which to set the alpha.

setHidden

Added in 1.0.0-alpha04
open fun setHidden(hidden: Boolean): Unit

Sets the local hidden state of this Entity. When true, this Entity and all descendants will not be rendered in the scene. When the hidden state is false, an entity will be rendered if its ancestors are not hidden.

Parameters
hidden: Boolean

The new local hidden state of this Entity.

setPose

Added in 1.0.0-alpha04
open fun setPose(pose: Pose, relativeTo: Int): Unit

Updates the pose (position and rotation) of the Entity relative to the given space.

setScale

Added in 1.0.0-alpha04
open fun setScale(scale: Vector3, relativeTo: Int): Unit

Sets the scale of this entity relative to the given space. This value will affect the rendering of this Entity's children. As the scale increases, this will stretch the content of the Entity.

Parameters
scale: Vector3

The Vector3 scale factor relative to the given space.

relativeTo: Int

The space in which to set the scale.

Public properties

children

Added in 1.0.0-alpha04
open val childrenList<Entity>

Sets the provided Entities to be children of the Entity.

contentDescription

Added in 1.0.0-alpha04
open var contentDescriptionString

Sets context-text for this entity to be consumed by Accessibility systems.

parent

Added in 1.0.0-alpha04
open var parentEntity?

Sets the parent Entity for this Entity. The child Entity's pose will be relative to the pose of its parent.

The parent entity.