Dali 3D User Interface Engine
List of all members | Public Member Functions | Public Attributes
Dali::Internal::LinearConstraintFunctor Struct Reference

Constraint functor to constraint properties given a linear map. More...

#include <linear-constrainer-impl.h>

Collaboration diagram for Dali::Internal::LinearConstraintFunctor:
Collaboration graph
[legend]

Public Member Functions

 LinearConstraintFunctor (Dali::Vector< float > &value, Dali::Vector< float > &progress, const Vector2 &range, const Vector2 &wrap)
 Constructor. More...
 
void operator() (float &value, const PropertyInputContainer &inputs)
 Functor operator for float properties. More...
 

Public Attributes

Dali::Vector< float > mValue
 values for the linear map More...
 
Dali::Vector< float > mProgress
 Progress for each of the values normalized to [0,1]. More...
 
Vector2 mRange
 The range of values in the input property which will be mapped to 0..1. More...
 
Vector2 mWrap
 Wrapping domain. Input property will be wrapped in this domain before being mapped to [0,1]. More...
 

Detailed Description

Constraint functor to constraint properties given a linear map.

Definition at line 37 of file linear-constrainer-impl.h.

Constructor & Destructor Documentation

Dali::Internal::LinearConstraintFunctor::LinearConstraintFunctor ( Dali::Vector< float > &  value,
Dali::Vector< float > &  progress,
const Vector2 range,
const Vector2 wrap 
)
inline

Constructor.

Parameters
[in]valueThe list of values for the linear map (f(x) of the linear map)
[in]progressProgress for each of the values normalized to [0,1] ( x of the linear map)
[in]rangeThe range of values in the input property which will be mapped to [0,1]
[in]wrapWrapping domain. Input property value will be wrapped in the domain [wrap.x,wrap.y] before mapping to [0,1]
Note
If progress is an empty vector, the values will be assumed to be equally spaced in the x-axis

Definition at line 49 of file linear-constrainer-impl.h.

Member Function Documentation

void Dali::Internal::LinearConstraintFunctor::operator() ( float &  value,
const PropertyInputContainer inputs 
)
inline

Functor operator for float properties.

Parameters
[out]valueCurrent value of the property
[in]inputsContains the input property used as the parameter for the path
Returns
The value of the linear map at the given parameter.

Definition at line 64 of file linear-constrainer-impl.h.

References Dali::Toolkit::Text::min(), mProgress, mRange, mValue, mWrap, Dali::VectorBase::Size(), Dali::WrapInDomain(), Dali::Vector2::x, and Dali::Vector2::y.

Here is the call graph for this function:

Member Data Documentation

Dali::Vector<float> Dali::Internal::LinearConstraintFunctor::mProgress

Progress for each of the values normalized to [0,1].

Definition at line 139 of file linear-constrainer-impl.h.

Referenced by operator()().

Vector2 Dali::Internal::LinearConstraintFunctor::mRange

The range of values in the input property which will be mapped to 0..1.

Definition at line 140 of file linear-constrainer-impl.h.

Referenced by operator()().

Dali::Vector<float> Dali::Internal::LinearConstraintFunctor::mValue

values for the linear map

Definition at line 138 of file linear-constrainer-impl.h.

Referenced by operator()().

Vector2 Dali::Internal::LinearConstraintFunctor::mWrap

Wrapping domain. Input property will be wrapped in this domain before being mapped to [0,1].

Definition at line 141 of file linear-constrainer-impl.h.

Referenced by operator()().


The documentation for this struct was generated from the following file:
Dali Docs Home
Read more about Dali