public final class GroupEntity implements ScenePose, Entity


An Entity that contains no content, but can have an arbitrary number of children. GroupEntity is useful for organizing the placement and movement of a group of child SceneCore Entities.

Summary

Public methods

static final @NonNull Entity
create(@NonNull Session session, @NonNull String name, @NonNull Pose pose)

Public factory method for creating a GroupEntity.

Inherited methods

From androidx.xr.scenecore.Entity
@FloatRange(from = 0.0, to = 1.0) float

Returns the alpha transparency set for this Entity.

@NonNull Pose

Returns the Pose for this Entity, relative to its parent.

@FloatRange(from = 0.0) float

Returns the local scale of this Entity, not inclusive of the parent's scale.

void
setAlpha(@FloatRange(from = 0.0, to = 1.0) float alpha)

Sets the alpha transparency of the Entity and its children.

void

Sets the Pose for this Entity, relative to its parent.

void
setScale(@FloatRange(from = 0.0) float scale)

Sets the scale of this Entity relative to its parent.

From androidx.xr.scenecore.ScenePose
abstract @NonNull Pose

The current Pose relative to the activity space root.

abstract @NonNull HitTestResult
hitTest(@NonNull Vector3 origin, @NonNull Vector3 direction)

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

abstract @NonNull 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.

abstract @NonNull Pose
transformPoseTo(@NonNull Pose pose, @NonNull ScenePose destination)

Returns a Pose relative to this ScenePose, transformed into a Pose relative to the destination.

Public methods

create

Added in 1.0.0-alpha05
public static final @NonNull Entity create(@NonNull Session session, @NonNull String name, @NonNull Pose pose)

Public factory method for creating a GroupEntity.

Parameters
@NonNull Session session

Session to create the GroupEntity in.

@NonNull String name

Name of the entity.

@NonNull Pose pose

Initial pose of the entity.