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

Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| Actor (Renderable *renderable=NULL, Effect *effect=NULL, Transform *transform=NULL, int block=0, int rank=0) | |
| Constructor. | |
| virtual | ~Actor () |
| Destructor. | |
| ref< Renderable > & | lod (int lod_index) |
Returns the Renderable object representing the LOD level specifed by index. | |
| const ref< Renderable > & | lod (int lod_index) const |
Returns the Renderable object representing the LOD level specifed by index. | |
| void | setLODs (Renderable *lod0, Renderable *lod1=NULL, Renderable *lod2=NULL, Renderable *lod3=NULL, Renderable *lod4=NULL, Renderable *lod5=NULL) |
| Utility function to assign one or more Renderable[s] to one or more LOD levels. | |
| void | setTransform (Transform *transform) |
| Binds a Transform to an Actor. | |
| Transform * | transform () |
| Returns the Transform bound tho an Actor. | |
| const Transform * | transform () const |
| Returns the Transform bound tho an Actor. | |
| void | setEffect (Effect *effect) |
| Binds an Effect to an Actor. | |
| Effect * | effect () |
| Returns the Effect bound to an Actor. | |
| const Effect * | effect () const |
| Returns the Effect bound to an Actor. | |
| const Sphere & | boundingSphere () const |
| Returns the bounding sphere that contains this Actor taking into consideration also its Transform. | |
| const AABB & | boundingBox () const |
| Returns the bounding box that contains this Actor taking into consideration also its Transform. | |
| void | computeBounds () |
| Computes the bounding box and bounding sphere of an Actor taking into consideration also its Transform. | |
| void | setRenderRank (int rank) |
| Modifies the rendering rank of an Actor. | |
| void | setRenderBlock (int block) |
| Modifies the rendering block of an Actor. | |
| int | renderRank () const |
| Returns the rendering rank of an Actor. | |
| int | renderBlock () const |
| Returns the rendering block of an Actor. | |
| void | setLODEvaluator (LODEvaluator *lod_evaluator) |
| Installs the LODEvaluator used to compute the current LOD at rendering time. | |
| LODEvaluator * | lodEvaluator () |
| Returns the installed LODEvaluator (if any) or NULL. | |
| const LODEvaluator * | lodEvaluator () const |
| Returns the installed LODEvaluator (if any) or NULL. | |
| int | evaluateLOD (Camera *camera) |
| virtual void | update (int, Camera *, Real) |
| Virtual function used to update or animate an Actor during the rendering. | |
| void | setLastUpdateTime (Real time) |
| For internal use only. | |
| Real | lastUpdateTime () const |
| For internal use only. | |
| void | setEnableMask (unsigned int mask) |
| The enable mask of an Actor defines whether the actor should be rendered or not depending on the Rendering::enableMask(). | |
| unsigned int | enableMask () const |
| The enable mask of an Actor defines whether the actor should be rendered or not depending on the Rendering::enableMask(). | |
| void | setUniform (Uniform *uniform) |
| Equivalent to uniformSet()->setUniform(uniform). | |
| const std::vector< ref < Uniform > > & | uniforms () const |
| Equivalent to uniformSet()->uniforms(). | |
| void | eraseUniform (const std::string &name) |
| Equivalent to uniformSet()->eraseUniform(name). | |
| void | eraseUniform (const Uniform *uniform) |
| Equivalent to uniformSet()->eraseUniform(uniform). | |
| void | eraseAllUniforms () |
| Equivalent to uniformSet()->eraseAllUniforms(). | |
| Uniform * | gocUniform (const std::string &name) |
| Equivalent to uniformSet()->getUniform(name, get_mode). | |
| Uniform * | getUniform (const std::string &name) |
| Equivalent to uniformSet()->getUniform(name, get_mode). | |
| const Uniform * | getUniform (const std::string &name) const |
| Equivalent to uniformSet()->getUniform(name, get_mode). | |
| void | setUniformSet (UniformSet *uniforms) |
| Installs a new UniformSet. | |
| UniformSet * | uniformSet () const |
| Returns the UniformSet installed. | |
| const Collection < ActorRenderingCallback > * | renderingCallbacks () const |
| Returns the list of ActorRenderingCallback bound to an Actor. | |
| Collection < ActorRenderingCallback > * | renderingCallbacks () |
| Returns the list of ActorRenderingCallback bound to an Actor. | |
| void | executeRenderingCallbacks (const Camera *camera, Renderable *renderable, const Shader *shader, int pass) |
| Calls all the ActorRenderingCallback installed on this Actor. | |
| void | setScissor (Scissor *scissor) |
| Sets the Scissor to be used when rendering an Actor. | |
| const Scissor * | scissor () const |
| Returns the Scissor used when rendering an Actor. | |
| Scissor * | scissor () |
| Returns the Scissor used when rendering an Actor. | |
| void | setOccludee (bool is_occludee) |
If is_occludee equals true an occlusion test will be performed before the rendering of the Actor (if occlusion culling is enabled) otherwise the Actor will always be rendered with no occlusion test even when occlusion culling is enabled. | |
| bool | isOccludee () const |
If is_occludee equals true an occlusion test will be performed before the rendering of the Actor (if occlusion culling is enabled) otherwise the Actor will always be rendered with no occlusion test even when occlusion culling is enabled. | |
| void | createOcclusionQuery () |
| For internal use only. | |
| void | deleteOcclusionQuery () |
| For internal use only. | |
| GLuint | occlusionQuery () const |
| For internal use only. | |
| void | setOcclusionQueryTick (unsigned tick) |
| For internal use only. | |
| unsigned | occlusionQueryTick () const |
| For internal use only. | |
Protected Attributes | |
| AABB | mAABB |
| Sphere | mSphere |
| Real | mLastUpdateTime |
| ref< Effect > | mEffect |
| ref< Renderable > | mRenderables [VL_MAX_ACTOR_LOD] |
| ref< Transform > | mTransform |
| ref< LODEvaluator > | mLODEvaluator |
| ref< UniformSet > | mUniformSet |
| ref< Scissor > | mScissor |
| Collection < ActorRenderingCallback > | mRenderingCallbacks |
| int | mRenderBlock |
| int | mRenderRank |
| long long | mTransformUpdateTick |
| long long | mBoundsUpdateTick |
| unsigned int | mEnableMask |
| GLuint | mOcclusionQuery |
| bool | mIsOccludee |
| unsigned | mOcclusionQueryTick |
An Actor can associate one Renderable for each LOD (level of detail) using the lods() function. The rendering order of an Actor is defined by its rendering rank, and block, see setRenderRank() and setRenderBlock() for the details.
| vl::Actor::Actor | ( | Renderable * | renderable = NULL, |
|
| Effect * | effect = NULL, |
|||
| Transform * | transform = NULL, |
|||
| int | block = 0, |
|||
| int | rank = 0 | |||
| ) | [inline] |
| Actor::~Actor | ( | ) | [virtual] |
Destructor.
| virtual const char* vl::Actor::className | ( | ) | [inline, virtual] |
| ref<Renderable>& vl::Actor::lod | ( | int | lod_index | ) | [inline] |
Returns the Renderable object representing the LOD level specifed by index.
| const ref<Renderable>& vl::Actor::lod | ( | int | lod_index | ) | const [inline] |
Returns the Renderable object representing the LOD level specifed by index.
| void Actor::setLODs | ( | Renderable * | lod0, | |
| Renderable * | lod1 = NULL, |
|||
| Renderable * | lod2 = NULL, |
|||
| Renderable * | lod3 = NULL, |
|||
| Renderable * | lod4 = NULL, |
|||
| Renderable * | lod5 = NULL | |||
| ) |
Utility function to assign one or more Renderable[s] to one or more LOD levels.
| Effect* vl::Actor::effect | ( | ) | [inline] |
| const Effect* vl::Actor::effect | ( | ) | const [inline] |
| const Sphere& vl::Actor::boundingSphere | ( | ) | const [inline] |
| const AABB& vl::Actor::boundingBox | ( | ) | const [inline] |
| void Actor::computeBounds | ( | ) |
| void vl::Actor::setRenderRank | ( | int | rank | ) | [inline] |
Modifies the rendering rank of an Actor.
The rendering rank affects the order in which an Actor is rendered, the greater the rank the later the Actor is rendered. The default render rank is zero.
To know more about rendering order please see Rendering Order.
| void vl::Actor::setRenderBlock | ( | int | block | ) | [inline] |
Modifies the rendering block of an Actor.
The rendering block affects the order in which an Actor is rendered, the greater the block the later the Actor is rendered. The default render block is zero.
To know more about rendering order please see Rendering Order.
| int vl::Actor::renderRank | ( | ) | const [inline] |
Returns the rendering rank of an Actor.
| int vl::Actor::renderBlock | ( | ) | const [inline] |
Returns the rendering block of an Actor.
| void vl::Actor::setLODEvaluator | ( | LODEvaluator * | lod_evaluator | ) | [inline] |
Installs the LODEvaluator used to compute the current LOD at rendering time.
| LODEvaluator* vl::Actor::lodEvaluator | ( | ) | [inline] |
Returns the installed LODEvaluator (if any) or NULL.
| const LODEvaluator* vl::Actor::lodEvaluator | ( | ) | const [inline] |
Returns the installed LODEvaluator (if any) or NULL.
| int Actor::evaluateLOD | ( | Camera * | camera | ) |
Virtual function used to update or animate an Actor during the rendering.
| lod | the LOD (level of detail) currently selected for the rendering. | |
| camera | the camera used for the current rendering. | |
| cur_t | the current animation time. |
Reimplemented in vl::MorphingActor, and vlVolume::SlicedVolume.
| void vl::Actor::setLastUpdateTime | ( | Real | time | ) | [inline] |
For internal use only.
| Real vl::Actor::lastUpdateTime | ( | ) | const [inline] |
For internal use only.
| void vl::Actor::setEnableMask | ( | unsigned int | mask | ) | [inline] |
The enable mask of an Actor defines whether the actor should be rendered or not depending on the Rendering::enableMask().
| unsigned int vl::Actor::enableMask | ( | ) | const [inline] |
The enable mask of an Actor defines whether the actor should be rendered or not depending on the Rendering::enableMask().
| void vl::Actor::setUniform | ( | Uniform * | uniform | ) | [inline] |
Equivalent to uniformSet()->setUniform(uniform).
Equivalent to uniformSet()->uniforms().
| void vl::Actor::eraseUniform | ( | const std::string & | name | ) | [inline] |
Equivalent to uniformSet()->eraseUniform(name).
| void vl::Actor::eraseUniform | ( | const Uniform * | uniform | ) | [inline] |
Equivalent to uniformSet()->eraseUniform(uniform).
| void vl::Actor::eraseAllUniforms | ( | ) | [inline] |
Equivalent to uniformSet()->eraseAllUniforms().
| Uniform* vl::Actor::gocUniform | ( | const std::string & | name | ) | [inline] |
Equivalent to uniformSet()->getUniform(name, get_mode).
| Uniform* vl::Actor::getUniform | ( | const std::string & | name | ) | [inline] |
Equivalent to uniformSet()->getUniform(name, get_mode).
| const Uniform* vl::Actor::getUniform | ( | const std::string & | name | ) | const [inline] |
Equivalent to uniformSet()->getUniform(name, get_mode).
| void vl::Actor::setUniformSet | ( | UniformSet * | uniforms | ) | [inline] |
| UniformSet* vl::Actor::uniformSet | ( | ) | const [inline] |
Returns the UniformSet installed.
| const Collection<ActorRenderingCallback>* vl::Actor::renderingCallbacks | ( | ) | const [inline] |
Returns the list of ActorRenderingCallback bound to an Actor.
| Collection<ActorRenderingCallback>* vl::Actor::renderingCallbacks | ( | ) | [inline] |
Returns the list of ActorRenderingCallback bound to an Actor.
| void vl::Actor::executeRenderingCallbacks | ( | const Camera * | camera, | |
| Renderable * | renderable, | |||
| const Shader * | shader, | |||
| int | pass | |||
| ) | [inline] |
Calls all the ActorRenderingCallback installed on this Actor.
| void vl::Actor::setScissor | ( | Scissor * | scissor | ) | [inline] |
| const Scissor* vl::Actor::scissor | ( | ) | const [inline] |
| void vl::Actor::setOccludee | ( | bool | is_occludee | ) | [inline] |
| bool vl::Actor::isOccludee | ( | ) | const [inline] |
| void Actor::createOcclusionQuery | ( | ) |
For internal use only.
Creates the occlusion query object name bound this Actor using the OpenGL function glGenQueries().
| void Actor::deleteOcclusionQuery | ( | ) |
For internal use only.
Deletes the occlusion query object name using the OpenGL function glDeleteQueries().
| GLuint vl::Actor::occlusionQuery | ( | ) | const [inline] |
For internal use only.
Returns the occlusion query object name bound this Actor as by the OpenGL function glGenQueries(). Returns 0 if no query object name has been created yet.
| void vl::Actor::setOcclusionQueryTick | ( | unsigned | tick | ) | [inline] |
For internal use only.
| unsigned vl::Actor::occlusionQueryTick | ( | ) | const [inline] |
For internal use only.
AABB vl::Actor::mAABB [protected] |
Sphere vl::Actor::mSphere [protected] |
Real vl::Actor::mLastUpdateTime [protected] |
ref<Effect> vl::Actor::mEffect [protected] |
Reimplemented in vlVolume::SlicedVolume.
ref<Renderable> vl::Actor::mRenderables[VL_MAX_ACTOR_LOD] [protected] |
ref<Transform> vl::Actor::mTransform [protected] |
ref<LODEvaluator> vl::Actor::mLODEvaluator [protected] |
ref<UniformSet> vl::Actor::mUniformSet [protected] |
ref<Scissor> vl::Actor::mScissor [protected] |
int vl::Actor::mRenderBlock [protected] |
int vl::Actor::mRenderRank [protected] |
long long vl::Actor::mTransformUpdateTick [protected] |
long long vl::Actor::mBoundsUpdateTick [protected] |
unsigned int vl::Actor::mEnableMask [protected] |
GLuint vl::Actor::mOcclusionQuery [protected] |
bool vl::Actor::mIsOccludee [protected] |
unsigned vl::Actor::mOcclusionQueryTick [protected] |