Commit b34862f7 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Better handling of RenderData in DataContainerInspectorWidget

parent 02d432e8
......@@ -223,6 +223,22 @@ namespace campvis {
ss << tester->getWorldBounds();
_lblBounds->setText(tr("World Bounds: ") + QString::fromStdString(ss.str()));
}
else if (const RenderData* tester = dynamic_cast<const RenderData*>(handles.front().second.getData())) {
const ImageData* id = tester->getNumColorTextures() > 0 ? tester->getColorTexture() : tester->getDepthTexture();
if (id != 0) {
std::ostringstream ss;
ss << id->getSize();
_lblSize->setText(tr("Size: ") + QString::fromStdString(ss.str()));
ss.str("");
ss << id->getWorldBounds();
_lblBounds->setText(tr("World Bounds: ") + QString::fromStdString(ss.str()));
}
else {
_lblSize->setText(tr("Size: n/a"));
_lblBounds->setText(tr("World Bounds: n/a"));
}
}
#ifdef CAMPVIS_HAS_MODULE_COLUMBIA
else if (const FiberData* tester = dynamic_cast<const FiberData*>(handles.front().second.getData())) {
std::ostringstream ss;
......
......@@ -41,6 +41,7 @@
#include "core/datastructures/imagerepresentationdisk.h"
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/datastructures/imagerepresentationgl.h"
#include "core/datastructures/renderdata.h"
#include <QHeaderView>
#include <QStringList>
......@@ -101,6 +102,9 @@ namespace campvis {
else if (const MeshGeometry* tester = dynamic_cast<const MeshGeometry*>(data)) {
return QVariant(QString("Mesh Geometry"));
}
else if (const RenderData* tester = dynamic_cast<const RenderData*>(data)) {
return QVariant(QString("Render Data"));
}
}
else
return QVariant();
......
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