Skip to content

Commit

Permalink
Fixed morphology layout feature (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
favreau committed Mar 31, 2017
1 parent fa04a50 commit 08d475c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions brayns/io/MorphologyLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,12 @@ bool MorphologyLoader::_importMorphology(
Boxf morphologyAABB;
const brain::Vector4fs& points = morphology.getPoints();
for (Vector4f point : points)
{
const Vector3f p = {point.x(), point.y(), point.z()};
morphologyAABB.merge(p);
}
morphologyAABB.merge({point.x(), point.y(), point.z()});

const Vector3f positionInGrid = {
-layout.horizontalSpacing *
-1.f * layout.horizontalSpacing *
static_cast<float>(morphologyIndex % layout.nbColumns),
-layout.verticalSpacing *
-1.f * layout.verticalSpacing *
static_cast<float>(morphologyIndex / layout.nbColumns),
0.f};
translation = positionInGrid - morphologyAABB.getCenter();
Expand Down

0 comments on commit 08d475c

Please sign in to comment.