Ocean
Loading...
Searching...
No Matches
TestSphericalExponentialMap.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_SPHERICAL_EXPONENTIAL_MAP_H
9#define META_OCEAN_TEST_TESTMATH_TEST_SPHERICAL_EXPONENTIAL_MAP_H
10
12
14
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestMath
24{
25
26/**
27 * This class implements a test for SphericalExponentialMap.
28 * @ingroup testmath
29 */
30class OCEAN_TEST_MATH_EXPORT TestSphericalExponentialMap
31{
32 public:
33
34 /**
35 * Executes all tests.
36 * @param testDuration Number of seconds for each test
37 * @param selector The test selector
38 * @return True, if succeeded
39 */
40 static bool test(const double testDuration, const TestSelector& selector);
41
42 /**
43 * Tests the constructor taking a reference vector and an offset vector.
44 * @param testDuration Number of seconds for each test, with range (0, infinity)
45 * @return True, if succeeded
46 */
47 static bool testConstructorFromVectors(const double testDuration);
48
49 protected:
50
51 /**
52 * Verifies the contract of the class, `offset == SphericalExponentialMap(reference, offset).rotation() * reference`.
53 * @param sphericalExponentialMap The object to be verified
54 * @param reference The reference vector which has been used to create the object, must have unit length
55 * @param offset The offset vector which has been used to create the object, must have unit length
56 * @return True, if so
57 */
58 static bool verifyRotation(const SphericalExponentialMap& sphericalExponentialMap, const Vector3& reference, const Vector3& offset);
59};
60
61}
62
63}
64
65}
66
67#endif // META_OCEAN_TEST_TESTMATH_TEST_SPHERICAL_EXPONENTIAL_MAP_H
This class implements an exponential map representing a 2-DOF rotation.
Definition SphericalExponentialMap.h:31
This class implements a test for SphericalExponentialMap.
Definition TestSphericalExponentialMap.h:31
static bool verifyRotation(const SphericalExponentialMap &sphericalExponentialMap, const Vector3 &reference, const Vector3 &offset)
Verifies the contract of the class, offset == SphericalExponentialMap(reference, offset)....
static bool testConstructorFromVectors(const double testDuration)
Tests the constructor taking a reference vector and an offset vector.
static bool test(const double testDuration, const TestSelector &selector)
Executes all tests.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
The namespace covering the entire Ocean framework.
Definition Accessor.h:15