Ocean
Loading...
Searching...
No Matches
TestRotation.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTMATH_TEST_ROTATION_H
9#define META_OCEAN_TEST_TESTMATH_TEST_ROTATION_H
10
12
13namespace Ocean
14{
15
16namespace Test
17{
18
19namespace TestMath
20{
21
22/**
23 * This class implements a rotation test.
24 * @ingroup testmath
25 */
26class OCEAN_TEST_MATH_EXPORT TestRotation
27{
28 public:
29
30 /**
31 * Executes all rotation tests.
32 * @param testDuration Number of seconds for each test
33 * @return True, if succeeded
34 */
35 static bool test(const double testDuration);
36
37 /**
38 * Tests the default and basic constructors.
39 * @param testDuration Number of seconds for each test
40 * @return True, if succeeded
41 * @tparam T The data type of the scalar value to be used
42 */
43 template <typename T>
44 static bool testConstructors(const double testDuration);
45
46 /**
47 * Tests the matrix constructors (SquareMatrix3 and HomogenousMatrix4).
48 * This test is critical for finding the maximum-finding bug.
49 * @param testDuration Number of seconds for each test
50 * @return True, if succeeded
51 * @tparam T The data type of the scalar value to be used
52 */
53 template <typename T>
54 static bool testMatrixConstructors(const double testDuration);
55
56 /**
57 * Tests the array constructor.
58 * @param testDuration Number of seconds for each test
59 * @return True, if succeeded
60 * @tparam T The data type of the scalar value to be used
61 */
62 template <typename T>
63 static bool testArrayConstructor(const double testDuration);
64
65 /**
66 * Tests angle normalization (setAngle and constructors).
67 * @param testDuration Number of seconds for each test
68 * @return True, if succeeded
69 * @tparam T The data type of the scalar value to be used
70 */
71 template <typename T>
72 static bool testAngleNormalization(const double testDuration);
73
74 /**
75 * Tests the conversion from a rotation to a quaternion.
76 * @param testDuration Number of seconds for each test, with range (0, infinity)
77 * @return True, if succeeded
78 * @tparam T The data type of the scalar value to be used
79 */
80 template <typename T>
81 static bool testConversionToQuaterion(const double testDuration);
82
83 /**
84 * Tests the conversion from a rotation to a homogenous matrix.
85 * @param testDuration Number of seconds for each test, with range (0, infinity)
86 * @return True, if succeeded
87 * @tparam T The data type of the scalar value to be used
88 */
89 template <typename T>
90 static bool testConversionToHomogenousMatrix(const double testDuration);
91
92 /**
93 * Tests the reference-offset constructor.
94 * @param testDuration Number of seconds for each test
95 * @return True, if succeeded
96 * @tparam T The data type of the scalar value to be used
97 */
98 template <typename T>
99 static bool testReferenceOffsetConstructor(const double testDuration);
100
101 /**
102 * Tests the left_R_right functions.
103 * @param testDuration Number of seconds for each test
104 * @return True, if succeeded
105 * @tparam T The data type of the scalar value to be used
106 */
107 template <typename T>
108 static bool testLeft_R_right(const double testDuration);
109
110 /**
111 * Tests the invert and inverted functions.
112 * @param testDuration Number of seconds for each test
113 * @return True, if succeeded
114 * @tparam T The data type of the scalar value to be used
115 */
116 template <typename T>
117 static bool testInversion(const double testDuration);
118
119 /**
120 * Tests the comparison operators (== and !=).
121 * @param testDuration Number of seconds for each test
122 * @return True, if succeeded
123 * @tparam T The data type of the scalar value to be used
124 */
125 template <typename T>
126 static bool testComparisonOperators(const double testDuration);
127
128 /**
129 * Tests the multiplication operators.
130 * @param testDuration Number of seconds for each test
131 * @return True, if succeeded
132 * @tparam T The data type of the scalar value to be used
133 */
134 template <typename T>
135 static bool testMultiplicationOperators(const double testDuration);
136
137 /**
138 * Tests the element access operators.
139 * @param testDuration Number of seconds for each test
140 * @return True, if succeeded
141 * @tparam T The data type of the scalar value to be used
142 */
143 template <typename T>
144 static bool testElementAccess(const double testDuration);
145};
146
147}
148
149}
150
151}
152
153#endif // META_OCEAN_TEST_TESTMATH_TEST_ROTATION_H
This class implements a rotation test.
Definition TestRotation.h:27
static bool testElementAccess(const double testDuration)
Tests the element access operators.
static bool testArrayConstructor(const double testDuration)
Tests the array constructor.
static bool testMultiplicationOperators(const double testDuration)
Tests the multiplication operators.
static bool testAngleNormalization(const double testDuration)
Tests angle normalization (setAngle and constructors).
static bool testInversion(const double testDuration)
Tests the invert and inverted functions.
static bool testConstructors(const double testDuration)
Tests the default and basic constructors.
static bool testConversionToHomogenousMatrix(const double testDuration)
Tests the conversion from a rotation to a homogenous matrix.
static bool testReferenceOffsetConstructor(const double testDuration)
Tests the reference-offset constructor.
static bool testComparisonOperators(const double testDuration)
Tests the comparison operators (== and !=).
static bool test(const double testDuration)
Executes all rotation tests.
static bool testConversionToQuaterion(const double testDuration)
Tests the conversion from a rotation to a quaternion.
static bool testLeft_R_right(const double testDuration)
Tests the left_R_right functions.
static bool testMatrixConstructors(const double testDuration)
Tests the matrix constructors (SquareMatrix3 and HomogenousMatrix4).
The namespace covering the entire Ocean framework.
Definition Accessor.h:15