Cuberite
A lightweight, fast and extensible game server for Minecraft
Functions
LinearUpscale.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename TYPE >
void LinearUpscale2DArray (TYPE *a_Src, int a_SrcSizeX, int a_SrcSizeY, TYPE *a_Dst, int a_UpscaleX, int a_UpscaleY)
 Linearly interpolates values in the array between the equidistant anchor points (upscales). More...
 
template<int SizeX, int SizeY, int AnchorStepX, int AnchorStepY, typename TYPE >
void LinearUpscale2DArrayInPlace (TYPE *a_Array)
 Linearly interpolates values in the array between the equidistant anchor points (upscales). More...
 
template<typename TYPE >
void LinearUpscale3DArray (TYPE *a_Src, int a_SrcSizeX, int a_SrcSizeY, int a_SrcSizeZ, TYPE *a_Dst, int a_UpscaleX, int a_UpscaleY, int a_UpscaleZ)
 Linearly interpolates values in the array between the equidistant anchor points (upscales). More...
 

Function Documentation

◆ LinearUpscale2DArray()

template<typename TYPE >
void LinearUpscale2DArray ( TYPE *  a_Src,
int  a_SrcSizeX,
int  a_SrcSizeY,
TYPE *  a_Dst,
int  a_UpscaleX,
int  a_UpscaleY 
)

Linearly interpolates values in the array between the equidistant anchor points (upscales).

Works on two arrays, input is packed and output is to be completely constructed.

Parameters
a_SrcSource array of size a_SrcSizeX x a_SrcSizeY
a_SrcSizeYDimensions of the src array
a_DstDest array, of size (a_SrcSizeX * a_UpscaleX + 1) x (a_SrcSizeY * a_UpscaleY + 1)
a_UpscaleYUpscale factor for each direction

Definition at line 93 of file LinearUpscale.h.

◆ LinearUpscale2DArrayInPlace()

template<int SizeX, int SizeY, int AnchorStepX, int AnchorStepY, typename TYPE >
void LinearUpscale2DArrayInPlace ( TYPE *  a_Array)

Linearly interpolates values in the array between the equidistant anchor points (upscales).

Works in-place (input is already present at the correct output coords) Uses templates to make it possible for the compiler to further optimizer the loops

Definition at line 46 of file LinearUpscale.h.

◆ LinearUpscale3DArray()

template<typename TYPE >
void LinearUpscale3DArray ( TYPE *  a_Src,
int  a_SrcSizeX,
int  a_SrcSizeY,
int  a_SrcSizeZ,
TYPE *  a_Dst,
int  a_UpscaleX,
int  a_UpscaleY,
int  a_UpscaleZ 
)

Linearly interpolates values in the array between the equidistant anchor points (upscales).

Works on two arrays, input is packed and output is to be completely constructed.

Parameters
a_SrcSource array of size a_SrcSizeX x a_SrcSizeY x a_SrcSizeZ
a_SrcSizeZDimensions of the src array
a_DstDest array, of size (a_SrcSizeX * a_UpscaleX + 1) x (a_SrcSizeY * a_UpscaleY + 1) x (a_SrcSizeZ * a_UpscaleZ + 1)
a_UpscaleZUpscale factor for each direction

Definition at line 164 of file LinearUpscale.h.