Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
NodeCullCallbackData Class Reference

This kind of CallbackData is passed to the CallbackObject added to CallbackNode:set_cull_callback(). More...

`#include "nodeCullCallbackData.h"`

Inheritance diagram for NodeCullCallbackData:

## Public Member Functions
| NodeCullCallbackData (CullTraverser *trav, CullTraverserData &data)
virtual TypeHandle | force_init_type ()
CullTraverserData & | get_data () const
| Returns the CullTraverserData in use at the time of the callback.
CullTraverser * | get_trav () const
| Returns the CullTraverser in use at the time of the callback.
virtual TypeHandle | get_type () const
virtual void | output (std::ostream &out) const
virtual void | upcall ()
| You should make this call during the callback if you want to continue the normal rendering function that would have been done in the absence of a callback.
Public Member Functions inherited from TypedObject
| TypedObject (const TypedObject &copy)=default
TypedObject * | as_typed_object ()
| Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObject * | as_typed_object () const
| Returns the object, upcast (if necessary) to a TypedObject pointer.
int | get_best_parent_from_Set (const std::set< int > &) const
int | get_type_index () const
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool | is_exact_type (TypeHandle handle) const
| Returns true if the current object is the indicated type exactly.
bool | is_of_type (TypeHandle handle) const
| Returns true if the current object is or derives from the indicated type.
TypedObject & | operator= (const TypedObject &copy)=default
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)

## Static Public Member Functions
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from CallbackData
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedObject
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.

## Additional Inherited Members
Public Attributes inherited from TypedObject
| get_type

## Detailed Description

This kind of CallbackData is passed to the CallbackObject added to CallbackNode:set_cull_callback().

Definition at line 26 of file nodeCullCallbackData.h.

## Constructor & Destructor Documentation

## ◆ NodeCullCallbackData()

NodeCullCallbackData::NodeCullCallbackData | ( | CullTraverser * | trav,
|  | CullTraverserData & | data )
| inline

Definition at line 17 of file nodeCullCallbackData.I.

## Member Function Documentation

## ◆ force_init_type()

virtual TypeHandle NodeCullCallbackData::force_init_type | ( |  | ) |
| inline virtual

Reimplemented from CallbackData.

Definition at line 54 of file nodeCullCallbackData.h.

## ◆ get_class_type()

static TypeHandle NodeCullCallbackData::get_class_type | ( |  | ) |
| inline static

Definition at line 43 of file nodeCullCallbackData.h.

## ◆ get_data()

CullTraverserData & NodeCullCallbackData::get_data | ( |  | ) | const
| inline

Returns the CullTraverserData in use at the time of the callback.

This object contains data that changes at each node of the traversal, such as the current node and the current net transform to that node.

Definition at line 39 of file nodeCullCallbackData.I.

## ◆ get_trav()

CullTraverser * NodeCullCallbackData::get_trav | ( |  | ) | const
| inline

Returns the CullTraverser in use at the time of the callback.

This object contains data that does not change during the traversal, such as the DisplayRegion and Camera in use.

Definition at line 29 of file nodeCullCallbackData.I.

## ◆ get_type()

virtual TypeHandle NodeCullCallbackData::get_type | ( |  | ) | const
| inline virtual

Reimplemented from CallbackData.

Definition at line 51 of file nodeCullCallbackData.h.

## ◆ init_type()

static void NodeCullCallbackData::init_type | ( |  | ) |
| inline static

Definition at line 46 of file nodeCullCallbackData.h.

## ◆ output()

void NodeCullCallbackData::output | ( | std::ostream & | out | ) | const
| virtual

Reimplemented from CallbackData.

Definition at line 26 of file nodeCullCallbackData.cxx.

## ◆ upcall()

void NodeCullCallbackData::upcall | ( |  | ) |
| virtual

You should make this call during the callback if you want to continue the normal rendering function that would have been done in the absence of a callback.

Specifically, this method will add this node to the draw queue, and continue the cull traversal for all the nodes below. If you omit this call, this node and its children will be pruned from the render result.

Reimplemented from CallbackData.

Definition at line 40 of file nodeCullCallbackData.cxx.

References PandaNode::Children::get_child(), PandaNodePipelineReader::get_children(), CallbackNode::get_draw_callback, PandaNode::Children::get_num_children(), TypedObject::is_of_type(), and PandaNodePipelineReader::release().

The documentation for this class was generated from the following files:

- panda/src/pgraphnodes/nodeCullCallbackData.h
- panda/src/pgraphnodes/nodeCullCallbackData.cxx
- panda/src/pgraphnodes/nodeCullCallbackData.I