Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
Grid3DAction Class Reference

Base class for Grid3D actions. More...

#include <ActionGrid.h>

Inherits GridAction.

Inherited by FlipX3D, Lens3D, Liquid, PageTurn3D, Ripple3D, Shaky3D, Twirl, Waves, and Waves3D.

Public Member Functions

virtual GridBasegetGrid () 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.
 
virtual void step (float dt) override
 
bool initWithDuration (float d)
 initializes the action
 

Detailed Description

Base class for Grid3D actions.

Grid3D actions can modify a non-tiled grid.

Member Function Documentation

◆ getGrid()

virtual GridBase * getGrid ( )
overridevirtual

Get the pointer of GridBase.

Returns
The pointer of GridBase.

Reimplemented from GridAction.

Reimplemented in PageTurn3D.

◆ getVertex()

Vec3 getVertex ( const Vec2 & position) const

Get the vertex that belongs to certain position in the grid.

Parameters
positionThe position of the grid.
Returns
Return a pointer of vertex. @js vertex @lua NA

◆ getOriginalVertex()

Vec3 getOriginalVertex ( const Vec2 & position) const

Get the non-transformed vertex that belongs to certain position in the grid.

Parameters
positionThe position of the grid.
Returns
Return a pointer of vertex. @js originalVertex @lua NA

◆ setVertex()

void setVertex ( const Vec2 & position,
const Vec3 & vertex )

Set a new vertex to a certain position of the grid.

Parameters
positionThe position of the grid.
vertexThe vertex will be used on the certain position of grid. @js setVertex @lua NA

◆ getGridRect()

Rect getGridRect ( ) const

Get the effect grid rect.

Returns
Return the effect grid rect.

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