40 VL_DEBUG_SET_OBJECT_NAME()
67 for(
size_t i = 0; i <
actors()->
size(); ++i ) {
142 std::set< Transform* > root_transforms;
143 for(
int i=0; i<(int)actors.
size(); ++i)
145 for(
Transform* root = actors[i]->transform(); root; root = root->parent() )
146 if ( !root->parent() )
147 root_transforms.insert(root);
152 std::set< Transform* >::iterator tra = root_transforms.begin();
153 while( tra != root_transforms.end() )
155 (*tra)->computeWorldMatrixRecursive();
161 for(
int i=0; i<(int)actors.
size(); ++i)
162 actors[i]->computeBounds();
Associates a Renderable object to an Effect and Transform.
size_t find(T *obj) const
bool isEnabled() const
Whether an Actor should be considered for rendering, picking, scene bounding box calculation etc...
void setAutomaticDelete(bool autodel_on)
If set to true the Object is deleted when its reference count reaches 0.
void extractVisibleActors(ActorCollection &list, const Camera *camera, unsigned enable_mask=0xFFFFFFFF)
Extracts the enabled and visible Actors contained in th ActorTree hierarchy and appends them to the g...
ActorTreeAbstract * mParent
void eraseAt(size_t index)
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...
bool cull(const Sphere &sphere) const
static void prepareActors(ActorCollection &actors)
Updates the Transform and the bounds of the given Actors.
unsigned int enableMask() const
The enable mask of an Actor is usually used to defines whether the actor should be rendered or not de...
const AABB & aabb() const
Returns the bounding box of a node. Such bounding box contains both the bounding boxes of the node's ...
const T * at(size_t i) const
Visualization Library main namespace.
const Frustum & frustum() const
The view frustum of the camera used to perform frustum culling.
const ActorCollection * actors() const
Returns the actors contained in a ActorTree node.
The AABB class implements an axis-aligned bounding box using vl::real precision.
An abstract class that represents all the objects that can be rendered.
The ActorTreeAbstract class implements the interface of a generic tree containing Actors in its nodes...
virtual ActorTreeAbstract * child(int i)=0
Returns the i-th child node of an ActorTreeAbstract node.
void computeAABB()
Recursively computes the bounding box of a node so that it includes the bounding boxes of the node's ...
const AABB & boundingBox() const
Returns the bounding box (not guaranteed to be up to date) that contains this Actor.
Defines the sequence of Shader objects used to render an Actor.
bool isEnabled() const
If false then extractVisibleActors() will ignore this node and all its children.
Defined as a simple subclass of Collection<Actor>, see Collection for more information.
ActorTreeAbstract * eraseActor(Actor *actor)
Removes the given Actor from the ActorTreeAbstract.
It's basically an std::vector for Objects that is itself an Object so it can be reference counted and...
void computeBounds()
Computes the bounding box and bounding sphere of an Actor if boundsDirty().
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
void extractActors(ActorCollection &list)
Extracts all the Actors contained in th ActorTree hierarchy and appends them to the given ActorCollec...
virtual int childrenCount() const =0
Returns the number of child nodes of an ActorTreeAbstract node.