Beatmup
Beatmup::NearestNeighborInterpolator< scanner, pixel > Class Template Reference

Nearest neighbour bitmap interpolation. More...

#include <interpolation.h>

Inheritance diagram for Beatmup::NearestNeighborInterpolator< scanner, pixel >:

Public Member Functions

 NearestNeighborInterpolator (const AbstractBitmap &bitmap, int x=0, int y=0)
 
pixel operator() () const
 
pixel operator() (float x, float y) const
 

Detailed Description

template<class scanner, typename pixel>
class Beatmup::NearestNeighborInterpolator< scanner, pixel >

Nearest neighbour bitmap interpolation.

Definition at line 27 of file interpolation.h.

Constructor & Destructor Documentation

◆ NearestNeighborInterpolator()

template<class scanner , typename pixel >
Beatmup::NearestNeighborInterpolator< scanner, pixel >::NearestNeighborInterpolator ( const AbstractBitmap bitmap,
int  x = 0,
int  y = 0 
)
inline

Definition at line 29 of file interpolation.h.

29 : scanner(bitmap, x, y) {}
jobject jlong jint jint y
jobject jlong jint x
Beatmup::InternalBitmap * bitmap

Member Function Documentation

◆ operator()() [1/2]

template<class scanner , typename pixel >
pixel Beatmup::NearestNeighborInterpolator< scanner, pixel >::operator() ( ) const
inline

Definition at line 30 of file interpolation.h.

30  {
31  return scanner::operator()();
32  }

◆ operator()() [2/2]

template<class scanner , typename pixel >
pixel Beatmup::NearestNeighborInterpolator< scanner, pixel >::operator() ( float  x,
float  y 
) const
inline

Definition at line 34 of file interpolation.h.

34  {
35  return scanner::operator() (roundf_fast(x), roundf_fast(y));
36  }
#define roundf_fast(X)
rounding (nearest integer)
Definition: utils.hpp:22

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