Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <ActorTreeAbstract.hpp>

Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| ActorTreeAbstract () | |
| virtual int | childrenCount () const =0 |
| Returns the number of child nodes of an ActorTreeAbstract node. | |
| virtual ActorTreeAbstract * | child (int i)=0 |
| Returns the i-th child node of an ActorTreeAbstract node. | |
| virtual const ActorTreeAbstract * | child (int i) const =0 |
| Returns the i-th child node of an ActorTreeAbstract node. | |
| const ActorTreeAbstract * | parent () const |
| Returns the parent of a node. | |
| ActorTreeAbstract * | parent () |
| Returns the parent of a node. | |
| const ActorCollection * | actors () const |
| Returns the actors contained in a ActorTree node. | |
| ActorCollection * | actors () |
| Returns the actors contained in a ActorTree node. | |
| const AABB & | aabb () const |
| Returns the bounding box of a node. Such bounding box contains both the bounding boxes of the node's Actor[s] and of the child nodes. | |
| void | computeAABB () |
| Recursively computes the bounding box of a node so that it includes the bounding boxes of the node's Actor[s] and of the child nodes. | |
| void | appendActors (ActorCollection &list) |
| Extracts all the Actor[s] contained in th ActorTree hierarchy and appends them to the given ActorCollection. | |
| void | appendVisibleActors (ActorCollection &list, const Camera *camera, unsigned enable_mask=0xFFFFFFFF) |
| Extracts the enabled and visible Actor[s] contained in th ActorTree hierarchy and appends them to the given ActorCollection. | |
| ActorTreeAbstract * | eraseActor (Actor *actor) |
| Removes the given Actor from the ActorTreeAbstract. | |
| Actor * | addActor (Renderable *renderable, Effect *eff, Transform *tr=NULL) |
| Utility function that adds an Actor and binds it to the given Renderable, Effect and Transform. | |
| Actor * | addActor (Actor *actor) |
| Utility function equivalent to 'actors()->push_back(actor)'. | |
| void | setParent (ActorTreeAbstract *p) |
| For internal use only. | |
Static Public Member Functions | |
| static void | prepareActors (ActorCollection &actors) |
| Updates the Transform and the bounds of the given Actor[s]. | |
Protected Attributes | |
| ActorTreeAbstract * | mParent |
| ActorCollection | mActors |
| AABB | mAABB |
The interface of ActorTreeAbstract allows you to:
Does not allow you to:
| ActorTreeAbstract::ActorTreeAbstract | ( | ) |
| virtual const char* vl::ActorTreeAbstract::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::Object.
Reimplemented in vl::ActorKdTree, and vl::ActorTree.
| virtual int vl::ActorTreeAbstract::childrenCount | ( | ) | const [pure virtual] |
Returns the number of child nodes of an ActorTreeAbstract node.
Implemented in vl::ActorKdTree, and vl::ActorTree.
| virtual ActorTreeAbstract* vl::ActorTreeAbstract::child | ( | int | i | ) | [pure virtual] |
Returns the i-th child node of an ActorTreeAbstract node.
Implemented in vl::ActorKdTree, and vl::ActorTree.
| virtual const ActorTreeAbstract* vl::ActorTreeAbstract::child | ( | int | i | ) | const [pure virtual] |
Returns the i-th child node of an ActorTreeAbstract node.
Implemented in vl::ActorKdTree, and vl::ActorTree.
| const ActorTreeAbstract* vl::ActorTreeAbstract::parent | ( | ) | const [inline] |
Returns the parent of a node.
| ActorTreeAbstract* vl::ActorTreeAbstract::parent | ( | ) | [inline] |
Returns the parent of a node.
| const ActorCollection* vl::ActorTreeAbstract::actors | ( | ) | const [inline] |
Returns the actors contained in a ActorTree node.
| ActorCollection* vl::ActorTreeAbstract::actors | ( | ) | [inline] |
Returns the actors contained in a ActorTree node.
| const AABB& vl::ActorTreeAbstract::aabb | ( | ) | const [inline] |
Returns the bounding box of a node. Such bounding box contains both the bounding boxes of the node's Actor[s] and of the child nodes.
| void ActorTreeAbstract::computeAABB | ( | ) |
Recursively computes the bounding box of a node so that it includes the bounding boxes of the node's Actor[s] and of the child nodes.
| void ActorTreeAbstract::appendActors | ( | ActorCollection & | list | ) |
| void ActorTreeAbstract::appendVisibleActors | ( | ActorCollection & | list, | |
| const Camera * | camera, | |||
| unsigned | enable_mask = 0xFFFFFFFF | |||
| ) |
Extracts the enabled and visible Actor[s] contained in th ActorTree hierarchy and appends them to the given ActorCollection.
This function implements a hierarchycal frustum culling algorithm that culls the nodes of the bounding box tree first and then the single Actor[s] contained in the nodes that could not be culled. See also Actor::enableMask()
| ActorTreeAbstract * ActorTreeAbstract::eraseActor | ( | Actor * | actor | ) |
Removes the given Actor from the ActorTreeAbstract.
| Actor * ActorTreeAbstract::addActor | ( | Renderable * | renderable, | |
| Effect * | eff, | |||
| Transform * | tr = NULL | |||
| ) |
Utility function that adds an Actor and binds it to the given Renderable, Effect and Transform.
Utility function equivalent to 'actors()->push_back(actor)'.
| void ActorTreeAbstract::prepareActors | ( | ActorCollection & | actors | ) | [static] |
| void vl::ActorTreeAbstract::setParent | ( | ActorTreeAbstract * | p | ) | [inline] |
For internal use only.
ActorTreeAbstract* vl::ActorTreeAbstract::mParent [protected] |
ActorCollection vl::ActorTreeAbstract::mActors [protected] |
AABB vl::ActorTreeAbstract::mAABB [protected] |