Tizen 2.4.0 rev3 SDK Public Release
[framework/graphics/dali.git] / dali / public-api / animation / constraints.h
index 9953a34..b3791c7 100644 (file)
@@ -35,9 +35,10 @@ namespace Dali
  */
 
 /**
- * @brief EqualToConstraint
+ * @brief The constraint function that updates the target property with the value of the first source.
  *
- * f(current, property) = property
+ * @e current = <em>input[0]</em>. @e current and <em>input[0]</em> indicate the target property
+ * and the first constraint source (the one added by the first Constraint::AddSource call), respectively.
  * @since_tizen 2.4
  */
 struct EqualToConstraint
@@ -50,12 +51,11 @@ struct EqualToConstraint
   { }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in, out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( float& current, const PropertyInputContainer& inputs )
   {
@@ -63,12 +63,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Vector2& current, const PropertyInputContainer& inputs )
   {
@@ -76,12 +75,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Vector3& current, const PropertyInputContainer& inputs )
   {
@@ -89,12 +87,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Vector4& current, const PropertyInputContainer& inputs )
   {
@@ -102,12 +99,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Quaternion& current, const PropertyInputContainer& inputs )
   {
@@ -115,12 +111,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in,out] current The current property value
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Matrix3& current, const PropertyInputContainer& inputs )
   {
@@ -128,12 +123,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @since_tizen 2.4
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Matrix& current, const PropertyInputContainer& inputs )
   {
@@ -143,9 +137,12 @@ struct EqualToConstraint
 };
 
 /**
- * @brief RelativeToConstraint for Vector3 properties
+ * @brief The constraint function that updates the target property with the value of the first source
+ * multiplied by scale parameter (for Vector3 properties).
  *
- * current = property * scale
+ * @e current = <em>input[0]</em> * @e scale. @e current, <em>input[0]</em>, and @e scale
+ * indicate the target property, the first constraint source, and the scale parameter, respectively.
+ * * implies element-wise multiplication.
  * @since_tizen 2.4
  */
 struct RelativeToConstraint
@@ -153,6 +150,7 @@ struct RelativeToConstraint
   /**
    * @brief Constructor.
    * @since_tizen 2.4
+   * @param[in] scale Scale factor
    */
   RelativeToConstraint( float scale )
   : mScale( scale, scale, scale ) { }
@@ -160,6 +158,7 @@ struct RelativeToConstraint
   /**
    * @brief Constructor.
    * @since_tizen 2.4
+   * @param[in] scale Scale factor
    */
   RelativeToConstraint( const Vector3& scale )
   : mScale( scale ) { }
@@ -167,6 +166,8 @@ struct RelativeToConstraint
   /**
    * @brief Functor.
    * @since_tizen 2.4
+   * @param[in,out] current The current property value (vector3 property * scale factor).
+   * @param[in] input Property container for current property calculation
    */
   void operator()( Vector3& current, const PropertyInputContainer& inputs )
   {
@@ -177,7 +178,11 @@ struct RelativeToConstraint
 };
 
 /**
- * @brief RelativeToConstraint for float properties
+ * @brief The constraint function that updates the target property with the value of the first source
+ * multiplied by scale parameter (for float properties).
+ *
+ * @e current = <em>input[0]</em> * @e scale. @e current, <em>input[0]</em>, and @e scale
+ * indicate the target property, the first constraint source, and the scale parameter, respectively.
  * @since_tizen 2.4
  */
 struct RelativeToConstraintFloat
@@ -185,6 +190,7 @@ struct RelativeToConstraintFloat
   /**
    * @brief Constructor.
    * @since_tizen 2.4
+   * @param[in] scale Scale factor
    */
   RelativeToConstraintFloat( float scale )
   : mScale( scale ) { }
@@ -192,6 +198,8 @@ struct RelativeToConstraintFloat
   /**
    * @brief Functor.
    * @since_tizen 2.4
+   * @param[in,out] current The current property value (float property * scale factor).
+   * @param[in] input Property container for current property calculation
    */
   void operator()( float& current, const PropertyInputContainer& inputs )
   {
@@ -211,10 +219,9 @@ struct RelativeToConstraintFloat
  *
  * @since_tizen 2.4
  * @param[in,out] current The current orientation property value, the constrained value is set.
- * @param[in] inputs Contains the World position of the target, the World position of the camera, and the world orientation of the target
- * @return The orientation of the camera
+ * @param[in] inputs Contains the world position of the target, the world position of the camera, and the world orientation of the target
  */
-inline void LookAt( Quaternion& current, const PropertyInputContainer& inputs )
+inline void LookAt( Dali::Quaternion& current, const Dali::PropertyInputContainer& inputs )
 {
   const PropertyInput& targetPosition( *inputs[0] );
   const PropertyInput& cameraPosition( *inputs[1] );