Workspace 6.21.5
Public Types | Public Member Functions | Protected Member Functions | List of all members
WSGLModelUpdateInfo Class Reference

Descriptor class for queueing model updates via the ModelProcessingThread.

#include <Rendering/OpenGL/wsglmodelupdateinfo.h>

Public Types

using PriorityType = size_t
 
enum class  Result { Incomplete , Failed , Succeeded , Aborted }
 Possible results of the update. More...
 
enum  Stage { Queued , NormalsUpdated , Completed }
 Defines the possible stages that take place throughout an update. More...
 

Public Member Functions

 WSGLModelUpdateInfo (const QString &modelId, Mesh::MeshModelSource &source, double edgeBreakThreshold, PriorityType priority=0)
 
 WSGLModelUpdateInfo (const WSGLModelUpdateInfo &)=delete
 
 ~WSGLModelUpdateInfo ()
 
QList< WSGLBufferObjectCacheItemPtrgetCompletedBufferObjects () const
 
Stage getCurrentStage () const
 
double getEdgeBreakThreshold () const
 
Mesh::MeshModelSource::LockedPtr< false > getMeshModelSource ()
 
const QString & getModelId () const
 
const Mesh::MultiNodeNormalsgetNormals () const
 
PriorityType getPriority () const
 
Result getResult () const
 
const QDateTime & getTimeNormalsGenerated () const
 
bool isMeshModelSourceDeleted () const
 
WSGLModelUpdateInfooperator= (const WSGLModelUpdateInfo &)=delete
 
void queueCopyToOpenGLHexahedralVolumes (const WSGLBufferObjectCacheItemPtr &item, GLuint *buffer)
 
void queueCopyToOpenGLPoints (const WSGLBufferObjectCacheItemPtr &item, GLuint *buffer)
 
void queueCopyToOpenGLPositionsAndNormals (const WSGLBufferObjectCacheItemPtr &item, GLfloat *buffer)
 
void queueCopyToOpenGLQuads (const WSGLBufferObjectCacheItemPtr &item, GLuint *buffer)
 
void queueCopyToOpenGLSegments (const WSGLBufferObjectCacheItemPtr &item, GLuint *buffer)
 
void queueCopyToOpenGLTriangles (const WSGLBufferObjectCacheItemPtr &item, GLuint *buffer)
 
void queueCopyToOpenGLVolumesAsTriangles (const WSGLBufferObjectCacheItemPtr &item, GLuint *volBuffer)
 
void queueCopyToOpenGLVolumesAsTrianglesWithAdjacency (const WSGLBufferObjectCacheItemPtr &item, GLuint *volBuffer)
 
void setPriority (PriorityType p)
 
void updateNormals (Mesh::MeshModelInterface &model)
 

Protected Member Functions

void executeQueuedGLCopyFunctions (Mesh::MeshModelInterface &model)
 
void setCompleted (Result result)
 

Member Typedef Documentation

◆ PriorityType

using PriorityType = size_t

Member Enumeration Documentation

◆ Result

enum class Result
strong
Enumerator
Incomplete 
Failed 
Succeeded 
Aborted 

◆ Stage

enum Stage
Note
Order is important here, as comparisons using < are used in the code.
Enumerator
Queued 
NormalsUpdated 
Completed 

Constructor & Destructor Documentation

◆ WSGLModelUpdateInfo() [1/2]

WSGLModelUpdateInfo ( const QString &  modelId,
Mesh::MeshModelSource source,
double  edgeBreakThreshold,
PriorityType  priority = 0 
)

◆ WSGLModelUpdateInfo() [2/2]

◆ ~WSGLModelUpdateInfo()

~WSGLModelUpdateInfo ( )
default

Member Function Documentation

◆ executeQueuedGLCopyFunctions()

void executeQueuedGLCopyFunctions ( Mesh::MeshModelInterface model)
protected
Parameters
modelThe model for which we are queueing data copy operations for.

◆ getCompletedBufferObjects()

QList< WSGLBufferObjectCacheItemPtr > getCompletedBufferObjects ( ) const
Returns
A list of all buffer objects that have had their copy operations completed. Generally, if the operation was able to be completed, this should be everything that was added via one of the queue functions.

◆ getCurrentStage()

WSGLModelUpdateInfo::Stage getCurrentStage ( ) const

◆ getEdgeBreakThreshold()

double getEdgeBreakThreshold ( ) const

◆ getMeshModelSource()

Mesh::MeshModelSource::LockedPtr< false > getMeshModelSource ( )

◆ getModelId()

const QString & getModelId ( ) const

◆ getNormals()

const Mesh::MultiNodeNormals & getNormals ( ) const

◆ getPriority()

WSGLModelUpdateInfo::PriorityType getPriority ( ) const

◆ getResult()

WSGLModelUpdateInfo::Result getResult ( ) const

◆ getTimeNormalsGenerated()

const QDateTime & getTimeNormalsGenerated ( ) const

◆ isMeshModelSourceDeleted()

bool isMeshModelSourceDeleted ( ) const

◆ operator=()

WSGLModelUpdateInfo & operator= ( const WSGLModelUpdateInfo )
delete

◆ queueCopyToOpenGLHexahedralVolumes()

void queueCopyToOpenGLHexahedralVolumes ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  buffer 
)

◆ queueCopyToOpenGLPoints()

void queueCopyToOpenGLPoints ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  buffer 
)

◆ queueCopyToOpenGLPositionsAndNormals()

void queueCopyToOpenGLPositionsAndNormals ( const WSGLBufferObjectCacheItemPtr item,
GLfloat *  buffer 
)

◆ queueCopyToOpenGLQuads()

void queueCopyToOpenGLQuads ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  buffer 
)

◆ queueCopyToOpenGLSegments()

void queueCopyToOpenGLSegments ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  buffer 
)

◆ queueCopyToOpenGLTriangles()

void queueCopyToOpenGLTriangles ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  buffer 
)

◆ queueCopyToOpenGLVolumesAsTriangles()

void queueCopyToOpenGLVolumesAsTriangles ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  volBuffer 
)

◆ queueCopyToOpenGLVolumesAsTrianglesWithAdjacency()

void queueCopyToOpenGLVolumesAsTrianglesWithAdjacency ( const WSGLBufferObjectCacheItemPtr item,
GLuint *  volBuffer 
)

◆ setCompleted()

void setCompleted ( Result  result)
protected

◆ setPriority()

void setPriority ( WSGLModelUpdateInfo::PriorityType  p)

◆ updateNormals()

void updateNormals ( Mesh::MeshModelInterface model)