Scene

class Scene(nativeHandle: NativePointer)

A Scene is a collection of Renderables and Lights to be rendered together.

A Scene must be associated with a View to be rendered. Renderables, Lights, Skyboxes, and IndirectLight can be added to and removed from a Scene. Scenes are relatively lightweight objects that mainly manage entity membership.

See also

, Renderer, RenderableManager, LightManager

Constructors

Link copied to clipboard
constructor(nativeHandle: NativePointer)

Properties

Link copied to clipboard

Gets the number of entities in this scene.

Link copied to clipboard

Sets the indirect light (IBL) for this scene.

Link copied to clipboard

Gets the number of light entities in this scene.

Link copied to clipboard

The native object, for interop with code calling the Fila* C API directly. Read-only: this wrapper owns it.

Link copied to clipboard

Gets the number of renderable entities in this scene.

Link copied to clipboard

Sets the skybox for this scene.

Functions

Link copied to clipboard
fun addEntities(entities: IntArray)

Adds multiple entities to this scene.

Link copied to clipboard
fun addEntity(entity: Entity)

Adds a single entity to this scene.

Link copied to clipboard
fun forEach(functor: (Entity) -> Unit)

Invokes functor on every entity in this scene.

Link copied to clipboard
fun hasEntity(entity: Entity): Boolean

Tests whether an entity is in this scene.

Link copied to clipboard
fun remove(entity: Entity)

Removes a single entity from this scene.

Link copied to clipboard

Removes all Renderables and Lights from this scene.

Link copied to clipboard
fun removeEntities(entities: IntArray)

Removes multiple entities from this scene.