Commit a387f349 authored by Lucile Remigy's avatar Lucile Remigy
Browse files

merge of matrix_3f.h and vec_3h.h in types.h

parent 887fd0cd
...@@ -128,6 +128,7 @@ SET(${PROJECT_NAME}_HEADERS ...@@ -128,6 +128,7 @@ SET(${PROJECT_NAME}_HEADERS
include/hpp/fcl/distance.h include/hpp/fcl/distance.h
include/hpp/fcl/math/matrix_3f.h include/hpp/fcl/math/matrix_3f.h
include/hpp/fcl/math/vec_3f.h include/hpp/fcl/math/vec_3f.h
include/hpp/fcl/math/types.h
include/hpp/fcl/math/tools.h include/hpp/fcl/math/tools.h
include/hpp/fcl/math/transform.h include/hpp/fcl/math/transform.h
include/hpp/fcl/traversal/details/traversal.h include/hpp/fcl/traversal/details/traversal.h
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
#define HPP_FCL_AABB_H #define HPP_FCL_AABB_H
#include <stdexcept> #include <stdexcept>
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <hpp/fcl/math/matrix_3f.h>
namespace hpp namespace hpp
{ {
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
#ifndef HPP_FCL_BV_NODE_H #ifndef HPP_FCL_BV_NODE_H
#define HPP_FCL_BV_NODE_H #define HPP_FCL_BV_NODE_H
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <hpp/fcl/math/matrix_3f.h>
#include <hpp/fcl/BV/BV.h> #include <hpp/fcl/BV/BV.h>
#include <iostream> #include <iostream>
......
...@@ -38,9 +38,7 @@ ...@@ -38,9 +38,7 @@
#ifndef HPP_FCL_OBB_H #ifndef HPP_FCL_OBB_H
#define HPP_FCL_OBB_H #define HPP_FCL_OBB_H
#include <hpp/fcl/math/types.h>
#include <hpp/fcl/math/vec_3f.h>
#include <hpp/fcl/math/matrix_3f.h>
namespace hpp namespace hpp
{ {
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
#define HPP_FCL_RSS_H #define HPP_FCL_RSS_H
#include <stdexcept> #include <stdexcept>
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <hpp/fcl/math/matrix_3f.h>
#include <boost/math/constants/constants.hpp> #include <boost/math/constants/constants.hpp>
namespace hpp namespace hpp
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#define HPP_FCL_KDOP_H #define HPP_FCL_KDOP_H
#include <stdexcept> #include <stdexcept>
#include <hpp/fcl/math/matrix_3f.h> #include <hpp/fcl/math/types.h>
namespace hpp namespace hpp
{ {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#ifndef HPP_FCL_COLLISION_H #ifndef HPP_FCL_COLLISION_H
#define HPP_FCL_COLLISION_H #define HPP_FCL_COLLISION_H
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <hpp/fcl/collision_object.h> #include <hpp/fcl/collision_object.h>
#include <hpp/fcl/collision_data.h> #include <hpp/fcl/collision_data.h>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include <hpp/fcl/collision_object.h> #include <hpp/fcl/collision_object.h>
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <vector> #include <vector>
#include <set> #include <set>
#include <limits> #include <limits>
......
...@@ -38,34 +38,9 @@ ...@@ -38,34 +38,9 @@
#ifndef HPP_FCL_MATRIX_3F_H #ifndef HPP_FCL_MATRIX_3F_H
#define HPP_FCL_MATRIX_3F_H #define HPP_FCL_MATRIX_3F_H
#include <hpp/fcl/math/vec_3f.h> # warning "This file is deprecated. Include <hpp/fcl/math/types.h> instead."
namespace hpp // List of equivalent includes.
{ # include <hpp/fcl/math/types.h>
namespace fcl
{
typedef Eigen::Matrix<FCL_REAL, 3, 3> Matrix3f; #endif
\ No newline at end of file
/// @brief Class for variance matrix in 3d
class Variance3f
{
public:
/// @brief Variation matrix
Matrix3f Sigma;
/// @brief Variations along the eign axes
Matrix3f::Scalar sigma[3];
/// @brief Eigen axes of the variation matrix
Vec3f axis[3];
};
}
} // namespace hpp
#endif
...@@ -197,8 +197,6 @@ void eigen(const Eigen::MatrixBase<Derived>& m, typename Derived::Scalar dout[3] ...@@ -197,8 +197,6 @@ void eigen(const Eigen::MatrixBase<Derived>& m, typename Derived::Scalar dout[3]
return; return;
} }
template<typename Derived, typename OtherDerived> template<typename Derived, typename OtherDerived>
bool isEqual(const Eigen::MatrixBase<Derived>& lhs, const Eigen::MatrixBase<OtherDerived>& rhs, const FCL_REAL tol = std::numeric_limits<FCL_REAL>::epsilon()*100) bool isEqual(const Eigen::MatrixBase<Derived>& lhs, const Eigen::MatrixBase<OtherDerived>& rhs, const FCL_REAL tol = std::numeric_limits<FCL_REAL>::epsilon()*100)
{ {
...@@ -206,7 +204,6 @@ bool isEqual(const Eigen::MatrixBase<Derived>& lhs, const Eigen::MatrixBase<Othe ...@@ -206,7 +204,6 @@ bool isEqual(const Eigen::MatrixBase<Derived>& lhs, const Eigen::MatrixBase<Othe
} }
} }
} // namespace hpp } // namespace hpp
#endif #endif
\ No newline at end of file
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#ifndef HPP_FCL_TRANSFORM_H #ifndef HPP_FCL_TRANSFORM_H
#define HPP_FCL_TRANSFORM_H #define HPP_FCL_TRANSFORM_H
#include <hpp/fcl/math/matrix_3f.h> #include <hpp/fcl/math/types.h>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
namespace hpp namespace hpp
...@@ -126,8 +126,6 @@ public: ...@@ -126,8 +126,6 @@ public:
R.setIdentity(); R.setIdentity();
} }
/// @brief operator = /// @brief operator =
Transform3f& operator = (const Transform3f& tf) Transform3f& operator = (const Transform3f& tf)
{ {
...@@ -262,8 +260,8 @@ public: ...@@ -262,8 +260,8 @@ public:
} }
}; };
}
}
} // namespace hpp } // namespace hpp
#endif #endif
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011-2014, Willow Garage, Inc.
* Copyright (c) 2014-2015, Open Source Robotics Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Open Source Robotics Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/** \author Joseph Mirabel */
#ifndef HPP_FCL_MATH_TYPES_H
#define HPP_FCL_MATH_TYPES_H
#include <hpp/fcl/data_types.h>
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <hpp/fcl/math/tools.h>
#include <cmath>
#include <iostream>
#include <limits>
namespace hpp
{
namespace fcl
{
typedef Eigen::Matrix<FCL_REAL, 3, 1> Vec3f;
}
#ifdef HPP_FCL_HAVE_OCTOMAP
#define OCTOMAP_VERSION_AT_LEAST(x,y,z) \
(OCTOMAP_MAJOR_VERSION > x || (OCTOMAP_MAJOR_VERSION >= x && \
(OCTOMAP_MINOR_VERSION > y || (OCTOMAP_MINOR_VERSION >= y && \
OCTOMAP_PATCH_VERSION >= z))))
#define OCTOMAP_VERSION_AT_MOST(x,y,z) \
(OCTOMAP_MAJOR_VERSION < x || (OCTOMAP_MAJOR_VERSION <= x && \
(OCTOMAP_MINOR_VERSION < y || (OCTOMAP_MINOR_VERSION <= y && \
OCTOMAP_PATCH_VERSION <= z))))
#endif // HPP_FCL_HAVE_OCTOMAP
}
namespace hpp
{
namespace fcl
{
typedef Eigen::Matrix<FCL_REAL, 3, 3> Matrix3f;
/// @brief Class for variance matrix in 3d
class Variance3f
{
public:
/// @brief Variation matrix
Matrix3f Sigma;
/// @brief Variations along the eign axes
Matrix3f::Scalar sigma[3];
/// @brief Eigen axes of the variation matrix
Vec3f axis[3];
};
}
} // namespace hpp
#endif
\ No newline at end of file
...@@ -38,37 +38,9 @@ ...@@ -38,37 +38,9 @@
#ifndef HPP_FCL_VEC_3F_H #ifndef HPP_FCL_VEC_3F_H
#define HPP_FCL_VEC_3F_H #define HPP_FCL_VEC_3F_H
#include <hpp/fcl/data_types.h> # warning "This file is deprecated. Include <hpp/fcl/math/types.h> instead."
#include <Eigen/Core> // List of equivalent includes.
#include <Eigen/Geometry> # include <hpp/fcl/math/types.h>
#include <hpp/fcl/math/tools.h>
#include <cmath> #endif
#include <iostream> \ No newline at end of file
#include <limits>
namespace hpp
{
namespace fcl
{
typedef Eigen::Matrix<FCL_REAL, 3, 1> Vec3f;
}
} // namespace hpp
#ifdef HPP_FCL_HAVE_OCTOMAP
#define OCTOMAP_VERSION_AT_LEAST(x,y,z) \
(OCTOMAP_MAJOR_VERSION > x || (OCTOMAP_MAJOR_VERSION >= x && \
(OCTOMAP_MINOR_VERSION > y || (OCTOMAP_MINOR_VERSION >= y && \
OCTOMAP_PATCH_VERSION >= z))))
#define OCTOMAP_VERSION_AT_MOST(x,y,z) \
(OCTOMAP_MAJOR_VERSION < x || (OCTOMAP_MAJOR_VERSION <= x && \
(OCTOMAP_MINOR_VERSION < y || (OCTOMAP_MINOR_VERSION <= y && \
OCTOMAP_PATCH_VERSION <= z))))
#endif // HPP_FCL_HAVE_OCTOMAP
#endif
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <hpp/fcl/fwd.hh> #include <hpp/fcl/fwd.hh>
#include <hpp/fcl/config.hh> #include <hpp/fcl/config.hh>
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <hpp/fcl/collision_object.h> #include <hpp/fcl/collision_object.h>
namespace hpp namespace hpp
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <boost/math/constants/constants.hpp> #include <boost/math/constants/constants.hpp>
#include <hpp/fcl/collision_object.h> #include <hpp/fcl/collision_object.h>
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <string.h> #include <string.h>
namespace hpp namespace hpp
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp> #include <boost/utility/binary.hpp>
#include <hpp/fcl/math/vec_3f.h> #include <hpp/fcl/math/types.h>
#include <hpp/fcl/math/matrix_3f.h>
#include <hpp/fcl/math/transform.h> #include <hpp/fcl/math/transform.h>
#include <hpp/fcl/intersect.h> #include <hpp/fcl/intersect.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment