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

Common::CosineTable Class Reference

#include <cosinetables.h>

List of all members.

Public Member Functions

 CosineTable (int bitPrecision)
 Construct a cosine table with the specified bit precision.
 ~CosineTable ()
const float * getTable ()
 Get pointer to table.
float at (int index) const
 Returns cos(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 cosinetables.h.


Constructor & Destructor Documentation

Common::CosineTable::CosineTable ( int  bitPrecision  ) 

Construct a cosine 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 cosinetables.cpp.

Common::CosineTable::~CosineTable (  ) 

Definition at line 66 of file cosinetables.cpp.


Member Function Documentation

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

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

Definition at line 49 of file cosinetables.cpp.

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

Get bit precision.

Definition at line 60 of file cosinetables.h.

const float* Common::CosineTable::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 (including) 2^bitPrecision/4: cos(0) till (including) cos(1/2*pi)
  • Entries (excluding) 2^bitPrecision/4 up to 2^bitPrecision/2: (excluding) cos(3/2*pi) till (excluding) cos(2*pi)

Definition at line 49 of file cosinetables.h.


Member Data Documentation

Definition at line 64 of file cosinetables.h.

Definition at line 67 of file cosinetables.h.

Definition at line 65 of file cosinetables.h.

Definition at line 66 of file cosinetables.h.

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

Definition at line 63 of file cosinetables.h.


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


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