Rotates a Node object to a certain angle by modifying it's rotation attribute.
More...
#include <ActionInterval.h>
Inherits ActionInterval.
|
virtual void | update (float time) override |
|
bool | initWithDuration (float duration, float dstAngleX, float dstAngleY) |
| initializes the action
|
|
bool | initWithDuration (float duration, const Vec3 &dstAngle3D) |
| initializes the action
|
|
void | calculateAngles (float &startAngle, float &diffAngle, float dstAngle) |
| calculates the start and diff angles
|
|
float | getElapsed () |
| How many seconds had elapsed since the actions started to run.
|
|
void | setAmplitudeRate (float amp) |
| Sets the amplitude rate, extension in GridAction.
|
|
float | getAmplitudeRate () |
| Gets the amplitude rate, extension in GridAction.
|
|
virtual void | step (float dt) override |
|
bool | initWithDuration (float d) |
| initializes the action
|
|
|
static RotateTo * | create (float duration, float dstAngleX, float dstAngleY) |
| Creates the action with separate rotation angles.
|
|
static RotateTo * | create (float duration, float dstAngle) |
| Creates the action.
|
|
static RotateTo * | create (float duration, const Vec3 &dstAngle3D) |
| Creates the action with 3D rotation angles.
|
|
Rotates a Node object to a certain angle by modifying it's rotation attribute.
The direction will be decided by the shortest angle.
◆ create() [1/3]
static RotateTo * create |
( |
float | duration, |
|
|
float | dstAngleX, |
|
|
float | dstAngleY ) |
|
static |
Creates the action with separate rotation angles.
- Parameters
-
duration | Duration time, in seconds. |
dstAngleX | In degreesCW. |
dstAngleY | In degreesCW. |
- Returns
- An autoreleased RotateTo object.
◆ create() [2/3]
static RotateTo * create |
( |
float | duration, |
|
|
float | dstAngle ) |
|
static |
Creates the action.
- Parameters
-
duration | Duration time, in seconds. |
dstAngle | In degreesCW. |
- Returns
- An autoreleased RotateTo object.
◆ create() [3/3]
static RotateTo * create |
( |
float | duration, |
|
|
const Vec3 & | dstAngle3D ) |
|
static |
Creates the action with 3D rotation angles.
- Parameters
-
duration | Duration time, in seconds. |
dstAngle3D | A Vec3 angle. |
- Returns
- An autoreleased RotateTo object.
◆ update()
virtual void update |
( |
float | time | ) |
|
|
overridevirtual |
◆ initWithDuration() [1/2]
bool initWithDuration |
( |
float | duration, |
|
|
float | dstAngleX, |
|
|
float | dstAngleY ) |
initializes the action
- Parameters
-
duration | in seconds |
dstAngleX | in degreesCW |
dstAngleY | in degreesCW |
◆ initWithDuration() [2/2]
bool initWithDuration |
( |
float | duration, |
|
|
const Vec3 & | dstAngle3D ) |
initializes the action
- Parameters
-
◆ calculateAngles()
void calculateAngles |
( |
float & | startAngle, |
|
|
float & | diffAngle, |
|
|
float | dstAngle ) |
calculates the start and diff angles
- Parameters
-
The documentation for this class was generated from the following file: