Workspace 6.21.5
|
Encapsulates the geometry of an OpenGL rendered item. More...
#include <Rendering/OpenGL/wsglgeometry.h>
This class exists so that we can group all the geometry for a single model into one reusable object which has its own concept of "last updated". This enables the renderer to know everything about a cached model's geometry, and know when it needs to update it.
WSGLGeometry | ( | const QString & | modelId, |
double | edgeBreakThreshold | ||
) |
~WSGLGeometry | ( | ) |
void clearAllElements | ( | ) |
Removes all primitives from the render item.
void clearVertexData | ( | ) |
bool containsAnyElements | ( | ) | const |
bool containsElements | ( | const Mesh::ElementType::Type & | type | ) | const |
Tests whether the specified primitive type exists in the render item.
bool containsOnlyElements | ( | const Mesh::ElementType::Type & | type | ) | const |
Convenience function. Tests whether only the specified primitive type exists in this item.
Mesh::ElementType::List getAllElementTypes | ( | ) | const |
WSGLBufferObjectCache * getBufferObjectCache | ( | ) | const |
double getEdgeBreakThreshold | ( | ) | const |
WSGLBufferObjectCacheItemPtr getElementBuffer | ( | const Mesh::ElementType::Type & | type | ) | const |
Returns the buffer object containing the primitives of the specified type associated with this render item.
type | The type of primitives to retrieve. |
const ElementIdMap & getElementBufferIds | ( | ) | const |
QString getGeomId | ( | ) | const |
const Mesh::BoundingBoxMinimal & getLocalBoundingBox | ( | ) | const |
const QString & getModelId | ( | ) | const |
bool getOptimizeOutInternalVolumeElements | ( | ) | const |
WSGLBufferObjectCacheItemPtr getVertexBuffer | ( | ) | const |
Returns the buffer object containing the vertex data (positions and / or normals) for this render item.
bool isBoundingBoxUpToDate | ( | const QDateTime & | timestamp | ) | const |
bool isEmpty | ( | ) | const |
bool isUpToDate | ( | const QDateTime & | timestamp | ) | const |
timestamp | The time we are comparing the geometry's updated state against. |
void setBufferObjectCache | ( | WSGLBufferObjectCache & | cache | ) |
void setContainsElements | ( | const Mesh::ElementType::Type & | type, |
bool | b | ||
) |
Assigns the specified buffer object (of type ELEMENT_ARRAY_BUFFER) as the collection of primitives representing the specified type.
void setEdgeBreakThreshold | ( | double | t | ) |
void setIsEmpty | ( | bool | b | ) |
void setLocalBoundingBox | ( | const Mesh::BoundingBoxMinimal & | bb | ) |
bb | The bounding box of the geometry in local coordinates. |
void setOptimizeOutInternalVolumeElements | ( | bool | val | ) |
val | If true, then the geometry render will optimize out internal volume (tetrahedral) elements. |