# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Protected Attributes

# vl::Actor Class Reference

Associates a Renderable object to an Effect and Transform. More...

`#include <Actor.hpp>`

Inheritance diagram for vl::Actor:

List of all members.

## Public Member Functions

| Actor (Renderable *renderable=NULL, Effect *effect=NULL, Transform *transform=NULL, int block=0, int rank=0)
| Constructor.
virtual | ~Actor ()
| Destructor.
void | setLod (int lod_index, Renderable *renderable)
| Sets the Renderable object representing the LOD level specifed by `lod_index`.
const Renderable * | lod (int lod_index) const
| Returns the Renderable object representing the LOD level specifed by `lod_index`.
Renderable * | lod (int lod_index)
| Returns the Renderable object representing the LOD level specifed by `lod_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 AABB & | boundingBox () const
| Returns the bounding box (`not` guaranteed to be up to date) that contains this Actor.
const Sphere & | boundingSphere () const
| Returns the bounding sphere (`not` guaranteed to be up to date) that contains this Actor.
const AABB & | boundingBoxSafe ()
| Returns the bounding box (`guaranteed` to be up to date) that contains this Actor.
const Sphere & | boundingSphereSafe ()
| Returns the bounding sphere (`guaranteed` to be up to date) that contains this Actor.
void | computeBounds ()
| Computes the bounding box and bounding sphere of an Actor.
bool | boundsDirty () const
| Returns whether the Actor's bounding box and sphere are up to date.
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)
void | setEnableMask (unsigned int mask)
| The enable mask of an Actor is usually used to defines whether the actor should be rendered or not depending on the Rendering::enableMask() but it can also be used for user-specific tasks.
unsigned int | enableMask () const
| The enable mask of an Actor is usually used to defines whether the actor should be rendered or not depending on the Rendering::enableMask() but it can also be used for user-specific tasks.
void | setUniform (Uniform *uniform)
| Equivalent to getUniformSet()->setUniform(uniform)
const std::vector< ref < Uniform > > & | uniforms () const
| Equivalent to getUniformSet()->uniforms()
std::vector< ref< Uniform > > & | uniforms ()
| Equivalent to gocUniformSet()->uniforms()
void | eraseUniform (const char *name)
| Equivalent to getUniformSet()->eraseUniform(name)
void | eraseUniform (const Uniform *uniform)
| Equivalent to getUniformSet()->eraseUniform(uniform)
void | eraseAllUniforms ()
| Equivalent to getUniformSet()->eraseAllUniforms()
Uniform * | gocUniform (const char *name)
| Equivalent to getUniformSet()->getUniform(name, get_mode)
Uniform * | getUniform (const char *name)
| Equivalent to getUniformSet()->getUniform(name, get_mode)
const Uniform * | getUniform (const char *name) const
| Equivalent to getUniformSet()->getUniform(name, get_mode)
void | setUniformSet (UniformSet *uniforms)
| Installs a new UniformSet.
const UniformSet * | getUniformSet () const
| Returns the installed UniformSet.
UniformSet * | getUniformSet ()
| Returns the installed UniformSet.
UniformSet * | gocUniformSet ()
| Creates and/or returns the installed UniformSet.
const Collection < ActorEventCallback > * | actorEventCallbacks () const
| Returns the list of ActorEventCallback bound to an Actor.
Collection< ActorEventCallback > * | actorEventCallbacks ()
| Returns the list of ActorEventCallback bound to an Actor.
void | dispatchOnActorRenderStarted (real frame_clock, const Camera *camera, Renderable *renderable, const Shader *shader, int pass)
| Calls all the onActorRenderStarted() of all the ActorEventCallback installed on this Actor.
void | dispatchOnActorDelete ()
| Calls all the onActorDelete() of all the ActorEventCallback 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
ref< Effect > | mEffect
ref< Renderable > | mRenderables [VL_MAX_ACTOR_LOD]
ref< Transform > | mTransform
ref< LODEvaluator > | mLODEvaluator
ref< UniformSet > | mUniformSet
ref< Scissor > | mScissor
Collection< ActorEventCallback > | mActorEventCallbacks
int | mRenderBlock
int | mRenderRank
long long | mTransformUpdateTick
long long | mBoundsUpdateTick
unsigned int | mEnableMask
GLuint | mOcclusionQuery
unsigned | mOcclusionQueryTick
bool | mIsOccludee

## Detailed Description

Associates a Renderable object to an Effect and Transform.

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.

Note:

- The same Renderable can be bound to more than one Actor at the same time
- The same Effect can be bound to more than one Actor at the same time
- The same Transform can be bound to more than one Actor at the same time

Remarks:

An Actor must always have a Renderable and Effect bound. If no Transform is specified the Renderable will be rendered as if it had an identity matrix transformation.

Uniforms

The Uniforms defined in the Actor and the ones defined in the Shader must not overlap, that is, an Actor must not define Uniforms that are also present in the Shader's Uniform and vice versa.

See also:
  Transform, Effect, Renderable, Geometry

Definition at line 131 of file Actor.hpp.

## Constructor & Destructor Documentation

vl::Actor::Actor | ( | Renderable * | renderable = `NULL`,
|  | Effect * | effect = `NULL`,
|  | Transform * | transform = `NULL`,
|  | int | block = `0`,
|  | int | rank = `0`
| ) |  | `[inline]`

Constructor.

Parameters:

  renderable | A Renderable defining the Actor's LOD level #0
  effect | The Effect to be used by the Actor
  transform | The Transform to be used by the Actor
  block | The rendering block to which the Actor belongs
  rank | The rendering rank to which the Actor belongs

Definition at line 143 of file Actor.hpp.

References NULL, and VL_DEBUG_SET_OBJECT_NAME.

Actor::~Actor | ( | ) | `[virtual]`

Destructor.

Definition at line 39 of file Actor.cpp.

References deleteOcclusionQuery(), and dispatchOnActorDelete().

## Member Function Documentation

void vl::Actor::setLod | ( | int | lod_index,
|  | Renderable * | renderable
| ) |  | `[inline]`

Sets the Renderable object representing the LOD level specifed by `lod_index`.

Definition at line 160 of file Actor.hpp.

Referenced by vl::SlicedVolume::bindActor(), vl::RaycastVolume::bindActor(), vl::MorphingCallback::bindActor(), vl::VLXClassWrapper_Actor::importActor(), and setLODs().

const Renderable* vl::Actor::lod | ( | int | lod_index ) | const`[inline]`

Returns the Renderable object representing the LOD level specifed by `lod_index`.

Definition at line 174 of file Actor.hpp.

Referenced by boundsDirty(), computeBounds(), vl::PixelLODEvaluator::evaluate(), vl::DistanceLODEvaluator::evaluate(), vl::VLXClassWrapper_Actor::exportActor(), vl::EdgeExtractor::extractEdges(), vl::Rendering::fillRenderQueue(), vl::RayIntersector::intersect(), and vl::DaeLoader::load().

Renderable* vl::Actor::lod | ( | int | lod_index ) | `[inline]`

Returns the Renderable object representing the LOD level specifed by `lod_index`.

Definition at line 177 of file Actor.hpp.

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.

Definition at line 45 of file Actor.cpp.

References setLod(), VL_CHECK, and VL_MAX_ACTOR_LOD.

void vl::Actor::setTransform | ( | Transform * | transform ) | `[inline]`

Binds a Transform to an Actor.

Definition at line 183 of file Actor.hpp.

Referenced by vl::VectorGraphics::drawActor(), and vl::VLXClassWrapper_Actor::importActor().

Transform* vl::Actor::transform | ( | ) | `[inline]`

Returns the Transform bound tho an Actor.

Definition at line 191 of file Actor.hpp.

Referenced by vl::TrackballManipulator::adjustView(), vl::Text::boundingRectTransformed(), boundsDirty(), computeBounds(), vl::PixelLODEvaluator::evaluate(), vl::DistanceLODEvaluator::evaluate(), vl::VLXClassWrapper_Actor::exportActor(), vl::RayIntersector::intersectGeometry(), vl::DaeLoader::load(), vl::SlicedVolume::onActorRenderStarted(), vl::EdgeUpdateCallback::onActorRenderStarted(), vl::DepthSortCallback::onActorRenderStarted(), vl::Renderer::render(), vl::DrawPixels::render_Implementation(), vl::OcclusionCullRenderer::render_pass2(), vl::Text::renderText(), vl::RenderQueue::sort(), vl::SlicedVolume::updateUniforms(), and vl::RaycastVolume::updateUniforms().

const Transform* vl::Actor::transform | ( | ) | const`[inline]`

Returns the Transform bound tho an Actor.

Definition at line 194 of file Actor.hpp.

void vl::Actor::setEffect | ( | Effect * | effect ) | `[inline]`

Binds an Effect to an Actor.

Definition at line 197 of file Actor.hpp.

Referenced by vl::VectorGraphics::drawActor(), vl::VLXClassWrapper_Actor::importActor(), and vl::DaeLoader::load().

Effect* vl::Actor::effect | ( | ) | `[inline]`

Returns the Effect bound to an Actor.

Definition at line 200 of file Actor.hpp.

Referenced by vl::VectorGraphics::drawActor(), vl::VLXClassWrapper_Actor::exportActor(), vl::Rendering::fillRenderQueue(), and vl::DaeLoader::load().

const Effect* vl::Actor::effect | ( | ) | const`[inline]`

Returns the Effect bound to an Actor.

Definition at line 203 of file Actor.hpp.

const AABB& vl::Actor::boundingBox | ( | ) | const`[inline]`

Returns the bounding box (`not` guaranteed to be up to date) that contains this Actor.

See also:
  boundingBoxSafe()

Definition at line 206 of file Actor.hpp.

Referenced by vl::TrackballManipulator::adjustView(), vl::ActorTreeAbstract::computeAABB(), vl::Sector::computeBoundingBox(), vl::SceneManager::computeBounds(), vl::OcclusionCullRenderer::render_pass2(), and vl::SceneManagerPortals::visitSector().

const Sphere& vl::Actor::boundingSphere | ( | ) | const`[inline]`

Returns the bounding sphere (`not` guaranteed to be up to date) that contains this Actor.

See also:
  boundingSphereSafe()

Definition at line 209 of file Actor.hpp.

Referenced by vl::SceneManager::computeBounds(), and vl::Rendering::render().

const AABB& vl::Actor::boundingBoxSafe | ( | ) | `[inline]`

Returns the bounding box (`guaranteed` to be up to date) that contains this Actor.

See also:
  boundingBox()

Definition at line 212 of file Actor.hpp.

const Sphere& vl::Actor::boundingSphereSafe | ( | ) | `[inline]`

Returns the bounding sphere (`guaranteed` to be up to date) that contains this Actor.

See also:
  boundingSphere()

Definition at line 215 of file Actor.hpp.

void Actor::computeBounds | ( | ) |

Computes the bounding box and bounding sphere of an Actor.

Definition at line 95 of file Actor.cpp.

References vl::Renderable::boundingBox(), vl::Renderable::boundsDirty(), vl::Renderable::boundsUpdateTick(), vl::AABB::isNull(), lod(), mAABB, mBoundsUpdateTick, mSphere, mTransformUpdateTick, NULL, transform(), vl::AABB::transformed(), and vl::Transform::worldMatrixUpdateTick().

Referenced by vl::TrackballManipulator::adjustView(), vl::ActorTreeAbstract::computeAABB(), vl::Sector::computeBoundingBox(), vl::SceneManager::computeBounds(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), and vl::SceneManagerPortals::visitSector().

bool Actor::boundsDirty | ( | ) | const

Returns whether the Actor's bounding box and sphere are up to date.

Definition at line 84 of file Actor.cpp.

References vl::Renderable::boundsDirty(), vl::Renderable::boundsUpdateTick(), lod(), mBoundsUpdateTick, mTransformUpdateTick, transform(), and vl::Transform::worldMatrixUpdateTick().

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.

See also:
  setRenderBlock(), Effect::setRenderRank()

Definition at line 232 of file Actor.hpp.

Referenced by vl::SceneManagerVectorGraphics::extractActors(), and vl::VLXClassWrapper_Actor::importActor().

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.

See also:
  setRenderRank(), Effect::setRenderRank()

Definition at line 244 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::importActor().

int vl::Actor::renderRank | ( | ) | const`[inline]`

Returns the rendering rank of an Actor.

Definition at line 247 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::exportActor(), vl::RenderQueueSorterAggressive::operator()(), vl::RenderQueueSorterOcclusion::operator()(), vl::RenderQueueSorterStandard::operator()(), and vl::RenderQueueSorterBasic::operator()().

int vl::Actor::renderBlock | ( | ) | const`[inline]`

Returns the rendering block of an Actor.

Definition at line 250 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::exportActor(), vl::RenderQueueSorterAggressive::operator()(), vl::RenderQueueSorterOcclusion::operator()(), vl::RenderQueueSorterStandard::operator()(), and vl::RenderQueueSorterBasic::operator()().

void vl::Actor::setLODEvaluator | ( | LODEvaluator * | lod_evaluator ) | `[inline]`

Installs the LODEvaluator used to compute the current LOD at rendering time.

Definition at line 253 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::importActor().

LODEvaluator* vl::Actor::lodEvaluator | ( | ) | `[inline]`

Returns the installed LODEvaluator (if any) or NULL.

Definition at line 256 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::exportActor().

const LODEvaluator* vl::Actor::lodEvaluator | ( | ) | const`[inline]`

Returns the installed LODEvaluator (if any) or NULL.

Definition at line 259 of file Actor.hpp.

int Actor::evaluateLOD | ( | Camera * | camera ) |

Definition at line 55 of file Actor.cpp.

References mLODEvaluator.

Referenced by vl::Rendering::fillRenderQueue().

void vl::Actor::setEnableMask | ( | unsigned int | mask ) | `[inline]`

The enable mask of an Actor is usually used to defines whether the actor should be rendered or not depending on the Rendering::enableMask() but it can also be used for user-specific tasks.

Definition at line 265 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::importActor().

unsigned int vl::Actor::enableMask | ( | ) | const`[inline]`

The enable mask of an Actor is usually used to defines whether the actor should be rendered or not depending on the Rendering::enableMask() but it can also be used for user-specific tasks.

Definition at line 269 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::exportActor(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::SceneManager::isEnabled(), vl::Renderer::render(), vl::EdgeRenderer::render(), vl::OcclusionCullRenderer::render_pass1(), and vl::OcclusionCullRenderer::render_pass2().

void Actor::setUniform | ( | Uniform * | uniform ) |

Equivalent to getUniformSet()->setUniform(uniform)

Remarks:
  This function performs a 'setUniformSet(new UniformSet)' if getUniformSet() is NULL.

Definition at line 118 of file Actor.cpp.

References gocUniformSet(), and vl::UniformSet::setUniform().

Referenced by vl::VLXClassWrapper_Actor::importActor().

const std::vector< ref< Uniform > > & Actor::uniforms | ( | ) | const

Equivalent to getUniformSet()->uniforms()

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 120 of file Actor.cpp.

References getUniformSet(), and vl::UniformSet::uniforms().

Referenced by vl::VLXClassWrapper_Actor::exportActor().

std::vector< ref< Uniform > > & Actor::uniforms | ( | ) |

Equivalent to gocUniformSet()->uniforms()

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 122 of file Actor.cpp.

References gocUniformSet(), and vl::UniformSet::uniforms().

void Actor::eraseUniform | ( | const char * | name ) |

Equivalent to getUniformSet()->eraseUniform(name)

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 124 of file Actor.cpp.

References vl::UniformSet::eraseUniform(), and getUniformSet().

void Actor::eraseUniform | ( | const Uniform * | uniform ) |

Equivalent to getUniformSet()->eraseUniform(uniform)

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 126 of file Actor.cpp.

References vl::UniformSet::eraseUniform(), and getUniformSet().

void Actor::eraseAllUniforms | ( | ) |

Equivalent to getUniformSet()->eraseAllUniforms()

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 128 of file Actor.cpp.

References vl::UniformSet::eraseAllUniforms(), and getUniformSet().

Uniform * Actor::gocUniform | ( | const char * | name ) |

Equivalent to getUniformSet()->getUniform(name, get_mode)

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 130 of file Actor.cpp.

References vl::UniformSet::gocUniform(), and gocUniformSet().

Referenced by vl::SlicedVolume::updateUniforms(), and vl::RaycastVolume::updateUniforms().

Uniform * Actor::getUniform | ( | const char * | name ) |

Equivalent to getUniformSet()->getUniform(name, get_mode)

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 132 of file Actor.cpp.

References vl::UniformSet::getUniform(), getUniformSet(), and NULL.

const Uniform * Actor::getUniform | ( | const char * | name ) | const

Equivalent to getUniformSet()->getUniform(name, get_mode)

Remarks:
  You must install a UniformSet with setUniformSet() before calling this function.

Definition at line 134 of file Actor.cpp.

References vl::UniformSet::getUniform(), getUniformSet(), and NULL.

void vl::Actor::setUniformSet | ( | UniformSet * | uniforms ) | `[inline]`

Installs a new UniformSet.

See also:
  - setUniform()
  - uniforms()
  - eraseUniform(const char* name)
  - eraseUniform(const Uniform* uniform)
  - eraseAllUniforms()
  - getUniform()

Definition at line 326 of file Actor.hpp.

const UniformSet* vl::Actor::getUniformSet | ( | ) | const`[inline]`

Returns the installed UniformSet.

See also:
  - setUniform()
  - uniforms()
  - eraseUniform(const char* name)
  - eraseUniform(const Uniform* uniform)
  - eraseAllUniforms()
  - getUniform()

Definition at line 337 of file Actor.hpp.

Referenced by eraseAllUniforms(), eraseUniform(), vl::VLXClassWrapper_Actor::exportActor(), getUniform(), vl::Renderer::render(), and uniforms().

UniformSet* vl::Actor::getUniformSet | ( | ) | `[inline]`

Returns the installed UniformSet.

See also:
  - setUniform()
  - uniforms()
  - eraseUniform(const char* name)
  - eraseUniform(const Uniform* uniform)
  - eraseAllUniforms()
  - getUniform()

Definition at line 348 of file Actor.hpp.

UniformSet* vl::Actor::gocUniformSet | ( | ) | `[inline]`

Creates and/or returns the installed UniformSet.

See also:
  - setUniform()
  - uniforms()
  - eraseUniform(const char* name)
  - eraseUniform(const Uniform* uniform)
  - eraseAllUniforms()
  - getUniform()

Definition at line 359 of file Actor.hpp.

Referenced by gocUniform(), setUniform(), and uniforms().

const Collection<ActorEventCallback>* vl::Actor::actorEventCallbacks | ( | ) | const`[inline]`

Returns the list of ActorEventCallback bound to an Actor.

Definition at line 362 of file Actor.hpp.

Referenced by vl::SlicedVolume::bindActor(), vl::RaycastVolume::bindActor(), vl::MorphingCallback::bindActor(), vl::VLXClassWrapper_Actor::exportActor(), and vl::VLXClassWrapper_Actor::importActor().

Collection<ActorEventCallback>* vl::Actor::actorEventCallbacks | ( | ) | `[inline]`

Returns the list of ActorEventCallback bound to an Actor.

Definition at line 365 of file Actor.hpp.

void vl::Actor::dispatchOnActorRenderStarted | ( | real | frame_clock,
|  | const Camera * | camera,
|  | Renderable * | renderable,
|  | const Shader * | shader,
|  | int | pass
| ) |  | `[inline]`

Calls all the onActorRenderStarted() of all the ActorEventCallback installed on this Actor.

Definition at line 368 of file Actor.hpp.

References vl::ActorEventCallback::isEnabled(), and vl::ActorEventCallback::onActorRenderStarted().

Referenced by vl::Renderer::render().

void vl::Actor::dispatchOnActorDelete | ( | ) | `[inline]`

Calls all the onActorDelete() of all the ActorEventCallback installed on this Actor.

Definition at line 379 of file Actor.hpp.

References vl::ActorEventCallback::onActorDelete().

Referenced by ~Actor().

void vl::Actor::setScissor | ( | Scissor * | scissor ) | `[inline]`

Sets the Scissor to be used when rendering an Actor.

Note:
  You can also define a Scissor on a per-Shader basis using the function Shader::setScissor(). In case both the Shader's and the Actor's Scissor are defined the Actor's Scissor is used.

See also:
  - Scissor
  - Shader::setScissor()

Definition at line 396 of file Actor.hpp.

const Scissor* vl::Actor::scissor | ( | ) | const`[inline]`

Returns the Scissor used when rendering an Actor.

See also:
  - Scissor
  - Actor::setScissor()
  - Shader::setScissor()

Definition at line 403 of file Actor.hpp.

Referenced by vl::Renderer::render(), and vl::OcclusionCullRenderer::render_pass2().

Scissor* vl::Actor::scissor | ( | ) | `[inline]`

Returns the Scissor used when rendering an Actor.

See also:
  - Scissor
  - Actor::setScissor()
  - Shader::setScissor()

Definition at line 411 of file Actor.hpp.

void vl::Actor::setOccludee | ( | bool | is_occludee ) | `[inline]`

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.

Definition at line 415 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::importActor().

bool vl::Actor::isOccludee | ( | ) | const`[inline]`

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.

Definition at line 419 of file Actor.hpp.

Referenced by vl::VLXClassWrapper_Actor::exportActor(), and vl::OcclusionCullRenderer::render_pass2().

void Actor::createOcclusionQuery | ( | ) |

For internal use only.

Creates the occlusion query object name bound this Actor using the OpenGL function glGenQueries().

Definition at line 63 of file Actor.cpp.

References vl::Has_Occlusion_Query, mOcclusionQuery, VL_CHECK, and VL_CHECK_OGL.

Referenced by vl::OcclusionCullRenderer::render_pass2().

void Actor::deleteOcclusionQuery | ( | ) |

For internal use only.

Deletes the occlusion query object name using the OpenGL function glDeleteQueries().

Definition at line 72 of file Actor.cpp.

References vl::Has_Occlusion_Query, and mOcclusionQuery.

Referenced by ~Actor().

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.

Definition at line 431 of file Actor.hpp.

Referenced by vl::OcclusionCullRenderer::render_pass1(), and vl::OcclusionCullRenderer::render_pass2().

void vl::Actor::setOcclusionQueryTick | ( | unsigned | tick ) | `[inline]`

For internal use only.

Definition at line 434 of file Actor.hpp.

Referenced by vl::OcclusionCullRenderer::render_pass2().

unsigned vl::Actor::occlusionQueryTick | ( | ) | const`[inline]`

For internal use only.

Definition at line 437 of file Actor.hpp.

Referenced by vl::OcclusionCullRenderer::render_pass1().

## Member Data Documentation

AABB vl::Actor::mAABB`[protected]`

Definition at line 450 of file Actor.hpp.

Referenced by computeBounds().

Sphere vl::Actor::mSphere`[protected]`

Definition at line 451 of file Actor.hpp.

Referenced by computeBounds().

ref<Effect> vl::Actor::mEffect`[protected]`

Definition at line 452 of file Actor.hpp.

ref<Renderable> vl::Actor::mRenderables[VL_MAX_ACTOR_LOD]`[protected]`

Definition at line 453 of file Actor.hpp.

ref<Transform> vl::Actor::mTransform`[protected]`

Definition at line 454 of file Actor.hpp.

ref<LODEvaluator> vl::Actor::mLODEvaluator`[protected]`

Definition at line 455 of file Actor.hpp.

Referenced by evaluateLOD().

ref<UniformSet> vl::Actor::mUniformSet`[protected]`

Definition at line 456 of file Actor.hpp.

ref<Scissor> vl::Actor::mScissor`[protected]`

Definition at line 457 of file Actor.hpp.

Collection<ActorEventCallback> vl::Actor::mActorEventCallbacks`[protected]`

Definition at line 458 of file Actor.hpp.

int vl::Actor::mRenderBlock`[protected]`

Definition at line 459 of file Actor.hpp.

int vl::Actor::mRenderRank`[protected]`

Definition at line 460 of file Actor.hpp.

long long vl::Actor::mTransformUpdateTick`[protected]`

Definition at line 461 of file Actor.hpp.

Referenced by boundsDirty(), and computeBounds().

long long vl::Actor::mBoundsUpdateTick`[protected]`

Definition at line 462 of file Actor.hpp.

Referenced by boundsDirty(), and computeBounds().

unsigned int vl::Actor::mEnableMask`[protected]`

Definition at line 463 of file Actor.hpp.

GLuint vl::Actor::mOcclusionQuery`[protected]`

Definition at line 464 of file Actor.hpp.

Referenced by createOcclusionQuery(), and deleteOcclusionQuery().

unsigned vl::Actor::mOcclusionQueryTick`[protected]`

Definition at line 465 of file Actor.hpp.

bool vl::Actor::mIsOccludee`[protected]`

Definition at line 466 of file Actor.hpp.

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/Actor.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/Actor.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:20.
Permission is granted to use this page to write and publish articles regarding Visualization Library.