⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-dff292a
|
#include <ActionGrid3D.h>
Inherits Grid3DAction.
Public Member Functions | |
| float | getLensEffect () const |
| Get the value of lens effect. | |
| void | setLensEffect (float lensEffect) |
| Set the value of lens effect. | |
| void | setConcave (bool concave) |
| Set whether lens is concave. | |
| const Vec2 & | getPosition () const |
| Get the center position of lens effect. | |
| void | setPosition (const Vec2 &position) |
| Set the center position of lens effect. | |
| bool | initWithDuration (float duration, const Vec2 &gridSize, const Vec2 &position, float radius) |
| Initializes the action with center position, radius, grid size and duration. | |
| Public Member Functions inherited from Grid3DAction | |
| GridBase * | getGrid () override |
| Get the pointer of GridBase. | |
| Vec3 | getVertex (const Vec2 &position) const |
| Get the vertex that belongs to certain position in the grid. | |
| Vec3 | getOriginalVertex (const Vec2 &position) const |
| Get the non-transformed vertex that belongs to certain position in the grid. | |
| void | setVertex (const Vec2 &position, const Vec3 &vertex) |
| Set a new vertex to a certain position of the grid. | |
| Rect | getGridRect () const |
| Get the effect grid rect. | |
| Public Member Functions inherited from GridAction | |
| bool | initWithDuration (float duration, const Vec2 &gridSize) |
| Initializes the action with size and duration. | |
| Public Member Functions inherited from ActionInterval | |
| 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. | |
| void | step (float dt) override |
| bool | initWithDuration (float d) |
| initializes the action | |
Static Public Member Functions | |
| static Lens3D * | create (float duration, const Vec2 &gridSize, const Vec2 &position, float radius) |
| Create the action with center position, radius, a grid size and duration. | |
Lens3D action.
This action is used for take effect on the target node as lens. You can create the action by these parameters: duration, grid size, center position of lens, radius of lens. Also you can change the lens effect value & whether effect is concave by the setter methods.
|
static |
Create the action with center position, radius, a grid size and duration.
| duration | Specify the duration of the Lens3D action. It's a value in seconds. |
| gridSize | Specify the size of the grid. |
| position | Specify the center position of the lens. |
| radius | Specify the radius of the lens. |
|
inline |
Get the value of lens effect.
Default value is 0.7.
|
inline |
Set the value of lens effect.
| lensEffect | The value of lens effect will be set. |
|
inline |
Set whether lens is concave.
| concave | Whether lens is concave. |
|
inline |
Get the center position of lens effect.
| void setPosition | ( | const Vec2 & | position | ) |
Set the center position of lens effect.
| position | The center position will be set. |
| bool initWithDuration | ( | float | duration, |
| const Vec2 & | gridSize, | ||
| const Vec2 & | position, | ||
| float | radius ) |
Initializes the action with center position, radius, grid size and duration.
| duration | Specify the duration of the Lens3D action. It's a value in seconds. |
| gridSize | Specify the size of the grid. |
| position | Specify the center position of the lens effect. |
| radius | Specify the radius of the lens effect. |