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 bitPrecision)
 Construct a sine table with the specified bit precision.
 ~SineTable ()
const float * getTable ()
 Get pointer to table.
float at (int index) const
 Returns sin(2*pi * index / 2^bitPrecision ) Index must be in range [0,2^bitPrecision-1].
int getBitPrecision ()
 Get bit precision.

Private Attributes

float * _table
int _bitPrecision
double _radResolution
int _refSize
int _nPoints

Detailed Description

Definition at line 28 of file sinetables.h.


Constructor & Destructor Documentation

Common::SineTable::SineTable ( int  bitPrecision  ) 

Construct a sine table with the specified bit precision.

Parameters:
bitPrecision Precision of the table, which must be in range [4, 16]

Definition at line 30 of file sinetables.cpp.

Common::SineTable::~SineTable (  ) 

Definition at line 70 of file sinetables.cpp.


Member Function Documentation

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

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

Definition at line 50 of file sinetables.cpp.

int Common::SineTable::getBitPrecision (  )  [inline]

Get bit precision.

Definition at line 60 of file sinetables.h.

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

Get pointer to table.

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

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

Definition at line 49 of file sinetables.h.


Member Data Documentation

Definition at line 64 of file sinetables.h.

Definition at line 67 of file sinetables.h.

Definition at line 65 of file sinetables.h.

Definition at line 66 of file sinetables.h.

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

Definition at line 63 of file sinetables.h.


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


Generated on Sat Jan 12 2019 05:04:15 for ResidualVM by doxygen 1.7.1
curved edge   curved edge