resonance 1.0.1
Loading...
Searching...
No Matches
Rnd::Animatable::FirstOrder Class Reference

Filter stage that moves the value a fixed fraction of the way towards its input. More...

#include <animatable.h>

Inheritance diagram for Rnd::Animatable::FirstOrder:
Collaboration diagram for Rnd::Animatable::FirstOrder:

Public Member Functions

 FirstOrder ()
 Construct a stage with indeterminate parameters.
 FirstOrder (float flLevel, float flRatio)
 Construct a stage with both parameters set.
virtual float Apply (float flValue)
 Move mLevel a fraction mRatio of the way towards the value.
virtual float Unapply (float flValue)
 Report the mLevel that preceded an Apply() of the value.
virtual void Print (Dbg &sink) const
 Write "(level:%.2f ratio:%.2f)" to sink.
virtual void Save (Stream &stream)
 Write both parameters to stream.
virtual void Load (Stream &stream)
 Read both parameters from stream.
virtual int Type ()
 Report kFilterFirstOrder.
virtual void Copy (const Filter *pSource)
 Copy both parameters from pSource.

Detailed Description

Filter stage that moves the value a fixed fraction of the way towards its input.

Its RTTI descriptor is at 0x008eef08. It derives publicly from Filter at offset 0. The object is 0xc bytes, and its vtable is at 0x0081e8a8.

The stage is stateful in the same way as ZeroOrder. mLevel is the running output.

Constructor & Destructor Documentation

◆ FirstOrder() [1/2]

Rnd::Animatable::FirstOrder::FirstOrder ( )
inline

Construct a stage with indeterminate parameters.

◆ FirstOrder() [2/2]

Rnd::Animatable::FirstOrder::FirstOrder ( float flLevel,
float flRatio )
inline

Construct a stage with both parameters set.

Parameters
flLevelThe starting output.
flRatioThe fraction of the remaining distance each Apply() covers.

Member Function Documentation

◆ Apply()

virtual float Rnd::Animatable::FirstOrder::Apply ( float flValue)
virtual

Move mLevel a fraction mRatio of the way towards the value.

Parameters
flValueThe value to move towards.
Returns
The new mLevel.
Ghidra address:
NTSC-U/C: 0x004994e0
Ghidra address:
PAL: 0x004d7440

Implements Rnd::Animatable::Filter.

◆ Unapply()

virtual float Rnd::Animatable::FirstOrder::Unapply ( float flValue)
virtual

Report the mLevel that preceded an Apply() of the value.

A unit mRatio divides by zero rather than reporting. That matches the binary.

Parameters
flValueThe value the last Apply() received.
Returns
The earlier level.
Ghidra address:
NTSC-U/C: 0x00499500
Ghidra address:
PAL: 0x004d7460

Reimplemented from Rnd::Animatable::Filter.

◆ Print()

virtual void Rnd::Animatable::FirstOrder::Print ( Dbg & sink) const
virtual

Write "(level:%.2f ratio:%.2f)" to sink.

Parameters
sinkThe diagnostic sink to write to.
Ghidra address:
NTSC-U/C: 0x00499528
Ghidra address:
PAL: 0x004d7488

Implements Rnd::Animatable::Filter.

◆ Save()

virtual void Rnd::Animatable::FirstOrder::Save ( Stream & stream)
virtual

Write both parameters to stream.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x004995c8
Ghidra address:
PAL: 0x004d7528

Implements Rnd::Animatable::Filter.

◆ Load()

virtual void Rnd::Animatable::FirstOrder::Load ( Stream & stream)
virtual

Read both parameters from stream.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x00499638
Ghidra address:
PAL: 0x004d7598

Implements Rnd::Animatable::Filter.

◆ Type()

virtual int Rnd::Animatable::FirstOrder::Type ( )
virtual

Report kFilterFirstOrder.

Returns
The type tag.
Ghidra address:
NTSC-U/C: 0x00499698
Ghidra address:
PAL: 0x004d75f8

Implements Rnd::Animatable::Filter.

◆ Copy()

virtual void Rnd::Animatable::FirstOrder::Copy ( const Filter * pSource)
virtual

Copy both parameters from pSource.

Parameters
pSourceThe FirstOrder to copy.
Ghidra address:
NTSC-U/C: 0x004996a0
Ghidra address:
PAL: 0x004d7600

Implements Rnd::Animatable::Filter.


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