# panda3d.core.SceneSetup¶

from panda3d.core import SceneSetup

class SceneSetup

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

Inheritance diagram

__init__(param0: SceneSetup) → None
getCameraNode() → Camera

Returns the camera used to render the scene.

Return type

Camera

getCameraPath() → NodePath

Returns the NodePath to the camera.

Return type

NodePath

getCameraTransform() → TransformState

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

Return type

TransformState

static getClassType() → TypeHandle
Return type

TypeHandle

getCsTransform() → TransformState

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

Return type

TransformState

getCsWorldTransform() → TransformState

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

Return type

TransformState

getCullBounds() → BoundingVolume

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

Return type

BoundingVolume

getCullCenter() → 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.

Return type

NodePath

getDisplayRegion() → DisplayRegion

Returns the display region for the scene.

Return type

DisplayRegion

getInitialState() → RenderState

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

Return type

RenderState

getInverted() → 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.

getLens() → Lens

Returns the particular Lens used for rendering.

Return type

Lens

getSceneRoot() → NodePath

Returns the root node of the scene.

Return type

NodePath

getViewportHeight() → int

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

getViewportWidth() → int

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

getWorldTransform() → TransformState

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

Return type

TransformState

setCameraNode(camera_node: Camera) → None

Specifies the camera used to render the scene.

setCameraPath(camera_path: NodePath) → None

Specifies the NodePath to the camera.

setCameraTransform(camera_transform: TransformState) → None

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

setCsTransform(cs_transform: TransformState) → None

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

setCsWorldTransform(cs_world_transform: TransformState) → None

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

setDisplayRegion(display_region: DisplayRegion) → None

Specifies the display region for the scene.

setInitialState(initial_state: RenderState) → None

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.

setInverted(inverted: bool) → None

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.

setLens(lens: Lens) → None

Indicates the particular Lens used for rendering.

setSceneRoot(scene_root: NodePath) → None

Specifies the root node of the scene.

setViewportSize(width: int, height: int) → None

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

setWorldTransform(world_transform: TransformState) → None

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