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 Geom *geom, const RenderState *state, const TransformState *internal_transform) | |
Creates a CullableObject based the indicated geom, with the indicated render state and transform. More... | |
CullableObject (const CullableObject ©) | |
Copies the CullableObject. 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... | |
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 (ostream &out) const |
PT (GeomMunger) _munger | |
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 45 of file cullableObject.h.
|
inline |
Creates an empty CullableObject whose pointers can be filled in later.
Definition at line 23 of file cullableObject.I.
Referenced by CullableObject().
|
inline |
Creates a CullableObject based the indicated geom, with the indicated render state and transform.
Definition at line 36 of file cullableObject.I.
References CullableObject().
|
inline |
|
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 88 of file cullableObject.I.
References GeomDrawCallbackData::get_lost_state(), and request_resident().
Referenced by operator=(), and GeomDrawCallbackData::upcall().
|
inlinestatic |
Flushes the PStatCollectors used during traversal.
Definition at line 145 of file cullableObject.I.
Referenced by GraphicsEngine::render_frame(), and set_draw_callback().
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 57 of file cullableObject.cxx.
References LMatrix4f::convert_mat(), GeomVertexReader::get_column(), GeomVertexColumn::get_contents(), Lens::get_coordinate_system(), CullTraverser::get_current_thread(), GeomVertexReader::get_data1(), GeomVertexReader::get_data1i(), GeomVertexReader::get_data3(), GeomVertexReader::get_data4(), TextureStage::get_default(), GeomPrimitive::get_first_vertex(), ClockObject::get_frame_time(), ClockObject::get_global_clock(), CullTraverser::get_gsg(), GeomPrimitive::get_index_format(), SceneSetup::get_lens(), GeomPrimitive::get_max_vertex(), GeomPrimitive::get_min_vertex(), RenderModeAttrib::get_mode(), GeomVertexColumn::get_num_components(), GeomPrimitive::get_num_vertices(), GeomVertexColumn::get_numeric_type(), RenderModeAttrib::get_perspective(), Lens::get_projection_mat(), CullTraverser::get_scene(), RenderModeAttrib::get_thickness(), SceneSetup::get_viewport_height(), SceneSetup::get_viewport_width(), GeomVertexWriter::get_write_row(), GeomVertexReader::has_column(), GeomVertexWriter::has_column(), LMatrix4f::invert_from(), GeomVertexReader::is_at_end(), GeomPrimitive::is_indexed(), Lens::is_orthographic(), GeomMunger::munge_geom(), LMatrix3f::rotate_mat(), GeomVertexWriter::set_data1i(), GeomVertexWriter::set_data2(), GeomVertexWriter::set_data3(), GeomVertexWriter::set_data4(), GeomVertexData::unclean_set_num_rows(), LMatrix4f::xform(), and LMatrix4f::xform_vec().
Referenced by DrawCullHandler::record_object().
|
inline |
Copies the CullableObject.
Definition at line 71 of file cullableObject.I.
References draw().
Referenced by CullableObject().
|
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 116 of file cullableObject.I.
References set_draw_callback().
Referenced by draw().
|
inline |
Specifies a CallbackObject that will be responsible for drawing this object.
Definition at line 135 of file cullableObject.I.
References flush_level().
Referenced by CallbackNode::add_for_draw(), ComputeNode::add_for_draw(), request_resident(), and NodeCullCallbackData::upcall().