Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Defines a set of actions to be executed to a Geometry as soon as it is loaded. More...
#include <GeometryLoadCallback.hpp>
Public Member Functions | |
GeometryLoadCallback () | |
void | operator() (ResourceDatabase *db) |
bool | discardOriginalNormals () const |
Discards the original normals. More... | |
void | setDiscardOriginalNormals (bool on) |
Discards the original normals. More... | |
bool | computeNormals () const |
Compute normals if not present. More... | |
void | setComputeNormals (bool cn) |
Compute normals if not present. More... | |
bool | removeDoubles () const |
Remove duplicated vertices. More... | |
void | setRemoveDoubles (bool rd) |
Remove duplicated vertices. More... | |
void | setSortVertices (bool on) |
Sorts the mesh's vertices for better performances. More... | |
bool | sortVertices () const |
Sorts the mesh's vertices for better performances. More... | |
void | setStripfy (bool on) |
Convert mesh into a set of triangle strips if possible. More... | |
bool | stripfy () const |
Convert mesh into a set of triangle strips if possible. More... | |
bool | convertToDrawArrays () const |
Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true) . More... | |
void | setConvertToDrawArrays (bool on) |
Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true) . More... | |
void | setUseDisplayLists (bool on) |
Enable display lists usage (overrides BufferObjects) More... | |
bool | useDisplayLists () const |
Enable display lists usage (overrides BufferObjects) More... | |
void | setUseBufferObjects (bool on) |
Enable BufferObject usage if display lists are disabled. More... | |
bool | useBufferObjects () const |
Enable BufferObject usage if display lists are disabled. More... | |
const mat4 & | transformMatrix () const |
void | setTransformMatrix (const mat4 &m) |
bool | transformGeometry () const |
Transforms the Geometries using transformMatrix(). More... | |
void | setTransformGeometry (bool on) |
Transforms the Geometries using transformMatrix(). More... | |
bool | makeGLESFriendly () const |
If true calls Geometry::makeGLESFriendly() More... | |
void | setMakeGLESFriendly (bool on) |
If true calls Geometry::makeGLESFriendly() More... | |
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 | |
mat4 | mMatrix |
bool | mTransformGeometry |
bool | mDiscardOriginalNormals |
bool | mComputeNormals |
bool | mRemoveDoubles |
bool | mSortVertices |
bool | mStripfy |
bool | mConvertToDrawArrays |
bool | mUseDisplayLists |
bool | mUseBufferObjects |
bool | mMakeGLESFriendly |
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 () |
Defines a set of actions to be executed to a Geometry as soon as it is loaded.
Definition at line 45 of file GeometryLoadCallback.hpp.
|
inline |
Definition at line 50 of file GeometryLoadCallback.hpp.
References mComputeNormals, mConvertToDrawArrays, mDiscardOriginalNormals, mMakeGLESFriendly, mRemoveDoubles, mSortVertices, mStripfy, mTransformGeometry, mUseBufferObjects, and mUseDisplayLists.
|
inline |
Compute normals if not present.
Definition at line 108 of file GeometryLoadCallback.hpp.
References mComputeNormals.
Referenced by operator()().
|
inline |
Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true)
.
Definition at line 128 of file GeometryLoadCallback.hpp.
References mConvertToDrawArrays.
Referenced by operator()().
|
inline |
Discards the original normals.
Definition at line 103 of file GeometryLoadCallback.hpp.
References mDiscardOriginalNormals.
Referenced by operator()().
|
inline |
If true calls Geometry::makeGLESFriendly()
Definition at line 151 of file GeometryLoadCallback.hpp.
References mMakeGLESFriendly.
Referenced by operator()().
|
inlinevirtual |
Implements vl::LoadCallback.
Definition at line 64 of file GeometryLoadCallback.hpp.
References computeNormals(), convertToDrawArrays(), discardOriginalNormals(), vl::ResourceDatabase::get(), makeGLESFriendly(), NULL, vl::DoubleVertexRemover::removeDoubles(), removeDoubles(), setRemoveDoubles(), sortVertices(), vl::TriangleStripGenerator::stripfy(), stripfy(), transformGeometry(), transformMatrix(), useBufferObjects(), and useDisplayLists().
|
inline |
Remove duplicated vertices.
Definition at line 113 of file GeometryLoadCallback.hpp.
References mRemoveDoubles.
Referenced by operator()().
|
inline |
Compute normals if not present.
Definition at line 110 of file GeometryLoadCallback.hpp.
References mComputeNormals.
|
inline |
Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true)
.
Definition at line 130 of file GeometryLoadCallback.hpp.
References mConvertToDrawArrays.
|
inline |
Discards the original normals.
Definition at line 105 of file GeometryLoadCallback.hpp.
References mDiscardOriginalNormals.
|
inline |
If true calls Geometry::makeGLESFriendly()
Definition at line 153 of file GeometryLoadCallback.hpp.
References mMakeGLESFriendly.
|
inline |
Remove duplicated vertices.
Definition at line 115 of file GeometryLoadCallback.hpp.
References mRemoveDoubles.
Referenced by operator()().
|
inline |
Sorts the mesh's vertices for better performances.
Definition at line 118 of file GeometryLoadCallback.hpp.
References mSortVertices.
|
inline |
Convert mesh into a set of triangle strips if possible.
Definition at line 123 of file GeometryLoadCallback.hpp.
References mStripfy.
|
inline |
Transforms the Geometries using transformMatrix().
Definition at line 148 of file GeometryLoadCallback.hpp.
References mTransformGeometry.
|
inline |
Definition at line 143 of file GeometryLoadCallback.hpp.
References mMatrix.
|
inline |
Enable BufferObject usage if display lists are disabled.
Definition at line 138 of file GeometryLoadCallback.hpp.
References mUseBufferObjects.
|
inline |
Enable display lists usage (overrides BufferObjects)
Definition at line 133 of file GeometryLoadCallback.hpp.
References mUseDisplayLists.
|
inline |
Sorts the mesh's vertices for better performances.
Definition at line 120 of file GeometryLoadCallback.hpp.
References mSortVertices.
Referenced by operator()().
|
inline |
Convert mesh into a set of triangle strips if possible.
Definition at line 125 of file GeometryLoadCallback.hpp.
References mStripfy.
Referenced by operator()().
|
inline |
Transforms the Geometries using transformMatrix().
Definition at line 146 of file GeometryLoadCallback.hpp.
References mTransformGeometry.
Referenced by operator()().
|
inline |
Definition at line 142 of file GeometryLoadCallback.hpp.
References mMatrix.
Referenced by operator()().
|
inline |
Enable BufferObject usage if display lists are disabled.
Definition at line 140 of file GeometryLoadCallback.hpp.
References mUseBufferObjects.
Referenced by operator()().
|
inline |
Enable display lists usage (overrides BufferObjects)
Definition at line 135 of file GeometryLoadCallback.hpp.
References mUseDisplayLists.
Referenced by operator()().
|
protected |
Definition at line 159 of file GeometryLoadCallback.hpp.
Referenced by computeNormals(), GeometryLoadCallback(), and setComputeNormals().
|
protected |
Definition at line 163 of file GeometryLoadCallback.hpp.
Referenced by convertToDrawArrays(), GeometryLoadCallback(), and setConvertToDrawArrays().
|
protected |
Definition at line 158 of file GeometryLoadCallback.hpp.
Referenced by discardOriginalNormals(), GeometryLoadCallback(), and setDiscardOriginalNormals().
|
protected |
Definition at line 166 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), makeGLESFriendly(), and setMakeGLESFriendly().
|
protected |
Definition at line 156 of file GeometryLoadCallback.hpp.
Referenced by setTransformMatrix(), and transformMatrix().
|
protected |
Definition at line 160 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), removeDoubles(), and setRemoveDoubles().
|
protected |
Definition at line 161 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), setSortVertices(), and sortVertices().
|
protected |
Definition at line 162 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), setStripfy(), and stripfy().
|
protected |
Definition at line 157 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), setTransformGeometry(), and transformGeometry().
|
protected |
Definition at line 165 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), setUseBufferObjects(), and useBufferObjects().
|
protected |
Definition at line 164 of file GeometryLoadCallback.hpp.
Referenced by GeometryLoadCallback(), setUseDisplayLists(), and useDisplayLists().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:08.
© Copyright Michele Bosi. All rights reserved.