ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::SineTable Class Reference

#include <sinetables.h>

List of all members.

Public Member Functions

 SineTable (int nPoints)
 Construct a sine table given the number of points.
 ~SineTable ()
const float * getTable ()
 Get pointer to table.
float at (int index) const
 Returns sin(2*pi * index / nPoints ) Index must be in range [0, nPoints - 1] Faster than atLegacy.
float atLegacy (int index) const
 Returns sin(2*pi * index / nPoints ) Index must be in range [0, nPoints - 1].

Private Attributes

float * _tableEOS
float * _table
double _radResolution
int _refSize
int _nPoints

Detailed Description

Definition at line 28 of file sinetables.h.


Constructor & Destructor Documentation

Common::SineTable::SineTable ( int  nPoints  ) 

Construct a sine table given the number of points.

Parameters:
nPoints Number of distinct radian points, which must be in range [16,65536] and be divisible by 4

Definition at line 30 of file sinetables.cpp.

Common::SineTable::~SineTable (  ) 

Definition at line 77 of file sinetables.cpp.


Member Function Documentation

float Common::SineTable::at ( int  index  )  const

Returns sin(2*pi * index / nPoints ) Index must be in range [0, nPoints - 1] Faster than atLegacy.

Definition at line 52 of file sinetables.cpp.

float Common::SineTable::atLegacy ( int  index  )  const

Returns sin(2*pi * index / nPoints ) Index must be in range [0, nPoints - 1].

Definition at line 57 of file sinetables.cpp.

const float* Common::SineTable::getTable (  )  [inline]

Get pointer to table.

This table contains nPoints/2 entries. Prefer to use at() The layout of this table is as follows:

  • Entries 0 up to (excluding) nPoints/4: sin(0) till (excluding) sin(1/2*pi)
  • Entries 2_nPoints/4 up to nPoints/2: sin(pi) till (excluding) sin(3/2*pi)

Definition at line 49 of file sinetables.h.


Member Data Documentation

Definition at line 69 of file sinetables.h.

Definition at line 67 of file sinetables.h.

Definition at line 68 of file sinetables.h.

float* Common::SineTable::_table [private]

Definition at line 66 of file sinetables.h.

float* Common::SineTable::_tableEOS [private]

Definition at line 65 of file sinetables.h.


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


Generated on Sat Sep 21 2019 05:03:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge