wavelength 1.0.0
Loading...
Searching...
No Matches
RampAnimator Class Reference

Value that moves toward a target along an interpolator, and poses an animation on the value. More...

#include <rampanimator.h>

Public Member Functions

 RampAnimator (float fValue, RndAnimatable *pAnim, Interpolator *pInterp, float fSpeed)
 Construct an animator resting at a value.
 ~RampAnimator ()
 Destroy the animator and its curve.
void SetAnim (RndAnimatable *pAnim)
 Pose an animation on the value.
void SetSpeed (float fSpeed)
 Set the speed of a move.
void SetTarget (float fTarget)
 Start moving from the current value toward a target.
void Jump (float fValue, float fTarget)
 Move to a value at once and start moving from it toward a target.
bool Update (float fDelta, bool bForce)
 Advance the move and pose the animation on the new value.
float GetValue () const
Interpolator * GetInterp () const
RndAnimatable * GetAnim () const

Detailed Description

Value that moves toward a target along an interpolator, and poses an animation on the value.

The class is not polymorphic and emits no RTTI. The object is 0x14 bytes. The title is inferred from the role. The head-up display panels embed one as their first member to slide in and out.

Constructor & Destructor Documentation

◆ RampAnimator()

RampAnimator::RampAnimator ( float fValue,
RndAnimatable * pAnim,
Interpolator * pInterp,
float fSpeed )

Construct an animator resting at a value.

Parameters
fValueThe value, and the first target.
pAnimThe animation posed on the value, or null.
pInterpThe curve the value follows, or null for a straight line. The animator owns the curve.
fSpeedThe change per unit of time, or 0 for a move that takes one unit of time.
Ghidra address:
NTSC-U/C: 0x001e41c8
Ghidra address:
PAL: 0x001ecf68

◆ ~RampAnimator()

RampAnimator::~RampAnimator ( )

Destroy the animator and its curve.

Ghidra address:
NTSC-U/C: 0x001e4270
Ghidra address:
PAL: 0x001ed010

Member Function Documentation

◆ SetAnim()

void RampAnimator::SetAnim ( RndAnimatable * pAnim)

Pose an animation on the value.

Parameters
pAnimThe animation, or null.
Ghidra address:
NTSC-U/C: 0x001e42d0
Ghidra address:
PAL: 0x001ed070

◆ SetSpeed()

void RampAnimator::SetSpeed ( float fSpeed)

Set the speed of a move.

Parameters
fSpeedThe change per unit of time, or 0 for a move that takes one unit of time.
Ghidra address:
NTSC-U/C: 0x001e4300
Ghidra address:
PAL: 0x001ed0a0

◆ SetTarget()

void RampAnimator::SetTarget ( float fTarget)

Start moving from the current value toward a target.

Parameters
fTargetThe target.
Ghidra address:
NTSC-U/C: 0x001e4330
Ghidra address:
PAL: 0x001ed0d0

◆ Jump()

void RampAnimator::Jump ( float fValue,
float fTarget )

Move to a value at once and start moving from it toward a target.

Parameters
fValueThe value.
fTargetThe target.
Ghidra address:
NTSC-U/C: 0x001e43c0
Ghidra address:
PAL: 0x001ed160

◆ Update()

bool RampAnimator::Update ( float fDelta,
bool bForce )

Advance the move and pose the animation on the new value.

Parameters
fDeltaThe time since the last update. Its magnitude is used.
bForceWhether to pose the animation when the value did not change.
Returns
Whether the value changed.
Ghidra address:
NTSC-U/C: 0x001e43e0
Ghidra address:
PAL: 0x001ed180

◆ GetValue()

float RampAnimator::GetValue ( ) const
inline
Returns
The current value.

◆ GetInterp()

Interpolator * RampAnimator::GetInterp ( ) const
inline
Returns
The curve the value follows.

◆ GetAnim()

RndAnimatable * RampAnimator::GetAnim ( ) const
inline
Returns
The animation posed on the value, or null.

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