Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
niermann999 committed Jul 24, 2024
1 parent 676202f commit 0bf7168
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions math/vc_aos/include/algebra/math/impl/vc_aos_transform3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,27 +256,21 @@ struct transform3 {
/// This method transform from a point from the local 3D cartesian frame
/// to the global 3D cartesian frame
///
/// @tparam point_type 3D point
///
/// @param v is the point to be transformed
///
/// @return a global point
template <typename point3_type>
ALGEBRA_HOST_DEVICE inline auto point_to_global(const point3_type &p) const {
ALGEBRA_HOST_DEVICE inline auto point_to_global(const point3 &p) const {

return _data.x * p[0] + _data.y * p[1] + _data.z * p[2] + _data.t;
}

/// This method transform from a vector from the global 3D cartesian frame
/// into the local 3D cartesian frame
///
/// @tparam point_type 3D point
///
/// @param v is the point to be transformed
///
/// @return a local point
template <typename point3_type>
ALGEBRA_HOST_DEVICE inline auto point_to_local(const point3_type &p) const {
ALGEBRA_HOST_DEVICE inline auto point_to_local(const point3 &p) const {

return _data_inv.x * p[0] + _data_inv.y * p[1] + _data_inv.z * p[2] +
_data_inv.t;
Expand All @@ -285,28 +279,21 @@ struct transform3 {
/// This method transform from a vector from the local 3D cartesian frame
/// to the global 3D cartesian frame
///
/// @tparam vector3_type 3D vector
///
/// @param v is the vector to be transformed
///
/// @return a vector in global coordinates
template <typename vector3_type>
ALGEBRA_HOST_DEVICE inline auto vector_to_global(
const vector3_type &v) const {
ALGEBRA_HOST_DEVICE inline auto vector_to_global(const vector3 &v) const {

return rotate(_data, v);
}

/// This method transform from a vector from the global 3D cartesian frame
/// into the local 3D cartesian frame
///
/// @tparam vector3_type 3D vector
///
/// @param v is the vector to be transformed
///
/// @return a vector in global coordinates
template <typename vector3_type>
ALGEBRA_HOST_DEVICE inline auto vector_to_local(const vector3_type &v) const {
ALGEBRA_HOST_DEVICE inline auto vector_to_local(const vector3 &v) const {

return rotate(_data_inv, v);
}
Expand Down

0 comments on commit 0bf7168

Please sign in to comment.