diff --git a/include/Library/Mathematics/Geometry/3D/Object.hpp b/include/Library/Mathematics/Geometry/3D/Object.hpp index 1f1db0be..c3f30cf6 100755 --- a/include/Library/Mathematics/Geometry/3D/Object.hpp +++ b/include/Library/Mathematics/Geometry/3D/Object.hpp @@ -12,7 +12,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -34,7 +34,7 @@ class Intersection ; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// using library::math::obj::Vector3d ; -using library::math::geom::trf::rot::Quaternion ; +using library::math::geom::d3::trf::rot::Quaternion ; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.hpp b/include/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.hpp index 0105e22e..32fc378a 100755 --- a/include/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.hpp +++ b/include/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.hpp @@ -10,7 +10,7 @@ #ifndef __Library_Mathematics_Geometry_3D_Objects_Ellipsoid__ #define __Library_Mathematics_Geometry_3D_Objects_Ellipsoid__ -#include +#include #include #include @@ -37,7 +37,7 @@ using library::math::obj::Matrix3d ; using library::math::geom::d3::Object ; using library::math::geom::d3::objects::Point ; using library::math::geom::d3::Intersection ; -using library::math::geom::trf::rot::Quaternion ; +using library::math::geom::d3::trf::rot::Quaternion ; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/3D/Objects/Point.hpp b/include/Library/Mathematics/Geometry/3D/Objects/Point.hpp index 88c118bc..b64e97dd 100755 --- a/include/Library/Mathematics/Geometry/3D/Objects/Point.hpp +++ b/include/Library/Mathematics/Geometry/3D/Objects/Point.hpp @@ -34,7 +34,7 @@ using library::core::types::Real ; using library::math::obj::Vector3d ; using library::math::geom::d3::Object ; -using library::math::geom::trf::rot::Quaternion ; +using library::math::geom::d3::trf::rot::Quaternion ; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/3D/Objects/PointSet.hpp b/include/Library/Mathematics/Geometry/3D/Objects/PointSet.hpp index eaa8cb00..5a36d1da 100755 --- a/include/Library/Mathematics/Geometry/3D/Objects/PointSet.hpp +++ b/include/Library/Mathematics/Geometry/3D/Objects/PointSet.hpp @@ -41,7 +41,7 @@ using library::core::ctnr::Array ; using library::math::obj::Vector3d ; using library::math::geom::d3::Object ; using library::math::geom::d3::objects::Point ; -using library::math::geom::trf::rot::Quaternion ; +using library::math::geom::d3::trf::rot::Quaternion ; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/3D/Transformation.hpp b/include/Library/Mathematics/Geometry/3D/Transformation.hpp index 608921d0..f5c8c897 100755 --- a/include/Library/Mathematics/Geometry/3D/Transformation.hpp +++ b/include/Library/Mathematics/Geometry/3D/Transformation.hpp @@ -10,7 +10,7 @@ #ifndef __Library_Mathematics_Geometry_3D_Transformation__ #define __Library_Mathematics_Geometry_3D_Transformation__ -#include +#include #include #include #include @@ -45,7 +45,7 @@ using library::math::obj::Matrix4d ; using library::math::geom::Angle ; using library::math::geom::d3::Object ; using library::math::geom::d3::objects::Point ; -using library::math::geom::trf::rot::RotationVector ; +using library::math::geom::d3::trf::rot::RotationVector ; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/Transformations/Rotations/EulerAngle.hpp b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/EulerAngle.hpp similarity index 83% rename from include/Library/Mathematics/Geometry/Transformations/Rotations/EulerAngle.hpp rename to include/Library/Mathematics/Geometry/3D/Transformations/Rotations/EulerAngle.hpp index 8af1ac17..14548b77 100755 --- a/include/Library/Mathematics/Geometry/Transformations/Rotations/EulerAngle.hpp +++ b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/EulerAngle.hpp @@ -1,14 +1,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Transformations/Rotations/EulerAngle.hpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/EulerAngle.hpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#ifndef __Library_Mathematics_Geometry_Transformations_Rotations_EulerAngle__ -#define __Library_Mathematics_Geometry_Transformations_Rotations_EulerAngle__ +#ifndef __Library_Mathematics_Geometry_3D_Transformations_Rotations_EulerAngle__ +#define __Library_Mathematics_Geometry_3D_Transformations_Rotations_EulerAngle__ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -18,6 +18,8 @@ namespace math { namespace geom { +namespace d3 +{ namespace trf { namespace rot @@ -34,6 +36,7 @@ namespace rot } } } +} //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.hpp b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.hpp new file mode 100755 index 00000000..1ad42096 --- /dev/null +++ b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.hpp @@ -0,0 +1,562 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/// @project Library/Mathematics +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.hpp +/// @author Lucas Brémond +/// @license TBD + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef __Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion__ +#define __Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion__ + +#include +#include + +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace library +{ +namespace math +{ +namespace geom +{ +namespace d3 +{ +namespace trf +{ +namespace rot +{ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +using library::core::types::Integer ; +using library::core::types::Real ; +using library::core::types::String ; + +using library::math::obj::Vector3d ; +using library::math::obj::Vector4d ; +using library::math::geom::Angle ; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +class RotationVector ; +class RotationMatrix ; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/// @brief Quaternion +/// +/// Provide a convenient mathematical notation for representing orientations and rotations of objects in three dimensions. +/// Compared to Euler angles they are simpler to compose and avoid the problem of gimbal lock. +/// Compared to rotation matrices they are more compact, more numerically stable, and more efficient. +/// +/// @ref https://en.wikipedia.org/wiki/Quaternion +/// @ref https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation + +class Quaternion +{ + + public: + + /// @brief Quaternion format + + enum class Format + { + + XYZS, ///< Vector-scalar format + SXYZ ///< Scalar-vector format + + } ; + + /// @brief Constructor + /// + /// @code + /// Quaternion quaternion = { 0.0, 0.0, 0.0, 0.1, Quaternion::Format::XYZS } ; + /// @endcode + /// + /// @param [in] aFirstComponent A first component + /// @param [in] aSecondComponent A second component + /// @param [in] aThirdComponent A third component + /// @param [in] aFourthComponent A fourth component + /// @param [in] aFormat A quaternion format + + Quaternion ( const Real& aFirstComponent, + const Real& aSecondComponent, + const Real& aThirdComponent, + const Real& aFourthComponent, + const Quaternion::Format& aFormat ) ; + + /// @brief Constructor + /// + /// @code + /// Quaternion quaternion = { Vector4d(0.0, 0.0, 0.0, 0.1), Quaternion::Format::XYZS } ; + /// @endcode + /// + /// @param [in] aVector A 4D vector + /// @param [in] aFormat A quaternion format + + Quaternion ( const Vector4d& aVector, + const Quaternion::Format& aFormat ) ; + + /// @brief Constructor + /// + /// @code + /// Quaternion quaternion = { Vector3d(0.0, 0.0, 0.0), 1.0 } ; + /// @endcode + /// + /// @param [in] aVectorPart A vector part + /// @param [in] aVectorPart A scalar part + + Quaternion ( const Vector3d& aVectorPart, + const Real& aScalarPart ) ; + + /// @brief Equal to operator + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.0) == Quaternion::XYZS(0.0, 0.0, 0.0, 1.0) ; // True + /// @endcode + /// + /// @param [in] aQuaternion A quaternion + /// @return True if quaternions are equal + + bool operator == ( const Quaternion& aQuaternion ) const ; + + /// @brief Not equal to operator + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.0) != Quaternion::XYZS(1.0, 0.0, 0.0, 0.0) ; // True + /// @endcode + /// + /// @param [in] aQuaternion A quaternion + /// @return True if quaternions not are equal + + bool operator != ( const Quaternion& aQuaternion ) const ; + + /// @brief Multiplication operator (quaternion) + /// + /// @code + /// Quaternion q_B_A = ... ; + /// Quaternion q_C_B = ... ; + /// Quaternion q_C_A = q_C_B * q_B_A ; + /// @encode + /// + /// @note This operator uses cross multiplication + /// + /// @param [in] aQuaternion A quaternion + /// @return A quaternion + + Quaternion operator * ( const Quaternion& aQuaternion ) const ; + + /// @brief Multiplication operator (vector) + /// + /// Example: + /// @code + /// Quaternion q_B_A = ... ; + /// Vector3d v_A = ... ; + /// Vector3d v_B = q_B_A * v_A ; + /// @endcode + /// + /// @note This operator uses transformVector + /// + /// @param [in] aVector A vector + /// @return A vector + + Vector3d operator * ( const Vector3d& aVector ) const ; + + /// @brief Division operator (quaternion) + /// + /// @code + /// Quaternion q_A_B = ... ; + /// Quaternion q_C_B = ... ; + /// Quaternion q_C_A = q_C_B / q_A_B ; + /// @endcode + /// + /// @note This is equivalent to multiplying with the inverse + /// + /// @param [in] aQuaternion A quaternion + /// @return A quaternion + + Quaternion operator / ( const Quaternion& aQuaternion ) const ; + + /// @brief Multiplication assignment operator (quaternion) + /// + /// @note This operator uses cross multiplication + /// + /// @param [in] aQuaternion A quaternion + /// @return A reference to quaternion + + Quaternion& operator *= ( const Quaternion& aQuaternion ) ; + + /// @brief Division assignment operator (quaternion) + /// + /// @note This is equivalent to multiplying with the inverse + /// + /// @param [in] aQuaternion A quaternion + /// @return A reference to quaternion + + Quaternion& operator /= ( const Quaternion& aQuaternion ) ; + + /// @brief Output stream operator + /// + /// @code + /// std::cout << Quaternion::XYZS(0.0, 0.0, 0.0, 1.0) ; + /// @endcode + /// + /// @param [in] anOutputStream An output stream + /// @param [in] aQuaternion A quaternion + /// @return A reference to output stream + + friend std::ostream& operator << ( std::ostream& anOutputStream, + const Quaternion& aQuaternion ) ; + + /// @brief Check if quaternion is defined + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.0).isDefined() ; // True + /// @endcode + /// + /// @return True if quaternion is defined + + bool isDefined ( ) const ; + + /// @brief Check if quaternion is unitary, i.e. its norm is equal to 1.0 + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.0).isUnitary() ; // True + /// @endcode + /// + /// @return True if quaternion is unitary + + bool isUnitary ( ) const ; + + /// @brief Check if quaternion is near a given quaternion + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.0).isNear(Quaternion::XYZS(0.0, 0.0, 0.0, 1.0 + 1e-19), Angle::Radians(1e-6)) ; // True + /// @endcode + /// + /// @param [in] aQuaternion A quaternion + /// @param [in] anAngularTolerance An angular tolerance + /// @return True if quaternions are near each other + + bool isNear ( const Quaternion& aQuaternion, + const Angle& anAngularTolerance ) const ; + + /// @brief Get first component of vector part + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).x() ; // &0.0 + /// @endcode + /// + /// @return First component of vector part + + Real x ( ) const ; + + /// @brief Get second component of vector part + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).y() ; // &0.0 + /// @endcode + /// + /// @return Second component of vector part + + Real y ( ) const ; + + /// @brief Get third component of vector part + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).z() ; // &0.0 + /// @endcode + /// + /// @return Third component of vector part + + Real z ( ) const ; + + /// @bref Get scalar part + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).s() ; // &1.0 + /// @endcode + /// + /// @return Scalar part + + Real s ( ) const ; + + /// @brief Get vector part + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).getVectorPart() ; // [0.0, 0.0, 0.0] + /// @endcode + /// + /// @return Vector part + + Vector3d getVectorPart ( ) const ; + + /// @brief Get scalar part + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).getScalarPart() ; // 1.0 + /// @endcode + /// + /// @return Scalar part + + Real getScalarPart ( ) const ; + + /// @brief Get normalized quaternion + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.000000000000001).toNormalized() ; // [0.0, 0.0, 0.0, 1.0] + /// @encode + /// + /// @return Normalized quaternion + + Quaternion toNormalized ( ) const ; + + /// @brief Get conjugate quaternion + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.70710678118, 0.70710678118).toConjugate() ; // [0.0, 0.0, -0.70710678118, 0.70710678118] + /// @encode + /// + /// @return Conjugate quaternion + + Quaternion toConjugate ( ) const ; + + /// @brief Get inverse quaternion + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.70710678118, 0.70710678118).toInverse() ; // [0.0, 0.0, -0.70710678118, 0.70710678118] + /// @encode + /// + /// @return Inverse quaternion + + Quaternion toInverse ( ) const ; + + /// @brief Get power + /// + /// @code + /// TBC... + /// @endcode + /// + /// @param [in] aValue A power value + /// @return Power + + Quaternion pow ( const Real& aValue ) const ; + + /// @brief Get exponential + /// + /// @code + /// TBC... + /// @endcode + /// + /// @return Exponential + + Quaternion exp ( ) const ; + + /// @brief Get logarithm + /// + /// @code + /// TBC... + /// @endcode + /// + /// @return Logarithm + + Quaternion log ( ) const ; + + /// @brief Get quaternion norm + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, -0.70710678118, 0.70710678118).norm() ; // 1.0 + /// @encode + /// + /// @return Quaternion norm + + Real norm ( ) const ; + + Quaternion crossMultiply ( const Quaternion& aQuaternion ) const ; + + Quaternion dotMultiply ( const Quaternion& aQuaternion ) const ; + + Vector3d rotateVector ( const Vector3d& aVector ) const ; + + /// @brief Convert quaternion to its vector representation + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).toVector() ; // [0.0, 0.0, 0.0, 1.0] + /// @endcode + /// + /// @param [in] (optional) aFormat A quaternion format + /// @return Vector representation + + Vector4d toVector ( const Quaternion::Format& aFormat = Quaternion::Format::XYZS ) const ; + + /// @brief Convert quaternion to its string representation + /// + /// @code + /// Quaternion::XYSZ(0.0, 0.0, 0.0, 1.0).toString() ; // "[0.0, 0.0, 0.0, 1.0]" + /// @endcode + /// + /// @param [in] (optional) aPrecision A quaternion precision + /// @param [in] (optional) aFormat A quaternion format + /// @return String representation + + String toString ( const Quaternion::Format& aFormat ) const ; + + String toString ( const Integer& aPrecision = Integer::Undefined(), + const Quaternion::Format& aFormat = Quaternion::Format::XYZS ) const ; + + /// @brief Normalize quaternion + /// + /// @code + /// Quaternion quaternion = Quaternion::XYZS(0.0, 0.0, 0.0, 1.000000000000001) ; // [0.0, 0.0, 0.0, 1.000000000000001] + /// quaternion.normalize() ; // [0.0, 0.0, 0.0, 1.0] + /// @endcode + /// + /// @return Reference to quaternion + + Quaternion& normalize ( ) ; + + /// @brief Conjugate quaternion + /// + /// @code + /// Quaternion quaternion = Quaternion::XYZS(0.0, 0.0, 0.70710678118, 0.70710678118) ; // [0.0, 0.0, 0.70710678118, 0.70710678118] + /// quaternion.conjugate() ; // [0.0, 0.0, -0.70710678118, 0.70710678118] + /// @endcode + /// + /// @return Reference to quaternion + + Quaternion& conjugate ( ) ; + + /// @brief Inverse quaternion + /// + /// @code + /// Quaternion quaternion = Quaternion::XYZS(0.0, 0.0, 0.70710678118, 0.70710678118) ; // [0.0, 0.0, 0.70710678118, 0.70710678118] + /// quaternion.inverse() ; // [0.0, 0.0, -0.70710678118, 0.70710678118] + /// @endcode + /// + /// @return Reference to quaternion + + Quaternion& inverse ( ) ; + + /// @brief Rectify quaternion (enforce positive scalar part) + /// + /// @code + /// Quaternion quaternion = Quaternion::XYZS(0.0, 0.0, -0.70710678118, -0.70710678118) ; // [0.0, 0.0, -0.70710678118, -0.70710678118] + /// quaternion.rectify() ; // [0.0, 0.0, 0.70710678118, 0.70710678118] + /// @endcode + /// + /// @return Reference to quaternion + + Quaternion& rectify ( ) ; + + /// @brief Get angular difference with quaternion + /// + /// @code + /// Quaternion::XYZS(0.0, 0.0, 0.0, 1.0).angularDifferenceWith(Quaternion::XYZS(0.0, 0.0, 0.0, 1.0)) ; // 0.0 [rad] + /// @endcode + /// + /// @param [in] aQuaternion A quaternion + /// @return Angular difference + + Angle angularDifferenceWith ( const Quaternion& aQuaternion ) const ; + + /// @brief Constructs an undefined quaternion + /// + /// @code + /// Quaternion quaternion = Quaternion::Undefined() ; // Undefined + /// @endcode + /// + /// @return Undefined quaternion + + static Quaternion Undefined ( ) ; + + /// @brief Constructs a unit quaternion + /// + /// @code + /// Quaternion quaternion = Quaternion::Unit() ; // [0.0, 0.0, 0.0, 1.0] + /// @endcode + /// + /// @return Unit quaternion + + static Quaternion Unit ( ) ; + + /// @brief Constructs a quaternion using the vector-scalar format + /// + /// @code + /// Quaternion quaternion = Quaternion::XYZS(0.0, 0.0, 0.0, 1.0) ; // [0.0, 0.0, 0.0, 1.0] + /// @endcode + /// + /// @param [in] aFirstComponent A first component + /// @param [in] aSecondComponent A second component + /// @param [in] aThirdComponent A third component + /// @param [in] aFourthComponent A fourth component + /// @return Quaternion + + static Quaternion XYZS ( const Real& aFirstComponent, + const Real& aSecondComponent, + const Real& aThirdComponent, + const Real& aFourthComponent ) ; + + /// @brief Constructs a quaternion from a rotation vector + /// + /// @code + /// Quaternion quaternion = Quaternion::RotationVector(RotationVector(Vector3d(0.0, 0.0, 1.0), Angle::Degrees(0.0))) ; // [0.0, 0.0, 0.0, 1.0] + /// @endcode + /// + /// @param [in] aRotationVector A rotation vector + /// @return Quaternion + + static Quaternion RotationVector ( const rot::RotationVector& aRotationVector ) ; + + /// @brief Constructs a rquaternion from a rotation matrix + /// + /// @code + /// Quaternion quaternion = Quaternion::RotationMatrix(RotationMatrix::Unit()) ; + /// @endcode + /// + /// @param [in] aRotationMatrix A rotation matrix + /// @return Quaternion + + static Quaternion RotationMatrix ( const rot::RotationMatrix& aRotationMatrix ) ; + + /// @brief Constructs a quaternion from a string + /// + /// @code + /// Quaternion quaternion = Quaternion::Parse("[0.0, 0.0, 0.0, 1.0]") ; // [0.0, 0.0, 0.0, 1.0] + /// @endcode + /// + /// @param [in] aString A string + /// @param [in] (optional) aFormat A quaternion format + /// @return Quaternion + + static Quaternion Parse ( const String& aString, + const Quaternion::Format& aFormat = Quaternion::Format::XYZS ) ; + + private: + + Real x_ ; + Real y_ ; + Real z_ ; + Real s_ ; + +} ; + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +} +} +} +} +} +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#endif + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/include/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.hpp b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.hpp similarity index 98% rename from include/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.hpp rename to include/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.hpp index d217cc23..bd393f63 100755 --- a/include/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.hpp +++ b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.hpp @@ -1,14 +1,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.hpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.hpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#ifndef __Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix__ -#define __Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix__ +#ifndef __Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix__ +#define __Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix__ #include #include @@ -24,6 +24,8 @@ namespace math { namespace geom { +namespace d3 +{ namespace trf { namespace rot @@ -344,6 +346,7 @@ class RotationMatrix } } } +} //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.hpp b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.hpp similarity index 96% rename from include/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.hpp rename to include/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.hpp index d6141064..56d80684 100755 --- a/include/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.hpp +++ b/include/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.hpp @@ -1,14 +1,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.hpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.hpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#ifndef __Library_Mathematics_Geometry_Transformations_Rotations_RotationVector__ -#define __Library_Mathematics_Geometry_Transformations_Rotations_RotationVector__ +#ifndef __Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector__ +#define __Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector__ #include #include @@ -24,6 +24,8 @@ namespace math { namespace geom { +namespace d3 +{ namespace trf { namespace rot @@ -187,6 +189,7 @@ class RotationVector } } } +} //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/Library/Mathematics/Geometry/Transformation.hpp b/include/Library/Mathematics/Geometry/Transformation.hpp deleted file mode 100755 index 3c19b821..00000000 --- a/include/Library/Mathematics/Geometry/Transformation.hpp +++ /dev/null @@ -1,57 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/// @project Library/Mathematics -/// @file Library/Mathematics/Transformation.hpp -/// @author Lucas Brémond -/// @license TBD - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef __Library_Mathematics_Geometry_Transformation__ -#define __Library_Mathematics_Geometry_Transformation__ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace library -{ -namespace math -{ -namespace geom -{ -namespace trf -{ -namespace rot -{ - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -class Transformation -{ - - public: - - enum class Type - { - - Active, - Passive - - } ; - - private: - -} ; - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -} -} -} -} -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/include/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.hpp b/include/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.hpp old mode 100755 new mode 100644 index b9afeb25..107498f6 --- a/include/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.hpp +++ b/include/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.hpp @@ -1,14 +1,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.hpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.hpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#ifndef __Library_Mathematics_Geometry_Transformations_Rotations_Quaternion__ -#define __Library_Mathematics_Geometry_Transformations_Rotations_Quaternion__ +#ifndef __Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion__ +#define __Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion__ #include #include diff --git a/include/Library/Mathematics/Objects/Vector.hpp b/include/Library/Mathematics/Objects/Vector.hpp index 1749880b..6f4fb788 100755 --- a/include/Library/Mathematics/Objects/Vector.hpp +++ b/include/Library/Mathematics/Objects/Vector.hpp @@ -21,6 +21,7 @@ #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wint-in-bool-context" +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #include #include diff --git a/share/python/notebooks/Tutorial.ipynb b/share/python/notebooks/Tutorial.ipynb index 51a12bdd..47df4316 100644 --- a/share/python/notebooks/Tutorial.ipynb +++ b/share/python/notebooks/Tutorial.ipynb @@ -84,7 +84,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -196,7 +196,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -241,7 +241,7 @@ "metadata": {}, "outputs": [], "source": [ - "point = Point.Undefined()" + "Point.Undefined()" ] }, { @@ -250,7 +250,7 @@ "metadata": {}, "outputs": [], "source": [ - "point = Point.Origin()" + "Point.Origin()" ] }, { @@ -323,7 +323,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -339,7 +339,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -355,7 +355,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -364,7 +364,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -373,7 +373,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -382,7 +382,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1228,16 +1228,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Mathematics ▸ Geometry ▸ Transformations" + "### Mathematics ▸ Geometry ▸ 3D ▸ Transformations" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ - "Transformations = Geometry.Transformations" + "Transformations = Geometry.D3.Transformations" ] }, { @@ -1249,7 +1249,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -1265,7 +1265,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -1281,7 +1281,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -1304,7 +1304,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -1326,7 +1326,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -1335,7 +1335,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -1344,16 +1344,28 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'Angle' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquaternion\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misNear\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mquaternion\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mAngle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mRadians\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0.0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mNameError\u001b[0m: name 'Angle' is not defined" + ] + } + ], "source": [ "quaternion.isNear(quaternion, Angle.Radians(0.0)) ;" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -1365,7 +1377,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -1375,7 +1387,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -1384,7 +1396,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -1393,7 +1405,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -1402,7 +1414,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -1414,7 +1426,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ @@ -1423,7 +1435,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -1432,7 +1444,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -1441,7 +1453,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -1450,7 +1462,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -1459,7 +1471,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -1468,7 +1480,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ @@ -1477,7 +1489,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -1486,7 +1498,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ diff --git a/share/python/src/LibraryMathematicsPy/Geometry.cpp b/share/python/src/LibraryMathematicsPy/Geometry.cpp index 0254e96e..e70a9014 100755 --- a/share/python/src/LibraryMathematicsPy/Geometry.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry.cpp @@ -7,7 +7,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -26,7 +25,6 @@ inline void LibraryMathematicsPy_Geometry ( ) LibraryMathematicsPy_Geometry_Angle() ; LibraryMathematicsPy_Geometry_2D() ; LibraryMathematicsPy_Geometry_3D() ; - LibraryMathematicsPy_Geometry_Transformations() ; } diff --git a/share/python/src/LibraryMathematicsPy/Geometry/3D.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D.cpp index 9bab5dad..59a0b120 100755 --- a/share/python/src/LibraryMathematicsPy/Geometry/3D.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D.cpp @@ -8,6 +8,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include +#include #include #include #include @@ -26,6 +27,7 @@ inline void LibraryMathematicsPy_Geometry_3D ( ) LibraryMathematicsPy_Geometry_3D_Object() ; LibraryMathematicsPy_Geometry_3D_Objects() ; LibraryMathematicsPy_Geometry_3D_Transformation() ; + LibraryMathematicsPy_Geometry_3D_Transformations() ; LibraryMathematicsPy_Geometry_3D_Intersection() ; } diff --git a/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Ellipsoid.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Ellipsoid.cpp index a8add2be..8296b812 100755 --- a/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Ellipsoid.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Ellipsoid.cpp @@ -30,7 +30,7 @@ inline void LibraryMathematicsPy_Geometry_3D_Objects_Ellipso using library::math::geom::d3::objects::Ellipsoid ; using library::math::geom::d3::objects::Pyramid ; using library::math::geom::d3::Intersection ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; scope in_Ellipsoid = class_>("Ellipsoid", init()) diff --git a/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Pyramid.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Pyramid.cpp index cd7ecc6e..2ca3fc61 100755 --- a/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Pyramid.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Objects/Pyramid.cpp @@ -32,7 +32,7 @@ inline void LibraryMathematicsPy_Geometry_3D_Objects_Pyramid using library::math::geom::d3::objects::Ellipsoid ; using library::math::geom::d3::objects::Pyramid ; using library::math::geom::d3::Intersection ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; scope in_Pyramid = class_>("Pyramid", init()) diff --git a/share/python/src/LibraryMathematicsPy/Geometry/Transformations.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations.cpp similarity index 75% rename from share/python/src/LibraryMathematicsPy/Geometry/Transformations.cpp rename to share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations.cpp index 76fc7c13..54e6f629 100755 --- a/share/python/src/LibraryMathematicsPy/Geometry/Transformations.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations.cpp @@ -1,26 +1,26 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file LibraryMathematicsPy/Geometry/Transformations.cpp +/// @file LibraryMathematicsPy/Geometry/3D/Transformations.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline void LibraryMathematicsPy_Geometry_Transformations ( ) +inline void LibraryMathematicsPy_Geometry_3D_Transformations ( ) { - boost::python::object module(boost::python::handle<>(boost::python::borrowed(PyImport_AddModule("Library.Mathematics.Geometry.Transformations")))) ; + boost::python::object module(boost::python::handle<>(boost::python::borrowed(PyImport_AddModule("Library.Mathematics.Geometry.D3.Transformations")))) ; boost::python::scope().attr("Transformations") = module ; boost::python::scope scope = module ; - LibraryMathematicsPy_Geometry_Transformations_Rotations() ; + LibraryMathematicsPy_Geometry_3D_Transformations_Rotations() ; } diff --git a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations.cpp similarity index 58% rename from share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations.cpp rename to share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations.cpp index 9c84f37b..b5ebfe52 100755 --- a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations.cpp @@ -1,30 +1,30 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file LibraryMathematicsPy/Geometry/Transformations/Rotations.cpp +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline void LibraryMathematicsPy_Geometry_Transformations_Rotations ( ) +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations ( ) { - boost::python::object module(boost::python::handle<>(boost::python::borrowed(PyImport_AddModule("Library.Mathematics.Geometry.Transformations.Rotations")))) ; + boost::python::object module(boost::python::handle<>(boost::python::borrowed(PyImport_AddModule("Library.Mathematics.Geometry.D3.Transformations.Rotations")))) ; boost::python::scope().attr("Rotations") = module ; boost::python::scope scope = module ; - LibraryMathematicsPy_Geometry_Transformations_Rotations_Quaternion() ; - LibraryMathematicsPy_Geometry_Transformations_Rotations_RotationVector() ; - LibraryMathematicsPy_Geometry_Transformations_Rotations_RotationMatrix() ; + LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion() ; + LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_RotationVector() ; + LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_RotationMatrix() ; } diff --git a/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/Quaternion.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/Quaternion.cpp new file mode 100755 index 00000000..e6850b6e --- /dev/null +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/Quaternion.cpp @@ -0,0 +1,94 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/// @project Library/Mathematics +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/Quaternion.cpp +/// @author Lucas Brémond +/// @license TBD + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +// BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion_toString_overloads, library::math::geom::d3::trf::rot::Quaternion::toString, 0, 2) + +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion ( ) +{ + + using namespace boost::python ; + + using library::core::types::Real ; + using library::core::types::String ; + + using library::math::obj::Vector3d ; + using library::math::obj::Vector4d ; + using library::math::geom::d3::trf::rot::Quaternion ; + + scope in_Quaternion = class_("Quaternion", init()) + + .def(init()) + .def(init()) + + .def(self == self) + .def(self != self) + + .def(self * self) + .def(self * Vector3d()) + + .def(self / self) + + .def(self_ns::str(self_ns::self)) + + .def("__repr__", +[] (const Quaternion& aQuaternion) -> std::string { return aQuaternion.toString() ; }) + + .def("isDefined", &Quaternion::isDefined) + .def("isUnitary", &Quaternion::isUnitary) + .def("isNear", &Quaternion::isNear) + + .def("x", &Quaternion::x) + .def("y", &Quaternion::y) + .def("z", &Quaternion::z) + .def("s", &Quaternion::s) + .def("getVectorPart", &Quaternion::getVectorPart) + .def("getScalarPart", &Quaternion::getScalarPart) + .def("toNormalized", &Quaternion::toNormalized) + .def("toConjugate", &Quaternion::toConjugate) + .def("toInverse", &Quaternion::toInverse) + // .def("pow", &Quaternion::pow) + // .def("exp", &Quaternion::exp) + // .def("log", &Quaternion::log) + .def("norm", &Quaternion::norm) + .def("crossMultiply", &Quaternion::crossMultiply) + .def("dotMultiply", &Quaternion::dotMultiply) + .def("rotateVector", &Quaternion::rotateVector) + .def("toVector", &Quaternion::toVector) + .def("toString", +[] (const Quaternion& aQuaternion, const Quaternion::Format aFormat) -> String { return aQuaternion.toString(aFormat) ; }) + // .def("toString", &Quaternion::toString(), LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion_toString_overloads()) + .def("normalize", +[] (Quaternion& aQuaternion) -> void { aQuaternion.normalize() ; }) + .def("conjugate", +[] (Quaternion& aQuaternion) -> void { aQuaternion.conjugate() ; }) + .def("inverse", +[] (Quaternion& aQuaternion) -> void { aQuaternion.inverse() ; }) + .def("rectify", +[] (Quaternion& aQuaternion) -> void { aQuaternion.rectify() ; }) + .def("angularDifferenceWith", &Quaternion::angularDifferenceWith) + + .def("Undefined", &Quaternion::Undefined).staticmethod("Undefined") + .def("Unit", &Quaternion::Unit).staticmethod("Unit") + .def("XYZS", &Quaternion::XYZS).staticmethod("XYZS") + .def("RotationVector", &Quaternion::RotationVector).staticmethod("RotationVector") + .def("RotationMatrix", &Quaternion::RotationMatrix).staticmethod("RotationMatrix") + .def("Parse", &Quaternion::Parse).staticmethod("Parse") + + ; + + enum_("Format") + + .value("XYZS", Quaternion::Format::XYZS) + .value("SXYZ", Quaternion::Format::SXYZ) + + ; + +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp new file mode 100755 index 00000000..1da88e0f --- /dev/null +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp @@ -0,0 +1,62 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/// @project Library/Mathematics +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp +/// @author Lucas Brémond +/// @license TBD + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_RotationMatrix ( ) +{ + + using namespace boost::python ; + + using library::core::types::Real ; + using library::core::types::String ; + + using library::math::obj::Vector3d ; + using library::math::obj::Matrix3d ; + using library::math::geom::d3::trf::rot::RotationMatrix ; + + scope in_RotationMatrix = class_("RotationMatrix", init()) + + .def(init()) + + .def(self == self) + .def(self != self) + + .def(self * self) + .def(self * Vector3d()) + + .def(self_ns::str(self_ns::self)) + .def(self_ns::repr(self_ns::self)) + + .def("isDefined", &RotationMatrix::isDefined) + + .def("getRowAt", &RotationMatrix::getRowAt) + .def("getColumnAt", &RotationMatrix::getColumnAt) + .def("toTransposed", &RotationMatrix::toTransposed) + .def("transpose", +[] (RotationMatrix& aRotationMatrix) -> void { aRotationMatrix.transpose() ; }) + + .def("Undefined", &RotationMatrix::Undefined).staticmethod("Undefined") + .def("Unit", &RotationMatrix::Unit).staticmethod("Unit") + .def("RX", &RotationMatrix::RX).staticmethod("RX") + .def("RY", &RotationMatrix::RY).staticmethod("RY") + .def("RZ", &RotationMatrix::RZ).staticmethod("RZ") + .def("Rows", &RotationMatrix::Rows).staticmethod("Rows") + .def("Columns", &RotationMatrix::Columns).staticmethod("Columns") + .def("Quaternion", &RotationMatrix::Quaternion).staticmethod("Quaternion") + .def("RotationVector", &RotationMatrix::RotationVector).staticmethod("RotationVector") + + ; + +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationVector.cpp b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationVector.cpp new file mode 100755 index 00000000..ce1fc9a8 --- /dev/null +++ b/share/python/src/LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationVector.cpp @@ -0,0 +1,51 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/// @project Library/Mathematics +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationVector.cpp +/// @author Lucas Brémond +/// @license TBD + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_RotationVector ( ) +{ + + using namespace boost::python ; + + using library::core::types::Real ; + using library::core::types::String ; + + using library::math::obj::Vector3d ; + using library::math::geom::Angle ; + using library::math::geom::d3::trf::rot::RotationVector ; + + scope in_RotationVector = class_("RotationVector", init()) + + .def(self == self) + .def(self != self) + + .def(self_ns::str(self_ns::self)) + .def(self_ns::repr(self_ns::self)) + + .def("isDefined", &RotationVector::isDefined) + + .def("getAxis", &RotationVector::getAxis) + .def("getAngle", &RotationVector::getAngle) + .def("toString", &RotationVector::toString) + + .def("Undefined", &RotationVector::Undefined) + .def("Unit", &RotationVector::Unit).staticmethod("Unit") + .def("Quaternion", &RotationVector::Quaternion).staticmethod("Quaternion") + .def("RotationMatrix", &RotationVector::RotationMatrix).staticmethod("RotationMatrix") + + ; + +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/Quaternion.cpp b/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/Quaternion.cpp old mode 100755 new mode 100644 index c24e194c..e6850b6e --- a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/Quaternion.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/Quaternion.cpp @@ -1,21 +1,21 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file LibraryMathematicsPy/Geometry/Transformations/Rotations/Quaternion.cpp +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/Quaternion.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (LibraryMathematicsPy_Geometry_Transformations_Rotations_Quaternion_toString_overloads, library::math::geom::trf::rot::Quaternion::toString, 0, 2) +// BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion_toString_overloads, library::math::geom::d3::trf::rot::Quaternion::toString, 0, 2) -inline void LibraryMathematicsPy_Geometry_Transformations_Rotations_Quaternion ( ) +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion ( ) { using namespace boost::python ; @@ -25,7 +25,7 @@ inline void LibraryMathematicsPy_Geometry_Transformations_Ro using library::math::obj::Vector3d ; using library::math::obj::Vector4d ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; scope in_Quaternion = class_("Quaternion", init()) @@ -66,7 +66,7 @@ inline void LibraryMathematicsPy_Geometry_Transformations_Ro .def("rotateVector", &Quaternion::rotateVector) .def("toVector", &Quaternion::toVector) .def("toString", +[] (const Quaternion& aQuaternion, const Quaternion::Format aFormat) -> String { return aQuaternion.toString(aFormat) ; }) - // .def("toString", &Quaternion::toString(), LibraryMathematicsPy_Geometry_Transformations_Rotations_Quaternion_toString_overloads()) + // .def("toString", &Quaternion::toString(), LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_Quaternion_toString_overloads()) .def("normalize", +[] (Quaternion& aQuaternion) -> void { aQuaternion.normalize() ; }) .def("conjugate", +[] (Quaternion& aQuaternion) -> void { aQuaternion.conjugate() ; }) .def("inverse", +[] (Quaternion& aQuaternion) -> void { aQuaternion.inverse() ; }) diff --git a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationMatrix.cpp b/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationMatrix.cpp old mode 100755 new mode 100644 index ad45d2ee..1da88e0f --- a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationMatrix.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationMatrix.cpp @@ -1,19 +1,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationMatrix.cpp +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline void LibraryMathematicsPy_Geometry_Transformations_Rotations_RotationMatrix ( ) +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_RotationMatrix ( ) { using namespace boost::python ; @@ -23,7 +23,7 @@ inline void LibraryMathematicsPy_Geometry_Transformations_Ro using library::math::obj::Vector3d ; using library::math::obj::Matrix3d ; - using library::math::geom::trf::rot::RotationMatrix ; + using library::math::geom::d3::trf::rot::RotationMatrix ; scope in_RotationMatrix = class_("RotationMatrix", init()) diff --git a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationVector.cpp b/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationVector.cpp old mode 100755 new mode 100644 index ff87cd00..ce1fc9a8 --- a/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationVector.cpp +++ b/share/python/src/LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationVector.cpp @@ -1,19 +1,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationVector.cpp +/// @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationVector.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline void LibraryMathematicsPy_Geometry_Transformations_Rotations_RotationVector ( ) +inline void LibraryMathematicsPy_Geometry_3D_Transformations_Rotations_RotationVector ( ) { using namespace boost::python ; @@ -23,7 +23,7 @@ inline void LibraryMathematicsPy_Geometry_Transformations_Ro using library::math::obj::Vector3d ; using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; scope in_RotationVector = class_("RotationVector", init()) diff --git a/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.py b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/Quaternion.py similarity index 92% rename from share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.py rename to share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/Quaternion.py index 87e83898..88dab48b 100644 --- a/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.py +++ b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/Quaternion.py @@ -3,7 +3,7 @@ ################################################################################################################################################################ # @project Library/Mathematics -# @file LibraryMathematicsPy/Geometry/Transformations/Rotations/Geometry.py +# @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/Geometry.py # @author Lucas Brémond # @license TBD @@ -16,8 +16,8 @@ from LibraryMathematicsPy import Geometry Angle = Geometry.Angle -Quaternion = Geometry.Transformations.Rotations.Quaternion -RotationVector = Geometry.Transformations.Rotations.RotationVector +Quaternion = Geometry.D3.Transformations.Rotations.Quaternion +RotationVector = Geometry.D3.Transformations.Rotations.RotationVector ################################################################################################################################################################ diff --git a/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/RotationMatrix.py b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/RotationMatrix.py new file mode 100644 index 00000000..81575c55 --- /dev/null +++ b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/RotationMatrix.py @@ -0,0 +1,39 @@ +# coding=utf-8 + +################################################################################################################################################################ + +# @project Library/Mathematics +# @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.py +# @author Lucas Brémond +# @license TBD + +################################################################################################################################################################ + +import numpy + +from Library.Core import Types + +from LibraryMathematicsPy import Geometry + +Angle = Geometry.Angle +Quaternion = Geometry.D3.Transformations.Rotations.Quaternion +RotationMatrix = Geometry.D3.Transformations.Rotations.RotationMatrix + +################################################################################################################################################################ + +# isDefined +# getRowAt +# getColumnAt +# toTransposed +# transpose +# Undefined +# Unit +# RX +# RY +# RZ +# Rows +# Columns +# Quaternion +# RotationVector + +################################################################################################################################################################ \ No newline at end of file diff --git a/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.py b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/RotationVector.py similarity index 86% rename from share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.py rename to share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/RotationVector.py index 887cd790..57770ec7 100644 --- a/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.py +++ b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/Rotations/RotationVector.py @@ -3,7 +3,7 @@ ################################################################################################################################################################ # @project Library/Mathematics -# @file LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationVector.py +# @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationVector.py # @author Lucas Brémond # @license TBD @@ -16,8 +16,8 @@ from LibraryMathematicsPy import Geometry Angle = Geometry.Angle -Quaternion = Geometry.Transformations.Rotations.Quaternion -RotationVector = Geometry.Transformations.Rotations.RotationVector +Quaternion = Geometry.D3.Transformations.Rotations.Quaternion +RotationVector = Geometry.D3.Transformations.Rotations.RotationVector ################################################################################################################################################################ diff --git a/share/python/test/Library/Mathematics/Geometry/Transformations/__init__.py b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/__init__.py similarity index 90% rename from share/python/test/Library/Mathematics/Geometry/Transformations/__init__.py rename to share/python/test/Library/Mathematics/Geometry/D3/Transformations/__init__.py index 5262af1e..2fef046e 100644 --- a/share/python/test/Library/Mathematics/Geometry/Transformations/__init__.py +++ b/share/python/test/Library/Mathematics/Geometry/D3/Transformations/__init__.py @@ -3,7 +3,7 @@ ################################################################################################################################################################ # @project Library/Mathematics -# @file LibraryMathematicsPy/Geometry/Transformations/Rotations.py +# @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations.py # @author Lucas Brémond # @license TBD diff --git a/share/python/test/Library/Mathematics/Geometry/D3/__init__.py b/share/python/test/Library/Mathematics/Geometry/D3/__init__.py new file mode 100644 index 00000000..a8e06eb2 --- /dev/null +++ b/share/python/test/Library/Mathematics/Geometry/D3/__init__.py @@ -0,0 +1,14 @@ +# coding=utf-8 + +################################################################################################################################################################ + +# @project Library/Mathematics +# @file LibraryMathematicsPy/Geometry/Transformations.py +# @author Lucas Brémond +# @license TBD + +################################################################################################################################################################ + +from .Transformations import Rotations + +################################################################################################################################################################ \ No newline at end of file diff --git a/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.py b/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.py index 5e2809d0..24be990e 100644 --- a/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.py +++ b/share/python/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.py @@ -3,7 +3,7 @@ ################################################################################################################################################################ # @project Library/Mathematics -# @file LibraryMathematicsPy/Geometry/Transformations/Rotations/RotationMatrix.py +# @file LibraryMathematicsPy/Geometry/3D/Transformations/Rotations/RotationMatrix.py # @author Lucas Brémond # @license TBD diff --git a/share/python/test/Library/Mathematics/Geometry/__init__.py b/share/python/test/Library/Mathematics/Geometry/__init__.py index a8e06eb2..cf99a6c8 100644 --- a/share/python/test/Library/Mathematics/Geometry/__init__.py +++ b/share/python/test/Library/Mathematics/Geometry/__init__.py @@ -9,6 +9,6 @@ ################################################################################################################################################################ -from .Transformations import Rotations +from .D3 import Transformations ################################################################################################################################################################ \ No newline at end of file diff --git a/src/Library/Mathematics/Geometry/2D/Transformation.cpp b/src/Library/Mathematics/Geometry/2D/Transformation.cpp index da2cf7ab..d568a3ea 100644 --- a/src/Library/Mathematics/Geometry/2D/Transformation.cpp +++ b/src/Library/Mathematics/Geometry/2D/Transformation.cpp @@ -14,8 +14,6 @@ #include #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace library diff --git a/src/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.cpp b/src/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.cpp index e54ac911..ca3b8790 100644 --- a/src/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.cpp +++ b/src/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -29,8 +29,18 @@ #include #include +// Disable Eigen warnings + +#pragma GCC diagnostic push // Save diagnostic state + +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wint-in-bool-context" + #include +#pragma GCC diagnostic pop // Turn the warnings back on + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace library @@ -901,7 +911,7 @@ void Ellipsoid::print ( void Ellipsoid::applyTransformation ( const Transformation& aTransformation ) { - using library::math::geom::trf::rot::RotationMatrix ; + using library::math::geom::d3::trf::rot::RotationMatrix ; if (!aTransformation.isDefined()) { diff --git a/src/Library/Mathematics/Geometry/3D/Objects/Pyramid.cpp b/src/Library/Mathematics/Geometry/3D/Objects/Pyramid.cpp index 66568f60..b4c52466 100644 --- a/src/Library/Mathematics/Geometry/3D/Objects/Pyramid.cpp +++ b/src/Library/Mathematics/Geometry/3D/Objects/Pyramid.cpp @@ -7,8 +7,8 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include #include #include @@ -191,8 +191,8 @@ Array Pyramid::getRaysOfLateralFaceAt ( { using library::math::obj::Interval ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; if (aRayCount < 2) { diff --git a/src/Library/Mathematics/Geometry/3D/Transformation.cpp b/src/Library/Mathematics/Geometry/3D/Transformation.cpp index ee32ab6a..f9ee545c 100644 --- a/src/Library/Mathematics/Geometry/3D/Transformation.cpp +++ b/src/Library/Mathematics/Geometry/3D/Transformation.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include @@ -15,8 +15,6 @@ #include #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace library @@ -317,7 +315,7 @@ Transformation Transformation::Translation ( Transformation Transformation::Rotation ( const RotationVector& aRotationVector ) { - using library::math::geom::trf::rot::RotationMatrix ; + using library::math::geom::d3::trf::rot::RotationMatrix ; if (!aRotationVector.isDefined()) { diff --git a/src/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.cpp b/src/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.cpp similarity index 98% rename from src/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.cpp rename to src/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.cpp index 3d3a1a3b..06f54f95 100644 --- a/src/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.cpp +++ b/src/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.cpp @@ -1,19 +1,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.cpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include #include #include -#include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -23,6 +22,8 @@ namespace math { namespace geom { +namespace d3 +{ namespace trf { namespace rot @@ -730,5 +731,6 @@ Quaternion Quaternion::Parse ( } } } +} /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/src/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.cpp b/src/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp similarity index 98% rename from src/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.cpp rename to src/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp index 1249e6ee..b39e21a9 100644 --- a/src/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.cpp +++ b/src/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp @@ -1,15 +1,15 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.cpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include #include #include @@ -22,6 +22,8 @@ namespace math { namespace geom { +namespace d3 +{ namespace trf { namespace rot @@ -594,5 +596,6 @@ RotationMatrix RotationMatrix::RotationVector ( } } } +} /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/src/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.cpp b/src/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.cpp similarity index 95% rename from src/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.cpp rename to src/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.cpp index ddaa9b8f..840b2765 100644 --- a/src/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.cpp +++ b/src/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.cpp @@ -1,21 +1,19 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.cpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include #include #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// namespace library @@ -24,6 +22,8 @@ namespace math { namespace geom { +namespace d3 +{ namespace trf { namespace rot @@ -216,5 +216,6 @@ RotationVector RotationVector::RotationMatrix ( } } } +} /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.test.cpp index 8e7add08..a3963943 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Ellipsoid.test.cpp @@ -7,8 +7,8 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include #include #include @@ -26,7 +26,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, Constructor) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; using library::math::geom::d3::objects::Ellipsoid ; { @@ -61,8 +61,8 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, EqualToOperator) using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -99,8 +99,8 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, NotEqualToOperator) using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -879,8 +879,8 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, GetFirstAxis) using library::math::obj::Vector3d ; using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -906,8 +906,8 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, GetSecondAxis) using library::math::obj::Vector3d ; using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -933,8 +933,8 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, GetThirdAxis) using library::math::obj::Vector3d ; using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -955,7 +955,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, GetThirdAxis) TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, GetOrientation) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; using library::math::geom::d3::objects::Ellipsoid ; { @@ -986,9 +986,9 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, GetMatrix) using library::math::obj::Matrix3d ; using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; - using library::math::geom::trf::rot::RotationMatrix ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationMatrix ; { @@ -1623,8 +1623,8 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ellipsoid, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Ellipsoid ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Line.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Line.test.cpp index 33b86f89..607db0dc 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Line.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Line.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -293,7 +293,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Line, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Line ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/LineString.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/LineString.test.cpp index 70a6e18f..d508b6d3 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/LineString.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/LineString.test.cpp @@ -286,7 +286,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_LineString, ApplyTransformation) using library::math::geom::d3::objects::Point ; using library::math::geom::d3::objects::LineString ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Plane.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Plane.test.cpp index 93e4fc48..1e0efd07 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Plane.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Plane.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include @@ -327,7 +327,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Plane, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Plane ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Point.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Point.test.cpp index 8f73f4ce..cf1883e5 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Point.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Point.test.cpp @@ -291,7 +291,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Point, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Point ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/PointSet.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/PointSet.test.cpp index 6e620fff..1f4bafbf 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/PointSet.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/PointSet.test.cpp @@ -288,7 +288,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_PointSet, ApplyTransformation) using library::math::geom::d3::objects::Point ; using library::math::geom::d3::objects::PointSet ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Polygon.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Polygon.test.cpp index d47c95b8..62761526 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Polygon.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Polygon.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include @@ -405,7 +405,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Polygon, ApplyTransformation) using library::math::geom::d3::objects::Point ; using library::math::geom::d3::objects::Polygon ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Pyramid.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Pyramid.test.cpp index 1a6d6095..5bde32f8 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Pyramid.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Pyramid.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -324,7 +324,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Pyramid, ApplyTransformation) using library::math::geom::d3::objects::Polygon ; using library::math::geom::d3::objects::Pyramid ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Ray.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Ray.test.cpp index 99cc679f..7232ce0f 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Ray.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Ray.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -316,7 +316,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Ray, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Ray ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Segment.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Segment.test.cpp index 8fa68e40..f46f032a 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Segment.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Segment.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include #include @@ -378,7 +378,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Segment, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Segment ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/3D/Objects/Sphere.test.cpp b/test/Library/Mathematics/Geometry/3D/Objects/Sphere.test.cpp index 56f16ab2..66a09fa5 100644 --- a/test/Library/Mathematics/Geometry/3D/Objects/Sphere.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Objects/Sphere.test.cpp @@ -7,7 +7,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include +#include #include #include @@ -209,7 +209,7 @@ TEST (Library_Mathematics_Geometry_3D_Objects_Sphere, ApplyTransformation) using library::math::geom::Angle ; using library::math::geom::d3::objects::Sphere ; using library::math::geom::d3::Transformation ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; // Translation diff --git a/test/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.test.cpp b/test/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.test.cpp similarity index 73% rename from test/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.test.cpp rename to test/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.test.cpp index bdb10227..0e636b20 100644 --- a/test/Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.test.cpp @@ -1,27 +1,27 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/Quaternion.test.cpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/Quaternion.test.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include #include #include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Constructor) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Constructor) { using library::math::obj::Vector3d ; using library::math::obj::Vector4d ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -55,10 +55,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Constru } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, EqualToOperator) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, EqualToOperator) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -97,10 +97,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, EqualTo } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, NotEqualToOperator) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, NotEqualToOperator) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -139,10 +139,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, NotEqua } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, MultiplicationOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, MultiplicationOperator) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -152,10 +152,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, NotEqua // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, DivisionOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, DivisionOperator) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -165,10 +165,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, NotEqua // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, MultiplicationAssignmentOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, MultiplicationAssignmentOperator) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -178,10 +178,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, NotEqua // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, DivisionAssignmentOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, DivisionAssignmentOperator) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -191,10 +191,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, NotEqua // } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, StreamOperator) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, StreamOperator) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -208,10 +208,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, StreamO } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, IsDefined) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, IsDefined) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -236,10 +236,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, IsDefin } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, IsUnitary) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, IsUnitary) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -264,11 +264,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, IsUnita } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, IsNear) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, IsNear) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -307,10 +307,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, IsNear) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, X) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, X) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -326,10 +326,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, X) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Y) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Y) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -345,10 +345,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Y) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Z) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Z) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -364,10 +364,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Z) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, S) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, S) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -383,11 +383,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, S) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, GetVectorPart) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, GetVectorPart) { using library::math::obj::Vector3d ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -403,10 +403,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, GetVect } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, GetScalarPart) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, GetScalarPart) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -422,10 +422,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, GetScal } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToNormalized) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, ToNormalized) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -435,10 +435,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, GetScal // } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConjugate) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, ToConjugate) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -458,10 +458,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToInverse) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, ToInverse) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -471,10 +471,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Pow) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Pow) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -484,10 +484,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Exp) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Exp) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -497,10 +497,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Log) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Log) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -510,10 +510,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Norm) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Norm) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -523,10 +523,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, CrossMultiply) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, CrossMultiply) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -536,10 +536,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, DotMultiply) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, DotMultiply) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -549,10 +549,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, RotateVector) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, RotateVector) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -562,11 +562,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToConju // } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToVector) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, ToVector) { using library::math::obj::Vector4d ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -583,10 +583,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToVecto } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToString) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, ToString) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -617,10 +617,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToStrin } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Normalize) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Normalize) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -630,10 +630,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToStrin // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Conjugate) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Conjugate) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -643,10 +643,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToStrin // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Inverse) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Inverse) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -656,10 +656,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToStrin // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Rectify) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Rectify) // { -// using library::math::geom::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::Quaternion ; // { @@ -669,11 +669,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, ToStrin // } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, AngularDifferenceWith) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, AngularDifferenceWith) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -694,10 +694,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Angular } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Undefined) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Undefined) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -708,10 +708,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Undefin } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Unit) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Unit) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -722,10 +722,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Unit) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, XYZS) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, XYZS) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -736,13 +736,13 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, XYZS) } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, RotationVector) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, RotationVector) { using library::core::types::Real ; using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -759,15 +759,15 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Rotatio } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, RotationMatrix) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, RotationMatrix) { using library::core::types::Real ; using library::math::obj::Vector3d ; using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; - using library::math::geom::trf::rot::RotationMatrix ; - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationMatrix ; + using library::math::geom::d3::trf::rot::Quaternion ; { @@ -818,10 +818,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Rotatio } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_Quaternion, Parse) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_Quaternion, Parse) { - using library::math::geom::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::Quaternion ; { diff --git a/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.test.cpp b/test/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.test.cpp similarity index 77% rename from test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.test.cpp rename to test/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.test.cpp index 5b95c587..13ed24f3 100644 --- a/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.test.cpp @@ -1,26 +1,26 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/RotationMatrix.test.cpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationMatrix.test.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include -#include +#include +#include +#include #include #include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Constructor) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, Constructor) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationMatrix ; + using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -47,11 +47,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, EqualToOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, EqualToOperator) // { // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -85,11 +85,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, NotEqualToOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, NotEqualToOperator) // { // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -123,11 +123,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, StreamOperator) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, StreamOperator) // { // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -141,12 +141,12 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, IsDefined) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, IsDefined) // { // using library::math::obj::Vector3d ; // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -164,12 +164,12 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, GetAxis) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, GetAxis) // { // using library::math::obj::Vector3d ; // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -187,11 +187,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, GetAngle) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, GetAngle) // { // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -216,10 +216,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Undefined) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, Undefined) // { -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -230,11 +230,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Unit) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, Unit) // { // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { @@ -245,17 +245,17 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Con // } -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, RX) -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, RY) -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, RZ) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, RX) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, RY) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, RZ) -// TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationMatrix, Quaternion) +// TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationMatrix, Quaternion) // { // using library::core::types::Real ; // using library::math::geom::Angle ; -// using library::math::geom::trf::rot::Quaternion ; -// using library::math::geom::trf::rot::RotationMatrix ; +// using library::math::geom::d3::trf::rot::Quaternion ; +// using library::math::geom::d3::trf::rot::RotationMatrix ; // { diff --git a/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.test.cpp b/test/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.test.cpp similarity index 82% rename from test/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.test.cpp rename to test/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.test.cpp index cc852131..f5193865 100644 --- a/test/Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.test.cpp +++ b/test/Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.test.cpp @@ -1,25 +1,25 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @project Library/Mathematics -/// @file Library/Mathematics/Geometry/Transformations/Rotations/RotationVector.test.cpp +/// @file Library/Mathematics/Geometry/3D/Transformations/Rotations/RotationVector.test.cpp /// @author Lucas Brémond /// @license TBD //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include #include //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Constructor) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, Constructor) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -40,11 +40,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Con } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, EqualToOperator) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, EqualToOperator) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -78,11 +78,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Equ } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, NotEqualToOperator) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, NotEqualToOperator) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -116,11 +116,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Not } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, StreamOperator) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, StreamOperator) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -134,12 +134,12 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Str } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, IsDefined) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, IsDefined) { using library::math::obj::Vector3d ; using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -157,12 +157,12 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, IsD } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, GetAxis) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, GetAxis) { using library::math::obj::Vector3d ; using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -180,11 +180,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Get } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, GetAngle) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, GetAngle) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -209,11 +209,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Get } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, ToString) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, ToString) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -253,10 +253,10 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, ToS } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Undefined) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, Undefined) { - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -267,11 +267,11 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Und } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Unit) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, Unit) { using library::math::geom::Angle ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::RotationVector ; { @@ -282,13 +282,13 @@ TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Uni } -TEST (Library_Mathematics_Geometry_Transformations_Rotations_RotationVector, Quaternion) +TEST (Library_Mathematics_Geometry_3D_Transformations_Rotations_RotationVector, Quaternion) { using library::core::types::Real ; using library::math::geom::Angle ; - using library::math::geom::trf::rot::Quaternion ; - using library::math::geom::trf::rot::RotationVector ; + using library::math::geom::d3::trf::rot::Quaternion ; + using library::math::geom::d3::trf::rot::RotationVector ; {