MathHelper unites the generally needed math operations. More...
#include <MathHelper.hpp>
Static Public Member Functions | |
static SimpleSphereCoordinates | convertC2S (const SimpleVector3 &cartesian) |
converts cartesian coordinates to sphere coordinates | |
static void | convertC2S (const SimpleVector3 &cartesian, SimpleSphereCoordinates &sphere) |
converts cartesian coordinates to sphere coordinates (lightweight) | |
static SimpleVector3 | convertS2C (const SimpleSphereCoordinates &sphere) |
converts sphere coordinates to cartesian coordinates (lightweight) | |
static void | convertS2C (const SimpleSphereCoordinates &sphere, SimpleVector3 &cartesian) |
converts sphere coordinates to cartesian coordinates (lightweight) | |
static double | degToRad (double input) |
template<typename PowerSet > | |
static boost::shared_ptr < PowerSet > | filterCardinalityPowerSet (const boost::shared_ptr< PowerSet > &powerSetPtr, const std::size_t min, const std::size_t max) |
template<typename PowerSet > | |
static boost::shared_ptr < PowerSet > | filterCardinalityPowerSet (const boost::shared_ptr< PowerSet > &setPtr, const std::size_t min) |
static Precision | getAngle (const SimpleVector3 &X, const SimpleVector3 &Y) |
static Precision | getCosinus (const SimpleVector3 &X, const SimpleVector3 &Y) |
static double | getDotProduct (SimpleVector3 v1, SimpleVector3 v2) |
static Precision | getMinimumAngleDifference (const Precision &firstAngle, const Precision &secondAngle) |
static SimpleQuaternionCollectionPtr | getOrientationsOnUnitSphere (const int &numberOfPoints) |
static SimpleVector3 | getProjection (const std::size_t &idx, const SimpleVector3 &X) |
static SimpleQuaternion | getQuaternionByAngles (const Precision &heading, const Precision &attitude, const Precision &bank) |
static int | getRandomInteger (const int &min, const int &max) |
static Precision | getRandomNumber (const Precision &mean, const Precision &standardDeviation) |
static SimpleQuaternion | getRandomQuaternion () |
static SimpleVectorX | getRandomVector (const SimpleVectorX &mean, const SimpleVectorX &standardDeviation) |
static double | getSignum (const double &value) |
static SimpleVector3 | getVisualAxis (const SimpleQuaternion &orientation) |
static void | getVisualAxis (const SimpleQuaternion &orientation, SimpleVector3 &resultAxis) |
template<typename Set > | |
static boost::shared_ptr < std::set< boost::shared_ptr < Set > > > | powerSet (const boost::shared_ptr< Set > &setPtr) |
template<typename Set > | |
static void | printPowerSet (boost::shared_ptr< std::set< boost::shared_ptr< Set > > > &powerSetPtr) |
template<typename Set > | |
static void | printSet (boost::shared_ptr< Set > &setPtr) |
static double | radToDeg (double input) |
Static Private Member Functions | |
static boost::mt19937 & | getRandomnessGenerator () |
MathHelper unites the generally needed math operations.
Definition at line 44 of file MathHelper.hpp.
SimpleSphereCoordinates robot_model_services::MathHelper::convertC2S | ( | const SimpleVector3 & | cartesian | ) | [static] |
converts cartesian coordinates to sphere coordinates
cartestian | any cartesian coordinates |
Definition at line 29 of file MathHelper.cpp.
void robot_model_services::MathHelper::convertC2S | ( | const SimpleVector3 & | cartesian, |
SimpleSphereCoordinates & | sphere | ||
) | [static] |
converts cartesian coordinates to sphere coordinates (lightweight)
cartestian | any cartesian coordinates |
sphere | (out) sphere coordinates (radius,inclinate,azimuth) |
Definition at line 35 of file MathHelper.cpp.
SimpleVector3 robot_model_services::MathHelper::convertS2C | ( | const SimpleSphereCoordinates & | sphere | ) | [static] |
converts sphere coordinates to cartesian coordinates (lightweight)
sphere | any sphere coordinates (radius,inclinate,azimuth) |
Definition at line 41 of file MathHelper.cpp.
void robot_model_services::MathHelper::convertS2C | ( | const SimpleSphereCoordinates & | sphere, |
SimpleVector3 & | cartesian | ||
) | [static] |
converts sphere coordinates to cartesian coordinates (lightweight)
sphere | any sphere coordinates (radius,inclinate,azimuth) |
cartesian | (out) cartesian coordinates |
Definition at line 47 of file MathHelper.cpp.
double robot_model_services::MathHelper::degToRad | ( | double | input | ) | [static] |
static boost::shared_ptr<PowerSet> robot_model_services::MathHelper::filterCardinalityPowerSet | ( | const boost::shared_ptr< PowerSet > & | powerSetPtr, |
const std::size_t | min, | ||
const std::size_t | max | ||
) | [inline, static] |
Definition at line 214 of file MathHelper.hpp.
static boost::shared_ptr<PowerSet> robot_model_services::MathHelper::filterCardinalityPowerSet | ( | const boost::shared_ptr< PowerSet > & | setPtr, |
const std::size_t | min | ||
) | [inline, static] |
Definition at line 228 of file MathHelper.hpp.
Precision robot_model_services::MathHelper::getAngle | ( | const SimpleVector3 & | X, |
const SimpleVector3 & | Y | ||
) | [static] |
X | [in] the first 3d vector |
Y | [in] the second 3d vector |
Definition at line 81 of file MathHelper.cpp.
Precision robot_model_services::MathHelper::getCosinus | ( | const SimpleVector3 & | X, |
const SimpleVector3 & | Y | ||
) | [static] |
X | [in] the first 3d vector |
Y | [in] the second 3d vector |
Definition at line 71 of file MathHelper.cpp.
double robot_model_services::MathHelper::getDotProduct | ( | SimpleVector3 | v1, |
SimpleVector3 | v2 | ||
) | [static] |
Definition at line 176 of file MathHelper.cpp.
Precision robot_model_services::MathHelper::getMinimumAngleDifference | ( | const Precision & | firstAngle, |
const Precision & | secondAngle | ||
) | [static] |
firstAngle | [in] the first angle |
secondAngle | [in] the second angle |
Definition at line 87 of file MathHelper.cpp.
SimpleQuaternionCollectionPtr robot_model_services::MathHelper::getOrientationsOnUnitSphere | ( | const int & | numberOfPoints | ) | [static] |
numberOfPoints | [in] the number of points to use. |
Definition at line 136 of file MathHelper.cpp.
SimpleVector3 robot_model_services::MathHelper::getProjection | ( | const std::size_t & | idx, |
const SimpleVector3 & | X | ||
) | [static] |
idx | [in] the index to project to 0 |
X | [in] the 3d vector used for this action. |
Definition at line 67 of file MathHelper.cpp.
SimpleQuaternion robot_model_services::MathHelper::getQuaternionByAngles | ( | const Precision & | heading, |
const Precision & | attitude, | ||
const Precision & | bank | ||
) | [static] |
heading | [in] the heading angle |
attitude | [in] the attitude angle |
bank | [in] the bank angle |
Definition at line 118 of file MathHelper.cpp.
int robot_model_services::MathHelper::getRandomInteger | ( | const int & | min, |
const int & | max | ||
) | [static] |
min | [in] the minumum integer |
max | [in] the maximum integer |
Definition at line 92 of file MathHelper.cpp.
boost::mt19937 & robot_model_services::MathHelper::getRandomnessGenerator | ( | ) | [static, private] |
Definition at line 24 of file MathHelper.cpp.
Precision robot_model_services::MathHelper::getRandomNumber | ( | const Precision & | mean, |
const Precision & | standardDeviation | ||
) | [static] |
mean | [in] the mean value |
standardDeviation | [in] the standard deviation to use. |
Definition at line 98 of file MathHelper.cpp.
Definition at line 113 of file MathHelper.cpp.
SimpleVectorX robot_model_services::MathHelper::getRandomVector | ( | const SimpleVectorX & | mean, |
const SimpleVectorX & | standardDeviation | ||
) | [static] |
mean | [in] the mean value in X dimensions |
standardDeviation | [in] the standard deviation to use in X dimensions. |
Definition at line 104 of file MathHelper.cpp.
double robot_model_services::MathHelper::getSignum | ( | const double & | value | ) | [static] |
SimpleVector3 robot_model_services::MathHelper::getVisualAxis | ( | const SimpleQuaternion & | orientation | ) | [static] |
Definition at line 53 of file MathHelper.cpp.
void robot_model_services::MathHelper::getVisualAxis | ( | const SimpleQuaternion & | orientation, |
SimpleVector3 & | resultAxis | ||
) | [static] |
Definition at line 59 of file MathHelper.cpp.
static boost::shared_ptr<std::set<boost::shared_ptr<Set> > > robot_model_services::MathHelper::powerSet | ( | const boost::shared_ptr< Set > & | setPtr | ) | [inline, static] |
Definition at line 188 of file MathHelper.hpp.
static void robot_model_services::MathHelper::printPowerSet | ( | boost::shared_ptr< std::set< boost::shared_ptr< Set > > > & | powerSetPtr | ) | [inline, static] |
Definition at line 179 of file MathHelper.hpp.
static void robot_model_services::MathHelper::printSet | ( | boost::shared_ptr< Set > & | setPtr | ) | [inline, static] |
Definition at line 171 of file MathHelper.hpp.
double robot_model_services::MathHelper::radToDeg | ( | double | input | ) | [static] |