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 nPoints)
 Construct a cosine table given the number of points.
 ~CosineTable ()
const float * getTable ()
 Get pointer to table.
float at (int index) const
 Returns cos(2*pi * index / nPoints ) Index must be in range [0, nPoints - 1] Faster than atLegacy.
float atLegacy (int index) const
 Returns cos(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 cosinetables.h.


Constructor & Destructor Documentation

Common::CosineTable::CosineTable ( int  nPoints  ) 

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

Common::CosineTable::~CosineTable (  ) 

Definition at line 74 of file cosinetables.cpp.


Member Function Documentation

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

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

Definition at line 52 of file cosinetables.cpp.

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

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

Definition at line 57 of file cosinetables.cpp.

const float* Common::CosineTable::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 (including) nPoints/4: cos(0) till (including) cos(1/2*pi)
  • Entries (excluding) nPoints/4 up to nPoints/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 69 of file cosinetables.h.

Definition at line 67 of file cosinetables.h.

Definition at line 68 of file cosinetables.h.

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

Definition at line 66 of file cosinetables.h.

Definition at line 65 of file cosinetables.h.


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


Generated on Sat Dec 7 2019 05:02:10 for ResidualVM by doxygen 1.7.1
curved edge   curved edge