This class is the base class for all perspective pose classes.
More...
|
template<typename T > |
static bool | calculateCosineSolutions (const T x1, const T x1_2, const T cos12, const T d12_2, T &x2a, T &x2b) |
| Calculates the two possible solutions for the law of cosines. More...
|
|
template<typename T > |
static T | calculateCosineResults (const T x1, const T x1_2, const T x2, const T x2_2, const T cos12, const T d12_2) |
| Returns the result of the law of cosines. More...
|
|
This class is the base class for all perspective pose classes.
◆ calculateCosineResults()
template<typename T >
T Ocean::Geometry::PerspectivePose::calculateCosineResults |
( |
const T |
x1, |
|
|
const T |
x1_2, |
|
|
const T |
x2, |
|
|
const T |
x2_2, |
|
|
const T |
cos12, |
|
|
const T |
d12_2 |
|
) |
| |
|
inlinestaticprotected |
Returns the result of the law of cosines.
For valid parameters this result should be zero. The law is: 0 = x1^2 + x2^2 - 2 * x1 * x2 * cos12 - d12^2
- Parameters
-
x1 | First leg distance |
x1_2 | Square of the first leg distance |
x2 | Second leg distance |
x2_2 | Square of the second leg distance |
cos12 | Cosine value of the angle between the two legs |
d12_2 | Square of the far distance |
- Returns
- Result of the law of cosines
- Template Parameters
-
T | The data type of the scalar |
◆ calculateCosineSolutions()
template<typename T >
static bool Ocean::Geometry::PerspectivePose::calculateCosineSolutions |
( |
const T |
x1, |
|
|
const T |
x1_2, |
|
|
const T |
cos12, |
|
|
const T |
d12_2, |
|
|
T & |
x2a, |
|
|
T & |
x2b |
|
) |
| |
|
staticprotected |
Calculates the two possible solutions for the law of cosines.
- Parameters
-
x1 | First leg distance |
x1_2 | Square of the first leg distance |
cos12 | Cosine value of the angle between the two legs |
d12_2 | Square of the far distance |
x2a | First solution of the second leg distance |
x2b | Second solution of the second leg distance |
- Returns
- True, if succeeded
- Template Parameters
-
T | The data type of the scalar |
The documentation for this class was generated from the following file: