Skip to content
Snippets Groups Projects
Commit 6247a642 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

make private where possible

parent f11d8338
No related branches found
No related tags found
1 merge request!570remove SessionModel/Item from SampleModel and all related items
......@@ -51,6 +51,11 @@ public:
RealSpace::Vector3D::_z)) // up
const;
void populateParticleFromParticle3DContainer(RealSpace::Model* model,
const Particle3DContainer& particle3DContainer,
const QVector3D& lattice_position = {}) const;
private:
void populateMultiLayer(RealSpace::Model* model, const MultiLayerItem& mlayerItem,
const SceneGeometry& sceneGeometry, const QVector3D& origin = {}) const;
......@@ -64,9 +69,6 @@ public:
void populateParticleFromParticleItem(RealSpace::Model* model,
const ItemWithParticles& particleItem) const;
void populateParticleFromParticle3DContainer(RealSpace::Model* model,
const Particle3DContainer& particle3DContainer,
const QVector3D& lattice_position = {}) const;
private:
std::unique_ptr<RealSpace::BuilderUtils> m_builderUtils;
......
......@@ -20,31 +20,12 @@
#include "GUI/View/Realspace/RealSpaceCanvas.h"
#include "Sample/HardParticle/HardParticles.h"
#include <boost/polymorphic_cast.hpp>
using boost::polymorphic_downcast;
namespace {
bool isTopLayer(const LayerItem& layerItem)
{
auto layers = polymorphic_downcast<MultiLayerItem*>(layerItem.parent())->layers();
return layers.indexOf(const_cast<LayerItem*>(&layerItem)) == 0;
}
bool isBottomLayer(const LayerItem& layerItem)
{
auto layers = polymorphic_downcast<MultiLayerItem*>(layerItem.parent())->layers();
return layers.indexOf(const_cast<LayerItem*>(&layerItem)) == layers.size() - 1;
}
} // namespace
double GUI::View::TransformTo3D::visualLayerThickness(const LayerItem& layerItem,
const SceneGeometry& sceneGeometry)
{
double thickness(0.0);
if (isTopLayer(layerItem) || isBottomLayer(layerItem))
if (layerItem.isTopLayer() || layerItem.isBottomLayer())
thickness = sceneGeometry.topOrBottomLayerThickness;
else
thickness = layerItem.thickness();
......
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