Visualization Library 2.1.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | List of all members
vl::EdgeUpdateCallback Class Reference

The EdgeUpdateCallback class updates at every frame the edges of an Actor for the purpose of edge-enhancement. More...

#include <EdgeUpdateCallback.hpp>

+ Inheritance diagram for vl::EdgeUpdateCallback:

Public Member Functions

 EdgeUpdateCallback ()
 
 EdgeUpdateCallback (const std::vector< EdgeExtractor::Edge > &edge)
 
void setShowCreases (bool sonly)
 If true only the edges forming the silhouette of an object will be rendered. More...
 
bool showCreases () const
 If true only the edges forming the silhouette of an object will be rendered. More...
 
virtual void onActorDelete (Actor *)
 Event notifying that an Actor is being deleted. More...
 
virtual void onActorRenderStarted (Actor *act, real, const Camera *cam, Renderable *renderable, const Shader *, int pass)
 Event generated just before an Actor is rendered but after the render states are ready and setup. More...
 
const std::vector< EdgeExtractor::Edge > & edges () const
 
std::vector< EdgeExtractor::Edge > & edges ()
 
- Public Member Functions inherited from vl::ActorEventCallback
 ActorEventCallback ()
 
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...
 
Objectoperator= (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...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () 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...
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 
- Protected Attributes inherited from vl::ActorEventCallback
bool mEnabled
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

The EdgeUpdateCallback class updates at every frame the edges of an Actor for the purpose of edge-enhancement.

See also
EdgeExtractor

Definition at line 44 of file EdgeUpdateCallback.hpp.

Constructor & Destructor Documentation

◆ EdgeUpdateCallback() [1/2]

vl::EdgeUpdateCallback::EdgeUpdateCallback ( )
inline

Definition at line 49 of file EdgeUpdateCallback.hpp.

◆ EdgeUpdateCallback() [2/2]

vl::EdgeUpdateCallback::EdgeUpdateCallback ( const std::vector< EdgeExtractor::Edge > &  edge)
inline

Definition at line 54 of file EdgeUpdateCallback.hpp.

Member Function Documentation

◆ edges() [1/2]

const std::vector<EdgeExtractor::Edge>& vl::EdgeUpdateCallback::edges ( ) const
inline

Definition at line 105 of file EdgeUpdateCallback.hpp.

Referenced by onActorRenderStarted().

◆ edges() [2/2]

std::vector<EdgeExtractor::Edge>& vl::EdgeUpdateCallback::edges ( )
inline

Definition at line 106 of file EdgeUpdateCallback.hpp.

◆ onActorDelete()

virtual void vl::EdgeUpdateCallback::onActorDelete ( Actor actor)
inlinevirtual

Event notifying that an Actor is being deleted.

Implements vl::ActorEventCallback.

Definition at line 64 of file EdgeUpdateCallback.hpp.

◆ onActorRenderStarted()

virtual void vl::EdgeUpdateCallback::onActorRenderStarted ( Actor actor,
real  frame_clock,
const Camera cam,
Renderable renderable,
const Shader shader,
int  pass 
)
inlinevirtual

Event generated just before an Actor is rendered but after the render states are ready and setup.

Reimplement to react to this event.

Parameters
actorThe Actor bound to this rendering callback.
frame_clockThe current rendering frame time, usually used for animation purposes.
camThe camera used for the current rendering.
renderableThe currently selected Actor LOD.
shaderThe currently active Shader.
passThe current Actor[s] rendering pass.

Implements vl::ActorEventCallback.

Definition at line 66 of file EdgeUpdateCallback.hpp.

References vl::Matrix4< T_Scalar >::as3x3(), vl::dot(), edges(), vl::Matrix4< T_Scalar >::getInverse(), vl::Vector3< T_Scalar >::normalize(), showCreases(), vl::Actor::transform(), vl::Camera::viewMatrix(), and vl::Transform::worldMatrix().

◆ setShowCreases()

void vl::EdgeUpdateCallback::setShowCreases ( bool  sonly)
inline

If true only the edges forming the silhouette of an object will be rendered.

Definition at line 60 of file EdgeUpdateCallback.hpp.

◆ showCreases()

bool vl::EdgeUpdateCallback::showCreases ( ) const
inline

If true only the edges forming the silhouette of an object will be rendered.

Definition at line 62 of file EdgeUpdateCallback.hpp.

Referenced by onActorRenderStarted().


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