Panda3D
|
This object holds the camera position, etc., and other general setup information for rendering a particular scene. More...
Public Member Functions | |
Camera | getCameraNode () |
Returns the camera used to render the scene. | |
NodePath const | getCameraPath () |
Returns the NodePath to the camera. | |
TransformState const | getCameraTransform () |
Returns the position of the camera relative to the starting node. | |
NodePath const | getCullCenter () |
Returns the point from which the culling operations will be performed. | |
DisplayRegion | getDisplayRegion () |
Returns the display region for the scene. | |
RenderState const | getInitialState () |
Returns the initial state as set by a previous call to set_initial_state(). | |
bool | getInverted () |
Returns the current setting of the inverted flag. | |
Lens const | getLens () |
Returns the particular Lens used for rendering. | |
int | getRefCount () |
Returns the current reference count. | |
NodePath const | getSceneRoot () |
Returns the root node of the scene. | |
int | getViewportHeight () |
Returns the height of the viewport (display region) in pixels. | |
int | getViewportWidth () |
Returns the width of the viewport (display region) in pixels. | |
TransformState const | getWorldTransform () |
Returns the position of the starting node relative to the camera. | |
ref () | |
Explicitly increments the reference count. | |
setCameraNode (Camera camera_node) | |
Specifies the camera used to render the scene. | |
setCameraPath (NodePath const camera_path) | |
Specifies the NodePath to the camera. | |
setCameraTransform (TransformState const camera_transform) | |
Specifies the position of the camera relative to the starting node. | |
setDisplayRegion (DisplayRegion display_region) | |
Specifies the display region for the scene. | |
setInitialState (RenderState const 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. | |
setInverted (bool inverted) | |
Changes the current setting of the inverted flag. | |
setLens (Lens const lens) | |
Indicates the particular Lens used for rendering. | |
setSceneRoot (NodePath const scene_root) | |
Specifies the root node of the scene. | |
setViewportSize (int width, int height) | |
Specifies the size of the viewport (display region), in pixels. | |
setWorldTransform (TransformState const world_transform) | |
Specifies the position of the starting node relative to the camera. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
This object holds the camera position, etc., and other general setup information for rendering a particular scene.
Camera getCameraNode | ( | ) |
Returns the camera used to render the scene.
TransformState const getCameraTransform | ( | ) |
Returns the position of the camera relative to the starting node.
static TypeHandle getClassType | ( | ) | [static, inherited] |
Reimplemented in NodeReferenceCount, TypedReferenceCount, VirtualFile, VirtualFileComposite, VirtualFileMount, VirtualFileMountMultifile, VirtualFileMountSystem, VirtualFileSimple, HTTPChannel, VirtualFileHTTP, VirtualFileMountHTTP, VrpnClient, ClientBase, PGItem, PandaNode, PGButton, PGTop, PGEntry, PGMouseWatcherBackground, MouseWatcherRegion, PGMouseWatcherParameter, TypedWritableReferenceCount, PGVirtualFrame, PGSliderBar, PGScrollFrame, PGWaitBar, FilterProperties, AudioSound, AudioManager, BamCacheRecord, CallbackObject, CachedTypedWritableReferenceCount, ClockObject, CopyOnWriteObject, NodeCachedReferenceCount, PythonCallbackObject, LerpFunctor, IntLerpFunctor, FloatLerpFunctor, SimpleLerpFunctorPoint2, SimpleLerpFunctorPoint3, SimpleLerpFunctorPoint4, SimpleLerpFunctorVBase2, SimpleLerpFunctorVBase3, SimpleLerpFunctorVBase4, SimpleLerpFunctorVec2, SimpleLerpFunctorVec3, SimpleLerpFunctorVec4, IntQueryLerpFunctor, FloatQueryLerpFunctor, SimpleQueryLerpFunctorPoint2, SimpleQueryLerpFunctorPoint3, SimpleQueryLerpFunctorPoint4, SimpleQueryLerpFunctorVBase2, SimpleQueryLerpFunctorVBase3, SimpleQueryLerpFunctorVBase4, SimpleQueryLerpFunctorVec2, SimpleQueryLerpFunctorVec3, SimpleQueryLerpFunctorVec4, MultiLerpFunctor, LerpBlendType, EaseInBlendType, EaseOutBlendType, EaseInOutBlendType, NoBlendType, Lerp, AutonomousLerp, ButtonThrower, DataNode, MouseInterfaceNode, DriveInterface, MouseSubregion, MouseWatcherGroup, MouseWatcher, Trackball, Transform2SG, TextFont, DynamicTextPage, Texture, DynamicTextFont, GeomTextGlyph, Geom, StaticTextFont, TextNode, ParametricCurve, CubicCurveseg, PiecewiseCurve, HermiteCurve, NurbsCurve, RopeNode, SheetNode, BoundingVolume, GeometricBoundingVolume, FiniteBoundingVolume, BoundingBox, BoundingHexahedron, BoundingLine, BoundingPlane, BoundingSphere, OmniBoundingVolume, DisplayRegionBase, GraphicsOutputBase, GraphicsStateGuardianBase, InternalName, GeomVertexArrayFormat, GeomVertexFormat, GeomVertexArrayData, GeomVertexArrayDataHandle, VertexTransform, TransformTable, TransformBlendTable, VertexSlider, SliderTable, GeomVertexData, AnimateVerticesRequest, AsyncTask, GeomPrimitive, TextureStage, GeomLines, GeomLinestrips, GeomPoints, GeomTriangles, GeomTrifans, GeomTristrips, Material, Lens, OrthographicLens, MatrixLens, PerspectiveLens, Shader, TextureReloadRequest, UserVertexSlider, UserVertexTransform, VideoTexture, AsyncTaskBase, AsyncTaskChain, AsyncTaskManager, AsyncTaskPause, AsyncTaskSequence, EventStoreValueBase, EventStoreTypedRefCount, Event, PointerEventList, PythonTask, Thread, ExternalThread, MainThread, PythonThread, WindowHandle.OSHandle, WindowHandle, OSHandle, DisplayRegion, GraphicsDevice, GraphicsPipe, GraphicsStateGuardian, StereoDisplayRegion, GraphicsOutput, GraphicsBuffer, GraphicsWindow, NativeWindowHandle, ParasiteBuffer, AnalogNode, ButtonNode, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, CollisionHandler, CollisionSolid, CollisionNode, CollisionEntry, CollisionHandlerEvent, CollisionHandlerHighestEvent, CollisionHandlerPhysical, CollisionHandlerFloor, CollisionHandlerGravity, CollisionHandlerPusher, CollisionHandlerFluidPusher, CollisionHandlerQueue, CollisionDSSolid, CollisionBox, CollisionSphere, CollisionInvSphere, CollisionRay, CollisionLine, CollisionPlane, CollisionPolygon, CollisionParabola, CollisionFloorMesh, CollisionSegment, CollisionTube, CollisionVisualizer, CharacterJoint, MovingPartMatrix, CharacterSlider, MovingPartScalar, CharacterVertexSlider, JointVertexTransform, Character, PartBundleNode, CharacterJointBundle, PartBundle, CharacterJointEffect, RenderEffect, AnimGroup, AnimBundle, AnimBundleNode, PartGroup, AnimControl, AnimChannelBase, AnimChannelACMatrixSwitchType, AnimChannelACScalarSwitchType, AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, AnimChannelScalarDynamic, AnimChannelScalarTable, AnimPreloadTable, BindAnimRequest, ModelLoadRequest, MovingPartBase, MovingPartACMatrixSwitchType, MovingPartACScalarSwitchType, FFMpegTexture, FrameRateMeter, SceneGraphAnalyzerMeter, MovieTexture, NodeVertexTransform, RigidBodyCombiner, PipeOcclusionCullTraverser, CullTraverser, MovieVideo, MovieVideoCursor, MovieAudio, MovieAudioCursor, InkblotVideo, InkblotVideoCursor, FfmpegVideo, FfmpegVideoCursor, FfmpegAudio, FfmpegAudioCursor, MicrophoneAudio, UserDataAudio, UserDataAudioCursor, TransformState, RenderAttrib, RenderModeAttrib, TexMatrixAttrib, RenderState, AlphaTestAttrib, AntialiasAttrib, RenderEffects, TransparencyAttrib, AudioVolumeAttrib, AuxBitplaneAttrib, AuxSceneData, BillboardEffect, LensNode, Camera, PlaneNode, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBinAttrib, CullFaceAttrib, GeomNode, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, EventStorePandaNode, Fog, FogAttrib, Light, LightAttrib, LightRampAttrib, PandaLoader, MaterialAttrib, ModelFlattenRequest, ModelNode, ModelRoot, TextureAttrib, TexGenAttrib, PolylightNode, PolylightEffect, ShaderInput, ShaderAttrib, ShowBoundsEffect, TexProjectorEffect, ScissorEffect, PosLerpFunctor, HprLerpFunctor, ScaleLerpFunctor, ColorLerpFunctor, PosHprLerpFunctor, HprScaleLerpFunctor, PosHprScaleLerpFunctor, ColorScaleLerpFunctor, PortalNode, RescaleNormalAttrib, ScissorAttrib, ShadeModelAttrib, StencilAttrib, UvScrollNode, LightNode, AmbientLight, CallbackNode, LightLensNode, DirectionalLight, LODNode, FadeLODNode, PointLight, SelectiveChildNode, SequenceNode, Spotlight, SwitchNode, RecorderBase, MouseRecorder, RecorderController, and SocketStreamRecorder.
NodePath const getCullCenter | ( | ) |
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.
DisplayRegion getDisplayRegion | ( | ) |
Returns the display region for the scene.
RenderState const getInitialState | ( | ) |
Returns the initial state as set by a previous call to set_initial_state().
bool getInverted | ( | ) |
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.
int getRefCount | ( | ) | [inherited] |
Returns the current reference count.
NodePath const getSceneRoot | ( | ) |
Returns the root node of the scene.
int getViewportHeight | ( | ) |
Returns the height of the viewport (display region) in pixels.
int getViewportWidth | ( | ) |
Returns the width of the viewport (display region) in pixels.
TransformState const getWorldTransform | ( | ) |
Returns the position of the starting node relative to the camera.
This is the inverse of the camera transform.
ref | ( | ) | [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.
setCameraNode | ( | Camera | camera_node | ) |
Specifies the camera used to render the scene.
setCameraTransform | ( | TransformState const | camera_transform | ) |
Specifies the position of the camera relative to the starting node.
setDisplayRegion | ( | DisplayRegion | display_region | ) |
Specifies the display region for the scene.
setInitialState | ( | RenderState const | 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.
setInverted | ( | bool | inverted | ) |
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.
setSceneRoot | ( | NodePath const | scene_root | ) |
Specifies the root node of the scene.
Specifies the size of the viewport (display region), in pixels.
setWorldTransform | ( | TransformState const | world_transform | ) |
Specifies the position of the starting node relative to the camera.
This is the inverse of the camera transform.
bool testRefCountIntegrity | ( | ) | [inherited] |
Does some easy checks to make sure that the reference count isn't completely bogus.
Returns true if ok, false otherwise.
Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.
bool testRefCountNonzero | ( | ) | [inherited] |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
Returns true if ok, false otherwise.
bool unref | ( | ) | [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.) 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.
Reimplemented in GeomVertexArrayFormat, and GeomVertexFormat.