Panda3D
Public Member Functions | Static Public Member Functions | List of all members
SceneSetup Class Reference

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

#include "sceneSetup.h"

Inheritance diagram for SceneSetup:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

Public Member Functions

virtual TypeHandle force_init_type ()
 
Cameraget_camera_node () const
 Returns the camera used to render the scene. More...
 
const NodePathget_camera_path () const
 Returns the NodePath to the camera. More...
 
const TransformStateget_camera_transform () const
 Returns the position of the camera relative to the starting node. More...
 
const TransformStateget_cs_transform () const
 Returns the transform from the camera's coordinate system to the GSG's internal coordinate system. More...
 
const TransformStateget_cs_world_transform () const
 Returns the position from the starting node relative to the camera, in the GSG's internal coordinate system. More...
 
const NodePathget_cull_center () const
 Returns the point from which the culling operations will be performed. More...
 
DisplayRegionget_display_region () const
 Returns the display region for the scene. More...
 
const RenderStateget_initial_state () const
 Returns the initial state as set by a previous call to set_initial_state(). More...
 
bool get_inverted () const
 Returns the current setting of the inverted flag. More...
 
const Lensget_lens () const
 Returns the particular Lens used for rendering. More...
 
const NodePathget_scene_root () const
 Returns the root node of the scene. More...
 
virtual TypeHandle get_type () const
 
int get_viewport_height () const
 Returns the height of the viewport (display region) in pixels. More...
 
int get_viewport_width () const
 Returns the width of the viewport (display region) in pixels. More...
 
const TransformStateget_world_transform () const
 Returns the position of the starting node relative to the camera. More...
 
 PT (BoundingVolume) get_cull_bounds() const
 
void set_camera_node (Camera *camera_node)
 Specifies the camera used to render the scene. More...
 
void set_camera_path (const NodePath &camera_path)
 Specifies the NodePath to the camera. More...
 
void set_camera_transform (const TransformState *camera_transform)
 Specifies the position of the camera relative to the starting node. More...
 
void set_cs_transform (const TransformState *cs_transform)
 Specifies the transform from the camera's coordinate system to the GSG's internal coordinate system. More...
 
void set_cs_world_transform (const TransformState *cs_world_transform)
 Specifies the position from the starting node relative to the camera, in the GSG's internal coordinate system. More...
 
void set_display_region (DisplayRegion *display_region)
 Specifies the display region for the scene. More...
 
void set_initial_state (const RenderState *initial_state)
 
void set_inverted (bool inverted)
 Changes the current setting of the inverted flag. More...
 
void set_lens (const Lens *lens)
 Indicates the particular Lens used for rendering. More...
 
void set_scene_root (const NodePath &scene_root)
 Specifies the root node of the scene. More...
 
void set_viewport_size (int width, int height)
 Specifies the size of the viewport (display region), in pixels. More...
 
void set_world_transform (const TransformState *world_transform)
 Specifies the position of the starting node relative to the camera. More...
 
- Public Member Functions inherited from TypedReferenceCount
 TypedReferenceCount (const TypedReferenceCount &copy)
 
void operator= (const TypedReferenceCount &copy)
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from ReferenceCount
int get_ref_count () const
 
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object. More...
 
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More...
 
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More...
 
void ref () const
 Explicitly increments the reference count. More...
 
bool ref_if_nonzero () const
 Atomically increases the reference count of this object if it is not zero. More...
 
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus. More...
 
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More...
 
virtual bool unref () const
 Explicitly decrements the reference count. More...
 
WeakReferenceListweak_ref ()
 Adds the indicated PointerToVoid as a weak reference to this object. More...
 
void weak_unref ()
 Removes the indicated PointerToVoid as a weak reference to this object. More...
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96. More...
 
- Static Public Member Functions inherited from ReferenceCount
static TypeHandle get_class_type ()
 
static void init_type ()
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
 get_type
 
- Public Attributes inherited from ReferenceCount
 get_ref_count
 Returns the current reference count. More...
 

Detailed Description

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

Definition at line 32 of file sceneSetup.h.

Member Function Documentation

◆ get_camera_node()

Camera * SceneSetup::get_camera_node ( ) const
inline

Returns the camera used to render the scene.

Definition at line 115 of file sceneSetup.I.

Referenced by CullTraverserData::apply_transform_and_state(), and CullTraverser::set_scene().

◆ get_camera_path()

const NodePath & SceneSetup::get_camera_path ( ) const
inline

Returns the NodePath to the camera.

Definition at line 99 of file sceneSetup.I.

◆ get_camera_transform()

const TransformState * SceneSetup::get_camera_transform ( ) const
inline

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

Definition at line 214 of file sceneSetup.I.

◆ get_cs_transform()

const TransformState * SceneSetup::get_cs_transform ( ) const
inline

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

Definition at line 250 of file sceneSetup.I.

◆ get_cs_world_transform()

const TransformState * SceneSetup::get_cs_world_transform ( ) const
inline

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

Definition at line 268 of file sceneSetup.I.

◆ get_cull_center()

const NodePath & SceneSetup::get_cull_center ( ) const
inline

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.

Definition at line 161 of file sceneSetup.I.

◆ get_display_region()

DisplayRegion * SceneSetup::get_display_region ( ) const
inline

Returns the display region for the scene.

Definition at line 42 of file sceneSetup.I.

Referenced by GraphicsEngine::do_cull(), DisplayRegionCullCallbackData::upcall(), and DisplayRegionDrawCallbackData::upcall().

◆ get_initial_state()

const RenderState * SceneSetup::get_initial_state ( ) const
inline

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

Definition at line 198 of file sceneSetup.I.

Referenced by CullTraverser::set_scene().

◆ get_inverted()

bool SceneSetup::get_inverted ( ) const
inline

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.

Definition at line 151 of file sceneSetup.I.

◆ get_lens()

const Lens * SceneSetup::get_lens ( ) const
inline

Returns the particular Lens used for rendering.

Definition at line 131 of file sceneSetup.I.

◆ get_scene_root()

const NodePath & SceneSetup::get_scene_root ( ) const
inline

Returns the root node of the scene.

Definition at line 83 of file sceneSetup.I.

◆ get_viewport_height()

int SceneSetup::get_viewport_height ( ) const
inline

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

Definition at line 67 of file sceneSetup.I.

◆ get_viewport_width()

int SceneSetup::get_viewport_width ( ) const
inline

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

Definition at line 59 of file sceneSetup.I.

◆ get_world_transform()

const TransformState * SceneSetup::get_world_transform ( ) const
inline

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

This is the inverse of the camera transform.

Definition at line 232 of file sceneSetup.I.

◆ set_camera_node()

void SceneSetup::set_camera_node ( Camera camera_node)
inline

Specifies the camera used to render the scene.

Definition at line 107 of file sceneSetup.I.

◆ set_camera_path()

void SceneSetup::set_camera_path ( const NodePath camera_path)
inline

Specifies the NodePath to the camera.

Definition at line 91 of file sceneSetup.I.

◆ set_camera_transform()

void SceneSetup::set_camera_transform ( const TransformState camera_transform)
inline

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

Definition at line 206 of file sceneSetup.I.

◆ set_cs_transform()

void SceneSetup::set_cs_transform ( const TransformState cs_transform)
inline

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

Definition at line 241 of file sceneSetup.I.

◆ set_cs_world_transform()

void SceneSetup::set_cs_world_transform ( const TransformState cs_world_transform)
inline

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

Definition at line 259 of file sceneSetup.I.

◆ set_display_region()

void SceneSetup::set_display_region ( DisplayRegion display_region)
inline

Specifies the display region for the scene.

Definition at line 34 of file sceneSetup.I.

◆ set_inverted()

void SceneSetup::set_inverted ( bool  inverted)
inline

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.

Definition at line 141 of file sceneSetup.I.

◆ set_lens()

void SceneSetup::set_lens ( const Lens lens)
inline

Indicates the particular Lens used for rendering.

Definition at line 123 of file sceneSetup.I.

◆ set_scene_root()

void SceneSetup::set_scene_root ( const NodePath scene_root)
inline

Specifies the root node of the scene.

Definition at line 75 of file sceneSetup.I.

◆ set_viewport_size()

void SceneSetup::set_viewport_size ( int  width,
int  height 
)
inline

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

Definition at line 50 of file sceneSetup.I.

◆ set_world_transform()

void SceneSetup::set_world_transform ( const TransformState world_transform)
inline

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

This is the inverse of the camera transform.

Definition at line 223 of file sceneSetup.I.


The documentation for this class was generated from the following files: