Commit 145e7815 authored by Bianca Tost's avatar Bianca Tost

clearified and simplified creation of new bounding box actors

parent 3349286c
...@@ -56,17 +56,13 @@ namespace Met3D ...@@ -56,17 +56,13 @@ namespace Met3D
MBaseMapActor::MBaseMapActor() MBaseMapActor::MBaseMapActor()
: MRotatedGridSupportingActor(), : MRotatedGridSupportingActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::HORIZONTAL),
texture(nullptr), texture(nullptr),
numVertices(4), numVertices(4),
colourSaturation(0.3) colourSaturation(0.3)
{ {
GDALAllRegister(); GDALAllRegister();
bBoxConnection = new MBoundingBoxConnection(
this, MBoundingBoxConnection::HORIZONTAL);
// Create and initialise QtProperties for the GUI. // Create and initialise QtProperties for the GUI.
// =============================================== // ===============================================
beginInitialiseQtProperties(); beginInitialiseQtProperties();
...@@ -83,7 +79,7 @@ MBaseMapActor::MBaseMapActor() ...@@ -83,7 +79,7 @@ MBaseMapActor::MBaseMapActor()
filenameProperty->setEnabled(false); filenameProperty->setEnabled(false);
// Bounding box of the actor. // Bounding box of the actor.
actorPropertiesSupGroup->addSubProperty(bBoxConnection->getProperty()); insertBoundingBoxProperty(actorPropertiesSupGroup);
colourSaturationProperty = addProperty(DECORATEDDOUBLE_PROPERTY, colourSaturationProperty = addProperty(DECORATEDDOUBLE_PROPERTY,
"colour saturation", "colour saturation",
......
...@@ -50,7 +50,8 @@ namespace Met3D ...@@ -50,7 +50,8 @@ namespace Met3D
MGraticuleActor::MGraticuleActor(MBoundingBoxConnection *boundingBoxConnection) MGraticuleActor::MGraticuleActor(MBoundingBoxConnection *boundingBoxConnection)
: MRotatedGridSupportingActor(), : MRotatedGridSupportingActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::HORIZONTAL,
boundingBoxConnection),
graticuleVertexBuffer(nullptr), graticuleVertexBuffer(nullptr),
numVerticesGraticule(0), numVerticesGraticule(0),
coastlineVertexBuffer(nullptr), coastlineVertexBuffer(nullptr),
...@@ -64,18 +65,6 @@ MGraticuleActor::MGraticuleActor(MBoundingBoxConnection *boundingBoxConnection) ...@@ -64,18 +65,6 @@ MGraticuleActor::MGraticuleActor(MBoundingBoxConnection *boundingBoxConnection)
naturalEarthDataLoader = MSystemManagerAndControl::getInstance() naturalEarthDataLoader = MSystemManagerAndControl::getInstance()
->getNaturalEarthDataLoader(); ->getNaturalEarthDataLoader();
// Use boundingBoxActor of horizontal cross section actor if graticule is
// part of it.
this->bBoxConnection = boundingBoxConnection;
// Created graticule actor as standalone actor and thus it needs its own
// bounding box actor. (As part of 2D Horizontal Cross-Section it uses
// the bounding box connected to the Horizontal Cross-Section.)
if (boundingBoxConnection == nullptr)
{
this->bBoxConnection = new MBoundingBoxConnection(
this, MBoundingBoxConnection::HORIZONTAL);
}
nLats.clear(); nLats.clear();
nLats.append(0); nLats.append(0);
nLons.clear(); nLons.clear();
...@@ -92,8 +81,10 @@ MGraticuleActor::MGraticuleActor(MBoundingBoxConnection *boundingBoxConnection) ...@@ -92,8 +81,10 @@ MGraticuleActor::MGraticuleActor(MBoundingBoxConnection *boundingBoxConnection)
// section. // section.
if (boundingBoxConnection == nullptr) if (boundingBoxConnection == nullptr)
{ {
actorPropertiesSupGroup->addSubProperty( // Created graticule actor as standalone actor and thus it needs its
this->bBoxConnection->getProperty()); // own bounding box actor. (As part of e.g. 2D Horizontal Cross-Section
// it uses the bounding box connected to the Horizontal Cross-Section.)
insertBoundingBoxProperty(actorPropertiesSupGroup);
} }
spacingProperty = addProperty(POINTF_LONLAT_PROPERTY, "spacing", spacingProperty = addProperty(POINTF_LONLAT_PROPERTY, "spacing",
......
...@@ -57,7 +57,7 @@ namespace Met3D ...@@ -57,7 +57,7 @@ namespace Met3D
MNWPHorizontalSectionActor::MNWPHorizontalSectionActor() MNWPHorizontalSectionActor::MNWPHorizontalSectionActor()
: MNWPMultiVarActor(), : MNWPMultiVarActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::HORIZONTAL),
slicePosition_hPa(250.), slicePosition_hPa(250.),
slicePositionGranularity_hPa(5.0), slicePositionGranularity_hPa(5.0),
slicePosSynchronizationActor(nullptr), slicePosSynchronizationActor(nullptr),
...@@ -73,8 +73,6 @@ MNWPHorizontalSectionActor::MNWPHorizontalSectionActor() ...@@ -73,8 +73,6 @@ MNWPHorizontalSectionActor::MNWPHorizontalSectionActor()
offsetPickPositionToHandleCentre(QVector2D(0., 0.)) offsetPickPositionToHandleCentre(QVector2D(0., 0.))
{ {
enablePicking(true); enablePicking(true);
bBoxConnection =
new MBoundingBoxConnection(this, MBoundingBoxConnection::HORIZONTAL);
// Create and initialise QtProperties for the GUI. // Create and initialise QtProperties for the GUI.
// =============================================== // ===============================================
...@@ -120,7 +118,7 @@ MNWPHorizontalSectionActor::MNWPHorizontalSectionActor() ...@@ -120,7 +118,7 @@ MNWPHorizontalSectionActor::MNWPHorizontalSectionActor()
properties->mEnum()->setEnumNames(differenceModeProperty, differenceModeNames); properties->mEnum()->setEnumNames(differenceModeProperty, differenceModeNames);
// Horizontal bounding box of the actor. // Horizontal bounding box of the actor.
actorPropertiesSupGroup->addSubProperty(bBoxConnection->getProperty()); insertBoundingBoxProperty(actorPropertiesSupGroup);
// Wind barbs. // Wind barbs.
vectorGlyphsSettings = new VectorGlyphsSettings(this); vectorGlyphsSettings = new VectorGlyphsSettings(this);
......
...@@ -53,14 +53,11 @@ namespace Met3D ...@@ -53,14 +53,11 @@ namespace Met3D
MNWPSurfaceTopographyActor::MNWPSurfaceTopographyActor() MNWPSurfaceTopographyActor::MNWPSurfaceTopographyActor()
: MNWPMultiVarActor(), : MNWPMultiVarActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::HORIZONTAL),
topographyVariableIndex(0), topographyVariableIndex(0),
shadingVariableIndex(0), shadingVariableIndex(0),
updateRenderRegion(false) updateRenderRegion(false)
{ {
bBoxConnection = new MBoundingBoxConnection(
this, MBoundingBoxConnection::HORIZONTAL);
// Create and initialise QtProperties for the GUI. // Create and initialise QtProperties for the GUI.
// =============================================== // ===============================================
beginInitialiseQtProperties(); beginInitialiseQtProperties();
...@@ -75,7 +72,7 @@ MNWPSurfaceTopographyActor::MNWPSurfaceTopographyActor() ...@@ -75,7 +72,7 @@ MNWPSurfaceTopographyActor::MNWPSurfaceTopographyActor()
actorPropertiesSupGroup); actorPropertiesSupGroup);
// Bounding box of the actor. // Bounding box of the actor.
actorPropertiesSupGroup->addSubProperty(bBoxConnection->getProperty()); insertBoundingBoxProperty(actorPropertiesSupGroup);
endInitialiseQtProperties(); endInitialiseQtProperties();
} }
......
...@@ -54,7 +54,7 @@ namespace Met3D ...@@ -54,7 +54,7 @@ namespace Met3D
MNWPVerticalSectionActor::MNWPVerticalSectionActor() MNWPVerticalSectionActor::MNWPVerticalSectionActor()
: MNWPMultiVarActor(), : MNWPMultiVarActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::VERTICAL),
labelDistance(1), labelDistance(1),
waypointsModel(nullptr), waypointsModel(nullptr),
modifyWaypoint(-1), modifyWaypoint(-1),
...@@ -74,8 +74,6 @@ MNWPVerticalSectionActor::MNWPVerticalSectionActor() ...@@ -74,8 +74,6 @@ MNWPVerticalSectionActor::MNWPVerticalSectionActor()
updatePath(false), updatePath(false),
offsetPickPositionToHandleCentre(QVector2D(0., 0.)) offsetPickPositionToHandleCentre(QVector2D(0., 0.))
{ {
bBoxConnection =
new MBoundingBoxConnection(this, MBoundingBoxConnection::VERTICAL);
enablePicking(true); enablePicking(true);
// Create and initialise QtProperties for the GUI. // Create and initialise QtProperties for the GUI.
...@@ -107,7 +105,8 @@ MNWPVerticalSectionActor::MNWPVerticalSectionActor() ...@@ -107,7 +105,8 @@ MNWPVerticalSectionActor::MNWPVerticalSectionActor()
enableActorUpdates(true); enableActorUpdates(true);
} }
actorPropertiesSupGroup->addSubProperty(bBoxConnection->getProperty()); // Bounding box of the actor.
insertBoundingBoxProperty(actorPropertiesSupGroup);
QString defaultPressureLineLevel = QString("1000.,900.,800.,700.,600.,500.") QString defaultPressureLineLevel = QString("1000.,900.,800.,700.,600.,500.")
+ QString(",400.,300.,200.,100.,90.,80.") + QString(",400.,300.,200.,100.,90.,80.")
......
...@@ -57,7 +57,7 @@ namespace Met3D ...@@ -57,7 +57,7 @@ namespace Met3D
MNWPVolumeRaycasterActor::MNWPVolumeRaycasterActor() MNWPVolumeRaycasterActor::MNWPVolumeRaycasterActor()
: MNWPMultiVarActor(), : MNWPMultiVarActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::VOLUME),
updateNextRenderFrame("111"), updateNextRenderFrame("111"),
renderMode(RenderMode::Original), renderMode(RenderMode::Original),
variableIndex(0), variableIndex(0),
...@@ -68,8 +68,6 @@ MNWPVolumeRaycasterActor::MNWPVolumeRaycasterActor() ...@@ -68,8 +68,6 @@ MNWPVolumeRaycasterActor::MNWPVolumeRaycasterActor()
bBoxEnabled(true), bBoxEnabled(true),
normalCurveNumVertices(0) normalCurveNumVertices(0)
{ {
bBoxConnection =
new MBoundingBoxConnection(this, MBoundingBoxConnection::VOLUME);
// Enable picking for the scene view's analysis mode. See // Enable picking for the scene view's analysis mode. See
// triggerAnalysisOfObjectAtPos(). // triggerAnalysisOfObjectAtPos().
enablePicking(true); enablePicking(true);
...@@ -98,8 +96,8 @@ MNWPVolumeRaycasterActor::MNWPVolumeRaycasterActor() ...@@ -98,8 +96,8 @@ MNWPVolumeRaycasterActor::MNWPVolumeRaycasterActor()
rayCasterSettings = new RayCasterSettings(this); rayCasterSettings = new RayCasterSettings(this);
actorPropertiesSupGroup->addSubProperty(rayCasterSettings->groupProp); actorPropertiesSupGroup->addSubProperty(rayCasterSettings->groupProp);
// Bounding box. // Bounding box of the actor.
actorPropertiesSupGroup->addSubProperty(bBoxConnection->getProperty()); insertBoundingBoxProperty(actorPropertiesSupGroup);
bBoxEnabledProperty = addProperty( bBoxEnabledProperty = addProperty(
BOOL_PROPERTY, "draw bounding box", actorPropertiesSupGroup); BOOL_PROPERTY, "draw bounding box", actorPropertiesSupGroup);
properties->mBool()->setValue(bBoxEnabledProperty, bBoxEnabled); properties->mBool()->setValue(bBoxEnabledProperty, bBoxEnabled);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
** prediction data. ** prediction data.
** **
** Copyright 2015-2018 Marc Rautenhaus ** Copyright 2015-2018 Marc Rautenhaus
** Copyright 2016-2017 Bianca Tost ** Copyright 2016-2018 Bianca Tost
** Copyright 2017 Philipp Kaiser ** Copyright 2017 Philipp Kaiser
** **
** Computer Graphics and Visualization Group ** Computer Graphics and Visualization Group
...@@ -63,7 +63,7 @@ namespace Met3D ...@@ -63,7 +63,7 @@ namespace Met3D
MTrajectoryActor::MTrajectoryActor() MTrajectoryActor::MTrajectoryActor()
: MActor(), : MActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::HORIZONTAL),
trajectorySource(nullptr), trajectorySource(nullptr),
normalsSource(nullptr), normalsSource(nullptr),
trajectoryFilter(nullptr), trajectoryFilter(nullptr),
...@@ -83,9 +83,6 @@ MTrajectoryActor::MTrajectoryActor() ...@@ -83,9 +83,6 @@ MTrajectoryActor::MTrajectoryActor()
shadowEnabled(true), shadowEnabled(true),
shadowColoured(false) shadowColoured(false)
{ {
bBoxConnection =
new MBoundingBoxConnection(this, MBoundingBoxConnection::HORIZONTAL);
// Create and initialise QtProperties for the GUI. // Create and initialise QtProperties for the GUI.
// =============================================== // ===============================================
beginInitialiseQtProperties(); beginInitialiseQtProperties();
...@@ -241,8 +238,8 @@ MTrajectoryActor::MTrajectoryActor() ...@@ -241,8 +238,8 @@ MTrajectoryActor::MTrajectoryActor()
GROUP_PROPERTY, "trajectory filters", GROUP_PROPERTY, "trajectory filters",
actorPropertiesSupGroup); actorPropertiesSupGroup);
// Bounding box. // Bounding box of the actor.
filtersGroupProperty->addSubProperty(bBoxConnection->getProperty()); insertBoundingBoxProperty(actorPropertiesSupGroup);
// Ascent (dp/dt > x). // Ascent (dp/dt > x).
enableAscentFilterProperty = addProperty( enableAscentFilterProperty = addProperty(
......
...@@ -49,14 +49,12 @@ namespace Met3D ...@@ -49,14 +49,12 @@ namespace Met3D
MVolumeBoundingBoxActor::MVolumeBoundingBoxActor() MVolumeBoundingBoxActor::MVolumeBoundingBoxActor()
: MActor(), : MActor(),
MBoundingBoxInterface(this), MBoundingBoxInterface(this, MBoundingBoxConnectionType::VOLUME),
coordinateVertexBuffer(nullptr), coordinateVertexBuffer(nullptr),
axisVertexBuffer(nullptr), axisVertexBuffer(nullptr),
tickLength(0.8), tickLength(0.8),
lineColour(QColor(0, 104, 139, 255)) lineColour(QColor(0, 104, 139, 255))
{ {
bBoxConnection =
new MBoundingBoxConnection(this, MBoundingBoxConnection::VOLUME);
// Create and initialise QtProperties for the GUI. // Create and initialise QtProperties for the GUI.
// =============================================== // ===============================================
beginInitialiseQtProperties(); beginInitialiseQtProperties();
...@@ -65,7 +63,7 @@ MVolumeBoundingBoxActor::MVolumeBoundingBoxActor() ...@@ -65,7 +63,7 @@ MVolumeBoundingBoxActor::MVolumeBoundingBoxActor()
setName(getActorType()); setName(getActorType());
// Bounding box of the actor. // Bounding box of the actor.
actorPropertiesSupGroup->addSubProperty(bBoxConnection->getProperty()); insertBoundingBoxProperty(actorPropertiesSupGroup);
tickLengthProperty = addProperty(DECORATEDDOUBLE_PROPERTY, tickLengthProperty = addProperty(DECORATEDDOUBLE_PROPERTY,
"tick length", "tick length",
......
...@@ -187,9 +187,20 @@ void MBoundingBox::emitPressureLevelChanged() ...@@ -187,9 +187,20 @@ void MBoundingBox::emitPressureLevelChanged()
*** CONSTRUCTOR / DESTRUCTOR *** *** CONSTRUCTOR / DESTRUCTOR ***
*******************************************************************************/ *******************************************************************************/
MBoundingBoxInterface::MBoundingBoxInterface(MActor *child) MBoundingBoxInterface::MBoundingBoxInterface(
MActor *child, MBoundingBoxConnectionType bBoxType,
MBoundingBoxConnection *parentBBoxConnection)
: child(child) : child(child)
{} {
if (parentBBoxConnection == nullptr)
{
bBoxConnection = new MBoundingBoxConnection(this, bBoxType);
}
else
{
bBoxConnection = parentBBoxConnection;
}
}
MBoundingBoxInterface::~MBoundingBoxInterface() MBoundingBoxInterface::~MBoundingBoxInterface()
...@@ -486,6 +497,12 @@ void MBoundingBoxInterface::switchToBoundingBox(QString bBoxName) ...@@ -486,6 +497,12 @@ void MBoundingBoxInterface::switchToBoundingBox(QString bBoxName)
} }
void MBoundingBoxInterface::insertBoundingBoxProperty(QtProperty *parentGroup)
{
parentGroup->addSubProperty(bBoxConnection->getProperty());
}
/****************************************************************************** /******************************************************************************
*** MBoundingBoxConnection *** *** MBoundingBoxConnection ***
*******************************************************************************/ *******************************************************************************/
...@@ -493,8 +510,8 @@ void MBoundingBoxInterface::switchToBoundingBox(QString bBoxName) ...@@ -493,8 +510,8 @@ void MBoundingBoxInterface::switchToBoundingBox(QString bBoxName)
*** CONSTRUCTOR / DESTRUCTOR *** *** CONSTRUCTOR / DESTRUCTOR ***
*******************************************************************************/ *******************************************************************************/
MBoundingBoxConnection::MBoundingBoxConnection(MBoundingBoxInterface *actor, MBoundingBoxConnection::MBoundingBoxConnection(
ConnectionType type) MBoundingBoxInterface *actor, MBoundingBoxConnectionType type)
: QObject(), : QObject(),
actor(actor), actor(actor),
type(type), type(type),
...@@ -549,15 +566,15 @@ MBoundingBoxConnection::~MBoundingBoxConnection() ...@@ -549,15 +566,15 @@ MBoundingBoxConnection::~MBoundingBoxConnection()
{ {
switch (type) switch (type)
{ {
case HORIZONTAL: case MBoundingBoxConnectionType::HORIZONTAL:
disconnect(boundingBox, SIGNAL(horizontal2DCoordsChanged()), disconnect(boundingBox, SIGNAL(horizontal2DCoordsChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
case VERTICAL: case MBoundingBoxConnectionType::VERTICAL:
disconnect(boundingBox, SIGNAL(pressureLevelChanged()), disconnect(boundingBox, SIGNAL(pressureLevelChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
case VOLUME: case MBoundingBoxConnectionType::VOLUME:
disconnect(boundingBox, SIGNAL(coords3DChanged()), disconnect(boundingBox, SIGNAL(coords3DChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
...@@ -706,20 +723,18 @@ void MBoundingBoxConnection::setBoundingBox(QString bBoxID) ...@@ -706,20 +723,18 @@ void MBoundingBoxConnection::setBoundingBox(QString bBoxID)
{ {
switch (type) switch (type)
{ {
case HORIZONTAL: case MBoundingBoxConnectionType::HORIZONTAL:
disconnect(boundingBox, SIGNAL(horizontal2DCoordsChanged()), disconnect(boundingBox, SIGNAL(horizontal2DCoordsChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
case VERTICAL: case MBoundingBoxConnectionType::VERTICAL:
disconnect(boundingBox, SIGNAL(pressureLevelChanged()), disconnect(boundingBox, SIGNAL(pressureLevelChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
case VOLUME: case MBoundingBoxConnectionType::VOLUME:
disconnect(boundingBox, SIGNAL(coords3DChanged()), disconnect(boundingBox, SIGNAL(coords3DChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
default:
break;
} }
} }
...@@ -729,20 +744,18 @@ void MBoundingBoxConnection::setBoundingBox(QString bBoxID) ...@@ -729,20 +744,18 @@ void MBoundingBoxConnection::setBoundingBox(QString bBoxID)
{ {
switch (type) switch (type)
{ {
case HORIZONTAL: case MBoundingBoxConnectionType::HORIZONTAL:
connect(boundingBox, SIGNAL(horizontal2DCoordsChanged()), connect(boundingBox, SIGNAL(horizontal2DCoordsChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
case VERTICAL: case MBoundingBoxConnectionType::VERTICAL:
connect(boundingBox, SIGNAL(pressureLevelChanged()), connect(boundingBox, SIGNAL(pressureLevelChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
case VOLUME: case MBoundingBoxConnectionType::VOLUME:
connect(boundingBox, SIGNAL(coords3DChanged()), connect(boundingBox, SIGNAL(coords3DChanged()),
this, SLOT(onBoundingBoxChanged())); this, SLOT(onBoundingBoxChanged()));
break; break;
default:
break;
} }
} }
} }
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
** three-dimensional visual exploration of numerical ensemble weather ** three-dimensional visual exploration of numerical ensemble weather
** prediction data. ** prediction data.
** **
** Copyright 2017 Marc Rautenhaus ** Copyright 2017-2018 Bianca Tost
** Copyright 2017 Bianca Tost ** Copyright 2017-2018 Marc Rautenhaus
** **
** Computer Graphics and Visualization Group ** Computer Graphics and Visualization Group
** Technische Universitaet Muenchen, Garching, Germany ** Technische Universitaet Muenchen, Garching, Germany
...@@ -146,6 +146,12 @@ protected: ...@@ -146,6 +146,12 @@ protected:
bool signalEmitEnabled; bool signalEmitEnabled;
}; };
enum class MBoundingBoxConnectionType
{
HORIZONTAL = 0,
VERTICAL = 1,
VOLUME = 2
};
class MBoundingBoxConnection; class MBoundingBoxConnection;
class MActor; class MActor;
...@@ -161,11 +167,17 @@ class MActor; ...@@ -161,11 +167,17 @@ class MActor;
cannot be solved due to the static_cast automatically created in Qt's cannot be solved due to the static_cast automatically created in Qt's
moc-files when using signals and slots. moc-files when using signals and slots.
(cp. http://www.drdobbs.com/cpp/multiple-inheritance-considered-useful/184402074). (cp. http://www.drdobbs.com/cpp/multiple-inheritance-considered-useful/184402074).
NOTE: To use bounding boxes it is mandatory to insert the bounding box
property with @ref insertBoundingBoxProperty() during creation of properties
in the constructor of the child class!
*/ */
class MBoundingBoxInterface class MBoundingBoxInterface
{ {
public: public:
MBoundingBoxInterface(MActor *child); MBoundingBoxInterface(MActor *child,
MBoundingBoxConnectionType bBoxType,
MBoundingBoxConnection *parentBBoxConnection = nullptr);
~MBoundingBoxInterface(); ~MBoundingBoxInterface();
/** /**
...@@ -194,6 +206,11 @@ public: ...@@ -194,6 +206,11 @@ public:
void switchToBoundingBox(QString bBoxName); void switchToBoundingBox(QString bBoxName);
protected: protected:
/**
Use this method to insert bounding box property as subproperty of @p parentGroup.
*/
void insertBoundingBoxProperty(QtProperty *parentGroup);
// Pointer to actor inheriting from the interface. // Pointer to actor inheriting from the interface.
MActor *child; MActor *child;
// Object realising and handling connection between actor and bounding box. // Object realising and handling connection between actor and bounding box.
...@@ -213,14 +230,8 @@ class MBoundingBoxConnection : public QObject ...@@ -213,14 +230,8 @@ class MBoundingBoxConnection : public QObject
Q_OBJECT Q_OBJECT
public: public:
enum ConnectionType MBoundingBoxConnection(MBoundingBoxInterface *actor,
{ MBoundingBoxConnectionType type);
HORIZONTAL = 0,
VERTICAL = 1,
VOLUME = 2
};
MBoundingBoxConnection(MBoundingBoxInterface *actor, ConnectionType type);
~MBoundingBoxConnection(); ~MBoundingBoxConnection();
MBoundingBox *getBoundingBox() { return boundingBox; } MBoundingBox *getBoundingBox() { return boundingBox; }
...@@ -282,7 +293,7 @@ protected: ...@@ -282,7 +293,7 @@ protected:
MSystemManagerAndControl *sysMC; MSystemManagerAndControl *sysMC;
MBoundingBoxInterface *actor; MBoundingBoxInterface *actor;
ConnectionType type; MBoundingBoxConnectionType type;
MBoundingBox *boundingBox; MBoundingBox *boundingBox;
MQtProperties *properties; MQtProperties *properties;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment