quickplot
Loading...
Searching...
No Matches
plotGeometry.h
1// SPDX-License-Identifier: GPL-3.0-or-later
2// Copyright (c) 2024 Team Dissolve and contributors
3
4#pragma once
5
6#include "axis.h"
7#include "triangle.h"
8#include <QQuick3DGeometry>
9#include <QVector3D>
10#include <vector>
11
13class PlotGeometry : public QQuick3DGeometry
14{
15 Q_OBJECT
17 Q_PROPERTY(double thickness MEMBER thickness_ NOTIFY dataChanged)
19 Q_PROPERTY(QList<double> xs MEMBER xs_ NOTIFY dataChanged)
21 Q_PROPERTY(QList<double> ys MEMBER ys_ NOTIFY dataChanged)
23 Q_PROPERTY(Axis *xAxis MEMBER xAxis_ NOTIFY dataChanged)
25 Q_PROPERTY(Axis *yAxis MEMBER yAxis_ NOTIFY dataChanged)
26
27 Q_SIGNALS:
30
31 protected:
36 virtual std::vector<Triangle> faces_(std::vector<Vec3<float>> points) const;
42 std::vector<Triangle> clip(const std::vector<Triangle> &ts) const;
44 void updateData();
46 double thickness_ = 0.01;
50 QList<double> xs_, ys_;
57};
Definition axis.h:12
Definition plotGeometry.h:14
QList< double > ys_
Definition plotGeometry.h:50
Axis * yAxis
Definition plotGeometry.h:25
void dataChanged()
QList< double > xs_
Definition plotGeometry.h:50
void updateData()
Definition plotGeometry.cpp:12
Axis * xAxis
Definition plotGeometry.h:23
double thickness_
Definition plotGeometry.h:46
double thickness
Definition plotGeometry.h:17
QList< double > ys
Definition plotGeometry.h:21
virtual std::vector< Triangle > faces_(std::vector< Vec3< float > > points) const
Definition plotGeometry.cpp:62
Axis * yAxis_
Definition plotGeometry.h:55
std::vector< Triangle > clip(const std::vector< Triangle > &ts) const
Definition plotGeometry.cpp:176
Axis * xAxis_
Definition plotGeometry.h:55
QList< double > xs
Definition plotGeometry.h:19
Definition vector3.h:11