Drag[en]gine Game Engine  1.0
deAnimatorLink Class Reference

Animator controller link. More...

#include <deAnimatorLink.h>

Public Member Functions

Constructors and Destructors
 deAnimatorLink ()
 Create link. More...
 deAnimatorLink (const deAnimatorLink &copy)
 Create copy of link. More...
 ~deAnimatorLink ()
 Clean up link. More...
int GetController () const
 Linked controller or -1 if not set. More...
bool HasController () const
 Controller is set. More...
void SetController (int controller)
 Set linked controller or -1 to not set. More...
int GetRepeat () const
 Repeat count of input value. More...
void SetRepeat (int repeat)
 Set repeat count of input value. More...
Mapping Points
int GetPointCount () const
 Number of points. More...
const decVector2GetPointAt (int position) const
 Point at position. More...
int FindPointPriorTo (float coordinate) const
 Index of point with matching x coordinate or point right before. More...
int AddPoint (const decVector2 &point)
 Add point. More...
void RemovePointFrom (int position)
 Remove point from position. More...
void RemoveAllPoints ()
 Remove all points. More...
deAnimatorLinkoperator= (const deAnimatorLink &copy)
 Copy link to this link. More...

Detailed Description

Animator controller link.

Describes a controller linked to a rule. This class stores besides the index of the controller in the animator also two transformation parameters. These can be used to alter the value obtained from the controller to reuse controllers. The controller value is first clamped by the lower and upper clamp boundaries. Controller always yield a value in the range from 0 to 1. The default clamp boundaries of 0 for the lower and 1 for the upper therefore leave the controller value untouched. The clamped value is then multiplied by the multiplier parameter and then offset by the offset parameter. Summed up the final value returned by this link equals to "value = offset + clamp( controllerValue, lower, upper ) * multiplier. The default value is 0 for offset and 1 for the multiplier. The transformation parameters should map the values from the range 0-1 back into the range 0-1. Certain rules can provide exceptions to allow special effects for which especially clamping can be useful.

Pl├╝ss Roland

Constructor & Destructor Documentation

◆ deAnimatorLink() [1/2]

deAnimatorLink::deAnimatorLink ( )

Create link.

◆ deAnimatorLink() [2/2]

deAnimatorLink::deAnimatorLink ( const deAnimatorLink copy)

Create copy of link.

◆ ~deAnimatorLink()

deAnimatorLink::~deAnimatorLink ( )

Clean up link.

Member Function Documentation

◆ AddPoint()

int deAnimatorLink::AddPoint ( const decVector2 point)

Add point.

index where point has been added.

Referenced by GetPointCount().

◆ FindPointPriorTo()

int deAnimatorLink::FindPointPriorTo ( float  coordinate) const

Index of point with matching x coordinate or point right before.

This method can be used to find the interval a point is located in by returning the most prior point. Retrieves -1 if there are no points satisfying this criteria.

Referenced by GetPointCount().

◆ GetController()

int deAnimatorLink::GetController ( ) const

Linked controller or -1 if not set.

◆ GetPointAt()

const decVector2& deAnimatorLink::GetPointAt ( int  position) const

Point at position.

deeOutOfBoundaryposition is less than 0 or larger than or equal to GetPointCount().

Referenced by GetPointCount().

◆ GetPointCount()

int deAnimatorLink::GetPointCount ( ) const

◆ GetRepeat()

int deAnimatorLink::GetRepeat ( ) const

Repeat count of input value.

References SetRepeat().

◆ HasController()

bool deAnimatorLink::HasController ( ) const

Controller is set.

References SetController().

◆ operator=()

deAnimatorLink& deAnimatorLink::operator= ( const deAnimatorLink copy)

Copy link to this link.

Referenced by GetPointCount().

◆ RemoveAllPoints()

void deAnimatorLink::RemoveAllPoints ( )

Remove all points.

Referenced by GetPointCount().

◆ RemovePointFrom()

void deAnimatorLink::RemovePointFrom ( int  position)

Remove point from position.

deeOutOfBoundaryposition is less than 0 or larger than or equal to GetPointCount().

Referenced by GetPointCount().

◆ SetController()

void deAnimatorLink::SetController ( int  controller)

Set linked controller or -1 to not set.

deeInvalidParamcontroller is less than -1.

Referenced by HasController().

◆ SetRepeat()

void deAnimatorLink::SetRepeat ( int  repeat)

Set repeat count of input value.

deeInvalidParamrepeat is less than 1.

Referenced by GetRepeat().

The documentation for this class was generated from the following file: