Go to the documentation of this file.
29 CallbackNode(
const std::string &name) :
32 PandaNode::set_cull_callback();
93 if (cbobj !=
nullptr) {
123 if (pgraph_cat.is_spam()) {
125 <<
"Found " << *
this <<
" in state " << *data._state
126 <<
" draw_mask = " << data._draw_mask <<
"\n";
133 if (cbobj !=
nullptr) {
136 data.get_internal_transform(trav));
137 object->set_draw_callback(cbobj);
149 PandaNode::output(out);
182 node->fillin(scan, manager);
193 PandaNode::fillin(scan, manager);
202 return new CData(*
this);
209 void CallbackNode::CData::
217 void CallbackNode::CData::
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A single page of data maintained by a PipelineCycler.
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
The smallest atom of cull.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
get_cull_callback
Returns the CallbackObject set by set_cull_callback().
A class to retrieve the individual data elements previously stored in a Datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is a generic object that can be assigned to a callback at various points in the rendering proces...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
virtual void do_callback(CallbackData *cbdata)
This method called when the callback is triggered; it *replaces* the original function.
static WritableFactory * get_factory()
Returns the global WritableFactory for generating TypedWritable objects.
get_draw_callback
Returns the CallbackObject set by set_draw_callback().
virtual PandaNode * make_copy() const
Returns a newly-allocated Node that is a shallow copy of this one.
Base class for objects that can be written to and read from Bam files.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
A special node that can issue arbitrary callbacks to user code, either during the cull or draw traver...
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
static void register_with_read_factory()
Tells the BamReader how to create objects of type CallbackNode.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
TypeHandle is the identifier used to differentiate C++ class types.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
void read_cdata(DatagramIterator &scan, PipelineCyclerBase &cycler)
Reads in the indicated CycleData object.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual void record_object(CullableObject *object, const CullTraverser *traverser)
This callback function is intended to be overridden by a derived class.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This is a special kind of GeometricBoundingVolume that fills all of space.
virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data)
This function will be called during the cull traversal to perform any additional operations that shou...
virtual void add_for_draw(CullTraverser *trav, CullTraverserData &data)
Adds the node's contents to the CullResult we are building up during the cull traversal,...
This kind of CallbackData is passed to the CallbackObject added to CallbackNode:set_cull_callback().
void register_factory(TypeHandle handle, CreateFunc *func, void *user_data=nullptr)
Registers a new kind of thing the Factory will be able to create.
void write_cdata(Datagram &packet, const PipelineCyclerBase &cycler)
Writes out the indicated CycleData object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CullHandler * get_cull_handler() const
Returns the object that will receive the culled Geoms.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void parse_params(const FactoryParams ¶ms, DatagramIterator &scan, BamReader *&manager)
Takes in a FactoryParams, passed from a WritableFactory into any TypedWritable's make function,...
virtual void output(std::ostream &out) const
Writes a brief description of the node to the indicated output stream.