Macros | Functions
matrix-homogeneous.cpp File Reference
#include <sstream>
#include <boost/math/constants/constants.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/test/output_test_stream.hpp>
#include <boost/test/unit_test.hpp>
#include <sot/core/matrix-geometry.hh>
Include dependency graph for matrix-homogeneous.cpp:

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   matrix_homogeneous
 
#define MATRIX_4x4_BOOST_REQUIRE_CLOSE(LEFT, RIGHT, TOLERANCE)   MATRIX_BOOST_REQUIRE_CLOSE(4, 4, LEFT, RIGHT, TOLERANCE)
 
#define MATRIX_BOOST_REQUIRE_CLOSE(N, M, LEFT, RIGHT, TOLERANCE)
 
#define MATRIX_HOMO_INIT(M, tx, ty, tz, roll, pitch, yaw)
 
#define MATRIX_IDENTITY_4x4_REQUIRE_CLOSE(M, TOLERANCE)
 

Functions

 BOOST_AUTO_TEST_CASE (product)
 
 BOOST_AUTO_TEST_CASE (inverse)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   matrix_homogeneous

Definition at line 5 of file matrix-homogeneous.cpp.

◆ MATRIX_4x4_BOOST_REQUIRE_CLOSE

#define MATRIX_4x4_BOOST_REQUIRE_CLOSE (   LEFT,
  RIGHT,
  TOLERANCE 
)    MATRIX_BOOST_REQUIRE_CLOSE(4, 4, LEFT, RIGHT, TOLERANCE)

Definition at line 23 of file matrix-homogeneous.cpp.

◆ MATRIX_BOOST_REQUIRE_CLOSE

#define MATRIX_BOOST_REQUIRE_CLOSE (   N,
  M,
  LEFT,
  RIGHT,
  TOLERANCE 
)
Value:
for (unsigned i = 0; i < N; ++i) \
for (unsigned j = 0; j < M; ++j) \
BOOST_REQUIRE_CLOSE(LEFT(i, j), RIGHT(i, j), TOLERANCE)
int i
N
M

Definition at line 18 of file matrix-homogeneous.cpp.

◆ MATRIX_HOMO_INIT

#define MATRIX_HOMO_INIT (   M,
  tx,
  ty,
  tz,
  roll,
  pitch,
  yaw 
)
Value:
M(0, 0) = cos(pitch) * cos(yaw); \
M(0, 1) = sin(roll) * sin(pitch) * cos(yaw) - cos(roll) * sin(yaw); \
M(0, 2) = cos(roll) * sin(pitch) * cos(yaw) + sin(roll) * sin(yaw); \
M(0, 3) = tx; \
M(1, 0) = cos(pitch) * sin(yaw); \
M(1, 1) = sin(roll) * sin(pitch) * sin(yaw) + cos(roll) * cos(yaw); \
M(1, 2) = cos(roll) * sin(pitch) * sin(yaw) - sin(roll) * cos(yaw); \
M(1, 3) = ty; \
M(2, 0) = -sin(pitch); \
M(2, 1) = sin(roll) * cos(pitch); \
M(2, 2) = cos(roll) * cos(pitch); \
M(2, 3) = tz; \
M(3, 0) = 0.; \
M(3, 1) = 0.; \
M(3, 2) = 0.; \
M(3, 3) = 1.
M

Definition at line 34 of file matrix-homogeneous.cpp.

◆ MATRIX_IDENTITY_4x4_REQUIRE_CLOSE

#define MATRIX_IDENTITY_4x4_REQUIRE_CLOSE (   M,
  TOLERANCE 
)
Value:
for (unsigned i = 0; i < 4; ++i) \
for (unsigned j = 0; j < 4; ++j) \
if (i == j) \
BOOST_REQUIRE_CLOSE(M(i, j), 1., TOLERANCE); \
else \
BOOST_CHECK_SMALL(M(i, j), .01 * TOLERANCE)
int i
M

Definition at line 26 of file matrix-homogeneous.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( product  )

Definition at line 52 of file matrix-homogeneous.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( inverse  )

Definition at line 82 of file matrix-homogeneous.cpp.



sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:27