add Scatter3D graphicMeshSmooth

This commit is contained in:
2023-10-23 20:03:43 +03:00
parent 31fd00a97a
commit fa720d4d3d
2 changed files with 12 additions and 3 deletions

View File

@@ -84,14 +84,20 @@ void Scatter3D::setGraphicMesh(Mesh mesh, int index) {
}
void Scatter3D::addGraphic(const QColor & color, float pointSize, Mesh mesh) {
void Scatter3D::setGraphicMeshSmooth(bool smooth, int index) {
graphics[index].series->setMeshSmooth(smooth);
container->update();
}
void Scatter3D::addGraphic(const QColor & color, float pointSize, Mesh mesh, bool meshSmooth) {
Scatter3DGraphic sg;
sg.data = new QtDataVisualization::QScatterDataProxy();
sg.series = new QtDataVisualization::QScatter3DSeries(sg.data);
sg.series->setItemSize(pointSize);
sg.series->setBaseColor(color);
sg.series->setMesh(mesh);
sg.series->setMeshSmooth(true);
sg.series->setMeshSmooth(meshSmooth);
graphics.append(sg);
canvas->addSeries(sg.series);
container->update();