summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2023-02-08 08:14:23 +0200
committerTomi Korpipaa <tomi.korpipaa@qt.io>2023-02-13 08:26:14 +0200
commitb4cb821c1e0059eb37176d5534b74914f4ef2a3d (patch)
treecc69e0211adb04eb73dde2a959702732fbfa8ef3 /examples
parent6b9e8224c2e567ed0f42fa5ebc442d201615fa3e (diff)
Revamp volumetric example visuals and documentation
Pick-to: 6.5 Fixes: QTBUG-110907 Change-Id: I16fa89d742ac7a7f26bb040e12c6f1e55a10f293 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/datavisualization/volumetric/doc/images/volumetric-example.pngbin177203 -> 169556 bytes
-rw-r--r--examples/datavisualization/volumetric/doc/src/volumetric.qdoc96
-rw-r--r--examples/datavisualization/volumetric/main.cpp27
-rw-r--r--examples/datavisualization/volumetric/volumetric.cpp119
-rw-r--r--examples/datavisualization/volumetric/volumetric.h74
5 files changed, 143 insertions, 173 deletions
diff --git a/examples/datavisualization/volumetric/doc/images/volumetric-example.png b/examples/datavisualization/volumetric/doc/images/volumetric-example.png
index 277d4fe4..6cc231d9 100644
--- a/examples/datavisualization/volumetric/doc/images/volumetric-example.png
+++ b/examples/datavisualization/volumetric/doc/images/volumetric-example.png
Binary files differ
diff --git a/examples/datavisualization/volumetric/doc/src/volumetric.qdoc b/examples/datavisualization/volumetric/doc/src/volumetric.qdoc
index ed177c87..04aa4bc4 100644
--- a/examples/datavisualization/volumetric/doc/src/volumetric.qdoc
+++ b/examples/datavisualization/volumetric/doc/src/volumetric.qdoc
@@ -10,7 +10,7 @@
\brief Rendering volumetric objects.
\since QtDataVisualization 1.2
- This example shows how to use QCustom3DVolume items to display volumetric data.
+ \e {Volumetric Rendering} shows how to use QCustom3DVolume to display volumetric data.
\image volumetric-example.png
@@ -20,41 +20,41 @@
The QCustom3DVolume items are special custom items (see QCustom3DItem), which can be used
to display volumetric data. The volume items are only supported with orthographic projection,
- so first we make sure the graph is using it:
-
- \snippet volumetric/volumetric.cpp 6
-
- The following code shows how to create a volumetric item tied to the data ranges of the axes:
+ so first make sure the graph is using it:
\snippet volumetric/volumetric.cpp 0
- By setting the QCustom3DItem::scalingAbsolute property to \c{false}, we indicate that the
- scaling of the volume should follow the changes in the data ranges. Next we define the
- internal contents of the volume:
+ Create a volumetric item tied to the data ranges of the axes:
\snippet volumetric/volumetric.cpp 1
- We use eight bit indexed color for our texture, as it is compact and makes it easy to adjust the
- colors without needing to reset the whole texture. For the texture data we use the data we
- created earlier based on some height maps.
- Typically the data for volume items comes pregenerated in a form of a stack of images, so we are
- not going to explain the data generation in detail. Please refer to the example code if you
- are interested in the actual data generation process.
-
- Since we are using eight bit indexed colors, we need a color table to map the eight bit color
- indexes to actual colors. We use one we populated on our own, but in a typical use case you
- would get the color table from the source images:
+ Indicate that the scaling of the volume should follow the changes in the data ranges by setting
+ the QCustom3DItem::scalingAbsolute property to \c{false}. Next, define the internal contents of
+ the volume:
\snippet volumetric/volumetric.cpp 2
- We want to optionally show slice frames around the volume, so we initialize their properties.
+ Use eight bit indexed color for the texture, as it is compact and makes it easy to adjust the
+ colors without needing to reset the whole texture. For the texture data, use the data created
+ earlier based on height maps.
+ Typically, the data for volume items comes pregenerated in the form of a stack of images, so
+ the data generation details can be skipped. For more information about the actual data
+ generation process, see the example code.
+
+ Since eight bit indexed colors are used, a color table is needed to map the eight bit color
+ indexes to actual colors. In a typical use case, you would get the color table from the source
+ images instead of using one manually defined:
+
+ \snippet volumetric/volumetric.cpp 3
+
+ To have an option to show slice frames around the volume, initialize their properties.
Initially, the frames will be hidden:
- \snippet volumetric/volumetric.cpp 5
+ \snippet volumetric/volumetric.cpp 4
- Finally we add the volume as a custom item to the graph to display it:
+ Finally, add the volume as a custom item to the graph to display it:
- \snippet volumetric/volumetric.cpp 3
+ \snippet volumetric/volumetric.cpp 5
\section1 Slicing into the Volume
@@ -62,28 +62,27 @@
not very helpful. One way to inspect the internal structure of the volume is to view the slices
of the volume. QCustom3DVolume provides two ways to display the slices. The first is to show
the selected slices in place of the volume. For example, to specify a slice perpendicular to
- the X-axis, you can use the following method:
+ the X-axis, use the following method:
- \snippet volumetric/volumetric.cpp 7
+ \snippet volumetric/volumetric.cpp 6
- To actually draw the slice specified above, the QCustom3DVolume::drawSlices property must be
- also set:
+ To display the slice specified above, the QCustom3DVolume::drawSlices property must also be set:
- \snippet volumetric/volumetric.cpp 8
+ \snippet volumetric/volumetric.cpp 7
The second way to view slices is to use QCustom3DVolume::renderSlice() method, which produces
a QImage from the specified slice. This image can then be displayed on another widget, such
- as a QLabel here:
+ as a QLabel:
- \snippet volumetric/volumetric.cpp 9
+ \snippet volumetric/volumetric.cpp 8
\section1 Adjusting Volume Transparency
- Sometimes viewing just the slices doesn't give you a good understanding of the volume's internal
- structure. QCustom3DVolume provides two properties that can be used to adjust the volume
- transparency:
+ Sometimes, viewing just the slices doesn't give you a good understanding of the volume's
+ internal structure. QCustom3DVolume provides two properties that can be used to adjust the
+ volume transparency:
- \snippet volumetric/volumetric.cpp 11
+ \snippet volumetric/volumetric.cpp 9
\dots
\snippet volumetric/volumetric.cpp 10
@@ -93,26 +92,25 @@
doesn't affect colors that are fully opaque, unless the QCustom3DVolume::preserveOpacity
property is set to \c{false}.
- An alternative way to adjust the transparency of the volume is adjust the alpha values of the
- voxels directly. For eight bit indexed textures, this is done simply by modifying and
- resetting the color table:
+ An alternative way to adjust the transparency of the volume is to adjust the alpha values of the
+ voxels directly. For eight bit indexed textures, this is done simply by modifying and resetting
+ the color table:
- \snippet volumetric/volumetric.cpp 12
+ \snippet volumetric/volumetric.cpp 11
\section1 High Definition vs. Low Definition Shader
- By default the volume rendering uses the high definition shader. It accounts for each
- voxel of the volume with correct weight when ray-tracing the volume contents,
- providing an accurate representation of even the finer details of the volume.
+ By default, the volumetric rendering uses a high definition shader. It accounts for each
+ voxel of the volume with the correct weight when ray-tracing the volume contents, providing an
+ accurate representation of even the finer details of the volume.
However, this is computationally very expensive, so the frame rate suffers.
- If rendering speed is more important than pixel-perfect
- accuracy of the volume contents, you can take the much faster low definition shader into use
- by setting \c{false} for QCustom3DVolume::useHighDefShader property. The low definition shader
- achieves the speed by making compromises on the accuracy, so it doesn't guarantee each voxel
- of the volume will be sampled. This can lead to flickering and/or other rendering artifacts
- on the finer details of the volume.
-
- \snippet volumetric/volumetric.cpp 13
+ If rendering speed is more important than pixel-perfect accuracy of the volume contents, take
+ the much faster low definition shader into use by setting QCustom3DVolume::useHighDefShader
+ property \c{false}. The low definition shader achieves the speed by making compromises on
+ accuracy, so it doesn't guarantee that every voxel of the volume will be sampled. This can lead
+ to flickering or other rendering artifacts on the finer details of the volume.
+
+ \snippet volumetric/volumetric.cpp 12
\section1 Example Contents
*/
diff --git a/examples/datavisualization/volumetric/main.cpp b/examples/datavisualization/volumetric/main.cpp
index e8016bd7..a2e01759 100644
--- a/examples/datavisualization/volumetric/main.cpp
+++ b/examples/datavisualization/volumetric/main.cpp
@@ -3,17 +3,16 @@
#include "volumetric.h"
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QWidget>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QVBoxLayout>
-#include <QtWidgets/QRadioButton>
-#include <QtWidgets/QSlider>
-#include <QtWidgets/QCheckBox>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QGroupBox>
-#include <QtWidgets/QMessageBox>
-#include <QtGui/QScreen>
+#include <QtWidgets/qapplication.h>
+#include <QtWidgets/qwidget.h>
+#include <QtWidgets/qboxlayout.h>
+#include <QtWidgets/qradiobutton.h>
+#include <QtWidgets/qslider.h>
+#include <QtWidgets/qcheckbox.h>
+#include <QtWidgets/qlabel.h>
+#include <QtWidgets/qgroupbox.h>
+#include <QtWidgets/qmessagebox.h>
+#include <QtGui/qscreen.h>
int main(int argc, char **argv)
{
@@ -30,7 +29,7 @@ int main(int argc, char **argv)
}
QSize screenSize = graph->screen()->size();
- container->setMinimumSize(QSize(screenSize.width() / 3, screenSize.height() / 3));
+ container->setMinimumSize(QSize(screenSize.width() / 3, screenSize.height() / 2));
container->setMaximumSize(screenSize);
container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
container->setFocusPolicy(Qt::StrongFocus);
@@ -43,7 +42,7 @@ int main(int argc, char **argv)
hLayout->addLayout(vLayout);
hLayout->addLayout(vLayout2);
- widget->setWindowTitle(QStringLiteral("Volumetric object example - 3D terrain"));
+ widget->setWindowTitle(QStringLiteral("Volumetric Rendering - 3D Terrain"));
QCheckBox *sliceXCheckBox = new QCheckBox(widget);
sliceXCheckBox->setText(QStringLiteral("Slice volume on X axis"));
@@ -79,7 +78,7 @@ int main(int argc, char **argv)
QGroupBox *textureDetailGroupBox = new QGroupBox(QStringLiteral("Texture detail"));
QRadioButton *lowDetailRB = new QRadioButton(widget);
- lowDetailRB->setText(QStringLiteral("Low (128x64x128)"));
+ lowDetailRB->setText(QStringLiteral("Low (256x128x256)"));
lowDetailRB->setChecked(true);
QRadioButton *mediumDetailRB = new QRadioButton(widget);
diff --git a/examples/datavisualization/volumetric/volumetric.cpp b/examples/datavisualization/volumetric/volumetric.cpp
index dab8caa8..66bd0da4 100644
--- a/examples/datavisualization/volumetric/volumetric.cpp
+++ b/examples/datavisualization/volumetric/volumetric.cpp
@@ -3,22 +3,14 @@
#include "volumetric.h"
#include <QtDataVisualization/qvalue3daxis.h>
-#include <QtDataVisualization/q3dscene.h>
-#include <QtDataVisualization/q3dcamera.h>
-#include <QtDataVisualization/q3dtheme.h>
#include <QtDataVisualization/qcustom3dlabel.h>
-#include <QtDataVisualization/q3dscatter.h>
#include <QtDataVisualization/q3dinputhandler.h>
#include <QtCore/qmath.h>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QRadioButton>
-#include <QtWidgets/QSlider>
-#include <QtCore/QDebug>
-#include <QtGui/QOpenGLContext>
-
-const int lowDetailSize(128);
-const int mediumDetailSize(256);
-const int highDetailSize(512);
+#include <QtGui/qopenglcontext.h>
+
+const int lowDetailSize(256);
+const int mediumDetailSize(512);
+const int highDetailSize(1024);
const int colorTableSize(256);
const int layerDataSize(512);
const int mineShaftDiameter(1);
@@ -41,8 +33,6 @@ static bool isOpenGLES()
{
#if QT_CONFIG(opengles2)
return true;
-#elif (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
- return false;
#else
return QOpenGLContext::currentContext()->isOpenGLES();
#endif
@@ -50,36 +40,16 @@ static bool isOpenGLES()
VolumetricModifier::VolumetricModifier(Q3DScatter *scatter)
: m_graph(scatter),
- m_volumeItem(0),
m_sliceIndexX(lowDetailSize / 2),
m_sliceIndexY(lowDetailSize / 4),
- m_sliceIndexZ(lowDetailSize / 2),
- m_slicingX(false),
- m_slicingY(false),
- m_slicingZ(false),
- m_mediumDetailRB(0),
- m_highDetailRB(0),
- m_lowDetailData(0),
- m_mediumDetailData(0),
- m_highDetailData(0),
- m_mediumDetailIndex(0),
- m_highDetailIndex(0),
- m_mediumDetailShaftIndex(0),
- m_highDetailShaftIndex(0),
- m_sliceSliderX(0),
- m_sliceSliderY(0),
- m_sliceSliderZ(0),
- m_usingPrimaryTable(true),
- m_sliceLabelX(0),
- m_sliceLabelY(0),
- m_sliceLabelZ(0)
-{
- m_graph->activeTheme()->setType(Q3DTheme::ThemeQt);
+ m_sliceIndexZ(lowDetailSize / 2)
+{
+ m_graph->activeTheme()->setType(Q3DTheme::ThemePrimaryColors);
m_graph->setShadowQuality(QAbstract3DGraph::ShadowQualityNone);
- m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
- //! [6]
+ m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetIsometricLeft);
+ //! [0]
m_graph->setOrthoProjection(true);
- //! [6]
+ //! [0]
m_graph->activeTheme()->setBackgroundEnabled(false);
// Only allow zooming at the center and limit the zoom to 200% to avoid clipping issues
@@ -89,10 +59,12 @@ VolumetricModifier::VolumetricModifier(Q3DScatter *scatter)
toggleAreaAll(true);
if (!isOpenGLES()) {
- m_lowDetailData = new QList<uchar>(lowDetailSize * lowDetailSize * lowDetailSize / 2);
- m_mediumDetailData =
- new QList<uchar>(mediumDetailSize * mediumDetailSize * mediumDetailSize / 2);
- m_highDetailData = new QList<uchar>(highDetailSize * highDetailSize * highDetailSize / 2);
+ m_lowDetailData
+ = new QList<uchar>(lowDetailSize * lowDetailSize * lowDetailSize / 2);
+ m_mediumDetailData
+ = new QList<uchar>(mediumDetailSize * mediumDetailSize * mediumDetailSize / 2);
+ m_highDetailData
+ = new QList<uchar>(highDetailSize * highDetailSize * highDetailSize / 2);
initHeightMap(QStringLiteral(":/heightmaps/layer_ground.png"), m_groundLayer);
initHeightMap(QStringLiteral(":/heightmaps/layer_water.png"), m_waterLayer);
@@ -103,7 +75,7 @@ VolumetricModifier::VolumetricModifier(Q3DScatter *scatter)
createVolume(lowDetailSize, 0, lowDetailSize, m_lowDetailData);
excavateMineShaft(lowDetailSize, 0, m_mineShaftArray.size(), m_lowDetailData);
- //! [0]
+ //! [1]
m_volumeItem = new QCustom3DVolume;
// Adjust water level to zero with a minor tweak to y-coordinate position and scaling
m_volumeItem->setScaling(
@@ -116,16 +88,16 @@ VolumetricModifier::VolumetricModifier(Q3DScatter *scatter)
(m_graph->axisY()->max() + m_graph->axisY()->min()) / 2.0f,
(m_graph->axisZ()->max() + m_graph->axisZ()->min()) / 2.0f));
m_volumeItem->setScalingAbsolute(false);
- //! [0]
//! [1]
+ //! [2]
m_volumeItem->setTextureWidth(lowDetailSize);
m_volumeItem->setTextureHeight(lowDetailSize / 2);
m_volumeItem->setTextureDepth(lowDetailSize);
m_volumeItem->setTextureFormat(QImage::Format_Indexed8);
m_volumeItem->setTextureData(new QList<uchar>(*m_lowDetailData));
- //! [1]
+ //! [2]
- // Generate color tables.
+ // Generate color tables
m_colorTable1.resize(colorTableSize);
m_colorTable2.resize(colorTableSize);
@@ -156,13 +128,17 @@ VolumetricModifier::VolumetricModifier(Q3DScatter *scatter)
if (i < magmaColorsMax) {
m_colorTable2[i] = qRgba(((i - aboveWaterGroundColorsMax) * 2),
((i - aboveWaterGroundColorsMax) * 2),
- ((i - aboveWaterGroundColorsMax) * 2), 255);
+ ((i - aboveWaterGroundColorsMax) * 2),
+ 255);
} else if (i < underWaterGroundColorsMax) {
m_colorTable2[i] = qRgba(((i - aboveWaterGroundColorsMax) * 2),
((i - aboveWaterGroundColorsMax) * 2),
- ((i - aboveWaterGroundColorsMax) * 2), terrainTransparency);
+ ((i - aboveWaterGroundColorsMax) * 2),
+ terrainTransparency);
} else if (i < waterColorsMax) {
- m_colorTable2[i] = qRgba(0, 0, ((i - underWaterGroundColorsMax) * 2) + 120,
+ m_colorTable2[i] = qRgba(0,
+ 0,
+ ((i - underWaterGroundColorsMax) * 2) + 120,
terrainTransparency);
} else {
m_colorTable2[i] = qRgba(0, 0, 0, 0); // Not used
@@ -171,21 +147,21 @@ VolumetricModifier::VolumetricModifier(Q3DScatter *scatter)
m_colorTable2[airColorIndex] = qRgba(0, 0, 0, 0);
m_colorTable2[mineShaftColorIndex] = qRgba(255, 255, 0, 255);
- //! [2]
+ //! [3]
m_volumeItem->setColorTable(m_colorTable1);
- //! [2]
+ //! [3]
- //! [5]
+ //! [4]
m_volumeItem->setSliceFrameGaps(QVector3D(0.01f, 0.02f, 0.01f));
m_volumeItem->setSliceFrameThicknesses(QVector3D(0.0025f, 0.005f, 0.0025f));
m_volumeItem->setSliceFrameWidths(QVector3D(0.0025f, 0.005f, 0.0025f));
m_volumeItem->setDrawSliceFrames(false);
- //! [5]
+ //! [4]
handleSlicingChanges();
- //! [3]
+ //! [5]
m_graph->addCustomItem(m_volumeItem);
- //! [3]
+ //! [5]
m_timer.start(0);
} else {
@@ -269,13 +245,13 @@ void VolumetricModifier::adjustSliceX(int value)
if (m_sliceIndexX == m_volumeItem->textureWidth())
m_sliceIndexX--;
if (m_volumeItem->sliceIndexX() != -1)
- //! [7]
+ //! [6]
m_volumeItem->setSliceIndexX(m_sliceIndexX);
- //! [7]
- //! [9]
+ //! [6]
+ //! [8]
m_sliceLabelX->setPixmap(
QPixmap::fromImage(m_volumeItem->renderSlice(Qt::XAxis, m_sliceIndexX)));
- //! [9]
+ //! [8]
}
}
@@ -431,7 +407,7 @@ void VolumetricModifier::setPreserveOpacity(bool enabled)
void VolumetricModifier::setTransparentGround(bool enabled)
{
if (m_volumeItem) {
- //! [12]
+ //! [11]
int newAlpha = enabled ? terrainTransparency : 255;
for (int i = aboveWaterGroundColorsMin; i < underWaterGroundColorsMax; i++) {
QRgb oldColor1 = m_colorTable1.at(i);
@@ -443,7 +419,7 @@ void VolumetricModifier::setTransparentGround(bool enabled)
m_volumeItem->setColorTable(m_colorTable1);
else
m_volumeItem->setColorTable(m_colorTable2);
- //! [12]
+ //! [11]
adjustSliceX(m_sliceSliderX->value());
adjustSliceY(m_sliceSliderY->value());
adjustSliceZ(m_sliceSliderZ->value());
@@ -453,9 +429,9 @@ void VolumetricModifier::setTransparentGround(bool enabled)
void VolumetricModifier::setUseHighDefShader(bool enabled)
{
if (m_volumeItem) {
- //! [13]
+ //! [12]
m_volumeItem->setUseHighDefShader(enabled);
- //! [13]
+ //! [12]
}
}
@@ -467,9 +443,9 @@ void VolumetricModifier::adjustAlphaMultiplier(int value)
mult = float(value - 99) / 2.0f;
else
mult = float(value) / float(500 - value * 4);
- //! [11]
+ //! [9]
m_volumeItem->setAlphaMultiplier(mult);
- //! [11]
+ //! [9]
QString labelFormat = QStringLiteral("Alpha multiplier: %1");
m_alphaMultiplierLabel->setText(labelFormat.arg(
QString::number(m_volumeItem->alphaMultiplier(), 'f', 3)));
@@ -624,8 +600,6 @@ int VolumetricModifier::excavateMineShaft(int textureSize, int startIndex, int c
dataIndex += (textureSize * textureSize / 2) * shaftSize;
}
}
-
-
}
return endIndex;
}
@@ -643,7 +617,6 @@ void VolumetricModifier::excavateMineBlock(int textureSize, int dataIndex, int s
(*textureData)[curIndex] = mineShaftColorIndex;
curIndex++;
}
-
}
}
}
@@ -653,9 +626,9 @@ void VolumetricModifier::handleSlicingChanges()
if (m_volumeItem) {
if (m_slicingX || m_slicingY || m_slicingZ) {
// Only show slices of selected dimensions
- //! [8]
+ //! [7]
m_volumeItem->setDrawSlices(true);
- //! [8]
+ //! [7]
m_volumeItem->setSliceIndexX(m_slicingX ? m_sliceIndexX : -1);
m_volumeItem->setSliceIndexY(m_slicingY ? m_sliceIndexY : -1);
m_volumeItem->setSliceIndexZ(m_slicingZ ? m_sliceIndexZ : -1);
diff --git a/examples/datavisualization/volumetric/volumetric.h b/examples/datavisualization/volumetric/volumetric.h
index ae03a3ad..a975fec2 100644
--- a/examples/datavisualization/volumetric/volumetric.h
+++ b/examples/datavisualization/volumetric/volumetric.h
@@ -6,11 +6,11 @@
#include <QtDataVisualization/q3dscatter.h>
#include <QtDataVisualization/qcustom3dvolume.h>
-#include <QtCore/QTimer>
-#include <QtGui/QRgb>
-#include <QtWidgets/QLabel>
-#include <QtWidgets/QSlider>
-#include <QtWidgets/QRadioButton>
+#include <QtCore/qtimer.h>
+#include <QtGui/qrgb.h>
+#include <QtWidgets/qlabel.h>
+#include <QtWidgets/qslider.h>
+#include <QtWidgets/qradiobutton.h>
class VolumetricModifier : public QObject
{
@@ -57,39 +57,39 @@ private:
void excavateMineBlock(int textureSize, int dataIndex, int size, QList<uchar> *textureData);
void handleSlicingChanges();
- Q3DScatter *m_graph;
- QCustom3DVolume *m_volumeItem;
- int m_sliceIndexX;
- int m_sliceIndexY;
- int m_sliceIndexZ;
- bool m_slicingX;
- bool m_slicingY;
- bool m_slicingZ;
- QLabel *m_fpsLabel;
- QRadioButton *m_mediumDetailRB;
- QRadioButton *m_highDetailRB;
- QList<uchar> *m_lowDetailData;
- QList<uchar> *m_mediumDetailData;
- QList<uchar> *m_highDetailData;
+ Q3DScatter *m_graph = nullptr;
+ QCustom3DVolume *m_volumeItem = nullptr;
+ int m_sliceIndexX = 0;
+ int m_sliceIndexY = 0;
+ int m_sliceIndexZ = 0;
+ bool m_slicingX = false;
+ bool m_slicingY = false;
+ bool m_slicingZ = false;
+ QLabel *m_fpsLabel = nullptr;
+ QRadioButton *m_mediumDetailRB = nullptr;
+ QRadioButton *m_highDetailRB = nullptr;
+ QList<uchar> *m_lowDetailData = nullptr;
+ QList<uchar> *m_mediumDetailData = nullptr;
+ QList<uchar> *m_highDetailData = nullptr;
+ int m_mediumDetailIndex = 0;
+ int m_highDetailIndex = 0;
+ int m_mediumDetailShaftIndex = 0;
+ int m_highDetailShaftIndex = 0;
+ QSlider *m_sliceSliderX = nullptr;
+ QSlider *m_sliceSliderY = nullptr;
+ QSlider *m_sliceSliderZ = nullptr;
+ QList<QRgb> m_colorTable1 = {};
+ QList<QRgb> m_colorTable2 = {};
+ bool m_usingPrimaryTable = true;
+ QLabel *m_sliceLabelX = nullptr;
+ QLabel *m_sliceLabelY = nullptr;
+ QLabel *m_sliceLabelZ = nullptr;
+ QLabel *m_alphaMultiplierLabel = nullptr;
+ QList<uchar> m_magmaLayer = {};
+ QList<uchar> m_waterLayer = {};
+ QList<uchar> m_groundLayer = {};
+ QList<QPair<QVector3D, QVector3D>> m_mineShaftArray = {};
QTimer m_timer;
- int m_mediumDetailIndex;
- int m_highDetailIndex;
- int m_mediumDetailShaftIndex;
- int m_highDetailShaftIndex;
- QSlider *m_sliceSliderX;
- QSlider *m_sliceSliderY;
- QSlider *m_sliceSliderZ;
- QList<QRgb> m_colorTable1;
- QList<QRgb> m_colorTable2;
- bool m_usingPrimaryTable;
- QLabel *m_sliceLabelX;
- QLabel *m_sliceLabelY;
- QLabel *m_sliceLabelZ;
- QLabel *m_alphaMultiplierLabel;
- QList<uchar> m_magmaLayer;
- QList<uchar> m_waterLayer;
- QList<uchar> m_groundLayer;
- QList<QPair<QVector3D, QVector3D>> m_mineShaftArray;
};
#endif