Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File 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:

ReferenceCount List of all members.

Public Member Functions

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

const NodePathget_scene_root () const
 Returns the root node of the scene.

void set_camera_path (const NodePath &camera_path)
 Specifies the NodePath to the camera.

const NodePathget_camera_path () const
 Returns the NodePath to the camera.

void set_camera_node (const Camera *camera_node)
 Specifies the camera used to render the scene.

const Cameraget_camera_node () const
 Returns the camera used to render the scene.

void set_lens (const Lens *lens)
 Indicates the particular Lens used for rendering.

const Lensget_lens () const
 Returns the particular Lens used for rendering.

void set_camera_transform (const TransformState *camera_transform)
 Specifies the position of the camera relative to the starting node, without any compensating coordinate-system transforms that might have been introduced for the purposes of rendering.

const TransformStateget_camera_transform () const
 Returns the position of the camera relative to the starting node, without any compensating coordinate-system transforms that might have been introduced for the purposes of rendering.

void set_world_transform (const TransformState *world_transform)
 Specifies the position of the starting node relative to the camera.

const TransformStateget_world_transform () const
 Returns the position of the starting node relative to the camera.

void set_cs_transform (const TransformState *cs_transform)
 Specifies the pretransformation to apply to the world transform to produce the appropriate transformation for rendering.

const TransformStateget_cs_transform () const
 Returns the pretransformation to apply to the world transform to produce the appropriate transformation for rendering.

const TransformStateget_render_transform () const
 Returns the position of the starting node relative to the camera, pretransformed as appropriate for rendering.

int get_ref_count () const
 Returns the current reference count.

int ref () const
 Explicitly increments the reference count.

int unref () const
 Explicitly decrements the reference count.

void test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.


Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Private Attributes

NodePath _scene_root
NodePath _camera_path
ConstPointerTo< Camera_camera_node
ConstPointerTo< Lens_lens
ConstPointerTo< TransformState_camera_transform
ConstPointerTo< TransformState_world_transform
ConstPointerTo< TransformState_cs_transform
ConstPointerTo< TransformState_render_transform

Detailed Description

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

Definition at line 45 of file sceneSetup.h.


Constructor & Destructor Documentation

SceneSetup::SceneSetup  )  [inline]
 

Definition at line 32 of file sceneSetup.I.

References _scene_root, and INLINE.


Member Function Documentation

const Camera * SceneSetup::get_camera_node  )  const [inline]
 

Returns the camera used to render the scene.

Definition at line 112 of file sceneSetup.I.

References _camera_transform, and INLINE.

const NodePath & SceneSetup::get_camera_path  )  const [inline]
 

Returns the NodePath to the camera.

Definition at line 86 of file sceneSetup.I.

References _camera_node, and INLINE.

const TransformState * SceneSetup::get_camera_transform  )  const [inline]
 

Returns the position of the camera relative to the starting node, without any compensating coordinate-system transforms that might have been introduced for the purposes of rendering.

Definition at line 176 of file sceneSetup.I.

References _cs_transform, and INLINE.

TypeHandle ReferenceCount::get_class_type void   )  [inline, static, inherited]
 

Reimplemented in AnimBundle, AnimBundleNode, AnimChannel< SwitchType >, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimControl, AnimGroup, MovingPart< SwitchType >, MovingPartBase, MovingPartMatrix, MovingPartScalar, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointBundle, CharacterSlider, ComputedVertices, CollisionEntry, CollisionHandler, CollisionHandlerEvent, CollisionHandlerFloor, CollisionHandlerPhysical, CollisionHandlerPusher, CollisionHandlerQueue, CollisionNode, CollisionPlane, CollisionPolygon, CollisionRay, CollisionSegment, CollisionSolid, CollisionSphere, CRGraphicsStateGuardian, CRSavedFrameBuffer, AnalogNode, ButtonNode, ClientAnalogDevice, ClientBase, ClientButtonDevice, ClientDevice, ClientDialDevice, ClientTrackerDevice, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, DataNode, GraphicsChannel, GraphicsLayer, GraphicsPipe, GraphicsStateGuardian, GraphicsWindow, HardwareChannel, SavedFrameBuffer, CylindricalLens, FisheyeLens, ProjectionScreen, PSphereLens, DXGraphicsStateGuardian7, DXSavedFrameBuffer7, wdxGraphicsPipe7, wdxGraphicsWindow7, DXGraphicsStateGuardian8, DXSavedFrameBuffer8, wdxGraphicsPipe8, wdxGraphicsWindow8, EggAnimData, EggBin, EggBinMaker, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggGroupUniquifier, EggMaterial, EggNamedObject, EggNameUniquifier, EggNode, EggNurbsCurve, EggNurbsSurface, EggObject, EggPoint, EggPolygon, EggPoolUniquifier, EggPrimitive, EggSAnimData, EggSurface, EggSwitchCondition, EggSwitchConditionDistance, EggTable, EggTexture, EggVertex, EggVertexPool, EggXfmAnimData, EggXfmSAnim, Event, EventStoreValueBase, EventStoreValue< Type >, RefCountProxy< Base >, RefCountObj< Base >, ThatThingie, ThisThingie, WhatAThingie, Thread, TypedReferenceCount, VirtualFile, VirtualFileComposite, VirtualFileSimple, WindowFramework, GLGraphicsStateGuardian, GLSavedFrameBuffer, glxGraphicsPipe, glxGraphicsStateGuardian, glxGraphicsWindow, dDrawable, Geom, GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, GeomTristrip, ImageBuffer, Lens, Material, MatrixLens, OrthographicLens, PerspectiveLens, PixelBuffer, Texture, GraphicsStateGuardianBase, Lerp, AutonomousLerp, LerpBlendType, EaseInBlendType, EaseOutBlendType, EaseInOutBlendType, NoBlendType, LerpFunctor, SimpleLerpFunctor< value >, SimpleQueryLerpFunctor< value >, MultiLerpFunctor, BoundingHexahedron, BoundingLine, BoundingSphere, BoundingVolume, FiniteBoundingVolume, GeometricBoundingVolume, OmniBoundingVolume, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, NurbsPPCurve, ParametricCurve, PiecewiseCurve, RopeNode, AlphaTestAttrib, AmbientLight, BillboardEffect, Camera, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBin, CullBinAttrib, CullBinBackToFront, CullBinFixed, CullBinFrontToBack, CullBinUnsorted, CullFaceAttrib, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, DirectionalLight, Fog, FogAttrib, GeomNode, LensNode, Light, LightAttrib, LightLensNode, LightNode, LODNode, MaterialAttrib, ModelNode, ModelRoot, NodePathComponent, PosLerpFunctor, HprLerpFunctor, ScaleLerpFunctor, ColorLerpFunctor, PosHprLerpFunctor, HprScaleLerpFunctor, PosHprScaleLerpFunctor, ColorScaleLerpFunctor, PandaNode, PlaneNode, PointLight, RenderAttrib, RenderEffect, RenderEffects, RenderModeAttrib, RenderState, SelectiveChildNode, SequenceNode, ShowBoundsEffect, Spotlight, SwitchNode, TexMatrixAttrib, TextureApplyAttrib, TextureAttrib, TransformState, EventStoreTransform, TransparencyAttrib, PGButton, PGEntry, PGItem, PGMouseWatcherBackground, PGMouseWatcherGroup, PGMouseWatcherParameter, PGMouseWatcherRegion, PGTop, PGWaitBar, ActorNode, AngularForce, AngularVectorForce, BaseForce, ForceNode, LinearCylinderVortexForce, LinearDistanceForce, LinearForce, LinearFrictionForce, LinearJitterForce, LinearNoiseForce, LinearRandomForce, LinearSinkForce, LinearSourceForce, LinearUserDefinedForce, LinearVectorForce, Physical, PhysicalNode, PhysicsObject, BamReaderParam, ButtonEventList, FactoryParam, Person, Parent, Child, TypedWritableReferenceCount, WritableParam, RIBGraphicsWindow, RIBGraphicsStateGuardian, CasterShader, OutlineShader, PlanarReflector, ProjtexShader, ProjtexShadower, Shader, FrustumShader, SpheretexHighlighter, SpheretexReflector, SpheretexShader, SpotlightShader, TextFont, TextNode, ButtonThrower, DriveInterface, MouseWatcher, MouseWatcherGroup, MouseWatcherRegion, Trackball, Transform2SG, VrpnAnalogDevice, VrpnButtonDevice, VrpnClient, VrpnDialDevice, VrpnTrackerDevice, wcrGraphicsWindow, wglGraphicsPipe, wglGraphicsStateGuardian, wglGraphicsWindow, WinGraphicsPipe, WinGraphicsWindow, AnimChannel< ACScalarSwitchType >, AnimChannel< ACMatrixSwitchType >, MovingPart< ACScalarSwitchType >, MovingPart< ACMatrixSwitchType >, SimpleLerpFunctor< LPoint3f >, SimpleLerpFunctor< LVecBase3f >, and SimpleLerpFunctor< LVecBase4f >.

Definition at line 66 of file referenceCount.h.

const TransformState * SceneSetup::get_cs_transform  )  const [inline]
 

Returns the pretransformation to apply to the world transform to produce the appropriate transformation for rendering.

Definition at line 248 of file sceneSetup.I.

const Lens * SceneSetup::get_lens  )  const [inline]
 

Returns the particular Lens used for rendering.

Definition at line 138 of file sceneSetup.I.

References _cs_transform, _render_transform, _world_transform, and INLINE.

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

Returns the current reference count.

Definition at line 183 of file referenceCount.I.

Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture().

const TransformState * SceneSetup::get_render_transform  )  const [inline]
 

Returns the position of the starting node relative to the camera, pretransformed as appropriate for rendering.

This is the same as the world transform, with a possible coordinate-system conversion applied.

Note that this value is always the position of the starting node, not the current node, even if it is sampled during a traversal. To get the render transform of the current node check in the current CullTraverserData.

Definition at line 279 of file sceneSetup.I.

const NodePath & SceneSetup::get_scene_root  )  const [inline]
 

Returns the root node of the scene.

Definition at line 60 of file sceneSetup.I.

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 211 of file sceneSetup.I.

void ReferenceCount::init_type void   )  [inline, static, inherited]
 

Reimplemented in AnimBundle, AnimBundleNode, AnimChannel< SwitchType >, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimControl, AnimGroup, MovingPart< SwitchType >, MovingPartBase, MovingPartMatrix, MovingPartScalar, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointBundle, CharacterSlider, ComputedVertices, CollisionEntry, CollisionHandler, CollisionHandlerEvent, CollisionHandlerFloor, CollisionHandlerPhysical, CollisionHandlerPusher, CollisionHandlerQueue, CollisionNode, CollisionPlane, CollisionPolygon, CollisionRay, CollisionSegment, CollisionSolid, CollisionSphere, CRGraphicsStateGuardian, CRSavedFrameBuffer, AnalogNode, ButtonNode, ClientAnalogDevice, ClientBase, ClientButtonDevice, ClientDevice, ClientDialDevice, ClientTrackerDevice, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, DataNode, GraphicsChannel, GraphicsLayer, GraphicsPipe, GraphicsStateGuardian, GraphicsWindow, HardwareChannel, SavedFrameBuffer, CylindricalLens, FisheyeLens, ProjectionScreen, PSphereLens, DXGraphicsStateGuardian7, DXSavedFrameBuffer7, wdxGraphicsPipe7, wdxGraphicsWindow7, DXGraphicsStateGuardian8, DXSavedFrameBuffer8, wdxGraphicsPipe8, wdxGraphicsWindow8, EggAnimData, EggBin, EggBinMaker, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggGroupUniquifier, EggMaterial, EggNamedObject, EggNameUniquifier, EggNode, EggNurbsCurve, EggNurbsSurface, EggObject, EggPoint, EggPolygon, EggPoolUniquifier, EggPrimitive, EggSAnimData, EggSurface, EggSwitchCondition, EggSwitchConditionDistance, EggTable, EggTexture, EggVertex, EggVertexPool, EggXfmAnimData, EggXfmSAnim, Event, EventStoreValueBase, RefCountProxy< Base >, RefCountObj< Base >, ThatThingie, ThisThingie, WhatAThingie, Thread, TypedReferenceCount, VirtualFile, VirtualFileComposite, VirtualFileSimple, WindowFramework, GLGraphicsStateGuardian, GLSavedFrameBuffer, glxGraphicsPipe, glxGraphicsStateGuardian, glxGraphicsWindow, dDrawable, Geom, GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, GeomTristrip, ImageBuffer, Lens, Material, MatrixLens, OrthographicLens, PerspectiveLens, PixelBuffer, Texture, GraphicsStateGuardianBase, Lerp, AutonomousLerp, LerpBlendType, EaseInBlendType, EaseOutBlendType, EaseInOutBlendType, NoBlendType, LerpFunctor, SimpleLerpFunctor< value >, SimpleQueryLerpFunctor< value >, MultiLerpFunctor, BoundingHexahedron, BoundingLine, BoundingSphere, BoundingVolume, FiniteBoundingVolume, GeometricBoundingVolume, OmniBoundingVolume, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, NurbsPPCurve, ParametricCurve, PiecewiseCurve, RopeNode, AlphaTestAttrib, AmbientLight, BillboardEffect, Camera, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBin, CullBinAttrib, CullBinBackToFront, CullBinFixed, CullBinFrontToBack, CullBinUnsorted, CullFaceAttrib, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, DirectionalLight, Fog, FogAttrib, GeomNode, LensNode, Light, LightAttrib, LightLensNode, LightNode, LODNode, MaterialAttrib, ModelNode, ModelRoot, NodePathComponent, PosLerpFunctor, HprLerpFunctor, ScaleLerpFunctor, ColorLerpFunctor, PosHprLerpFunctor, HprScaleLerpFunctor, PosHprScaleLerpFunctor, ColorScaleLerpFunctor, PandaNode, PlaneNode, PointLight, RenderAttrib, RenderEffect, RenderEffects, RenderModeAttrib, RenderState, SelectiveChildNode, SequenceNode, ShowBoundsEffect, Spotlight, SwitchNode, TexMatrixAttrib, TextureApplyAttrib, TextureAttrib, TransformState, EventStoreTransform, TransparencyAttrib, PGButton, PGEntry, PGItem, PGMouseWatcherBackground, PGMouseWatcherGroup, PGMouseWatcherParameter, PGMouseWatcherRegion, PGTop, PGWaitBar, ActorNode, AngularForce, AngularVectorForce, BaseForce, ForceNode, LinearCylinderVortexForce, LinearDistanceForce, LinearForce, LinearFrictionForce, LinearJitterForce, LinearNoiseForce, LinearRandomForce, LinearSinkForce, LinearSourceForce, LinearUserDefinedForce, LinearVectorForce, Physical, PhysicalNode, PhysicsObject, BamReaderParam, ButtonEventList, FactoryParam, Person, Parent, Child, TypedWritableReferenceCount, WritableParam, RIBGraphicsWindow, RIBGraphicsStateGuardian, CasterShader, OutlineShader, PlanarReflector, ProjtexShader, ProjtexShadower, Shader, FrustumShader, SpheretexHighlighter, SpheretexReflector, SpheretexShader, SpotlightShader, TextFont, TextNode, ButtonThrower, DriveInterface, MouseWatcher, MouseWatcherGroup, MouseWatcherRegion, Trackball, Transform2SG, VrpnAnalogDevice, VrpnButtonDevice, VrpnClient, VrpnDialDevice, VrpnTrackerDevice, wcrGraphicsWindow, wglGraphicsPipe, wglGraphicsStateGuardian, wglGraphicsWindow, WinGraphicsPipe, WinGraphicsWindow, AnimChannel< ACScalarSwitchType >, AnimChannel< ACMatrixSwitchType >, MovingPart< ACScalarSwitchType >, MovingPart< ACMatrixSwitchType >, SimpleLerpFunctor< LPoint3f >, SimpleLerpFunctor< LVecBase3f >, and SimpleLerpFunctor< LVecBase4f >.

Definition at line 69 of file referenceCount.h.

References INLINE.

Referenced by ConfigureFn(), and ThatThingie::get_class_type().

int ReferenceCount::ref  )  const [inline, inherited]
 

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.

The return value is the new reference count.

Definition at line 225 of file referenceCount.I.

Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering().

void SceneSetup::set_camera_node const Camera camera_node  )  [inline]
 

Specifies the camera used to render the scene.

Definition at line 99 of file sceneSetup.I.

References _lens.

void SceneSetup::set_camera_path const NodePath camera_path  )  [inline]
 

Specifies the NodePath to the camera.

Definition at line 73 of file sceneSetup.I.

References _camera_node, and INLINE.

void SceneSetup::set_camera_transform const TransformState camera_transform  )  [inline]
 

Specifies the position of the camera relative to the starting node, without any compensating coordinate-system transforms that might have been introduced for the purposes of rendering.

Definition at line 157 of file sceneSetup.I.

References _world_transform, and INLINE.

void SceneSetup::set_cs_transform const TransformState cs_transform  )  [inline]
 

Specifies the pretransformation to apply to the world transform to produce the appropriate transformation for rendering.

This is usually the appropriate coordinate-system conversion for the current GSG.

Definition at line 230 of file sceneSetup.I.

void SceneSetup::set_lens const Lens lens  )  [inline]
 

Indicates the particular Lens used for rendering.

Definition at line 125 of file sceneSetup.I.

References _camera_transform, and INLINE.

void SceneSetup::set_scene_root const NodePath scene_root  )  [inline]
 

Specifies the root node of the scene.

Definition at line 47 of file sceneSetup.I.

References _scene_root, and INLINE.

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 193 of file sceneSetup.I.

References _render_transform, and INLINE.

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

Does some easy checks to make sure that the reference count isn't completely bogus.

Definition at line 328 of file referenceCount.I.

References INLINE.

Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount().

int ReferenceCount::unref  )  const [inline, inherited]
 

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 the new reference count.

Definition at line 293 of file referenceCount.I.

References INLINE.

Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds().


Member Data Documentation

ConstPointerTo< Camera > SceneSetup::_camera_node [private]
 

Definition at line 75 of file sceneSetup.h.

Referenced by get_camera_path(), and set_camera_path().

NodePath SceneSetup::_camera_path [private]
 

Definition at line 74 of file sceneSetup.h.

ConstPointerTo< TransformState > SceneSetup::_camera_transform [private]
 

Definition at line 77 of file sceneSetup.h.

Referenced by get_camera_node(), and set_lens().

ConstPointerTo< TransformState > SceneSetup::_cs_transform [private]
 

Definition at line 79 of file sceneSetup.h.

Referenced by get_camera_transform(), and get_lens().

ConstPointerTo< Lens > SceneSetup::_lens [private]
 

Definition at line 76 of file sceneSetup.h.

Referenced by set_camera_node().

ConstPointerTo< TransformState > SceneSetup::_render_transform [private]
 

Definition at line 80 of file sceneSetup.h.

Referenced by get_lens(), and set_world_transform().

NodePath SceneSetup::_scene_root [private]
 

Definition at line 73 of file sceneSetup.h.

Referenced by SceneSetup(), and set_scene_root().

ConstPointerTo< TransformState > SceneSetup::_world_transform [private]
 

Definition at line 78 of file sceneSetup.h.

Referenced by get_lens(), and set_camera_transform().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:54:58 2003 for Panda by doxygen1.3