Mathematical functions

Functions

int SO3MathsQuatToEulerXYZ (mmachine m)
 Main include.
int SO3MathsQuatToEulerXZY (mmachine m)
 SO3MathsQuatToEulerXZY : Scol function to transform quaternion vector in euler angles (XZY).
int SO3MathsQuatToEulerYXZ (mmachine m)
 SO3MathsQuatToEulerYXZ : Scol function to transform quaternion vector in euler angles (YXZ).
int SO3MathsQuatToEulerYZX (mmachine m)
 SO3MathsQuatToEulerYZX : Scol function to transform quaternion vector in euler angles (YZX).
int SO3MathsQuatToEulerZXY (mmachine m)
 SO3MathsQuatToEulerZXY : Scol function to transform quaternion vector in euler angles (ZXY).
int SO3MathsQuatToEulerZYX (mmachine m)
 SO3MathsQuatToEulerZYX : Scol function to transform quaternion vector in euler angles (ZYX).
int SO3MathsQuatToEulerDegreeXYZ (mmachine m)
 SO3MathsQuatToEulerDegreeXYZ : Scol function to transform quaternion vector in euler angles (degree) (XYZ).
int SO3MathsQuatToEulerDegreeXZY (mmachine m)
 SO3MathsQuatToEulerDegreeXZY : Scol function to transform quaternion vector in euler angles (degree) (XZY).
int SO3MathsQuatToEulerDegreeYXZ (mmachine m)
 SO3MathsQuatToEulerDegreeYXZ : Scol function to transform quaternion vector in euler angles (degree) (YXZ).
int SO3MathsQuatToEulerDegreeYZX (mmachine m)
 SO3MathsQuatToEulerDegreeYZX : Scol function to transform quaternion vector in euler angles (degree) (YZX).
int SO3MathsQuatToEulerDegreeZXY (mmachine m)
 SO3MathsQuatToEulerDegreeZXY : Scol function to transform quaternion vector in euler angles (degree) (ZXY).
int SO3MathsQuatToEulerDegreeZYX (mmachine m)
 SO3MathsQuatToEulerDegreeZYX : Scol function to transform quaternion vector in euler angles (degree) (ZYX).
int SO3MathsEulerXYZToQuat (mmachine m)
 SO3MathsEulerXYZToQuat : Scol function to transform euler angles (XYZ) (radians) in a quaternion.
int SO3MathsEulerXZYToQuat (mmachine m)
 SO3MathsEulerXZYToQuat : Scol function to transform euler angles (XZY) (radians) in a quaternion.
int SO3MathsEulerYXZToQuat (mmachine m)
 SO3MathsEulerYXZToQuat : Scol function to transform euler angles (YXZ) (radians) in a quaternion.
int SO3MathsEulerYZXToQuat (mmachine m)
 SO3MathsEulerYZXToQuat : Scol function to transform euler angles (YZX) (radians) in a quaternion.
int SO3MathsEulerZYXToQuat (mmachine m)
 SO3MathsEulerZYXToQuat : Scol function to transform euler angles (ZYX) (radians) in a quaternion.
int SO3MathsEulerZXYToQuat (mmachine m)
 SO3MathsEulerZXYToQuat : Scol function to transform euler angles (ZXY) (radians) in a quaternion.
int SO3MathsQuatDiff (mmachine m)
 SO3MathsQuatDiff : Scol function to make the mathematical difference between two quaternions.
int SO3MathsQuatSubstract (mmachine m)
 SO3MathsQuatSubstract : Scol function to substract two quaternions.
int SO3MathsQuatAdd (mmachine m)
 SO3MathsQuatAdd : Scol function to add two quaternions.
int SO3MathsQuatInterpolate (mmachine m)
 SO3MathsQuatInterpolate : function to interpolate two quaternions.
int SO3MathsDegreeToRadian (mmachine m)
 SO3MathsDegreeToRadian : function to convert a value from degrees to radians.
int SO3MathsRadianToDegree (mmachine m)
 SO3MathsRadianToDegree : function to convert a value from radians to degrees.
int SO3MathsQuatGetRoll (mmachine m)
 SO3MathsQuatGetRoll : function to get the roll value from quaternion.
int SO3MathsQuatGetYaw (mmachine m)
 SO3MathsQuatGetYaw : function to get the yaw value from quaternion.
int SO3MathsQuatGetPitch (mmachine m)
 SO3MathsQuatGetPitch : function to get the pitch value from quaternion.
int SO3MathsQuatGetDegreeRoll (mmachine m)
 SO3MathsQuatGetDegreeRoll : function to get the roll value in degree from quaternion.
int SO3MathsQuatGetDegreeYaw (mmachine m)
 SO3MathsQuatGetDegreeYaw : function to get the yaw value in degree from quaternion.
int SO3MathsQuatGetDegreePitch (mmachine m)
 SO3MathsQuatGetDegreePitch : function to get the pitch value in degree from quaternion.
int SO3MathsQuatToAxes (mmachine m)
 SO3MathsQuatToAxes : function to project quaternion to axis values.
int SO3MathsQuatFromAngle (mmachine m)
 SO3MathsQuatFromAngle : function to get Quaternion from X Y Z angle.
int SO3MathsQuatFromDegreeAngle (mmachine m)
 SO3MathsQuatFromDegreeAngle : function to get Quaternion from X Y Z angle in degree.
int SO3MathsQuatFromAngleAxis (mmachine m)
 SO3MathsQuatFromAngleAxis : function to get Quaternion from angle axis.
int SO3MathsQuatFromAxes (mmachine m)
 SO3MathsQuatFromAxes : function to get Quaternion from axis.
int SO3MathsQuatGetXaxis (mmachine m)
 SO3MathsQuatGetXaxis : function to get X-axis from quaternion.
int SO3MathsQuatGetYaxis (mmachine m)
 SO3MathsQuatGetYaxis : function to get Y-axis from quaternion.
int SO3MathsQuatGetZaxis (mmachine m)
 SO3MathsQuatGetZaxis : function to get Z-axis from quaternion.
int SO3MathsQuatGetDirection (mmachine m)
 SO3MathsQuatGetDirection : function to get the direction from quaternion.
int SO3MathsClampValue (mmachine m)
 SO3MathsClampValue : function to clamp a value.
int SO3MathsGetRotationTo (mmachine m)
 SO3MathsGetRotationTo : Scol function to get the shortest arc quaternion to rotate the source vector to the destination vector.
int SO3MathsVectorDotProduct (mmachine m)
 SO3MathsVectorDotProduct : Calculates the dot (scalar) product of this vector with another.

Detailed Description

Scol functions definition


Function Documentation

int SO3MathsClampValue ( mmachine  m  ) 

SO3MathsClampValue : function to clamp a value.

Prototype: fun [F F F] F

Parameters:
[F F F] : values : min, max and clamp value
Returns:
F : result value if success, NIL otherwise

Definition at line 2269 of file SCOLMaths.cpp.

int SO3MathsDegreeToRadian ( mmachine  m  ) 

SO3MathsDegreeToRadian : function to convert a value from degrees to radians.

Prototype: fun [F] F

Parameters:
F : value in degrees
Returns:
F : result in radians if success, NIL otherwise

Definition at line 1371 of file SCOLMaths.cpp.

int SO3MathsEulerXYZToQuat ( mmachine  m  ) 

SO3MathsEulerXYZToQuat : Scol function to transform euler angles (XYZ) (radians) in a quaternion.

Prototype: fun [[F F F]] [F F F F]

Parameters:
[F F F] : current vector (Euler angles)
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 754 of file SCOLMaths.cpp.

int SO3MathsEulerXZYToQuat ( mmachine  m  ) 

SO3MathsEulerXZYToQuat : Scol function to transform euler angles (XZY) (radians) in a quaternion.

Prototype: fun [[F F F]] [F F F F]

Parameters:
[F F F] : current vector (Euler angles)
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 813 of file SCOLMaths.cpp.

int SO3MathsEulerYXZToQuat ( mmachine  m  ) 

SO3MathsEulerYXZToQuat : Scol function to transform euler angles (YXZ) (radians) in a quaternion.

Prototype: fun [[F F F]] [F F F F]

Parameters:
[F F F] : current vector (Euler angles)
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 872 of file SCOLMaths.cpp.

int SO3MathsEulerYZXToQuat ( mmachine  m  ) 

SO3MathsEulerYZXToQuat : Scol function to transform euler angles (YZX) (radians) in a quaternion.

Prototype: fun [[F F F]] [F F F F]

Parameters:
[F F F] : current vector (Euler angles)
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 931 of file SCOLMaths.cpp.

int SO3MathsEulerZXYToQuat ( mmachine  m  ) 

SO3MathsEulerZXYToQuat : Scol function to transform euler angles (ZXY) (radians) in a quaternion.

Prototype: fun [[F F F]] [F F F F]

Parameters:
[F F F] : current vector (Euler angles)
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 1049 of file SCOLMaths.cpp.

int SO3MathsEulerZYXToQuat ( mmachine  m  ) 

SO3MathsEulerZYXToQuat : Scol function to transform euler angles (ZYX) (radians) in a quaternion.

Prototype: fun [[F F F]] [F F F F]

Parameters:
[F F F] : current vector (Euler angles)
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 990 of file SCOLMaths.cpp.

int SO3MathsGetRotationTo ( mmachine  m  ) 

SO3MathsGetRotationTo : Scol function to get the shortest arc quaternion to rotate the source vector to the destination vector.

Prototype: fun [[F F F] [F F F]] [F F F F]

Parameters:
[F F F] : source vector
[F F F] : destination vector
Returns:
[F F F F] : quaternion result if success, NIL otherwise

Definition at line 2302 of file SCOLMaths.cpp.

int SO3MathsQuatAdd ( mmachine  m  ) 

SO3MathsQuatAdd : Scol function to add two quaternions.

Prototype: fun [[F F F F] [F F F F]] [F F F F]

Parameters:
[F F F F] : quaternion 1
[F F F F] : quaternion 2
Returns:
[F F F F] : quaternion result if success, NIL otherwise

Definition at line 1234 of file SCOLMaths.cpp.

int SO3MathsQuatDiff ( mmachine  m  ) 

SO3MathsQuatDiff : Scol function to make the mathematical difference between two quaternions.

Prototype: fun [[F F F F] [F F F F]] [F F F F]

Parameters:
[F F F F] : quaternion 1
[F F F F] : quaternion 2
Returns:
[F F F F] : quaternion result if success, NIL otherwise

Definition at line 1109 of file SCOLMaths.cpp.

int SO3MathsQuatFromAngle ( mmachine  m  ) 

SO3MathsQuatFromAngle : function to get Quaternion from X Y Z angle.

Prototype: fun [[F F F]]] [F F F F]

Parameters:
[F F F] : given X Y Z angle transformations
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 1813 of file SCOLMaths.cpp.

int SO3MathsQuatFromAngleAxis ( mmachine  m  ) 

SO3MathsQuatFromAngleAxis : function to get Quaternion from angle axis.

Prototype: fun [F [F F F]]] [F F F F]

Parameters:
F : radian angle
[F F F] : axis
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 1934 of file SCOLMaths.cpp.

int SO3MathsQuatFromAxes ( mmachine  m  ) 

SO3MathsQuatFromAxes : function to get Quaternion from axis.

Prototype: fun [[F F F] [F F F] [F F F]] [F F F F]

Parameters:
[F F F] [F F F] [F F F] : given angle axis transformations
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 1986 of file SCOLMaths.cpp.

int SO3MathsQuatFromDegreeAngle ( mmachine  m  ) 

SO3MathsQuatFromDegreeAngle : function to get Quaternion from X Y Z angle in degree.

Prototype: fun [[F F F]]] [F F F F]

Parameters:
[F F F] : given X Y Z angle transformations
Returns:
[F F F F] : quaternion if success, NIL otherwise

Definition at line 1871 of file SCOLMaths.cpp.

int SO3MathsQuatGetDegreePitch ( mmachine  m  ) 

SO3MathsQuatGetDegreePitch : function to get the pitch value in degree from quaternion.

Prototype: fun [[F F F F] I] F

Parameters:
[F F F F] : given quaternion
I : boolean : if true : reproject axis
Returns:
F : pitch value in degree if success, NIL otherwise

Definition at line 1673 of file SCOLMaths.cpp.

int SO3MathsQuatGetDegreeRoll ( mmachine  m  ) 

SO3MathsQuatGetDegreeRoll : function to get the roll value in degree from quaternion.

Prototype: fun [[F F F F] I] F

Parameters:
[F F F F] : given quaternion
I : boolean : if true : reproject axis
Returns:
F : roll value in degree if success, NIL otherwise

Definition at line 1577 of file SCOLMaths.cpp.

int SO3MathsQuatGetDegreeYaw ( mmachine  m  ) 

SO3MathsQuatGetDegreeYaw : function to get the yaw value in degree from quaternion.

Prototype: fun [[F F F F] I] F

Parameters:
[F F F F] : given quaternion
I : boolean : if true : reproject axis
Returns:
F : yaw value in degree if success, NIL otherwise

Definition at line 1625 of file SCOLMaths.cpp.

int SO3MathsQuatGetDirection ( mmachine  m  ) 

SO3MathsQuatGetDirection : function to get the direction from quaternion.

Prototype: fun [[F F F F] [F F F]] [F F F]

Parameters:
[F F F F] : given quaternion
[F F F] : given vector for projection
Returns:
[F F F] : Direction vector if success, NIL otherwise

Definition at line 2203 of file SCOLMaths.cpp.

int SO3MathsQuatGetPitch ( mmachine  m  ) 

SO3MathsQuatGetPitch : function to get the pitch value from quaternion.

Prototype: fun [[F F F F] I] F

Parameters:
[F F F F] : given quaternion
I : boolean : if true : reproject axis
Returns:
F : pitch value in radian if success, NIL otherwise

Definition at line 1529 of file SCOLMaths.cpp.

int SO3MathsQuatGetRoll ( mmachine  m  ) 

SO3MathsQuatGetRoll : function to get the roll value from quaternion.

Prototype: fun [[F F F F] I] F

Parameters:
[F F F F] : given quaternion
I : boolean : if true : reproject axis
Returns:
F : roll value in radian if success, NIL otherwise

Definition at line 1432 of file SCOLMaths.cpp.

int SO3MathsQuatGetXaxis ( mmachine  m  ) 

SO3MathsQuatGetXaxis : function to get X-axis from quaternion.

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : given quaternion
Returns:
[F F F] : X axis if success, NIL otherwise

Definition at line 2046 of file SCOLMaths.cpp.

int SO3MathsQuatGetYaw ( mmachine  m  ) 

SO3MathsQuatGetYaw : function to get the yaw value from quaternion.

Prototype: fun [[F F F F] I] F

Parameters:
[F F F F] : given quaternion
I : boolean : if true : reproject axis
Returns:
F : yaw value in radian if success, NIL otherwise

Definition at line 1481 of file SCOLMaths.cpp.

int SO3MathsQuatGetYaxis ( mmachine  m  ) 

SO3MathsQuatGetYaxis : function to get Y-axis from quaternion.

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : given quaternion
Returns:
[F F F] : Y axis if success, NIL otherwise

Definition at line 2098 of file SCOLMaths.cpp.

int SO3MathsQuatGetZaxis ( mmachine  m  ) 

SO3MathsQuatGetZaxis : function to get Z-axis from quaternion.

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : given quaternion
Returns:
[F F F] : Z axis if success, NIL otherwise

Definition at line 2150 of file SCOLMaths.cpp.

int SO3MathsQuatInterpolate ( mmachine  m  ) 

SO3MathsQuatInterpolate : function to interpolate two quaternions.

Prototype: fun [[F F F F] [F F F F] F I] [F F F F]

Parameters:
[F F F F] : quaternion 1
[F F F F] : quaternion 2
F : Interpolation coefficient between 0.0 and 1.0
I : 1 for the shortest orientation, 0 otherwise
Returns:
[F F F F] : quaternion result if success, NIL otherwise

Definition at line 1301 of file SCOLMaths.cpp.

int SO3MathsQuatSubstract ( mmachine  m  ) 

SO3MathsQuatSubstract : Scol function to substract two quaternions.

Prototype: fun [[F F F F] [F F F F]] [F F F F]

Parameters:
[F F F F] : quaternion 1
[F F F F] : quaternion 2
Returns:
[F F F F] : quaternion result if success, NIL otherwise

Definition at line 1171 of file SCOLMaths.cpp.

int SO3MathsQuatToAxes ( mmachine  m  ) 

SO3MathsQuatToAxes : function to project quaternion to axis values.

Prototype: fun [[F F F F]] [[F F F] [F F F] [F F F]]

Parameters:
[F F F F] : given quaternion
Returns:
[[F F F] [F F F] [F F F]] : axis vectors if success, NIL otherwise

Definition at line 1720 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerDegreeXYZ ( mmachine  m  ) 

SO3MathsQuatToEulerDegreeXYZ : Scol function to transform quaternion vector in euler angles (degree) (XYZ).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles in degrees if success, NIL otherwise

Definition at line 403 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerDegreeXZY ( mmachine  m  ) 

SO3MathsQuatToEulerDegreeXZY : Scol function to transform quaternion vector in euler angles (degree) (XZY).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles in degrees if success, NIL otherwise

Definition at line 461 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerDegreeYXZ ( mmachine  m  ) 

SO3MathsQuatToEulerDegreeYXZ : Scol function to transform quaternion vector in euler angles (degree) (YXZ).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles in degrees if success, NIL otherwise

Definition at line 518 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerDegreeYZX ( mmachine  m  ) 

SO3MathsQuatToEulerDegreeYZX : Scol function to transform quaternion vector in euler angles (degree) (YZX).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles in degrees if success, NIL otherwise

Definition at line 577 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerDegreeZXY ( mmachine  m  ) 

SO3MathsQuatToEulerDegreeZXY : Scol function to transform quaternion vector in euler angles (degree) (ZXY).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles in degrees if success, NIL otherwise

Definition at line 636 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerDegreeZYX ( mmachine  m  ) 

SO3MathsQuatToEulerDegreeZYX : Scol function to transform quaternion vector in euler angles (degree) (ZYX).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles in degrees if success, NIL otherwise

Definition at line 695 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerXYZ ( mmachine  m  ) 

Main include.

SO3MathsQuatToEulerXYZ : Scol function to transform quaternion vector in euler angles (XYZ) Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles if success, NIL otherwise

Definition at line 51 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerXZY ( mmachine  m  ) 

SO3MathsQuatToEulerXZY : Scol function to transform quaternion vector in euler angles (XZY).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles if success, NIL otherwise

Definition at line 110 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerYXZ ( mmachine  m  ) 

SO3MathsQuatToEulerYXZ : Scol function to transform quaternion vector in euler angles (YXZ).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles if success, NIL otherwise

Definition at line 169 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerYZX ( mmachine  m  ) 

SO3MathsQuatToEulerYZX : Scol function to transform quaternion vector in euler angles (YZX).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles if success, NIL otherwise

Definition at line 228 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerZXY ( mmachine  m  ) 

SO3MathsQuatToEulerZXY : Scol function to transform quaternion vector in euler angles (ZXY).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles if success, NIL otherwise

Definition at line 285 of file SCOLMaths.cpp.

int SO3MathsQuatToEulerZYX ( mmachine  m  ) 

SO3MathsQuatToEulerZYX : Scol function to transform quaternion vector in euler angles (ZYX).

Prototype: fun [[F F F F]] [F F F]

Parameters:
[F F F F] : current quaternion
Returns:
[F F F] : euler angles if success, NIL otherwise

Definition at line 344 of file SCOLMaths.cpp.

int SO3MathsRadianToDegree ( mmachine  m  ) 

SO3MathsRadianToDegree : function to convert a value from radians to degrees.

Prototype: fun [F] F

Parameters:
F : value in radians
Returns:
F : result in degrees if success, NIL otherwise

Definition at line 1401 of file SCOLMaths.cpp.

int SO3MathsVectorDotProduct ( mmachine  m  ) 

SO3MathsVectorDotProduct : Calculates the dot (scalar) product of this vector with another.

Remarks:
The dot product can be used to calculate the angle between 2 vectors. If both are unit vectors, the dot product is the cosine of the angle; otherwise the dot product must be divided by the product of the lengths of both vectors to get the cosine of the angle. This result can further be used to calculate the distance of a point from a plane.

Prototype: fun [[F F F] [F F F]] F

Parameters:
[F F F] : Reference vector used to calculate the dot product
[F F F] : Vector with which to calculate the dot product
Returns:
F : A float representing the dot product value.

Definition at line 2375 of file SCOLMaths.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Oct 31 14:42:34 2011 for SO3Engine by  doxygen 1.6.3