1 #ifndef LVR2_ASCII_RENDERER_BITFIELD_HPP 2 #define LVR2_ASCII_RENDERER_BITFIELD_HPP 8 template<
unsigned int W,
unsigned int H>
15 void set(
const unsigned int& i,
const unsigned int& j)
17 data |= 1UL << (i * H + j);
20 bool get(
const unsigned int& i,
const unsigned int& j)
const 22 return (data >> (i * H + j)) & 1U;
25 void toggle(
const unsigned int& i,
const unsigned int& j)
27 data ^= 1UL << (i * H + j);
30 void clear(
const unsigned int& i,
const unsigned int& j)
32 data &= ~(1UL << (i * H + j) );
40 #endif // LVR2_ASCII_RENDERER_BITFIELD_HPP
void toggle(const unsigned int &i, const unsigned int &j)
void clear(const unsigned int &i, const unsigned int &j)