-
public class SceneA
Sceneis a flat container of RenderableManager and LightManager components.A
Scenedoesn'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 aSceneat any time. Moreover clients can use TransformManager to create a graph of transforms.A RenderableManager component must be added to a
Creation and DestructionAScenein order to be rendered, and theScenemust be provided to a View.Sceneis created using createScene and destroyed using destroyScene.
-
-
Method Summary
Modifier and Type Method Description SkyboxgetSkybox()voidsetSkybox(@Nullable() Skybox skybox)Sets the Skybox. IndirectLightgetIndirectLight()voidsetIndirectLight(@Nullable() IndirectLight ibl)Sets the IndirectLight to use when rendering the Scene.voidaddEntity(int entity)Adds an Entity to the Scene.voidaddEntities(Array<int> entities)Adds a list of entities to the Scene.voidremoveEntity(int entity)Removes an Entity from the Scene.voidremove(int entity)voidremoveEntities(Array<int> entities)Removes a list of entities from the Scene.This is equivalent to calling remove in a loop.If any of the specified entities do not exist in the scene, they are skipped.intgetRenderableCount()Returns the number of RenderableManager components in the Scene.intgetLightCount()Returns the number of LightManager components in the Scene.booleanhasEntity(int entity)Returns true if the given entity is in the Scene. longgetNativeObject()-
-
Method Detail
-
getIndirectLight
@Nullable() IndirectLight getIndirectLight()
-
setIndirectLight
void setIndirectLight(@Nullable() IndirectLight ibl)
Sets the IndirectLight to use when rendering the
Scene.Currently, aScenemay only have a single IndirectLight.This call replaces the current IndirectLight.- Parameters:
ibl- the IndirectLight to use when rendering theSceneornullto unset.
-
addEntity
void addEntity(int entity)
Adds an Entity to the
Scene.- Parameters:
entity- the entity is ignored if it doesn't have a RenderableManager componentor LightManager component.
-
addEntities
void addEntities(Array<int> entities)
Adds a list of entities to the
Scene.- Parameters:
entities- array containing entities to add to theScene.
-
removeEntity
void removeEntity(int entity)
Removes an Entity from the
Scene.- Parameters:
entity- the Entity to remove from theScene.
-
remove
@Deprecated() void remove(int entity)
-
removeEntities
void removeEntities(Array<int> entities)
Removes a list of entities from the
Scene.This is equivalent to calling remove in a loop.If any of the specified entities do not exist in the scene, they are skipped.- Parameters:
entities- array containing entities to remove from theScene.
-
getRenderableCount
int getRenderableCount()
Returns the number of RenderableManager components in the
Scene.
-
getLightCount
int getLightCount()
Returns the number of LightManager components in the
Scene.
-
hasEntity
boolean hasEntity(int entity)
Returns true if the given entity is in the Scene.
-
getNativeObject
long getNativeObject()
-
-
-
-