#include <CUTransformAction2.h>
This factor creates an action scaling towards a fixed magnification
This class is actually a factory for creating movement actions. To create an action, call attach
with the appropriate SceneNode
. Note that this class contains no duration information. That is supplied when the action is added to ActionTimeline
.
◆ ScaleTo()
cugl::scene2::ScaleTo::ScaleTo |
( |
| ) |
|
|
inline |
Creates an uninitialized scaling animation.
NEVER USE A CONSTRUCTOR WITH NEW. If you want to allocate an object on the heap, use one of the static constructors instead.
◆ ~ScaleTo()
cugl::scene2::ScaleTo::~ScaleTo |
( |
| ) |
|
|
inline |
Deletes this animation, disposing all resources
◆ alloc() [1/3]
static std::shared_ptr< ScaleTo > cugl::scene2::ScaleTo::alloc |
( |
| ) |
|
|
inlinestatic |
Returns a newly allocated scaling action returning the node to normal size
- Returns
- a newly allocated scaling action returning the node to normal size
◆ alloc() [2/3]
static std::shared_ptr< ScaleTo > cugl::scene2::ScaleTo::alloc |
( |
const Vec2 |
scale | ) |
|
|
inlinestatic |
Returns a newly allocated scaling action towards the given scale amount
- Parameters
-
scale | The target scaling amount |
- Returns
- a newly allocated scaling action towards the given scale amount
◆ alloc() [3/3]
static std::shared_ptr< ScaleTo > cugl::scene2::ScaleTo::alloc |
( |
float |
scale | ) |
|
|
inlinestatic |
Returns a newly allocated scaling action towards the given scale amount
- Parameters
-
scale | The target scaling amount |
- Returns
- a newly allocated scaling action towards the given scale amount
◆ attach()
Returns an action attaching this animation to the given scene node
This action will reference this object during the animation. Any changes to this object during that time may alter the animation.
Note that the action has no associated duration. That should be set when it is added to ActionTimeline
.
- Parameters
-
- Returns
- an action attaching this animation to the given scene node
◆ dispose()
void cugl::scene2::ScaleTo::dispose |
( |
| ) |
|
|
inline |
Disposes all of the resources used by this animation.
A disposed animation can be safely reinitialized.
◆ getScale()
const Vec2 & cugl::scene2::ScaleTo::getScale |
( |
| ) |
const |
|
inline |
Returns the movement delta for this action.
Changing this value for an actively animating action can have undefined effects.
- Returns
- the movement delta for this action.
◆ init() [1/3]
bool cugl::scene2::ScaleTo::init |
( |
| ) |
|
|
inline |
Initializes a scaling action returning the node to normal size
- Returns
- true if initialization was successful.
◆ init() [2/3]
bool cugl::scene2::ScaleTo::init |
( |
const Vec2 |
scale | ) |
|
Initializes a scaling action towards the given scale amount
- Parameters
-
scale | The target scaling amount |
- Returns
- true if initialization was successful.
◆ init() [3/3]
bool cugl::scene2::ScaleTo::init |
( |
float |
scale | ) |
|
|
inline |
Initializes a scaling action towards the given scale amount
- Parameters
-
scale | The target scaling amount |
- Returns
- true if initialization was successful.
◆ setScale()
void cugl::scene2::ScaleTo::setScale |
( |
const Vec2 |
scale | ) |
|
|
inline |
Sets the movement delta for this action.
Changing this value for an actively animating action can have undefined effects.
- Parameters
-
scale | The scale amount for this action. |
◆ _target
Vec2 cugl::scene2::ScaleTo::_target |
|
protected |
The target scaling factor at the end of the animation
The documentation for this class was generated from the following file: