|
@@ -325,14 +325,21 @@ TEST(Maths, RotationF_Calculations)
|
|
};
|
|
};
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-DefineEngineFunction(AddRotation, RotationF, (RotationF a, RotationF b), ,
|
|
|
|
|
|
+DefineEngineFunction(AddRotation, RotationF, (RotationF a, RotationF b, const char* returnType), ("Euler"),
|
|
"Adds two rotations together.\n"
|
|
"Adds two rotations together.\n"
|
|
"@param a Rotation one."
|
|
"@param a Rotation one."
|
|
"@param b Rotation two."
|
|
"@param b Rotation two."
|
|
"@returns v sum of both rotations."
|
|
"@returns v sum of both rotations."
|
|
"@ingroup Math")
|
|
"@ingroup Math")
|
|
{
|
|
{
|
|
- return a + b;
|
|
|
|
|
|
+ RotationF ret;
|
|
|
|
+ RotationF sum = a + b;
|
|
|
|
+ if (String(returnType) == String("Euler"))
|
|
|
|
+ ret.set(sum.asEulerF());
|
|
|
|
+ else
|
|
|
|
+ ret.set(sum.asAxisAngle());
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
DefineEngineFunction(SubtractRotation, RotationF, (RotationF a, RotationF b), ,
|
|
DefineEngineFunction(SubtractRotation, RotationF, (RotationF a, RotationF b), ,
|