root/OpenSceneGraph/trunk/src/osgPlugins/bsp/BITSET.h @ 13041

Revision 13041, 0.9 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1//////////////////////////////////////////////////////////////////////////////////////////
2//  BITSET.h
3//  class declaration for set of bits to represent many true/falses
4//  You may use this code however you wish, but if you do, please credit me and
5//  provide a link to my website in a readme file or similar
6//  Downloaded from: www.paulsprojects.net
7//  Created:  8th August 2002
8//////////////////////////////////////////////////////////////////////////////////////////
9
10#ifndef BITSET_H
11#define BITSET_H
12
13#include <vector>
14
15
16class BITSET
17{
18public:
19  BITSET() : m_numBytes(0)
20  {}
21  ~BITSET()
22  {
23  }
24
25  bool Init(int numberOfBits);
26  void ClearAll();
27  void SetAll();
28
29  void Clear(int bitNumber);
30  void Set(int bitNumber);
31
32  unsigned char IsSet(int bitNumber) const;
33
34protected:
35  int m_numBytes; //size of bits array
36  unsigned char * m_bits_aux;
37  std::vector<unsigned char> m_bits;
38};
39
40#endif
Note: See TracBrowser for help on using the browser.