Scene

The root of the scene graph

All children added to this node can be rendered via a renderer.

class pysg.scene.RenderLists

Data object containing lights and geometry list for rendering.

class pysg.scene.Scene(background_color: tuple = (0, 0, 0), ambient_light: tuple = (0.0, 0.0, 0.0), auto_update: bool = True)

The scene object. Must always bee the root node of the scene graph.

Parameters:
  • background_color – The clear color of the scene.
  • ambient_light – Light value which will be applied to all objects in scene.
  • auto_update – If true the object transform will be updated automatically.
  • you have to do it manually. (Otherwise) –
add(node_3d: pysg.node_3d.Node3D) → None

Overrides base class of Node3D to add an objects to render or light list.

Parameters:node_3d (Node3D) – The child node which shall be added to the scene graph.
clear() → None

Clears render lists and scene graph.

remove(node_3d: pysg.node_3d.Node3D) → None

Overrides base class of Node3D to removes an object from render or light list.

Parameters:node_3d (Node3D) – The child node which shall be removed.
render_list

The current render list containing all the 3D objects and lights for rendering.

Returns:A RenderLists object containing all elements for rendering.
Return type:RenderLists