LibrePCB Developers Documentation
OpenGlTriangleObject Class Referencefinal

Asynchronously generates a 3D board scene for OpenGL rendering. More...

#include <opengltriangleobject.h>

+ Inheritance diagram for OpenGlTriangleObject:
+ Collaboration diagram for OpenGlTriangleObject:

Public Member Functions

 OpenGlTriangleObject () noexcept
 
 OpenGlTriangleObject (const OpenGlTriangleObject &other)=delete
 
virtual ~OpenGlTriangleObject () noexcept
 
void setData (const QColor &color, const QVector< QVector3D > &data) noexcept
 
virtual void draw (QOpenGLFunctions &gl, QOpenGLShaderProgram &program) noexcept override
 
OpenGlTriangleObjectoperator= (const OpenGlTriangleObject &rhs)=delete
 
- Public Member Functions inherited from OpenGlObject
 OpenGlObject () noexcept=default
 
 OpenGlObject (const OpenGlObject &other) noexcept=default
 
virtual ~OpenGlObject () noexcept=default
 
virtual void draw (QOpenGLFunctions &gl, QOpenGLShaderProgram &program) noexcept=0
 

Private Attributes

QOpenGLBuffer mBuffer
 
int mCount
 
QMutex mMutex
 
QColor mColor
 
tl::optional< QVector< QVector3D > > mNewTriangles
 

Detailed Description

Asynchronously generates a 3D board scene for OpenGL rendering.

Constructor & Destructor Documentation

◆ OpenGlTriangleObject() [1/2]

OpenGlTriangleObject ( )
noexcept

◆ OpenGlTriangleObject() [2/2]

OpenGlTriangleObject ( const OpenGlTriangleObject other)
delete

◆ ~OpenGlTriangleObject()

~OpenGlTriangleObject ( )
virtualnoexcept

Member Function Documentation

◆ setData()

void setData ( const QColor &  color,
const QVector< QVector3D > &  data 
)
noexcept

◆ draw()

void draw ( QOpenGLFunctions &  gl,
QOpenGLShaderProgram &  program 
)
overridevirtualnoexcept

Implements OpenGlObject.

◆ operator=()

OpenGlTriangleObject & operator= ( const OpenGlTriangleObject rhs)
delete

Member Data Documentation

◆ mBuffer

QOpenGLBuffer mBuffer
private

◆ mCount

int mCount
private

◆ mMutex

QMutex mMutex
private

◆ mColor

QColor mColor
private

◆ mNewTriangles

tl::optional<QVector<QVector3D> > mNewTriangles
private

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