#include <dali/public-api/math/vector2.h>
#include <dali/public-api/math/vector3.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/math/quaternion.h>
#include <dali/public-api/object/property-input.h>
namespace Dali
function = EvalVector4;
break;
}
+ case Property::ROTATION:
+ {
+ function = EvalQuaternion;
+ break;
+ }
default:
{
function = EvalDefault;
return Evaluate(propertyValue, arg);
}
+bool Step::EvalQuaternion(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg)
+{
+ Quaternion propertyValue = value.GetQuaternion();
+ // TODO : Make some meaningfule calculation here
+ Vector4 v = propertyValue.EulerAngles();
+ const float checkValue = v.LengthSquared();
+ return Evaluate(checkValue, arg);
+}
+
bool Step::EvalDefault(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg)
{
return false;
* Vector2 => 2 dimensional length of vector has stepped arg1 amount from arg0.
* Vector3 => 3 dimensional length of vector has stepped arg1 amount from arg0.
* Vector4 => 4 dimensional length of vector has stepped arg1 amount from arg0.
+ * Quaternion => sum of rotation angle and axis changes has stepped arg1 amount from arg0
* Default => return false.
*/
class Step
static bool EvalVector4(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
/**
+ * Checks if Quaternion is Outside
+ * @param[in] value The value being examined.
+ * @param[in] arg The supplied arguments for the condition.
+ * @return Condition result (true if condition met, false if not)
+ */
+ static bool EvalQuaternion(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
+
+ /**
* Default check for other types.
* @param[in] value The value being examined.
* @param[in] arg The supplied arguments for the condition.
#include <dali/public-api/math/vector2.h>
#include <dali/public-api/math/vector3.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/math/quaternion.h>
#include <dali/public-api/object/property-input.h>
namespace Dali
function = EvalVector4;
break;
}
+ case Property::ROTATION:
+ {
+ function = EvalQuaternion;
+ break;
+ }
default:
{
function = EvalDefault;
return Evaluate(propertyValue, arg);
}
+bool VariableStep::EvalQuaternion(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg)
+{
+ Quaternion propertyValue = value.GetQuaternion();
+ // TODO : Make some meaningfule calculation here
+ Vector4 v = propertyValue.EulerAngles();
+ const float checkValue = v.LengthSquared();
+ return Evaluate(checkValue, arg);
+}
+
bool VariableStep::EvalDefault(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg)
{
return false;
* Vector2 => 2 dimensional length of vector has stepped arg1 amount from arg0.
* Vector3 => 3 dimensional length of vector has stepped arg1 amount from arg0.
* Vector4 => 4 dimensional length of vector has stepped arg1 amount from arg0.
+ * Quaternion => sum of rotation angle and axis changes has stepped arg1 amount from arg0
* Default => return false.
*/
class VariableStep
static bool EvalVector4(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
/**
+ * Checks if Quaternion is Outside
+ * @param[in] value The value being examined.
+ * @param[in] arg The supplied arguments for the condition.
+ * @return Condition result (true if condition met, false if not)
+ */
+ static bool EvalQuaternion(const Dali::PropertyInput& value, PropertyNotification::RawArgumentContainer& arg);
+
+ /**
* Default check for other types.
* @param[in] value The value being examined.
* @param[in] arg The supplied arguments for the condition.
* vector2 (the 2D length)
* vector3 (the 3D length)
* vector4 (the 4D length)
+ * quaternion (the radian of rotation and axis)
* @SINCE_1_0.0
* @param[in] stepAmount The step size required to trigger condition
* @param[in] initialValue The initial value to step from
* vector2 (the 2D length)
* vector3 (the 3D length)
* vector4 (the 4D length)
+ * quaternion (the radian of rotation and axis)
* @SINCE_1_0.0
* @param[in] steps List of values to receive notifications for as a property crosses them
* @return A property condition function object