From a1fecad694cc426f80c4fd50076b2b2db407d7eb Mon Sep 17 00:00:00 2001 From: Juan Hernando Vieites Date: Tue, 15 Mar 2016 14:09:51 +0100 Subject: [PATCH 1/2] Fix MVD3 to adapt to latest test data. --- tests/circuit.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/circuit.cpp b/tests/circuit.cpp index 9aa46ec..5494805 100644 --- a/tests/circuit.cpp +++ b/tests/circuit.cpp @@ -306,12 +306,13 @@ BOOST_AUTO_TEST_CASE(all_mvd3) BOOST_CHECK( transforms[20].equals( brain::Matrix4f( - brain::Quaternionf( 0.383102, 0, 0.923706, 0 ), + brain::Quaternionf( 0, 0.923706, 0, 0.383102 ), brain::Vector3f( 30.12771, 1794.125911, 19.860587 )), 0.00001f )); + BOOST_CHECK( transforms[100].equals( brain::Matrix4f( - brain::Quaternionf ( 0.120884, 0, -0.992667, 0 ), + brain::Quaternionf ( 0, -0.992667, 0, 0.120884 ), brain::Vector3f( 48.757924, 1824.458993, 15.302584 )), 0.00001f )); } @@ -341,12 +342,12 @@ BOOST_AUTO_TEST_CASE(partial_mvd3) BOOST_CHECK( transforms[1].equals( brain::Matrix4f( - brain::Quaternionf( 0.383102, 0, 0.923706, 0 ), + brain::Quaternionf( 0, 0.923706, 0, 0.383102 ), brain::Vector3f( 30.12771, 1794.125911, 19.860587 )), 0.00001f )); BOOST_CHECK( transforms[2].equals( brain::Matrix4f( - brain::Quaternionf( 0.120884, 0, -0.992667, 0 ), + brain::Quaternionf( 0, -0.992667, 0, 0.120884 ), brain::Vector3f( 48.757924, 1824.458993, 15.302584 )), 0.00001f )); } From fcd83c617f27ca811dbcf609055a5304907ca9d6 Mon Sep 17 00:00:00 2001 From: Juan Hernando Vieites Date: Mon, 14 Mar 2016 23:02:26 +0100 Subject: [PATCH 2/2] Make rotation quaternions available in brain::circuit. --- brain/circuit.cpp | 5 +++++ brain/circuit.h | 2 ++ doc/Changelog.md | 2 ++ 3 files changed, 9 insertions(+) diff --git a/brain/circuit.cpp b/brain/circuit.cpp index 254661f..26f2d11 100644 --- a/brain/circuit.cpp +++ b/brain/circuit.cpp @@ -349,5 +349,10 @@ Matrix4fs Circuit::getTransforms( const GIDSet& gids ) const } +Quaternionfs Circuit::getRotations( const GIDSet& gids ) const +{ + return _impl->getRotations( gids ); +} + } diff --git a/brain/circuit.h b/brain/circuit.h index 73e5082..ccfc635 100644 --- a/brain/circuit.h +++ b/brain/circuit.h @@ -84,6 +84,8 @@ class Circuit : public boost::noncopyable BRAIN_API Vector3fs getPositions( const GIDSet& gids ) const; /** @return The local to world transformations of the given cells. */ BRAIN_API Matrix4fs getTransforms( const GIDSet& gids ) const; + /** @return The local to world rotation of the given cells. */ + BRAIN_API Quaternionfs getRotations( const GIDSet& gids ) const; class Impl; //!< @internal diff --git a/doc/Changelog.md b/doc/Changelog.md index 254fbdb..dd51633 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -3,6 +3,8 @@ Changelog {#Changelog} # git master +* [49](https://github.com/BlueBrain/Brion/pull/49): + Added the method brain::Circuit::getRotations * [46](https://github.com/BlueBrain/Brion/pull/46): Fixed a bug in enum to string conversions affecting morphologyConverter. * [39](https://github.com/BlueBrain/Brion/pull/39):