Visualization Library 2.0.0

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

VL     Star     Watch     Fork     Issue

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

Defines a set of actions to be executed to a Geometry as soon as it is loaded. More...

#include <GeometryLoadCallback.hpp>

+ Inheritance diagram for vl::GeometryLoadCallback:

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 mat4transformMatrix () 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...
 
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...
 

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
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GeometryLoadCallback()

vl::GeometryLoadCallback::GeometryLoadCallback ( )
inline

Member Function Documentation

◆ computeNormals()

bool vl::GeometryLoadCallback::computeNormals ( ) const
inline

Compute normals if not present.

Definition at line 108 of file GeometryLoadCallback.hpp.

References mComputeNormals.

Referenced by operator()().

◆ convertToDrawArrays()

bool vl::GeometryLoadCallback::convertToDrawArrays ( ) const
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()().

◆ discardOriginalNormals()

bool vl::GeometryLoadCallback::discardOriginalNormals ( ) const
inline

Discards the original normals.

Definition at line 103 of file GeometryLoadCallback.hpp.

References mDiscardOriginalNormals.

Referenced by operator()().

◆ makeGLESFriendly()

bool vl::GeometryLoadCallback::makeGLESFriendly ( ) const
inline

If true calls Geometry::makeGLESFriendly()

Definition at line 151 of file GeometryLoadCallback.hpp.

References mMakeGLESFriendly.

Referenced by operator()().

◆ operator()()

void vl::GeometryLoadCallback::operator() ( ResourceDatabase db)
inlinevirtual

◆ removeDoubles()

bool vl::GeometryLoadCallback::removeDoubles ( ) const
inline

Remove duplicated vertices.

Definition at line 113 of file GeometryLoadCallback.hpp.

References mRemoveDoubles.

Referenced by operator()().

◆ setComputeNormals()

void vl::GeometryLoadCallback::setComputeNormals ( bool  cn)
inline

Compute normals if not present.

Definition at line 110 of file GeometryLoadCallback.hpp.

References mComputeNormals.

◆ setConvertToDrawArrays()

void vl::GeometryLoadCallback::setConvertToDrawArrays ( bool  on)
inline

Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true).

Definition at line 130 of file GeometryLoadCallback.hpp.

References mConvertToDrawArrays.

◆ setDiscardOriginalNormals()

void vl::GeometryLoadCallback::setDiscardOriginalNormals ( bool  on)
inline

Discards the original normals.

Definition at line 105 of file GeometryLoadCallback.hpp.

References mDiscardOriginalNormals.

◆ setMakeGLESFriendly()

void vl::GeometryLoadCallback::setMakeGLESFriendly ( bool  on)
inline

If true calls Geometry::makeGLESFriendly()

Definition at line 153 of file GeometryLoadCallback.hpp.

References mMakeGLESFriendly.

◆ setRemoveDoubles()

void vl::GeometryLoadCallback::setRemoveDoubles ( bool  rd)
inline

Remove duplicated vertices.

Definition at line 115 of file GeometryLoadCallback.hpp.

References mRemoveDoubles.

Referenced by operator()().

◆ setSortVertices()

void vl::GeometryLoadCallback::setSortVertices ( bool  on)
inline

Sorts the mesh's vertices for better performances.

Definition at line 118 of file GeometryLoadCallback.hpp.

References mSortVertices.

◆ setStripfy()

void vl::GeometryLoadCallback::setStripfy ( bool  on)
inline

Convert mesh into a set of triangle strips if possible.

Definition at line 123 of file GeometryLoadCallback.hpp.

References mStripfy.

◆ setTransformGeometry()

void vl::GeometryLoadCallback::setTransformGeometry ( bool  on)
inline

Transforms the Geometries using transformMatrix().

Definition at line 148 of file GeometryLoadCallback.hpp.

References mTransformGeometry.

◆ setTransformMatrix()

void vl::GeometryLoadCallback::setTransformMatrix ( const mat4 m)
inline

Definition at line 143 of file GeometryLoadCallback.hpp.

References mMatrix.

◆ setUseBufferObjects()

void vl::GeometryLoadCallback::setUseBufferObjects ( bool  on)
inline

Enable BufferObject usage if display lists are disabled.

Definition at line 138 of file GeometryLoadCallback.hpp.

References mUseBufferObjects.

◆ setUseDisplayLists()

void vl::GeometryLoadCallback::setUseDisplayLists ( bool  on)
inline

Enable display lists usage (overrides BufferObjects)

Definition at line 133 of file GeometryLoadCallback.hpp.

References mUseDisplayLists.

◆ sortVertices()

bool vl::GeometryLoadCallback::sortVertices ( ) const
inline

Sorts the mesh's vertices for better performances.

Definition at line 120 of file GeometryLoadCallback.hpp.

References mSortVertices.

Referenced by operator()().

◆ stripfy()

bool vl::GeometryLoadCallback::stripfy ( ) const
inline

Convert mesh into a set of triangle strips if possible.

Definition at line 125 of file GeometryLoadCallback.hpp.

References mStripfy.

Referenced by operator()().

◆ transformGeometry()

bool vl::GeometryLoadCallback::transformGeometry ( ) const
inline

Transforms the Geometries using transformMatrix().

Definition at line 146 of file GeometryLoadCallback.hpp.

References mTransformGeometry.

Referenced by operator()().

◆ transformMatrix()

const mat4& vl::GeometryLoadCallback::transformMatrix ( ) const
inline

Definition at line 142 of file GeometryLoadCallback.hpp.

References mMatrix.

Referenced by operator()().

◆ useBufferObjects()

bool vl::GeometryLoadCallback::useBufferObjects ( ) const
inline

Enable BufferObject usage if display lists are disabled.

Definition at line 140 of file GeometryLoadCallback.hpp.

References mUseBufferObjects.

Referenced by operator()().

◆ useDisplayLists()

bool vl::GeometryLoadCallback::useDisplayLists ( ) const
inline

Enable display lists usage (overrides BufferObjects)

Definition at line 135 of file GeometryLoadCallback.hpp.

References mUseDisplayLists.

Referenced by operator()().

Member Data Documentation

◆ mComputeNormals

bool vl::GeometryLoadCallback::mComputeNormals
protected

◆ mConvertToDrawArrays

bool vl::GeometryLoadCallback::mConvertToDrawArrays
protected

◆ mDiscardOriginalNormals

bool vl::GeometryLoadCallback::mDiscardOriginalNormals
protected

◆ mMakeGLESFriendly

bool vl::GeometryLoadCallback::mMakeGLESFriendly
protected

◆ mMatrix

mat4 vl::GeometryLoadCallback::mMatrix
protected

Definition at line 156 of file GeometryLoadCallback.hpp.

Referenced by setTransformMatrix(), and transformMatrix().

◆ mRemoveDoubles

bool vl::GeometryLoadCallback::mRemoveDoubles
protected

Definition at line 160 of file GeometryLoadCallback.hpp.

Referenced by GeometryLoadCallback(), removeDoubles(), and setRemoveDoubles().

◆ mSortVertices

bool vl::GeometryLoadCallback::mSortVertices
protected

Definition at line 161 of file GeometryLoadCallback.hpp.

Referenced by GeometryLoadCallback(), setSortVertices(), and sortVertices().

◆ mStripfy

bool vl::GeometryLoadCallback::mStripfy
protected

Definition at line 162 of file GeometryLoadCallback.hpp.

Referenced by GeometryLoadCallback(), setStripfy(), and stripfy().

◆ mTransformGeometry

bool vl::GeometryLoadCallback::mTransformGeometry
protected

◆ mUseBufferObjects

bool vl::GeometryLoadCallback::mUseBufferObjects
protected

◆ mUseDisplayLists

bool vl::GeometryLoadCallback::mUseDisplayLists
protected

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