Dali 3D User Interface Engine
List of all members | Classes | Public Member Functions | Static Public Member Functions
Dali::Path Class Reference

A 3D parametric curve. More...

#include <path.h>

Inheritance diagram for Dali::Path:
Inheritance graph
[legend]
Collaboration diagram for Dali::Path:
Collaboration graph
[legend]

Classes

struct  Property
 An enumeration of properties belonging to the Path class. More...
 

Public Member Functions

 Path ()
 Create an uninitialized Path handle. More...
 
 ~Path ()
 Destructor. More...
 
 Path (const Path &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
Pathoperator= (const Path &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
void AddPoint (const Vector3 &point)
 Add an interpolation point. More...
 
void AddControlPoint (const Vector3 &point)
 Add a control point. More...
 
void GenerateControlPoints (float curvature)
 Automatic generation of control points. More...
 
void Sample (float progress, Vector3 &position, Vector3 &tangent) const
 Sample path at a given progress. More...
 
Vector3GetPoint (size_t index)
 Accessor for the interpolation points. More...
 
Vector3GetControlPoint (size_t index)
 Accessor for the control points. More...
 
size_t GetPointCount () const
 Get the number of interpolation points in the path. More...
 
DALI_INTERNAL Path (Internal::Path *path)
 This constructor is used by Path::New() methods. More...
 
- Public Member Functions inherited from Dali::Handle
 Handle (Dali::Internal::Object *handle)
 This constructor is used by Dali New() methods. More...
 
 Handle ()
 This constructor provides an uninitialized Dali::Handle. More...
 
 ~Handle ()
 Dali::Handle is intended as a base class. More...
 
 Handle (const Handle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
Handleoperator= (const Handle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
bool Supports (Capability capability) const
 Query whether an handle supports a given capability. More...
 
unsigned int GetPropertyCount () const
 Query how many properties are provided by an handle. More...
 
std::string GetPropertyName (Property::Index index) const
 Query the name of a property. More...
 
Property::Index GetPropertyIndex (const std::string &name) const
 Query the index of a property. More...
 
bool IsPropertyWritable (Property::Index index) const
 Query whether a property can be set using SetProperty(). More...
 
bool IsPropertyAnimatable (Property::Index index) const
 Query whether a writable property can be the target of an animation or constraint. More...
 
bool IsPropertyAConstraintInput (Property::Index index) const
 Query whether a property can be used as in input to a constraint. More...
 
Property::Type GetPropertyType (Property::Index index) const
 Query the type of a property. More...
 
void SetProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of an existing property. More...
 
Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue)
 Register a new animatable property. More...
 
Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue, Property::AccessMode accessMode)
 Register a new property. More...
 
Property::Value GetProperty (Property::Index index) const
 Retrieve a property value. More...
 
template<typename T >
GetProperty (Property::Index index) const
 Convenience function for obtaining a property of a known type. More...
 
void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this object (including custom properties). More...
 
PropertyNotification AddPropertyNotification (Property::Index index, const PropertyCondition &condition)
 Add a property notification to this object. More...
 
PropertyNotification AddPropertyNotification (Property::Index index, int componentIndex, const PropertyCondition &condition)
 Add a property notification to this object. More...
 
void RemovePropertyNotification (Dali::PropertyNotification propertyNotification)
 Remove a property notification from this object. More...
 
void RemovePropertyNotifications ()
 Remove all property notifications from this object. More...
 
void RemoveConstraints ()
 Remove all constraints from an Object. More...
 
void RemoveConstraints (unsigned int tag)
 Remove all the constraint from the Object with a matching tag. More...
 
- Public Member Functions inherited from Dali::BaseHandle
 BaseHandle (Dali::BaseObject *handle)
 This constructor is used by Dali New() methods. More...
 
 BaseHandle ()
 This constructor provides an uninitialized Dali::BaseHandle. More...
 
 ~BaseHandle ()
 Dali::BaseHandle is intended as a base class. More...
 
 BaseHandle (const BaseHandle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
BaseHandleoperator= (const BaseHandle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
BaseObjectGetBaseObject ()
 Retrieve the internal Dali resource. More...
 
const BaseObjectGetBaseObject () const
 Retrieve the internal Dali resource. More...
 
void Reset ()
 Resets the handle. More...
 
 operator BooleanType () const
 Converts an handle to a BooleanType. More...
 
bool operator== (const BaseHandle &rhs) const
 Equality operator overload. More...
 
bool operator!= (const BaseHandle &rhs) const
 Inequality operator overload. More...
 
Dali::RefObjectGetObjectPtr () const
 Get the reference counted object pointer. More...
 

Static Public Member Functions

static Path New ()
 Create an initialized Path handle. More...
 
static Path DownCast (BaseHandle handle)
 Downcast a handle to Path handle. More...
 
- Static Public Member Functions inherited from Dali::Handle
static Handle New ()
 Create a new object. More...
 
static Handle DownCast (BaseHandle handle)
 Downcast to a handle. More...
 

Additional Inherited Members

- Public Types inherited from Dali::Handle
enum  Capability { DYNAMIC_PROPERTIES = 0x01 }
 An Handle's capabilities can be queried using Handle::Supports() .0. More...
 
- Protected Member Functions inherited from Dali::BaseHandle
void ThisIsSaferThanReturningVoidStar () const
 Used by the safe bool idiom. More...
 

Detailed Description

A 3D parametric curve.

Paths can be used to animate position and orientation of actors using Dali::Animate()

.0

Definition at line 44 of file path.h.

Constructor & Destructor Documentation

Dali::Path::Path ( )

Create an uninitialized Path handle.

This can be initialized with Path::New(). Calling member functions with an uninitialized Path handle is not allowed. .0

Definition at line 38 of file path.cpp.

Referenced by DownCast(), and New().

Here is the caller graph for this function:

Dali::Path::~Path ( )

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods. .0

Definition at line 42 of file path.cpp.

Dali::Path::Path ( const Path handle)

This copy constructor is required for (smart) pointer semantics.

.0

Parameters
[in]handleA reference to the copied handle

Definition at line 46 of file path.cpp.

Dali::Path::Path ( Internal::Path path)
explicit

This constructor is used by Path::New() methods.

.0

Parameters
[in]pathA pointer to an internal path resource

Definition at line 51 of file path.cpp.

Member Function Documentation

void Dali::Path::AddControlPoint ( const Vector3 point)
void Dali::Path::AddPoint ( const Vector3 point)
Path Dali::Path::DownCast ( BaseHandle  handle)
static

Downcast a handle to Path handle.

If handle points to a Path object the downcast produces valid handle. If not the returned handle is left uninitialized. .0

Parameters
[in]handleHandle to an object
Returns
Handle to a Path object or an uninitialized handle

Definition at line 33 of file path.cpp.

References Dali::BaseHandle::GetObjectPtr(), and Path().

Referenced by UtcDaliPathDownCast().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Path::GenerateControlPoints ( float  curvature)

Automatic generation of control points.

Generated control points which result in a smooth join between the splines of each segment.

The generating algorithm is as follows: For a given knot point K[N], find the vector that bisects K[N-1],[N] and [N],[N+1]. Calculate the tangent vector by taking the normal of this bisector. The in control point is the length of the preceding segment back along this bisector multiplied by the curvature. The out control point is the length of the succeeding segment forward along this bisector multiplied by the curvature.

.0

Parameters
[in]curvatureThe curvature of the spline. 0 gives straight lines between the knots, negative values means the spline contains loops, positive values up to 0.5 result in a smooth curve, positive values between 0.5 and 1 result in looped curves where the loops are not distinct (i.e. the curve appears to be non-continuous), positive values higher than 1 result in looped curves.
Precondition
There are at least two points in the path ( one segment ).

Definition at line 72 of file path.cpp.

References Dali::GetImplementation().

Referenced by utcDaliPathGenerateControlPoints01(), utcDaliPathGenerateControlPoints02(), and utcDaliPathGenerateControlPoints03().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector3 & Dali::Path::GetControlPoint ( size_t  index)

Accessor for the control points.

.0

Parameters
[in]indexThe index of the control point.
Returns
A reference to the control point.

Definition at line 88 of file path.cpp.

References Dali::GetImplementation().

Referenced by utcDaliPathGenerateControlPoints01(), utcDaliPathGetControlPoints(), utcDaliPathGetControlPoints01(), and utcDaliPathGetControlPoints02().

Here is the call graph for this function:

Here is the caller graph for this function:

Vector3 & Dali::Path::GetPoint ( size_t  index)

Accessor for the interpolation points.

.0

Parameters
[in]indexThe index of the interpolation point.
Returns
A reference to the interpolation point.

Definition at line 83 of file path.cpp.

References Dali::GetImplementation().

Referenced by utcDaliPathGetPoint(), utcDaliPathGetPoint02(), and utcDaliPathGetPoint03().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Dali::Path::GetPointCount ( ) const

Get the number of interpolation points in the path.

.0

Returns
The number of interpolation points in the path

Definition at line 93 of file path.cpp.

References Dali::GetImplementation().

Referenced by utcDaliPathGetPointCount().

Here is the call graph for this function:

Here is the caller graph for this function:

Path Dali::Path::New ( )
static
Path & Dali::Path::operator= ( const Path rhs)

This assignment operator is required for (smart) pointer semantics.

.0

Parameters
[in]rhsA reference to the copied handle
Returns
A reference to this

Definition at line 56 of file path.cpp.

References Dali::BaseHandle::operator=().

Here is the call graph for this function:

void Dali::Path::Sample ( float  progress,
Vector3 position,
Vector3 tangent 
) const

Sample path at a given progress.

Calculates position and tangent at that point of the curve

.0

Parameters
[in]progressA floating point value between 0.0 and 1.0.
[out]positionThe interpolated position at that progress.
[out]tangentThe interpolated tangent at that progress.

Definition at line 78 of file path.cpp.

References Dali::GetImplementation().

Referenced by Dali::Internal::PathConstraintFunctor::operator()(), UtcDaliAnimationAnimateAlphaFunctionP(), UtcDaliAnimationAnimateAlphaFunctionTimePeriodP(), UtcDaliAnimationAnimateP(), UtcDaliAnimationAnimateTimePeriodP(), UtcDaliPathAssignment(), UtcDaliPathDownCast(), UtcDaliPathSample01(), UtcPathConstrainerApply(), UtcPathConstrainerApplyRange(), UtcPathConstrainerDestroy(), and UtcPathConstrainerRemove().

Here is the call graph for this function:

Here is the caller graph for this function:


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