LibrePCB Developers Documentation
|
Asynchronously generates a 3D board scene for OpenGL rendering. More...
#include <openglscenebuilder.h>
Inherits QObject.
Public Types | |
typedef std::tuple< qreal, qreal, qreal > | Color |
typedef QMap< Color, QVector< QVector3D > > | StepModel |
Signals | |
void | started () |
void | finished (QString errorMsg) |
void | objectAdded (std::shared_ptr< librepcb::editor::OpenGlObject > obj) |
void | objectRemoved (std::shared_ptr< librepcb::editor::OpenGlObject > obj) |
void | objectUpdated (std::shared_ptr< librepcb::editor::OpenGlObject > obj) |
Public Member Functions | |
OpenGlSceneBuilder (QObject *parent=nullptr) noexcept | |
OpenGlSceneBuilder (const OpenGlSceneBuilder &other)=delete | |
~OpenGlSceneBuilder () noexcept | |
void | start (std::shared_ptr< SceneData3D > data) noexcept |
Start building scene asynchronously. | |
bool | isBusy () const noexcept |
Check if there is currently a build in progress. | |
void | waitForFinished () noexcept |
Wait (block) until the build is finished. | |
void | cancel () noexcept |
Cancel the build. | |
OpenGlSceneBuilder & | operator= (const OpenGlSceneBuilder &rhs)=delete |
Private Member Functions | |
void | run (std::shared_ptr< SceneData3D > data) noexcept |
ClipperLib::Paths | getPaths (const std::shared_ptr< SceneData3D > &data, const QStringList layers) const |
QVector< QVector3D > | extrude (const ClipperLib::Paths &paths, qreal z, qreal height, qreal scaleFactor, bool faces=true, bool edges=true, bool closed=true) const |
void | publishTriangleData (const QString &id, const QColor &color, const QVector< QVector3D > &triangles) |
void | publishDevice (const SceneData3D::DeviceData &obj, const QByteArray &stepContent, qreal z, qreal scaleFactor, qreal alpha) |
Static Private Member Functions | |
static QVector< QVector3D > | tesselate (const ClipperLib::Path &path, qreal z, qreal scaleFactor) |
Private Attributes | |
const PositiveLength | mMaxArcTolerance |
QFuture< void > | mFuture |
bool | mAbort |
QHash< QString, std::shared_ptr< OpenGlTriangleObject > > | mBoardObjects |
QHash< Uuid, QMap< Color, std::shared_ptr< OpenGlTriangleObject > > > | mDevices |
QHash< QByteArray, StepModel > | mStepModels |
Cache. | |
Asynchronously generates a 3D board scene for OpenGL rendering.
typedef std::tuple<qreal, qreal, qreal> Color |
|
noexcept |
|
delete |
|
noexcept |
|
noexcept |
Start building scene asynchronously.
|
noexcept |
Check if there is currently a build in progress.
true | Build in progress. |
false | Idle. |
|
noexcept |
Wait (block) until the build is finished.
|
noexcept |
Cancel the build.
|
delete |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
privatenoexcept |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Cache.