- * The templated parameter P, is the type of the property to constrain.
- * @param [in] target The index of the property to constrain.
- * @param [in] func A function which returns the constrained property value.
- * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
- * @return The new constraint.
- */
- template <class P>
- static Constraint NewWithInterpolator( Property::Index target,
- boost::function<P (const P& current)> func,
- boost::function<P (const P&, const P&, float)> interpolator )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- func,
- interpolator );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * Animation will be performed using the default interpolator.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @return The new constraint.
- */
- template <class P>
- static Constraint New( Property::Index target,
- ConstraintSource source1,
- boost::function<P (const P& current, const PropertyInput& input1)> func )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- func,
- GetDefaultInterpolator( PropertyTypes::Get<P>() ) );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
- * @return The new constraint.
- */
- template <class P>
- static Constraint NewWithInterpolator( Property::Index target,
- ConstraintSource source1,
- boost::function<P (const P& current, const PropertyInput& input1)> func,
- boost::function<P (const P&, const P&, float)> interpolator )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- func,
- interpolator );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * Animation will be performed using the default interpolator.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @return The new constraint.
- */
- template <class P>
- static Constraint New( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2)> func )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- func,
- GetDefaultInterpolator(PropertyTypes::Get<P>()) );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
- * @return The new constraint.
- */
- template <class P>
- static Constraint NewWithInterpolator( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2)> func,
- boost::function<P (const P&, const P&, float)> interpolator )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- func,
- interpolator );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * Animation will be performed using the default interpolator.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @return The new constraint.
- */
- template <class P>
- static Constraint New( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- ConstraintSource source3,
- boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2, const PropertyInput& input3)> func )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- source3,
- func,
- GetDefaultInterpolator(PropertyTypes::Get<P>()) );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
- * @return The new constraint.
- */
- template <class P>
- static Constraint NewWithInterpolator( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- ConstraintSource source3,
- boost::function<P (const P& current, const PropertyInput& input1, const PropertyInput& input2, const PropertyInput& input3)> func,
- boost::function<P (const P&, const P&, float)> interpolator )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- source3,
- func,
- interpolator );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * Animation will be performed using the default interpolator.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
- * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @return The new constraint.
- */
- template <class P>
- static Constraint New( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- ConstraintSource source3,
- ConstraintSource source4,
- boost::function<P (const P& current,
- const PropertyInput& input1,
- const PropertyInput& input2,
- const PropertyInput& input3,
- const PropertyInput& input4)> func )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- source3,
- source4,
- func,
- GetDefaultInterpolator(PropertyTypes::Get<P>()) );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
- * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
- * @return The new constraint.
- */
- template <class P>
- static Constraint NewWithInterpolator( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- ConstraintSource source3,
- ConstraintSource source4,
- boost::function<P (const P& current,
- const PropertyInput& input1,
- const PropertyInput& input2,
- const PropertyInput& input3,
- const PropertyInput& input4)> func,
- boost::function<P (const P&, const P&, float)> interpolator )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- source3,
- source4,
- func,
- interpolator );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * Animation will be performed using the default interpolator.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
- * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
- * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @return The new constraint.
- */
- template <class P>
- static Constraint New( Property::Index target,
- ConstraintSource source1,
- ConstraintSource source2,
- ConstraintSource source3,
- ConstraintSource source4,
- ConstraintSource source5,
- boost::function<P (const P& current,
- const PropertyInput& input1,
- const PropertyInput& input2,
- const PropertyInput& input3,
- const PropertyInput& input4,
- const PropertyInput& input5)> func )
- {
- return New( target,
- PropertyTypes::Get<P>(),
- source1,
- source2,
- source3,
- source4,
- source5,
- func,
- GetDefaultInterpolator(PropertyTypes::Get<P>()) );
- }
-
- /**
- * @brief Create a constraint which targets a property.
- *
- * The templated parameter P, is the type of the property to constrain.
- * @param [in] target The index of the property to constrain.
- * @param [in] source1 The source of a property; the current value will be passed as the 2nd parameter of func.
- * @param [in] source2 The source of a property; the current value will be passed as the 3rd parameter of func.
- * @param [in] source3 The source of a property; the current value will be passed as the 4th parameter of func.
- * @param [in] source4 The source of a property; the current value will be passed as the 5th parameter of func.
- * @param [in] source5 The source of a property; the current value will be passed as the 6th parameter of func.
- * @param [in] func A function which returns the constrained property value.
- * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func.
- * @return The new constraint.