wavelength 1.0.0
Loading...
Searching...
No Matches
Interpolator Class Referenceabstract

Map from an input range to an output range, clamped at both ends. More...

#include <interpolator.h>

Inheritance diagram for Interpolator:

Public Member Functions

virtual ~Interpolator ()
 Release the interpolator.
virtual float Interp (float fX)=0
 Map an input inside the range.
virtual float Eval (float fX)
 Map an input, clamping it to the range first.
virtual void Reset (float fY0, float fY1, float fX0, float fX1)=0
 Replace the end points.
float GetY0 () const
float GetY1 () const
float GetX0 () const
float GetX1 () const

Protected Attributes

float mY0
float mY1
float mX0
float mX1

Detailed Description

Map from an input range to an output range, clamped at both ends.

The RTTI includes the class name. The four end points come first and the vptr follows them at +0x10. The class is abstract.

Constructor & Destructor Documentation

◆ ~Interpolator()

virtual Interpolator::~Interpolator ( )
inlinevirtual

Release the interpolator.

Ghidra address:
NTSC-U/C: 0x003a85f0
Ghidra address:
PAL: 0x004172d0

Member Function Documentation

◆ Interp()

virtual float Interpolator::Interp ( float fX)
pure virtual

Map an input inside the range.

Parameters
fXThe input.
Returns
The output.

Implemented in ATanInterpolator, ExpInterpolator, InvExpInterpolator, LinearInterpolator, TableInterpolator, and TableLinInterpolator.

◆ Eval()

virtual float Interpolator::Eval ( float fX)
virtual

Map an input, clamping it to the range first.

An input at or before mX0 gives mY0, and one at or after mX1 gives mY1.

Parameters
fXThe input.
Returns
The output.
Ghidra address:
NTSC-U/C: 0x00291160
Ghidra address:
PAL: 0x0029ab28

◆ Reset()

virtual void Interpolator::Reset ( float fY0,
float fY1,
float fX0,
float fX1 )
pure virtual

Replace the end points.

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.

Implemented in ATanInterpolator, ExpInterpolator, InvExpInterpolator, LinearInterpolator, and TableInterpolator.

◆ GetY0()

float Interpolator::GetY0 ( ) const
inline
Returns
The output at the start of the range.

◆ GetY1()

float Interpolator::GetY1 ( ) const
inline
Returns
The output at the end of the range.

◆ GetX0()

float Interpolator::GetX0 ( ) const
inline
Returns
The start of the input range.

◆ GetX1()

float Interpolator::GetX1 ( ) const
inline
Returns
The end of the input range.

Member Data Documentation

◆ mY0

float Interpolator::mY0
protected

The output at the start of the range.

◆ mY1

float Interpolator::mY1
protected

The output at the end of the range.

◆ mX0

float Interpolator::mX0
protected

The start of the input range.

◆ mX1

float Interpolator::mX1
protected

The end of the input range.


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