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

Interpolator whose output follows a power of the input's position in the range. More...

#include <interpolator.h>

Inheritance diagram for ExpInterpolator:
Collaboration diagram for ExpInterpolator:

Public Member Functions

 ~ExpInterpolator () override=default
 Destroy the object.
 ExpInterpolator (float fY0, float fY1, float fX0, float fX1, float fExponent)
 Construct an interpolator.
void Reset (float fY0, float fY1, float fX0, float fX1, float fExponent)
 Replace the end points and the power.
void Reset (float fY0, float fY1, float fX0, float fX1) override
 Replace the end points and preserve the power.
float Interp (float fX) override
 Map an input along the curve.
Public Member Functions inherited from Interpolator
virtual ~Interpolator ()
 Release the interpolator.
virtual float Eval (float fX)
 Map an input, clamping it to the range first.
float GetY0 () const
float GetY1 () const
float GetX0 () const
float GetX1 () const

Additional Inherited Members

Protected Attributes inherited from Interpolator
float mY0
float mY1
float mX0
float mX1

Detailed Description

Interpolator whose output follows a power of the input's position in the range.

The RTTI records the class as deriving from Interpolator. The object is 0x20 bytes.

Constructor & Destructor Documentation

◆ ~ExpInterpolator()

ExpInterpolator::~ExpInterpolator ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x003a86d0
Ghidra address:
PAL: 0x004173b0

◆ ExpInterpolator()

ExpInterpolator::ExpInterpolator ( float fY0,
float fY1,
float fX0,
float fX1,
float fExponent )

Construct an interpolator.

Parameters
fY0The output at the start of the range.
fY1The output at the end of the range.
fX0The start of the input range.
fX1The end of the input range.
fExponentThe power.
Ghidra address:
NTSC-U/C: 0x00291668
Ghidra address:
PAL: 0x0029b030

Member Function Documentation

◆ Reset() [1/2]

void ExpInterpolator::Reset ( float fY0,
float fY1,
float fX0,
float fX1,
float fExponent )

Replace the end points and the power.

An input range narrower than 1e-6 gives a scale of 1.

Parameters
fY0The output at the start of the range.
fY1The output at the end of the range.
fX0The start of the input range.
fX1The end of the input range.
fExponentThe power.
Ghidra address:
NTSC-U/C: 0x002916a0
Ghidra address:
PAL: 0x0029b068

◆ Reset() [2/2]

void ExpInterpolator::Reset ( float fY0,
float fY1,
float fX0,
float fX1 )
overridevirtual

Replace the end points and preserve the power.

Parameters
fY0The output at the start of the range.
fY1The output at the end of the range.
fX0The start of the input range.
fX1The end of the input range.
Ghidra address:
NTSC-U/C: 0x002916f8
Ghidra address:
PAL: 0x0029b0c0

Implements Interpolator.

◆ Interp()

float ExpInterpolator::Interp ( float fX)
overridevirtual

Map an input along the curve.

Parameters
fXThe input.
Returns
mY0 plus mRange times the input's position in the range raised to mExponent.
Ghidra address:
NTSC-U/C: 0x00291718
Ghidra address:
PAL: 0x0029b0e0

Implements Interpolator.


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