RigsofRods
Soft-body Physics Simulation
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
r
s
t
u
v
w
Functions
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
i
k
l
m
n
p
r
s
t
u
v
w
Typedefs
a
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
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
y
~
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
Enumerations
a
b
c
d
g
h
l
m
n
o
p
r
s
t
v
Enumerator
a
b
c
d
f
g
h
l
m
n
o
r
s
t
v
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
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
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
k
o
Macros
_
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
x
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
source
main
utils
BitFlags.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
7
typedef
uint32_t
BitMask_t
;
8
typedef
uint64_t
BitMask64_t
;
9
10
#define BITMASK( OFFSET ) ( 1 << ((OFFSET) - 1) )
11
#define BITMASK64( OFFSET ) ( BitMask64_t(1) << BitMask64_t((OFFSET) - 1) )
12
13
#define BITMASK_IS_0( VAR, FLAGS ) ( ((VAR) & (FLAGS)) == 0 )
14
#define BITMASK_IS_1( VAR, FLAGS ) ( ((VAR) & (FLAGS)) == (FLAGS) )
15
16
#define BITMASK_SET_0( VAR, FLAGS ) ( (VAR) &= ~ (FLAGS) )
17
#define BITMASK_SET_1( VAR, FLAGS ) ( (VAR) |= (FLAGS) )
18
19
inline
void
BITMASK_SET
(
BitMask_t
& mask,
BitMask_t
flag,
bool
val)
20
{
21
if
(val) {
BITMASK_SET_1
(mask, flag); }
22
else
{
BITMASK_SET_0
(mask, flag); }
23
}
24
25
// --------------- TO BE REMOVED --------------- //
26
28
#define BITMASK_PROPERTY_GET(VAR, BIT_INDEX, FLAG_NAME, GETTER_NAME) \
29
static const BitMask_t FLAG_NAME = BITMASK((BIT_INDEX)); \
30
inline bool GETTER_NAME() const { return BITMASK_IS_1((VAR), FLAG_NAME); }
31
BITMASK_SET
void BITMASK_SET(BitMask_t &mask, BitMask_t flag, bool val)
Definition:
BitFlags.h:19
BITMASK_SET_0
#define BITMASK_SET_0(VAR, FLAGS)
Definition:
BitFlags.h:16
BITMASK_SET_1
#define BITMASK_SET_1(VAR, FLAGS)
Definition:
BitFlags.h:17
BitMask_t
uint32_t BitMask_t
Definition:
BitFlags.h:7
BitMask64_t
uint64_t BitMask64_t
Definition:
BitFlags.h:8
Generated by
1.8.17