cosmetix
[k8-jellyphysics.git] / src / jelly / Bitmask.h
bloba3ed656aa8dfd8123582f4f2e5805b90dfaa138c
1 #ifndef _BITMASK_H
2 #define _BITMASK_H
5 namespace JellyPhysics {
7 struct Bitmask {
8 int mask;
10 void clear () { mask = 0x00; }
11 void setOn (int bit) { mask |= (0x01<<bit); }
12 void setOff (int bit) { mask &= ~(0x01<<bit); }
13 bool getBit (int bit) const { return ((mask&(0x01<<bit)) != 0); }
19 #endif