MeVisLab Toolbox Reference
mlQuaternion.h File Reference
#include "mlLinearAlgebraSystem.h"
#include "mlVector3.h"
#include <mlErrorMacros.h>
#include <mlErrorOutput.h>
#include <mlPrintTemplateErrors.h>

Go to the source code of this file.

Classes

class  ml::TQuaternion< DT >
 Declaration of complex type traits: More...
 

Namespaces

namespace  ml
 Main documentation file for ML users and developers.
 
namespace  std
 STL namespace.
 

Macros

#define _ML_QUATERNION_CALC_CHECKED(FUNC_NAME, CALC_EXPR)
 Defines a code fragment which checks and handles some stuff for safe expression calculations.
 
#define _ML_QUAT_CALC_EXP   TQuaternion<DT>(-v/len,0).mult(mult(TQuaternion<DT>(-v/len,0)).arcsinh());
 Internal helper macro - do not use.
 
#define _ML_QUAT_CALC_EXP   TQuaternion<DT>(-v/len,0).mult(arccosh());
 Internal helper macro - do not use.
 
#define _ML_QUAT_CALC_EXP   TQuaternion<DT>(-v/len,0).mult(mult(TQuaternion<DT>(-v/len,0)).arctanh());
 Internal helper macro - do not use.
 

Typedefs

Specializations for float, double, and long double.
typedef TQuaternion< MLfloatml::Quaternionf
 A smaller Quaternion type as specialization from TQuaternion.
 
typedef TQuaternion< MLdoubleml::Quaterniond
 The default Quaternion type used in the ML as specialization from TQuaternion.
 
typedef TQuaternion< MLldoubleml::Quaternionld
 A large Quaternion type for further extensions of the ML as specialization from TQuaternion.
 
typedef TQuaternion< MLdoubleml::Quaternion
 Define the default Quaternion type which is used by the ML; it uses double as component type.
 

Functions

template<typename DT >
ostream & std::operator<< (ostream &s, const ml::TQuaternion< DT > &v)
 Overloading the operator "<<" for stream output of TQuaternion objects.
 

Macro Definition Documentation

◆ _ML_QUAT_CALC_EXP [1/3]

#define _ML_QUAT_CALC_EXP   TQuaternion<DT>(-v/len,0).mult(mult(TQuaternion<DT>(-v/len,0)).arcsinh());

Internal helper macro - do not use.

Definition at line 878 of file mlQuaternion.h.

Referenced by ml::TQuaternion< DT >::arccos(), ml::TQuaternion< DT >::arcsin(), and ml::TQuaternion< DT >::arctan().

◆ _ML_QUAT_CALC_EXP [2/3]

#define _ML_QUAT_CALC_EXP   TQuaternion<DT>(-v/len,0).mult(arccosh());

Internal helper macro - do not use.

Definition at line 878 of file mlQuaternion.h.

◆ _ML_QUAT_CALC_EXP [3/3]

#define _ML_QUAT_CALC_EXP   TQuaternion<DT>(-v/len,0).mult(mult(TQuaternion<DT>(-v/len,0)).arctanh());

Internal helper macro - do not use.

Definition at line 878 of file mlQuaternion.h.

◆ _ML_QUATERNION_CALC_CHECKED

#define _ML_QUATERNION_CALC_CHECKED ( FUNC_NAME,
CALC_EXPR )
Value:
{ \
const Tvec3<DT> &v = qv(); \
const DT len = v.length(); \
/* Error! Check whether we have a pointer to a return error code value. */ \
if (isError == NULL){ \
/* No, post an error. */ \
printTemplateError("TQuaternion::" FUNC_NAME "() const, " FUNC_NAME \
" of quaternion cannot be calculated", \
"Returning default quaternion"); \
} \
else{ \
/* Yes, set return code, retVal is left on default. */ \
*isError = true; \
} \
} \
else{ \
/* Define return values. */ \
if (isError != NULL){ *isError = false; } \
} \
} \
return retVal; \
bool MLValueIs0WOM(MLint8 a)
Returns true if value is 0, otherwise false.
#define ML_BAD_PARAMETER
A bad/invalid parameter (or even an inappropriate image) has been passed to a module or an algorithm;...
Definition mlTypeDefs.h:823
Target mlrange_cast(Source arg)
Generic version of checked ML casts.

Defines a code fragment which checks and handles some stuff for safe expression calculations.

It calculates and checks the length of qv. If it is non 0 then it executes the expression otherwise it handles the error as follows: If the length is 0, i.e. the expression cannot be determined, an error is created. If isError is NULL, it is posted to the error handling system. If isError is non-NULL, no error is posted, however *isError is set to true, otherwise it is set to false. In error case and isError is non-NULL the default quaternion is returned.

Parameters
FUNC_NAMEis (string) name of the function to be implemented.
CALC_EXPRis the expression to be executed to calculate the TQuaternion

return value.

Definition at line 848 of file mlQuaternion.h.

Referenced by ml::TQuaternion< DT >::arccos(), ml::TQuaternion< DT >::arcsin(), and ml::TQuaternion< DT >::arctan().