Ocean
Ocean::Geometry::PerspectivePose Class Reference

This class is the base class for all perspective pose classes. More...

Inheritance diagram for Ocean::Geometry::PerspectivePose:

Static Protected Member Functions

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...
 

Detailed Description

This class is the base class for all perspective pose classes.

Member Function Documentation

◆ 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
x1First leg distance
x1_2Square of the first leg distance
x2Second leg distance
x2_2Square of the second leg distance
cos12Cosine value of the angle between the two legs
d12_2Square of the far distance
Returns
Result of the law of cosines
Template Parameters
TThe 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
x1First leg distance
x1_2Square of the first leg distance
cos12Cosine value of the angle between the two legs
d12_2Square of the far distance
x2aFirst solution of the second leg distance
x2bSecond solution of the second leg distance
Returns
True, if succeeded
Template Parameters
TThe data type of the scalar

The documentation for this class was generated from the following file: