Animator controller link. More...
#include <deAnimatorLink.h>
Public Member Functions | |
Constructors and Destructors | |
| deAnimatorLink () | |
| Creates a new animator with the given resource manager. | |
| ~deAnimatorLink () | |
| Cleans up the animator. | |
Management | |
| int | GetController () const |
| Retrieves the linked controller of -1 if not set. | |
| bool | HasController () const |
| Determines if a controller is set. | |
| void | SetController (int controller) |
| Sets the linked controller or -1 to unset. | |
Mapping Points | |
| int | GetPointCount () const |
| Retrieves the number of points. | |
| const decVector2 & | GetPointAt (int position) const |
| Retrieves the point at the given position. | |
| int | FindPointPriorTo (float coordinate) const |
| Retrieves the index of the point with the x coordinates matching the given x coordinate or the point which lies closest on the smaller side. | |
| int | AddPoint (const decVector2 &point) |
| Adds a point returning the index where it has been added. | |
| void | RemovePointFrom (int position) |
| Removes a point from the given position. | |
| void | RemoveAllPoints () |
| Removes all points. | |
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.
| deAnimatorLink::deAnimatorLink | ( | ) |
Creates a new animator with the given resource manager.
| deAnimatorLink::~deAnimatorLink | ( | ) |
Cleans up the animator.
| int deAnimatorLink::AddPoint | ( | const decVector2 & | point ) |
Adds a point returning the index where it has been added.
| int deAnimatorLink::FindPointPriorTo | ( | float | coordinate ) | const |
Retrieves the index of the point with the x coordinates matching the given x coordinate or the point which lies closest on the smaller side.
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.
| int deAnimatorLink::GetController | ( | ) | const [inline] |
Retrieves the linked controller of -1 if not set.
| const decVector2& deAnimatorLink::GetPointAt | ( | int | position ) | const |
Retrieves the point at the given position.
| int deAnimatorLink::GetPointCount | ( | ) | const [inline] |
Retrieves the number of points.
| bool deAnimatorLink::HasController | ( | ) | const [inline] |
Determines if a controller is set.
| void deAnimatorLink::RemoveAllPoints | ( | ) |
Removes all points.
| void deAnimatorLink::RemovePointFrom | ( | int | position ) |
Removes a point from the given position.
| void deAnimatorLink::SetController | ( | int | controller ) |
Sets the linked controller or -1 to unset.
1.7.2