25 mask._mask.bits0 = 0xffffffff;
26 mask._mask.bits1 = 0xffffffff;
27 mask._mask.bits2 = 0xffffffff;
28 mask._mask.bits3 = 0xffffffff;
40 mask._mask.bits0 = 0x0000000;
41 mask._mask.bits1 = 0x0000000;
42 mask._mask.bits2 = 0x0000000;
43 mask._mask.bits3 = 0x0000000;
54 nassertv_always(idx >= 0 && idx <= 127);
56 NxU32 bits = 1 << (idx % 32);
78 nassertv_always(idx >= 0 && idx <= 127);
80 NxU32 bits = 1 << (idx % 32);
83 _mask.bits0 = _mask.bits0 & ~bits;
86 _mask.bits1 = _mask.bits1 & ~bits;
89 _mask.bits2 = _mask.bits2 & ~bits;
92 _mask.bits3 = _mask.bits3 & ~bits;
103 nassertr_always(idx >= 0 && idx <= 127,
false);
105 NxU32 bits = 1 << (idx % 32);
108 return (_mask.bits0 & bits) ? true :
false;
111 return (_mask.bits1 & bits) ? true :
false;
114 return (_mask.bits2 & bits) ? true :
false;
117 return (_mask.bits3 & bits) ? true :
false;
132 for (
int i=0; i<32; i++) {
133 name0 += (_mask.bits0 & (1 << i)) ?
'1' :
'0';
134 name1 += (_mask.bits1 & (1 << i)) ?
'1' :
'0';
135 name2 += (_mask.bits2 & (1 << i)) ?
'1' :
'0';
136 name3 += (_mask.bits3 & (1 << i)) ?
'1' :
'0';
139 out <<
"/" << name0 <<
"-" << name1 <<
"-" << name2 <<
"-" << name3 <<
"/";
static PhysxGroupsMask all_on()
Returns a PhysxGroupsMask whose bits are all on.
void clear_bit(unsigned int idx)
Sets the nth bit off.
void set_bit(unsigned int idx)
Sets the nth bit on.
static PhysxGroupsMask all_off()
Returns a PhysxGroupsMask whose bits are all off.
void output(std::ostream &out) const
Writes the PhysxGroupsMask out as a list of ones and zeros.
bool get_bit(unsigned int idx) const
Returns true if the nth bit is set, false if it is cleared.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.