Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
h
i
m
n
o
p
r
s
t
v
w
x
y
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
p
q
r
s
t
u
v
Enumerations
Enumerator
b
g
h
j
l
o
p
r
s
w
x
y
Classes
Class List
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
w
z
Related Functions
:
a
b
c
d
e
f
h
k
l
n
o
p
s
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
a
b
c
d
f
i
m
n
o
p
s
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
s
t
u
v
Enumerations
Enumerator
a
d
f
i
k
l
o
p
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
h
i
k
l
m
n
p
r
s
t
u
v
w
Examples
src
tools
lvr2_ascii_viewer
include
ascii_viewer
BitField.hpp
Go to the documentation of this file.
1
#ifndef LVR2_ASCII_RENDERER_BITFIELD_HPP
2
#define LVR2_ASCII_RENDERER_BITFIELD_HPP
3
4
#include <iostream>
5
6
namespace
lvr2
{
7
8
template
<
unsigned
int
W,
unsigned
int
H>
9
struct
BitField
{
10
// storage
11
unsigned
char
data
= 0;
12
13
BitField
():
data
(0){}
14
15
void
set
(
const
unsigned
int
& i,
const
unsigned
int
& j)
16
{
17
data
|= 1UL << (i * H + j);
18
}
19
20
bool
get
(
const
unsigned
int
& i,
const
unsigned
int
& j)
const
21
{
22
return
(
data
>> (i * H + j)) & 1U;
23
}
24
25
void
toggle
(
const
unsigned
int
& i,
const
unsigned
int
& j)
26
{
27
data
^= 1UL << (i * H + j);
28
}
29
30
void
clear
(
const
unsigned
int
& i,
const
unsigned
int
& j)
31
{
32
data
&= ~(1UL << (i * H + j) );
33
}
34
35
36
};
37
38
}
// namespace lvr2
39
40
#endif // LVR2_ASCII_RENDERER_BITFIELD_HPP
lvr2::BitField::get
bool get(const unsigned int &i, const unsigned int &j) const
Definition:
BitField.hpp:20
lvr2::BitField::toggle
void toggle(const unsigned int &i, const unsigned int &j)
Definition:
BitField.hpp:25
lvr2::BitField::data
unsigned char data
Definition:
BitField.hpp:11
lvr2::BitField::BitField
BitField()
Definition:
BitField.hpp:13
lvr2
Definition:
BaseBufferManipulators.hpp:39
lvr2::BitField
Definition:
BitField.hpp:9
lvr2::BitField::clear
void clear(const unsigned int &i, const unsigned int &j)
Definition:
BitField.hpp:30
lvr2::BitField::set
void set(const unsigned int &i, const unsigned int &j)
Definition:
BitField.hpp:15
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz
, Alexander Mock
, Lars Kiesow
, Lukas Kalbertodt
, Tristan Igelbrink
, Johan M. von Behren
, Dominik Feldschnieders
, Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:22