Beatmup
Beatmup::TripleFloatBitmapReader Class Reference

Triple float bitmap reader. More...

#include <bitmap_access.h>

Inheritance diagram for Beatmup::TripleFloatBitmapReader:
Beatmup::CustomBitmapScanner< pixfloat, 3 > Beatmup::TripleFloatBitmapWriter

Public Types

typedef pixfloat3 pixtype
 
- Public Types inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
typedef pixfloat pixvaltype
 

Public Member Functions

pixfloat3 operator() () const
 
pixfloat3 operator() (int x, int y) const
 
const pixfloat3 operator[] (int i) const
 Retrieves a value at position shifted by i pixels in scanline order with respect to the current position. More...
 
 TripleFloatBitmapReader (const AbstractBitmap &bitmap, int x=0, int y=0)
 
- Public Member Functions inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
bool operator< (const CustomBitmapScanner &another) const
 
pixfloatoperator* () const
 
void operator++ (int)
 Move the current position ONE PIXEL forward. More...
 
void operator+= (const int n)
 Move the current position N pixels forward. More...
 
void goTo (int x, int y)
 Changes current position. More...
 
int getWidth () const
 Returns bitmap width in pixels. More...
 
int getHeight () const
 Returns bitmap height in pixels. More...
 
 CustomBitmapScanner (const AbstractBitmap &bitmap, int x=0, int y=0)
 

Public Attributes

const float MAX_VALUE = 1.0f
 
- Public Attributes inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
const int NUMBER_OF_CHANNELS
 

Additional Inherited Members

- Protected Member Functions inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
pixfloatjump (int x, int y) const
 Retrieves pixel address at a given position;. More...
 
- Protected Attributes inherited from Beatmup::CustomBitmapScanner< pixfloat, 3 >
pixfloatdata
 bitmap data More...
 
pixfloatptr
 pointer to the current pixel More...
 
int width
 
int height
 bitmap sizes in pixels More...
 

Detailed Description

Triple float bitmap reader.

Definition at line 269 of file bitmap_access.h.

Member Typedef Documentation

◆ pixtype

Constructor & Destructor Documentation

◆ TripleFloatBitmapReader()

Beatmup::TripleFloatBitmapReader::TripleFloatBitmapReader ( const AbstractBitmap bitmap,
int  x = 0,
int  y = 0 
)
inline

Definition at line 293 of file bitmap_access.h.

CustomBitmapScanner(const AbstractBitmap &bitmap, int x=0, int y=0)
jobject jlong jint jint y
jobject jlong jint x
Beatmup::InternalBitmap * bitmap

Member Function Documentation

◆ operator()() [1/2]

pixfloat3 Beatmup::TripleFloatBitmapReader::operator() ( ) const
inline

Definition at line 275 of file bitmap_access.h.

275  {
276  return pixfloat3{ ptr[CHANNELS_3.R], ptr[CHANNELS_3.G], ptr[CHANNELS_3.B] };
277  }
pixfloat * ptr
pointer to the current pixel
Definition: bitmap_access.h:69
static const struct Beatmup::@2 CHANNELS_3

◆ operator()() [2/2]

pixfloat3 Beatmup::TripleFloatBitmapReader::operator() ( int  x,
int  y 
) const
inline

Definition at line 279 of file bitmap_access.h.

279  {
280  int i = 3 * (y * width + x);
281  return pixfloat3{ data[i + CHANNELS_3.R], data[i + CHANNELS_3.G], data[i + CHANNELS_3.B] };
282  }

◆ operator[]()

const pixfloat3 Beatmup::TripleFloatBitmapReader::operator[] ( int  i) const
inline

Retrieves a value at position shifted by i pixels in scanline order with respect to the current position.

Definition at line 287 of file bitmap_access.h.

287  {
288  const pixfloat* p = ptr + 3 * i;
289  return pixfloat3{ p[CHANNELS_3.R], p[CHANNELS_3.G], p[CHANNELS_3.B] };
290  }
float pixfloat
Definition: basic_types.h:35
Beatmup::IntPoint p((int) x,(int) y)

Member Data Documentation

◆ MAX_VALUE

const float Beatmup::TripleFloatBitmapReader::MAX_VALUE = 1.0f

Definition at line 273 of file bitmap_access.h.


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