Lugre::cBitMask Class Reference

a 2d bitmask for pixel exact mousepicking, e.g. for gui stuff in iris2 More...

#include <lugre_bitmask.h>

Inheritance diagram for Lugre::cBitMask:

Inheritance graph
[legend]
Collaboration diagram for Lugre::cBitMask:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cBitMask ()
virtual ~cBitMask ()
void SetDataFromOgreImage (Ogre::Image &pImage, float fMinAlpha=0.5)
 bit is set if pixel_alpha >= fMinAlpha
void SetDataFrom16BitImage (const short *pImageData16Bit, const int w, const int h)
 transparent = false
void Reset ()
void BlankData (const int w, const int h)
 allocate and init to zero/false
bool GetWrap ()
void SetWrap (const bool bWrap)
bool TestBit (int x, int y)

Static Public Member Functions

static void LuaRegister (lua_State *L)
 lua binding

Public Attributes

char * mpData
int miW
int miH
bool mbWrap


Detailed Description

a 2d bitmask for pixel exact mousepicking, e.g. for gui stuff in iris2

Definition at line 35 of file lugre_bitmask.h.


Constructor & Destructor Documentation

Lugre::cBitMask::cBitMask (  ) 

Definition at line 8 of file lugre_bitmask.cpp.

Lugre::cBitMask::~cBitMask (  )  [virtual]

Definition at line 9 of file lugre_bitmask.cpp.

References Reset().


Member Function Documentation

void Lugre::cBitMask::SetDataFromOgreImage ( Ogre::Image &  pImage,
float  fMinAlpha = 0.5 
)

bit is set if pixel_alpha >= fMinAlpha

Definition at line 11 of file lugre_bitmask.cpp.

References BlankData(), and mpData.

void Lugre::cBitMask::SetDataFrom16BitImage ( const short *  pImageData16Bit,
const int  w,
const int  h 
)

transparent = false

Definition at line 21 of file lugre_bitmask.cpp.

References BlankData(), and mpData.

void Lugre::cBitMask::Reset (  ) 

Definition at line 38 of file lugre_bitmask.cpp.

References miH, miW, and mpData.

Referenced by BlankData(), and ~cBitMask().

void Lugre::cBitMask::BlankData ( const int  w,
const int  h 
)

allocate and init to zero/false

Definition at line 29 of file lugre_bitmask.cpp.

References miH, miW, mpData, and Reset().

Referenced by SetDataFrom16BitImage(), and SetDataFromOgreImage().

bool Lugre::cBitMask::GetWrap (  )  [inline]

Definition at line 46 of file lugre_bitmask.h.

References mbWrap.

void Lugre::cBitMask::SetWrap ( const bool  bWrap  )  [inline]

Definition at line 47 of file lugre_bitmask.h.

References mbWrap.

bool Lugre::cBitMask::TestBit ( int  x,
int  y 
) [inline]

Definition at line 48 of file lugre_bitmask.h.

References mbWrap, miH, miW, and mpData.

Referenced by Lugre::cWidget::IsUnderPos().

void Lugre::cBitMask::LuaRegister ( lua_State *  L  )  [static]

lua binding

Definition at line 67 of file lugre_bitmask_L.cpp.

References PROFILE.


Member Data Documentation

Definition at line 37 of file lugre_bitmask.h.

Referenced by BlankData(), Reset(), and TestBit().

Definition at line 38 of file lugre_bitmask.h.

Referenced by BlankData(), Reset(), and TestBit().

Definition at line 39 of file lugre_bitmask.h.

Referenced by GetWrap(), SetWrap(), and TestBit().


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

Generated on Wed Feb 8 06:00:20 2012 for cpp by  doxygen 1.5.6