SceneSetup

from panda3d.core import SceneSetup
class SceneSetup

Bases:

Bases: TypedReferenceCount

This object holds the camera position, etc., and other general setup information for rendering a particular scene.

Inheritance diagram

Inheritance diagram of SceneSetup

__init__(param0: SceneSetup)
get_camera_node() Camera

Returns the camera used to render the scene.

get_camera_path() NodePath

Returns the NodePath to the camera.

get_camera_transform() TransformState

Returns the position of the camera relative to the starting node.

static get_class_type() TypeHandle
get_cs_transform() TransformState

Returns the transform from the camera’s coordinate system to the GSG’s internal coordinate system.

get_cs_world_transform() TransformState

Returns the position from the starting node relative to the camera, in the GSG’s internal coordinate system.

get_cull_bounds() BoundingVolume

Returns the bounding volume that should be used to perform view-frustum culling (in the space of get_cull_center()). This is normally the current lens’ bounding volume, but it may be overridden with Camera.set_cull_bounds().

get_cull_center() NodePath

Returns the point from which the culling operations will be performed. This is normally the camera, but if camera->set_cull_center() has been specified, it will be that special node instead.

get_display_region() DisplayRegion

Returns the display region for the scene.

get_initial_state() RenderState

Returns the initial state as set by a previous call to set_initial_state().

get_inverted() bool

Returns the current setting of the inverted flag. When this is true, the scene is rendered into the window upside-down, flipped like a mirror along the X axis.

get_lens() Lens

Returns the particular Lens used for rendering.

get_scene_root() NodePath

Returns the root node of the scene.

get_view_frustum() GeometricBoundingVolume

Returns the initial state as set by a previous call to set_initial_state().

get_viewport_height() int

Returns the height of the viewport (display region) in pixels.

get_viewport_width() int

Returns the width of the viewport (display region) in pixels.

get_world_transform() TransformState

Returns the position of the starting node relative to the camera. This is the inverse of the camera transform.

set_camera_node(camera_node: Camera)

Specifies the camera used to render the scene.

set_camera_path(camera_path: NodePath)

Specifies the NodePath to the camera.

set_camera_transform(camera_transform: TransformState)

Specifies the position of the camera relative to the starting node.

set_cs_transform(cs_transform: TransformState)

Specifies the transform from the camera’s coordinate system to the GSG’s internal coordinate system.

set_cs_world_transform(cs_world_transform: TransformState)

Specifies the position from the starting node relative to the camera, in the GSG’s internal coordinate system.

set_display_region(display_region: DisplayRegion)

Specifies the display region for the scene.

set_initial_state(initial_state: RenderState)

Sets the initial state which is applied to all nodes in the scene, as if it were set at the top of the scene graph.

set_inverted(inverted: bool)

Changes the current setting of the inverted flag. When this is true, the scene is rendered into the window upside-down and backwards, that is, inverted as if viewed through a mirror placed on the floor.

set_lens(lens: Lens)

Indicates the particular Lens used for rendering.

set_scene_root(scene_root: NodePath)

Specifies the root node of the scene.

set_view_frustum(view_frustum: GeometricBoundingVolume)

Returns the camera’s cull bounds transformed to world space, or null if view frustum culling is disabled.

set_viewport_size(width: int, height: int)

Specifies the size of the viewport (display region), in pixels.

set_world_transform(world_transform: TransformState)

Specifies the position of the starting node relative to the camera. This is the inverse of the camera transform.