Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The ActorEventCallback class defines a callback object to react to Actor-related events. More...
#include <Actor.hpp>
Public Member Functions | |
ActorEventCallback () | |
virtual void | onActorRenderStarted (Actor *actor, real frame_clock, const Camera *cam, Renderable *renderable, const Shader *shader, int pass)=0 |
Event generated just before an Actor is rendered but after the render states are ready and setup. More... | |
virtual void | onActorDelete (Actor *actor)=0 |
Event notifying that an Actor is being deleted. More... | |
void | setEnabled (bool enabled) |
bool | isEnabled () const |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Attributes | |
bool | mEnabled |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
The ActorEventCallback class defines a callback object to react to Actor-related events.
Usually an ActorEventCallback is used to perform a per-Actor operation like changing some attributes of the Actor itself or of the associated Renderable/Geometry. For example the MorphingCallback class is used to aid the rendering of a MorphingCallback, while the DepthSortCallback class is used to perform per-Actor polygon sorting.
You can test whether the shader has a GLSLProgram bound to it or not by simply testing shader->glslProgram() != NULL. If you update a uniform you must ensure that all the Actor[s] using the same GLSLProgram appropriately setup such uniform.
|
inline |
Definition at line 96 of file Actor.hpp.
Referenced by vl::Actor::dispatchOnActorRenderStarted().
|
pure virtual |
Event notifying that an Actor is being deleted.
Implemented in vl::DepthSortCallback, vl::EdgeUpdateCallback, vl::MorphingCallback, vl::SlicedVolume, and vl::RaycastVolume.
Referenced by vl::Actor::dispatchOnActorDelete().
|
pure virtual |
Event generated just before an Actor is rendered but after the render states are ready and setup.
Reimplement to react to this event.
actor | The Actor bound to this rendering callback. |
frame_clock | The current rendering frame time, usually used for animation purposes. |
cam | The camera used for the current rendering. |
renderable | The currently selected Actor LOD. |
shader | The currently active Shader. |
pass | The current Actor[s] rendering pass. |
Implemented in vl::DepthSortCallback, vl::EdgeUpdateCallback, vl::MorphingCallback, vl::SlicedVolume, and vl::RaycastVolume.
Referenced by vl::Actor::dispatchOnActorRenderStarted().
|
inline |
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:05.
© Copyright Michele Bosi. All rights reserved.