Photon Quantum 3.0.0

Static Public Member Functions | Static Public Attributes | Properties | List of all members
Photon.Deterministic.FPLut Class Reference

The lookup table for the inverse cosine function. The table stores precalculated values of the inverse cosine function for specific angles. The values are in fixed-point format with a precision of 16 bits. More...

Static Public Member Functions

static void GenerateTables (string directoryPath)
 Generate lookup tables in directoryPath . More...
 
static void Init (LutProvider lutProvider)
 Initialize LUT using lutProvider . The provider needs to be able to load following paths: More...
 
static void Init (string directoryPath)
 Initialize LUT from directory directoryPath . The directory needs to have following files: More...
 

Static Public Attributes

static long[] acos_lut
 A lookup table used for approximately calculating the inverse cosine (acos) function for fixed-point numbers. More...
 
static long[] asin_lut
 Lookup table for the arcsine function. More...
 
static long[] atan_lut
 Lookup table for the Atan function in FPMath More...
 
static long[] exp_integral_lut
 Lookup table for the exp function. More...
 
static uint[] log2_approx_lut
 Lookup table for the log2 function. More...
 
const long ONE = 1 << PRECISION
 The value of one in fixed-point format. More...
 
const long PI = 205887L
 The value of PI in fixed-point format. More...
 
const long PIOVER2 = (PI >> 1) + 1
 The value of PI divided by 2 in fixed-point format. More...
 
const long PITIMES2 = PI << 1
 The value of PI times 2 in fixed-point format. More...
 
const int PRECISION = 16
 The number of bits used for the fractional part of the fixed-point numbers. More...
 
static long[] sin_cos_lut
 Lookup table for the sine and cosine functions. More...
 
static int[] sqrt_aprox_lut
 Lookup table for approximate square root values. More...
 
static long[] tan_lut
 Lookup table for the tangent function. More...
 

Properties

static Boolean IsLoaded [get]
 Returns true if the lookup tables have been loaded. More...
 

Detailed Description

The lookup table for the inverse cosine function. The table stores precalculated values of the inverse cosine function for specific angles. The values are in fixed-point format with a precision of 16 bits.

Member Function Documentation

◆ Init() [1/2]

static void Photon.Deterministic.FPLut.Init ( string  directoryPath)
inlinestatic

Initialize LUT from directory directoryPath . The directory needs to have following files:

  • FPSin.bytes
  • FPCos.bytes
  • FPTan.bytes
  • FPAsin.bytes
  • FPAcos.bytes
  • FPAtan.bytes
  • FPSqrt.bytes
Parameters
directoryPath

◆ Init() [2/2]

static void Photon.Deterministic.FPLut.Init ( LutProvider  lutProvider)
inlinestatic

Initialize LUT using lutProvider . The provider needs to be able to load following paths:

  • FPSin
  • FPCos
  • FPTan
  • FPAsin
  • FPAcos
  • FPAtan
  • FPSqrt
Parameters
lutProvider

◆ GenerateTables()

static void Photon.Deterministic.FPLut.GenerateTables ( string  directoryPath)
inlinestatic

Generate lookup tables in directoryPath .

Parameters
directoryPath

Member Data Documentation

◆ PRECISION

const int Photon.Deterministic.FPLut.PRECISION = 16
static

The number of bits used for the fractional part of the fixed-point numbers.

◆ PI

const long Photon.Deterministic.FPLut.PI = 205887L
static

The value of PI in fixed-point format.

◆ PITIMES2

const long Photon.Deterministic.FPLut.PITIMES2 = PI << 1
static

The value of PI times 2 in fixed-point format.

◆ PIOVER2

const long Photon.Deterministic.FPLut.PIOVER2 = (PI >> 1) + 1
static

The value of PI divided by 2 in fixed-point format.

◆ ONE

const long Photon.Deterministic.FPLut.ONE = 1 << PRECISION
static

The value of one in fixed-point format.

◆ sqrt_aprox_lut

int [] Photon.Deterministic.FPLut.sqrt_aprox_lut
static

Lookup table for approximate square root values.

◆ asin_lut

long [] Photon.Deterministic.FPLut.asin_lut
static

Lookup table for the arcsine function.

◆ acos_lut

long [] Photon.Deterministic.FPLut.acos_lut
static

A lookup table used for approximately calculating the inverse cosine (acos) function for fixed-point numbers.

◆ atan_lut

long [] Photon.Deterministic.FPLut.atan_lut
static

Lookup table for the Atan function in FPMath

◆ sin_cos_lut

long [] Photon.Deterministic.FPLut.sin_cos_lut
static

Lookup table for the sine and cosine functions.

◆ tan_lut

long [] Photon.Deterministic.FPLut.tan_lut
static

Lookup table for the tangent function.

◆ log2_approx_lut

uint [] Photon.Deterministic.FPLut.log2_approx_lut
static

Lookup table for the log2 function.

◆ exp_integral_lut

long [] Photon.Deterministic.FPLut.exp_integral_lut
static

Lookup table for the exp function.

Property Documentation

◆ IsLoaded

Boolean Photon.Deterministic.FPLut.IsLoaded
staticget

Returns true if the lookup tables have been loaded.