Filter stage that applies an affine map.
More...
#include <animatable.h>
|
| | ScaleOffset () |
| | Construct a stage with indeterminate parameters.
|
| | ScaleOffset (float flScale, float flOffset) |
| | Construct a stage with both parameters set.
|
| virtual float | Apply (float flValue) |
| | Scale and then offset the value.
|
| virtual float | Unapply (float flValue) |
| | Undo the affine map.
|
| virtual void | Print (Dbg &sink) const |
| | Write "(scale:%.2f offset:%.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 kFilterScaleOffset.
|
| virtual void | Copy (const Filter *pSource) |
| | Copy both parameters from pSource.
|
Filter stage that applies an affine map.
Its RTTI descriptor is at 0x008ef018. It derives publicly from Filter at offset 0. The object is 0xc bytes, and its vtable is at 0x0081e980.
◆ ScaleOffset() [1/2]
| Rnd::Animatable::ScaleOffset::ScaleOffset |
( |
| ) |
|
|
inline |
Construct a stage with indeterminate parameters.
NewFilter() builds a ScaleOffset this way and writes nothing beyond the vtable pointer, so the two parameters start indeterminate and the reader overwrites both.
◆ ScaleOffset() [2/2]
| Rnd::Animatable::ScaleOffset::ScaleOffset |
( |
float | flScale, |
|
|
float | flOffset ) |
|
inline |
Construct a stage with both parameters set.
- Parameters
-
| flScale | The multiplier. |
| flOffset | The addend. |
◆ Apply()
| virtual float Rnd::Animatable::ScaleOffset::Apply |
( |
float | flValue | ) |
|
|
virtual |
Scale and then offset the value.
- Parameters
-
- Returns
- flValue times mScale plus mOffset.
- Ghidra address:
- NTSC-U/C: 0x00498ef0
- Ghidra address:
- PAL: 0x004d6e50
Implements Rnd::Animatable::Filter.
◆ Unapply()
| virtual float Rnd::Animatable::ScaleOffset::Unapply |
( |
float | flValue | ) |
|
|
virtual |
Undo the affine map.
A zero mScale divides by zero rather than reporting. That matches the binary.
- Parameters
-
- Returns
- flValue less mOffset, divided by mScale.
- Ghidra address:
- NTSC-U/C: 0x00498f08
- Ghidra address:
- PAL: 0x004d6e68
Reimplemented from Rnd::Animatable::Filter.
◆ Print()
| virtual void Rnd::Animatable::ScaleOffset::Print |
( |
Dbg & | sink | ) |
const |
|
virtual |
Write "(scale:%.2f offset:%.2f)" to sink.
- Parameters
-
| sink | The diagnostic sink to write to. |
- Ghidra address:
- NTSC-U/C: 0x00498f20
- Ghidra address:
- PAL: 0x004d6e80
Implements Rnd::Animatable::Filter.
◆ Save()
| virtual void Rnd::Animatable::ScaleOffset::Save |
( |
Stream & | stream | ) |
|
|
virtual |
Write both parameters to stream.
- Parameters
-
| stream | The stream to write to. |
- Ghidra address:
- NTSC-U/C: 0x00498fc0
- Ghidra address:
- PAL: 0x004d6f20
Implements Rnd::Animatable::Filter.
◆ Load()
| virtual void Rnd::Animatable::ScaleOffset::Load |
( |
Stream & | stream | ) |
|
|
virtual |
Read both parameters from stream.
- Parameters
-
| stream | The stream to read from. |
- Ghidra address:
- NTSC-U/C: 0x00499030
- Ghidra address:
- PAL: 0x004d6f90
Implements Rnd::Animatable::Filter.
◆ Type()
| virtual int Rnd::Animatable::ScaleOffset::Type |
( |
| ) |
|
|
virtual |
Report kFilterScaleOffset.
- Returns
- The type tag.
- Ghidra address:
- NTSC-U/C: 0x00499090
- Ghidra address:
- PAL: 0x004d6ff0
Implements Rnd::Animatable::Filter.
◆ Copy()
| virtual void Rnd::Animatable::ScaleOffset::Copy |
( |
const Filter * | pSource | ) |
|
|
virtual |
Copy both parameters from pSource.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x00499098
- Ghidra address:
- PAL: 0x004d6ff8
Implements Rnd::Animatable::Filter.
◆ mScale
| float Rnd::Animatable::ScaleOffset::mScale |
◆ mOffset
| float Rnd::Animatable::ScaleOffset::mOffset |
The documentation for this class was generated from the following file: