23 mask._mask = 0xffffffff;
34 mask._mask = 0x0000000;
44 nassertv_always(idx >= 0 && idx <= 31);
45 _mask = _mask | (1 << idx);
54 nassertv_always(idx >= 0 && idx <= 31);
55 _mask = _mask & ~(1 << idx);
65 nassertr_always(idx >= 0 && idx <= 31,
false);
66 return (_mask & (1 << idx)) ? true :
false;
77 for (
int i=0; i<32; i++) {
78 name += (_mask & (1 << i)) ?
'1' :
'0';
81 out <<
"/" << name <<
"/";
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output(std::ostream &out) const
Writes the PhysxMask out as a list of ones and zeros.
void set_bit(unsigned int idx)
Sets the nth bit on.
static PhysxMask all_on()
Returns a PhysxMask whose bits are all on.
bool get_bit(unsigned int idx) const
Returns true if the nth bit is set, false if it is cleared.
static PhysxMask all_off()
Returns a PhysxMask whose bits are all off.
void clear_bit(unsigned int idx)
Sets the nth bit off.