Skip to content
Snippets Groups Projects
Commit f85e0ed3 authored by Karsten Rink's avatar Karsten Rink
Browse files

changed getMatBounds() to getValueBounds(), changed copies of bounding box points to references

parent 1e215502
No related branches found
No related tags found
No related merge requests found
......@@ -141,8 +141,8 @@ void ElementTreeModel::setMesh(MeshLib::Mesh const*const mesh)
_rootItem->appendChild(aabb_item);
const GeoLib::AABB<MeshLib::Node> aabb (MeshInformation::getBoundingBox(mesh));
const MeshLib::Node min = aabb.getMinPoint();
const MeshLib::Node max = aabb.getMaxPoint();
const MeshLib::Node& min = aabb.getMinPoint();
const MeshLib::Node& max = aabb.getMaxPoint();
QList<QVariant> min_aabb;
min_aabb << "Min:" << QString::number(min[0], 'f') << QString::number(min[1], 'f') << QString::number(min[2], 'f');
......@@ -154,7 +154,7 @@ void ElementTreeModel::setMesh(MeshLib::Mesh const*const mesh)
TreeItem* max_item = new TreeItem(max_aabb, aabb_item);
aabb_item->appendChild(max_item);
std::pair<unsigned, unsigned> mat_bounds (MeshInformation::getMatBounds(mesh));
std::pair<unsigned, unsigned> mat_bounds (MeshInformation::getValueBounds(mesh));
QList<QVariant> materials;
materials << "MaterialIDs: " << "[" + QString::number(mat_bounds.first) << QString::number(mat_bounds.second) + "]" << "";
TreeItem* mat_item = new TreeItem(materials, _rootItem);
......
......@@ -17,7 +17,7 @@
#include "Elements/Element.h"
const std::pair<unsigned, unsigned> MeshInformation::getMatBounds(MeshLib::Mesh const*const mesh)
const std::pair<unsigned, unsigned> MeshInformation::getValueBounds(MeshLib::Mesh const*const mesh)
{
const std::vector<MeshLib::Element*> elements (mesh->getElements());
const auto minmax = std::minmax_element(elements.cbegin(), elements.cend(),
......
......@@ -31,7 +31,7 @@ class MeshInformation
{
public:
/// Returns the smallest and largest MaterialID of the mesh.
static const std::pair<unsigned, unsigned> getMatBounds(MeshLib::Mesh const*const mesh);
static const std::pair<unsigned, unsigned> getValueBounds(MeshLib::Mesh const*const mesh);
/// Returns the bounding box of the mesh.
static const GeoLib::AABB<MeshLib::Node> getBoundingBox(MeshLib::Mesh const*const mesh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment