|
Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
DepthSortCallback sorts the primitives of the Geometry bound to the Actor in which the callback is installed. More...
#include <DepthSortCallback.hpp>
Inheritance diagram for vl::DepthSortCallback:Public Member Functions | |
| DepthSortCallback () | |
| Constructor. More... | |
| void | onActorDelete (Actor *) |
| Event notifying that an Actor is being deleted. More... | |
| virtual void | onActorRenderStarted (Actor *actor, real, const Camera *cam, Renderable *renderable, const Shader *, int pass) |
| Performs the actual sorting. More... | |
| template<typename T , typename deT > | |
| void | sort (deT *polys, std::vector< Point< T > > &sorted_points, std::vector< Line< T > > &sorted_lines, std::vector< Triangle< T > > &sorted_triangles, std::vector< Quad< T > > &sorted_quads) |
| ESortMode | sortMode () const |
| void | setSortMode (ESortMode sort_mode) |
| void | invalidateCache () |
| Forces sorting at the next rendering. More... | |
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... | |
| 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 | |
| std::vector< vec3 > | mEyeSpaceVerts |
| std::vector< PrimitiveZ > | mPrimitiveZ |
| std::vector< PointUInt > | mSortedPointsUInt |
| std::vector< LineUInt > | mSortedLinesUInt |
| std::vector< TriangleUInt > | mSortedTrianglesUInt |
| std::vector< QuadUInt > | mSortedQuadsUInt |
| std::vector< PointUShort > | mSortedPointsUShort |
| std::vector< LineUShort > | mSortedLinesUShort |
| std::vector< TriangleUShort > | mSortedTrianglesUShort |
| std::vector< QuadUShort > | mSortedQuadsUShort |
| std::vector< PointUByte > | mSortedPointsUByte |
| std::vector< LineUByte > | mSortedLinesUByte |
| std::vector< TriangleUByte > | mSortedTrianglesUByte |
| std::vector< QuadUByte > | mSortedQuadsUByte |
| vl::mat4 | mCacheMatrix |
| ESortMode | mSortMode |
Protected Attributes inherited from vl::ActorEventCallback | |
| 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 () |
DepthSortCallback sorts the primitives of the Geometry bound to the Actor in which the callback is installed.
In order to work properly DepthSortCallback requires the following:
Despite the fact that the condition list seems to be quite limiting it actually covers the most common usage cases. Furthermore the use of DrawElements* and the primitive types PT_POINTS, PT_LINES, PT_TRIANGLES, PT_QUADS grants the maximum flexibility.
Definition at line 73 of file DepthSortCallback.hpp.
|
inline |
Constructor.
Definition at line 136 of file DepthSortCallback.hpp.
References setSortMode(), and vl::SM_SortBackToFront.
|
inline |
Forces sorting at the next rendering.
Definition at line 339 of file DepthSortCallback.hpp.
References mCacheMatrix.
|
inlinevirtual |
Event notifying that an Actor is being deleted.
Implements vl::ActorEventCallback.
Definition at line 142 of file DepthSortCallback.hpp.
|
inlinevirtual |
Performs the actual sorting.
Implements vl::ActorEventCallback.
Definition at line 145 of file DepthSortCallback.hpp.
References vl::Object::as(), vl::Geometry::drawCalls(), vl::ArrayAbstract::getAsVec3(), mCacheMatrix, mEyeSpaceVerts, mSortedLinesUByte, mSortedLinesUInt, mSortedLinesUShort, mSortedPointsUByte, mSortedPointsUInt, mSortedPointsUShort, mSortedQuadsUByte, mSortedQuadsUInt, mSortedQuadsUShort, mSortedTrianglesUByte, mSortedTrianglesUInt, mSortedTrianglesUShort, vl::Renderable::setBufferObjectDirty(), vl::Renderable::setDisplayListDirty(), vl::ArrayAbstract::size(), vl::Actor::transform(), vl::Geometry::vertexArray(), vl::Camera::viewMatrix(), and vl::Transform::worldMatrix().
|
inline |
Definition at line 334 of file DepthSortCallback.hpp.
References mSortMode.
Referenced by DepthSortCallback().
|
inline |
Definition at line 200 of file DepthSortCallback.hpp.
References vl::BU_DYNAMIC_DRAW, vl::Has_BufferObject, mEyeSpaceVerts, mPrimitiveZ, vl::PT_LINES, vl::PT_POINTS, vl::PT_QUADS, vl::PT_TRIANGLES, vl::SM_SortBackToFront, and sortMode().
|
inline |
Definition at line 333 of file DepthSortCallback.hpp.
References mSortMode.
Referenced by vlX::VLXClassWrapper_ActorEventCallback::exportActorEventCallback(), and sort().
|
protected |
Definition at line 360 of file DepthSortCallback.hpp.
Referenced by invalidateCache(), and onActorRenderStarted().
|
protected |
Definition at line 342 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted(), and sort().
|
protected |
Definition at line 343 of file DepthSortCallback.hpp.
Referenced by sort().
|
protected |
Definition at line 356 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 346 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 351 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 355 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 345 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 350 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 358 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 348 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 353 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 357 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 347 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 352 of file DepthSortCallback.hpp.
Referenced by onActorRenderStarted().
|
protected |
Definition at line 362 of file DepthSortCallback.hpp.
Referenced by setSortMode(), and sortMode().
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:49.
© Copyright Michele Bosi. All rights reserved.