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

Interpolator that blends linearly between the two entries of a table around an input. More...

#include <interpolator.h>

Inheritance diagram for TableLinInterpolator:
Collaboration diagram for TableLinInterpolator:

Public Member Functions

 TableLinInterpolator (Interpolator &source, int nCount)
 Construct an interpolator by sampling another one.
 TableLinInterpolator (float fX0, float fX1, const DataArray *pArray, int nFirst)
 Construct an interpolator from the numbers of an array.
 ~TableLinInterpolator () override
 Release the slopes.
float Interp (float fX) override
 Blend the two entries around an input.
void Resample (Interpolator &source, int nCount) override
 Size the slopes, then fill the table by sampling another interpolator.
void SetSize (int nCount, float fX0, float fX1) override
 Size the slopes and the table, and set the input range.
void Update () override
 Recompute the spacing and the difference between each pair of neighbouring entries.
Public Member Functions inherited from TableInterpolator
 TableInterpolator (int nCount, float fX0, float fX1)
 Construct an interpolator with a zeroed table.
 TableInterpolator (float fX0, float fX1, const DataArray *pArray, int nFirst)
 Construct an interpolator from the numbers of an array.
 ~TableInterpolator () override
 Release the table.
void Reset (float fY0, float fY1, float fX0, float fX1) override
 Report that a table cannot be rebuilt from end points.
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 Member Functions inherited from TableInterpolator
void FillTable (const DataArray *pArray, int nFirst)
 Read the numbers of an array into the table.
Protected Attributes inherited from TableInterpolator
float mStep
float mInvStep
float * mTable
int mCount
Protected Attributes inherited from Interpolator
float mY0
float mY1
float mX0
float mX1

Detailed Description

Interpolator that blends linearly between the two entries of a table around an input.

The RTTI records the class as deriving from TableInterpolator. The object is 0x28 bytes.

Constructor & Destructor Documentation

◆ TableLinInterpolator() [1/2]

TableLinInterpolator::TableLinInterpolator ( Interpolator & source,
int nCount )

Construct an interpolator by sampling another one.

Parameters
sourceThe interpolator to sample.
nCountThe table entries.
Ghidra address:
NTSC-U/C: 0x00291e80
Ghidra address:
PAL: 0x0029b848

◆ TableLinInterpolator() [2/2]

TableLinInterpolator::TableLinInterpolator ( float fX0,
float fX1,
const DataArray * pArray,
int nFirst )

Construct an interpolator from the numbers of an array.

Parameters
fX0The start of the input range.
fX1The end of the input range.
pArrayThe array.
nFirstThe index of the first table entry in the array.
Ghidra address:
NTSC-U/C: 0x00291ef8
Ghidra address:
PAL: 0x0029b8c0

◆ ~TableLinInterpolator()

TableLinInterpolator::~TableLinInterpolator ( )
override

Release the slopes.

Ghidra address:
NTSC-U/C: 0x00291fd8
Ghidra address:
PAL: 0x0029b9a0

Member Function Documentation

◆ Interp()

float TableLinInterpolator::Interp ( float fX)
overridevirtual

Blend the two entries around an input.

Parameters
fXThe input.
Returns
The blend, the first or the last entry outside the range.
Ghidra address:
NTSC-U/C: 0x002921a8
Ghidra address:
PAL: 0x0029bb70

Reimplemented from TableInterpolator.

◆ Resample()

void TableLinInterpolator::Resample ( Interpolator & source,
int nCount )
overridevirtual

Size the slopes, then fill the table by sampling another interpolator.

Parameters
sourceThe interpolator to sample.
nCountThe table entries.
Ghidra address:
NTSC-U/C: 0x00292030
Ghidra address:
PAL: 0x0029b9f8

Reimplemented from TableInterpolator.

◆ SetSize()

void TableLinInterpolator::SetSize ( int nCount,
float fX0,
float fX1 )
overridevirtual

Size the slopes and the table, and set the input range.

Parameters
nCountThe table entries.
fX0The start of the input range.
fX1The end of the input range.
Ghidra address:
NTSC-U/C: 0x002920b0
Ghidra address:
PAL: 0x0029ba78

Reimplemented from TableInterpolator.

◆ Update()

void TableLinInterpolator::Update ( )
overridevirtual

Recompute the spacing and the difference between each pair of neighbouring entries.

Ghidra address:
NTSC-U/C: 0x00292140
Ghidra address:
PAL: 0x0029bb08

Reimplemented from TableInterpolator.


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