Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

AuxSceneData Class Reference

This is a base class for a generic data structure that can be attached per-instance to the camera, to store per-instance data that must be preserved over multiple frames. More...

#include "auxSceneData.h"

Inheritance diagram for AuxSceneData:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase FadeLODNodeData

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
double get_duration () const
 Returns the minimum length in time, in seconds, to keep this AuxSceneData object around in the scene graph after the last time it was rendered.
double get_expiration_time () const
 Returns the frame_time at which this AuxSceneData object is currently scheduled to be removed from the scene graph.
double get_last_render_time () const
 Returns the last time this object was used during traversal (according to set_last_render_time()).
virtual TypeHandle get_type () const
virtual void output (ostream &out) const
void set_duration (double duration)
 Specifies the minimum length in time, in seconds, to keep this AuxSceneData object around in the scene graph after the last time it was rendered.
void set_last_render_time (double render_time)
 Should be called with the current frame_time each time the AuxSceneData is used during traversal.
virtual void write (ostream &out, int indent_level=0) const

Static Public Member Functions

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.

Protected Member Functions

 AuxSceneData (double duration=0.0)
 This is protected, since you normally don't want to create a plain AuxSceneData object; instead, create an instance of a derived class that actually has some useful data in it.

Protected Attributes

double _duration
double _last_render_time

Detailed Description

This is a base class for a generic data structure that can be attached per-instance to the camera, to store per-instance data that must be preserved over multiple frames.

In particular, this is used to implement the FadeLODNode, which must remember during traversal at what point it is in the fade, separately for each instance and for each camera.

Definition at line 35 of file auxSceneData.h.


Constructor & Destructor Documentation

AuxSceneData::AuxSceneData ( double  duration = 0.0) [inline, protected]

This is protected, since you normally don't want to create a plain AuxSceneData object; instead, create an instance of a derived class that actually has some useful data in it.

Definition at line 24 of file auxSceneData.I.


Member Function Documentation

double AuxSceneData::get_duration ( ) const [inline]

Returns the minimum length in time, in seconds, to keep this AuxSceneData object around in the scene graph after the last time it was rendered.

Definition at line 50 of file auxSceneData.I.

double AuxSceneData::get_expiration_time ( ) const [inline]

Returns the frame_time at which this AuxSceneData object is currently scheduled to be removed from the scene graph.

Definition at line 84 of file auxSceneData.I.

Referenced by FadeLODNode::cull_callback().

double AuxSceneData::get_last_render_time ( ) const [inline]

Returns the last time this object was used during traversal (according to set_last_render_time()).

Definition at line 72 of file auxSceneData.I.

Referenced by FadeLODNode::cull_callback().

static void AuxSceneData::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from TypedReferenceCount.

Reimplemented in FadeLODNodeData.

Definition at line 59 of file auxSceneData.h.

References TypedReferenceCount::init_type().

Referenced by FadeLODNodeData::init_type().

void AuxSceneData::set_duration ( double  duration) [inline]

Specifies the minimum length in time, in seconds, to keep this AuxSceneData object around in the scene graph after the last time it was rendered.

Definition at line 38 of file auxSceneData.I.

Referenced by FadeLODNode::cull_callback().

void AuxSceneData::set_last_render_time ( double  render_time) [inline]

Should be called with the current frame_time each time the AuxSceneData is used during traversal.

Definition at line 61 of file auxSceneData.I.

Referenced by FadeLODNode::cull_callback().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations