35#ifndef NETWORKOBJECT_H
36#define NETWORKOBJECT_H
55class QRhiResourceUpdateBatch;
130 QRhiBuffer* edgeVertexBuffer()
const;
131 QRhiBuffer* edgeIndexBuffer()
const;
132 QRhiBuffer* edgeInstanceBuffer()
const;
140 bool hasData()
const {
return !m_network.isEmpty(); }
148 struct InstanceData {
162 void createNodeGeometry();
163 void createEdgeGeometry();
164 void buildNodeInstances();
165 void buildEdgeInstances();
168 CONNECTIVITYLIB::Network m_network;
169 QString m_colormap =
"Viridis";
174 std::unique_ptr<GpuBuffers> m_gpu;
176 QByteArray m_nodeVertexData;
177 QByteArray m_nodeIndexData;
178 QByteArray m_nodeInstanceData;
179 int m_nodeIndexCount = 0;
180 int m_nodeInstanceCount = 0;
181 bool m_nodeGeometryDirty =
false;
182 bool m_nodeInstancesDirty =
false;
185 QByteArray m_edgeVertexData;
186 QByteArray m_edgeIndexData;
187 QByteArray m_edgeInstanceData;
188 int m_edgeIndexCount = 0;
189 int m_edgeInstanceCount = 0;
190 bool m_edgeGeometryDirty =
false;
191 bool m_edgeInstancesDirty =
false;
193 bool m_visible =
true;
disp3D_rhi library export/import macros.
#define DISP3DRHISHARED_EXPORT
Network class declaration.
This class holds information about a network, can compute a distance table and provide network metric...
QRhiBuffer * nodeIndexBuffer() const
int nodeInstanceCount() const
int edgeIndexCount() const
void setColormap(const QString &sColormap)
void updateNodeBuffers(QRhi *rhi, QRhiResourceUpdateBatch *u)
void setVisible(bool visible)
void setThreshold(double dThreshold)
void load(const CONNECTIVITYLIB::Network &network, const QString &sColormap="Viridis")
QRhiBuffer * nodeInstanceBuffer() const
int edgeInstanceCount() const
int nodeIndexCount() const
QRhiBuffer * nodeVertexBuffer() const
void updateEdgeBuffers(QRhi *rhi, QRhiResourceUpdateBatch *u)