# SceneSetup

from pandac.PandaModules import SceneSetup

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

## Inheritance:

SceneSetup: ReferenceCount
ReferenceCount: MemoryBase
MemoryBase:

## Methods of SceneSetup:

getCameraNode
getCameraPath
getCameraTransform
getCullCenter
getDisplayRegion
getInitialState
getInverted
getLens
getSceneRoot
getViewportHeight
getViewportWidth
getWorldTransform
setCameraNode
setCameraPath
setCameraTransform
setDisplayRegion
setInitialState
setInverted
setLens
setSceneRoot
setViewportSize
setWorldTransform

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

getCameraNode Camera *SceneSetup::get_camera_node(void) const; Description: Returns the camera used to render the scene.

getCameraPath NodePath const &SceneSetup::get_camera_path(void) const; Description: Returns the NodePath to the camera.

getCameraTransform TransformState const *SceneSetup::get_camera_transform(void) const; Description: Returns the position of the camera relative to the starting node.

getCullCenter NodePath const &SceneSetup::get_cull_center(void) const; Description: 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.

getDisplayRegion DisplayRegion *SceneSetup::get_display_region(void) const; Description: Returns the display region for the scene.

getInitialState RenderState const *SceneSetup::get_initial_state(void) const; Description: Returns the initial state as set by a previous call to set_initial_state().

getInverted bool SceneSetup::get_inverted(void) const; Description: 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 const *SceneSetup::get_lens(void) const; Description: Returns the particular Lens used for rendering.

getSceneRoot NodePath const &SceneSetup::get_scene_root(void) const; Description: Returns the root node of the scene.

getViewportHeight int SceneSetup::get_viewport_height(void) const; Description: Returns the height of the viewport (display region) in pixels.

getViewportWidth int SceneSetup::get_viewport_width(void) const; Description: Returns the width of the viewport (display region) in pixels.

getWorldTransform TransformState const *SceneSetup::get_world_transform(void) const; Description: Returns the position of the starting node relative to the camera. This is the inverse of the camera transform.

setCameraNode void SceneSetup::set_camera_node(Camera *camera_node); Description: Specifies the camera used to render the scene.

setCameraPath void SceneSetup::set_camera_path(NodePath const &camera_path); Description: Specifies the NodePath to the camera.

setCameraTransform void SceneSetup::set_camera_transform(TransformState const *camera_transform); Description: Specifies the position of the camera relative to the starting node.

setDisplayRegion void SceneSetup::set_display_region(DisplayRegion *display_region); Description: Specifies the display region for the scene.

setInitialState void SceneSetup::set_initial_state(RenderState const *initial_state); Description: 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 void SceneSetup::set_inverted(bool inverted); Description: 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 void SceneSetup::set_lens(Lens const *lens); Description: Indicates the particular Lens used for rendering.

setSceneRoot void SceneSetup::set_scene_root(NodePath const &scene_root); Description: Specifies the root node of the scene.

setViewportSize void SceneSetup::set_viewport_size(int width, int height); Description: Specifies the size of the viewport (display region), in pixels.

setWorldTransform void SceneSetup::set_world_transform(TransformState const *world_transform); Description: Specifies the position of the starting node relative to the camera. This is the inverse of the camera transform.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.