Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Layers.h
Go to the documentation of this file.
1#pragma once
2#include <xgl/ShaderProgram.h>
4#include <xgl/global.h>
5
6namespace sf::xgl
7{
8
12class _XGL_CLASS Layers : QObject
13{
14 public:
19 explicit Layers(QObject* parent = nullptr);
20
24 ~Layers() override;
25
32 bool load(const QString& filepath, const QStringList& layers = {});
33
39 QStringList getLayerNames(bool loaded = true) const;
40
48 VertexArrayBase* getVertexArray(QOpenGLShaderProgram* sp, const QString& layer, const QColor& color = {0, 0, 0, 0});
49
50 private:
52 struct Private;
54 Private* _p{nullptr};
55};
56
57}// namespace sf::xgl
Creates and holds the layers of the loaded drawings.
Definition Layers.h:13
VertexArrayBase * getVertexArray(QOpenGLShaderProgram *sp, const QString &layer, const QColor &color={0, 0, 0, 0})
Gets the vertex array from the specified layer for the given shader program.
QStringList getLayerNames(bool loaded=true) const
Gets the layer names from the file or the ones loaded.
bool load(const QString &filepath, const QStringList &layers={})
Generic method to load drawings.
Layers(QObject *parent=nullptr)
Default Qt constructor.
~Layers() override
Overridden destructor.
Base class for vertex-array derived classes.
Definition VertexArrayBase.h:15
Definition DemoRenderer.h:6
#define _XGL_CLASS
Definition xgl/global.h:35