This object holds the camera position, etc., and other general setup information for rendering a particular scene. More...
#include "sceneSetup.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
Camera * | get_camera_node () const |
Returns the camera used to render the scene. More... | |
const NodePath & | get_camera_path () const |
Returns the NodePath to the camera. More... | |
const TransformState * | get_camera_transform () const |
Returns the position of the camera relative to the starting node. More... | |
const TransformState * | get_cs_transform () const |
Returns the transform from the camera's coordinate system to the GSG's internal coordinate system. More... | |
const TransformState * | get_cs_world_transform () const |
Returns the position from the starting node relative to the camera, in the GSG's internal coordinate system. More... | |
const NodePath & | get_cull_center () const |
Returns the point from which the culling operations will be performed. More... | |
DisplayRegion * | get_display_region () const |
Returns the display region for the scene. More... | |
const RenderState * | get_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 Lens * | get_lens () const |
Returns the particular Lens used for rendering. More... | |
const NodePath & | get_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 TransformState * | get_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) |
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. More... | |
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... | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_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... | |
void | operator= (const TypedObject ©) |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_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 | 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... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
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 TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
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 TypeHandle | get_class_type () |
static void | init_type () |
This object holds the camera position, etc., and other general setup information for rendering a particular scene.
Definition at line 35 of file sceneSetup.h.
|
inline |
Returns the camera used to render the scene.
Definition at line 144 of file sceneSetup.I.
Referenced by CullTraverserData::apply_transform_and_state(), FadeLODNode::cull_callback(), LODNode::cull_callback(), and CullTraverser::set_scene().
|
inline |
Returns the NodePath to the camera.
Definition at line 124 of file sceneSetup.I.
|
inline |
Returns the position of the camera relative to the starting node.
Definition at line 271 of file sceneSetup.I.
Referenced by GraphicsStateGuardian::fetch_specified_part().
|
inline |
Returns the transform from the camera's coordinate system to the GSG's internal coordinate system.
Definition at line 317 of file sceneSetup.I.
Referenced by SpeedTreeNode::cull_callback(), and PipeOcclusionCullTraverser::set_scene().
|
inline |
Returns the position from the starting node relative to the camera, in the GSG's internal coordinate system.
Definition at line 341 of file sceneSetup.I.
Referenced by GraphicsStateGuardian::fetch_specified_part().
|
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 203 of file sceneSetup.I.
Referenced by PortalNode::cull_callback(), GraphicsEngine::do_cull(), and PortalClipper::prepare_portal().
|
inline |
Returns the display region for the scene.
Definition at line 50 of file sceneSetup.I.
Referenced by GraphicsEngine::do_cull(), DisplayRegionCullCallbackData::upcall(), and DisplayRegionDrawCallbackData::upcall().
|
inline |
Returns the initial state as set by a previous call to set_initial_state().
Definition at line 249 of file sceneSetup.I.
Referenced by CullTraverser::set_scene().
|
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 190 of file sceneSetup.I.
|
inline |
Returns the particular Lens used for rendering.
Definition at line 164 of file sceneSetup.I.
Referenced by ScissorEffect::cull_callback(), SpeedTreeNode::cull_callback(), PortalClipper::prepare_portal(), and GraphicsStateGuardian::set_scene().
|
inline |
Returns the root node of the scene.
Definition at line 104 of file sceneSetup.I.
Referenced by SpeedTreeNode::cull_callback(), and GraphicsEngine::do_cull().
|
inline |
Returns the height of the viewport (display region) in pixels.
Definition at line 84 of file sceneSetup.I.
|
inline |
Returns the width of the viewport (display region) in pixels.
Definition at line 73 of file sceneSetup.I.
|
inline |
Returns the position of the starting node relative to the camera.
This is the inverse of the camera transform.
Definition at line 295 of file sceneSetup.I.
Referenced by GraphicsStateGuardian::fetch_specified_part().
|
inline |
Specifies the camera used to render the scene.
Definition at line 134 of file sceneSetup.I.
|
inline |
Specifies the NodePath to the camera.
Definition at line 114 of file sceneSetup.I.
|
inline |
Specifies the position of the camera relative to the starting node.
Definition at line 260 of file sceneSetup.I.
|
inline |
Specifies the transform from the camera's coordinate system to the GSG's internal coordinate system.
Definition at line 306 of file sceneSetup.I.
|
inline |
Specifies the position from the starting node relative to the camera, in the GSG's internal coordinate system.
Definition at line 329 of file sceneSetup.I.
|
inline |
Specifies the display region for the scene.
Definition at line 40 of file sceneSetup.I.
|
inline |
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.
Definition at line 238 of file sceneSetup.I.
|
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 177 of file sceneSetup.I.
|
inline |
Indicates the particular Lens used for rendering.
Definition at line 154 of file sceneSetup.I.
|
inline |
Specifies the root node of the scene.
Definition at line 94 of file sceneSetup.I.
|
inline |
Specifies the size of the viewport (display region), in pixels.
Definition at line 61 of file sceneSetup.I.
|
inline |
Specifies the position of the starting node relative to the camera.
This is the inverse of the camera transform.
Definition at line 283 of file sceneSetup.I.