Panda3D
 All Classes Functions Variables Enumerations
physxMask.h
1 // Filename: physxMask32.h
2 // Created by: enn0x (21Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXMASK_H
16 #define PHYSXMASK_H
17 
18 #include "pandabase.h"
19 
20 #include "physx_includes.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PhysxMask
24 // Description : 32-bit bitmask class.
25 ////////////////////////////////////////////////////////////////////
26 class EXPCL_PANDAPHYSX PhysxMask {
27 
28 PUBLISHED:
29  INLINE PhysxMask();
30  INLINE ~PhysxMask();
31 
32  void set_bit(unsigned int idx);
33  void clear_bit(unsigned int idx);
34  bool get_bit(unsigned int idx) const;
35 
36  void output(ostream &out) const;
37 
38  static PhysxMask all_on();
39  static PhysxMask all_off();
40 
41 public:
42  INLINE NxU32 get_mask() const;
43 
44 private:
45  NxU32 _mask;
46 };
47 
48 INLINE ostream &operator << (ostream &out, const PhysxMask &mask) {
49  mask.output(out);
50  return out;
51 }
52 
53 #include "physxMask.I"
54 
55 #endif // PHYSXMASK_H
void output(ostream &out) const
Writes the PhysxMask out as a list of ones and zeros.
Definition: physxMask.cxx:90
32-bit bitmask class.
Definition: physxMask.h:26