Back to Filament

Scene

docs/android/dokka/filament-android/com.google.android.filament/-scene/index.md

1.75.05.7 KB
Original Source

//filament-android/com.google.android.filament/Scene

Scene

open class Scene

A Scene is a flat container of RenderableManager and LightManager components.

A Scene doesn't provide a hierarchy of objects, i.e.: it's not a scene-graph. However, it manages the list of objects to render and the list of lights. These can be added or removed from a Scene at any time. Moreover clients can use TransformManager to create a graph of transforms.

A RenderableManager component must be added to a Scene in order to be rendered, and the Scene must be provided to a View.

Creation and Destruction

A Scene is created using createScene and destroyed using destroyScene.

See also

View
LightManager
RenderableManager
TransformManager

Types

NameSummary
EntityProcessor[main]
interface EntityProcessor

Functions

NameSummary
addEntities[main]
open fun addEntities(entities: Array<Int>)
Adds a list of entities to the Scene.
addEntity[main]
open fun addEntity(entity: Int)
Adds an Entity to the Scene.
forEach[main]
open fun forEach(entityProcessor: Scene.EntityProcessor)
Invokes user functor on each entity in the scene.
getEntities[main]
open fun getEntities(): Array<Int>
Returns the list of all entities in the Scene in a newly allocated array.
[main]
open fun getEntities(outArray: Array<Int>): Array<Int>
Returns the list of all entities in the Scene.
getEntityCount[main]
open fun getEntityCount(): Int
Returns the total number of Entities in the Scene, whether alive or not.
getIndirectLight[main]
open fun getIndirectLight(): IndirectLight
getLightCount[main]
open fun getLightCount(): Int
Returns the number of active (alive) LightManager components in the Scene.
getNativeObject[main]
open fun getNativeObject(): Long
getRenderableCount[main]
open fun getRenderableCount(): Int
Returns the number of active (alive) RenderableManager components in the Scene.
getSkybox[main]
open fun getSkybox(): Skybox
hasEntity[main]
open fun hasEntity(entity: Int): Boolean
Returns true if the given entity is in the Scene.
remove[main]
open fun remove(entity: Int)
removeEntities[main]
open fun removeEntities(entities: Array<Int>)
Removes a list of entities from the Scene.
removeEntity[main]
open fun removeEntity(entity: Int)
Removes an Entity from the Scene.
setIndirectLight[main]
open fun setIndirectLight(ibl: IndirectLight)
Sets the IndirectLight to use when rendering the Scene.
setSkybox[main]
open fun setSkybox(skybox: Skybox)
Sets the Skybox.