Panda3D
|
The smallest atom of cull. More...
#include "cullableObject.h"
Public Member Functions | |
CullableObject () | |
Creates an empty CullableObject whose pointers can be filled in later. More... | |
CullableObject (const CullableObject ©) | |
Copies the CullableObject. More... | |
CullableObject (CPT(Geom) geom, CPT(RenderState) state, CPT(TransformState) internal_transform) | |
Creates a CullableObject based the indicated geom, with the indicated render state and transform. More... | |
CPT (Geom) _geom | |
CPT (GeomVertexData) _munged_data | |
CPT (RenderState) _state | |
CPT (TransformState) _internal_transform | |
void | draw (GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread) |
Draws the cullable object on the GSG immediately, in the GSG's current state. More... | |
void | draw_callback (GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread) |
Invokes the draw callback, assuming one is set. More... | |
void | draw_inline (GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread) |
Draws the cullable object on the GSG immediately, in the GSG's current state. More... | |
bool | munge_geom (GraphicsStateGuardianBase *gsg, GeomMunger *munger, const CullTraverser *traverser, bool force) |
Uses the indicated GeomMunger to transform the geom and/or its vertices. More... | |
void | operator= (const CullableObject ©) |
Copies the CullableObject. More... | |
void | output (std::ostream &out) const |
PT (CallbackObject) _draw_callback | |
bool | request_resident () const |
Returns true if all the data necessary to render this object is currently resident in memory. More... | |
void | set_draw_callback (CallbackObject *draw_callback) |
Specifies a CallbackObject that will be responsible for drawing this object. More... | |
Static Public Member Functions | |
static void | flush_level () |
Flushes the PStatCollectors used during traversal. More... | |
static TypeHandle | get_class_type () |
static void | init_type () |
The smallest atom of cull.
This is normally just a Geom and its associated state, but it also contain a draw callback.
Definition at line 41 of file cullableObject.h.
|
inline |
Creates an empty CullableObject whose pointers can be filled in later.
Definition at line 17 of file cullableObject.I.
|
inline |
Creates a CullableObject based the indicated geom, with the indicated render state and transform.
Definition at line 28 of file cullableObject.I.
|
inline |
Copies the CullableObject.
Definition at line 43 of file cullableObject.I.
|
inline |
Draws the cullable object on the GSG immediately, in the GSG's current state.
This should only be called from the draw thread.
Definition at line 71 of file cullableObject.I.
Referenced by GeomDrawCallbackData::upcall().
|
inline |
Invokes the draw callback, assuming one is set.
Crashes if not.
Definition at line 139 of file cullableObject.I.
|
inline |
Draws the cullable object on the GSG immediately, in the GSG's current state.
This should only be called from the draw thread. Assumes the GSG has already been set to the appropriate state.
Definition at line 131 of file cullableObject.I.
|
inlinestatic |
Flushes the PStatCollectors used during traversal.
Definition at line 121 of file cullableObject.I.
bool CullableObject::munge_geom | ( | GraphicsStateGuardianBase * | gsg, |
GeomMunger * | munger, | ||
const CullTraverser * | traverser, | ||
bool | force | ||
) |
Uses the indicated GeomMunger to transform the geom and/or its vertices.
If force is false, this may do nothing and return false if the vertex data is nonresident. If force is true, this will always return true, but it may have to block while the vertex data is paged in.
Definition at line 53 of file cullableObject.cxx.
Referenced by DrawCullHandler::record_object().
|
inline |
Copies the CullableObject.
Definition at line 58 of file cullableObject.I.
|
inline |
Returns true if all the data necessary to render this object is currently resident in memory.
If this returns false, the data will be brought back into memory shortly; try again later.
Definition at line 96 of file cullableObject.I.
|
inline |
Specifies a CallbackObject that will be responsible for drawing this object.
Definition at line 113 of file cullableObject.I.