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

Constraint functor to constraint properties to paths. More...

#include <path-constrainer-impl.h>

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

Public Member Functions

 PathConstraintFunctor (PathPtr path, const Vector2 &range, const Vector2 &wrap)
 Constructor. More...
 
 PathConstraintFunctor (PathPtr path, const Vector2 &range, const Vector3 &forward, const Vector2 &wrap)
 Constructor. More...
 
void operator() (Vector3 &position, const PropertyInputContainer &inputs)
 Functor operator for Vector3 properties. More...
 
void operator() (Quaternion &current, const PropertyInputContainer &inputs)
 Functor operator for Quaternion properties. More...
 

Public Attributes

PathPtr mPath
 The path used. More...
 
Vector3 mForward
 Vector in object space which will be aligned with the tangent of the path. 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 to paths.

Vector3 properties will be constrained to the position of the path and Rotation properties will be constrained to follow the tangent of the path given a forward vector in object's local space.

Definition at line 42 of file path-constrainer-impl.h.

Constructor & Destructor Documentation

Dali::Internal::PathConstraintFunctor::PathConstraintFunctor ( PathPtr  path,
const Vector2 range,
const Vector2 wrap 
)
inline

Constructor.

Parameters
[in]pathThe path used in the constraint
[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]

Definition at line 51 of file path-constrainer-impl.h.

Dali::Internal::PathConstraintFunctor::PathConstraintFunctor ( PathPtr  path,
const Vector2 range,
const Vector3 forward,
const Vector2 wrap 
)
inline

Constructor.

Parameters
[in]pathThe path used in the constraint
[in]rangeThe range of values in the input property which will be mapped to 0..1
[in]forwardVector in object space which will be aligned with the tangent of the path
[in]wrapWrapping domain. Input property value will be wrapped in the domain [wrap.x,wrap.y] before mapping to [0,1]

Definition at line 61 of file path-constrainer-impl.h.

Member Function Documentation

void Dali::Internal::PathConstraintFunctor::operator() ( Vector3 position,
const PropertyInputContainer inputs 
)
inline

Functor operator for Vector3 properties.

Parameters
[in,out]positionCurrent value of the property
[in]inputsContains the input property used as the parameter for the path
Returns
The position of the path at the given parameter.

Definition at line 71 of file path-constrainer-impl.h.

References mPath, mRange, mWrap, Dali::Path::Sample(), Dali::WrapInDomain(), Dali::Vector2::x, and Dali::Vector2::y.

Here is the call graph for this function:

void Dali::Internal::PathConstraintFunctor::operator() ( Quaternion current,
const PropertyInputContainer inputs 
)
inline

Functor operator for Quaternion properties.

Parameters
[in,out]currentCurrent value of the property
[in]inputsContains the input property used as the parameter for the path
Returns
The rotation which will align the forward vector and the tangent of the path at the given parameter.

Definition at line 94 of file path-constrainer-impl.h.

References mForward, mPath, mRange, mWrap, Dali::Path::Sample(), Dali::WrapInDomain(), Dali::Vector2::x, and Dali::Vector2::y.

Here is the call graph for this function:

Member Data Documentation

Vector3 Dali::Internal::PathConstraintFunctor::mForward

Vector in object space which will be aligned with the tangent of the path.

Definition at line 111 of file path-constrainer-impl.h.

Referenced by operator()().

PathPtr Dali::Internal::PathConstraintFunctor::mPath

The path used.

Definition at line 110 of file path-constrainer-impl.h.

Referenced by operator()().

Vector2 Dali::Internal::PathConstraintFunctor::mRange

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

Definition at line 112 of file path-constrainer-impl.h.

Referenced by operator()().

Vector2 Dali::Internal::PathConstraintFunctor::mWrap

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

Definition at line 113 of file path-constrainer-impl.h.

Referenced by operator()().


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