Panda3D
|
00001 // Filename: physxGroupsMask.h 00002 // Created by: enn0x (21Oct09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXGROUPSMASK_H 00016 #define PHYSXGROUPSMASK_H 00017 00018 #include "pandabase.h" 00019 00020 #include "physx_includes.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : PhysxGroupsMask 00024 // Description : 128-bit bitmask class. 00025 //////////////////////////////////////////////////////////////////// 00026 class EXPCL_PANDAPHYSX PhysxGroupsMask { 00027 00028 PUBLISHED: 00029 INLINE PhysxGroupsMask(); 00030 INLINE PhysxGroupsMask(NxGroupsMask mask); 00031 INLINE ~PhysxGroupsMask(); 00032 00033 void set_bit(unsigned int idx); 00034 void clear_bit(unsigned int idx); 00035 bool get_bit(unsigned int idx) const; 00036 00037 void output(ostream &out) const; 00038 00039 static PhysxGroupsMask all_on(); 00040 static PhysxGroupsMask all_off(); 00041 00042 INLINE unsigned int get_bits0() const; 00043 INLINE unsigned int get_bits1() const; 00044 INLINE unsigned int get_bits2() const; 00045 INLINE unsigned int get_bits3() const; 00046 00047 INLINE void set_bits0( unsigned int bits ); 00048 INLINE void set_bits1( unsigned int bits ); 00049 INLINE void set_bits2( unsigned int bits ); 00050 INLINE void set_bits3( unsigned int bits ); 00051 00052 public: 00053 INLINE NxGroupsMask get_mask() const; 00054 INLINE void set_mask(NxGroupsMask mask); 00055 00056 NxGroupsMask _mask; 00057 }; 00058 00059 INLINE ostream &operator << (ostream &out, const PhysxGroupsMask &mask) { 00060 mask.output(out); 00061 return out; 00062 } 00063 00064 #include "physxGroupsMask.I" 00065 00066 #endif // PHYSXGROUPSMASK_H