PxBitMapBase

Defined in include/foundation/PxBitMap.h

Inheritance Relationships

Base Type

template<class PxAllocator>
class PxBitMapBase : public PxUserAllocated

Hold a bitmap with operations to set,reset or test given bit.

We inhibit copy to prevent unintentional copies. If a copy is desired copy() should be used or alternatively a copy constructor implemented.

Public Functions

inline PxBitMapBase(const PxEMPTY)
inline PxBitMapBase(const PxAllocator &allocator)
inline PxBitMapBase()
inline ~PxBitMapBase()
inline void release()
inline PxAllocator &getAllocator()
inline void growAndSet(PxU32 index)
inline void growAndReset(PxU32 index)
inline PxIntBool boundedTest(PxU32 index) const
inline void boundedReset(PxU32 index)
inline void set(PxU32 index)
inline void reset(PxU32 index)
inline PxIntBool test(PxU32 index) const
inline PxU32 getNibbleFast(PxU32 nibIndex) const
inline void andNibbleFast(PxU32 nibIndex, PxU32 mask)
inline void orNibbleFast(PxU32 nibIndex, PxU32 mask)
inline void clear()
inline void resizeAndClear(PxU32 newBitCount)
inline void setEmpty()
inline void setWords(PxU32 *map, PxU32 wordCount)
inline void resize(PxU32 newBitCount, bool value = false)
inline PxU32 size() const
inline void copy(const PxBitMapBase &a)
inline PxU32 count() const
inline PxU32 count(PxU32 start, PxU32 length) const
inline PxU32 findLast() const

returns 0 if no bits set (!!!)

template<class Combiner, class _>
inline void combineInPlace(const PxBitMapBase<_> &b)
template<class Combiner, class _1, class _2>
inline void combine(const PxBitMapBase<_1> &a, const PxBitMapBase<_2> &b)
inline const PxU32 *getWords() const
inline PxU32 *getWords()
inline PxU32 getWordCount() const
inline PxU32 isInUserMemory() const
inline void *operator new(size_t, void *address)
template<typename Alloc>
inline void *operator new(size_t size, Alloc alloc, const char *fileName, int line)
template<typename Alloc>
inline void *operator new(size_t size, size_t, Alloc alloc, const char *fileName, int line)
inline void operator delete(void*, void*)
template<typename Alloc>
inline void operator delete(void *ptr, Alloc alloc, const char *fileName, int line)
inline void operator delete(void *ptr)
template<typename Alloc>
inline void *operator new[](size_t size, Alloc alloc, const char *fileName, int line)
template<typename Alloc>
inline void *operator new[](size_t size, size_t, Alloc alloc, const char *fileName, int line)
template<typename Alloc>
inline void operator delete[](void *ptr, Alloc alloc, const char *fileName, int line)
inline void operator delete[](void *ptr)

Protected Functions

inline void extend(PxU32 size)
inline void extendUninitialized(PxU32 size)
template<class Combiner>
inline void combine1(const PxU32 *words, PxU32 length)
template<class Combiner>
inline void combine2(const PxU32 *words1, PxU32 length1, const PxU32 *words2, PxU32 length2)

Protected Attributes

PxU32 *mMap
PxU32 mWordCount
PxAllocator mAllocator
PxU8 mPadding[3]

Friends

friend class Iterator
struct AND

Public Functions

inline PxU32 operator()(PxU32 a, PxU32 b)
class Iterator

Iterate over indices in a bitmap

This iterator is good because it finds the set bit without looping over the cached bits upto 31 times. However it does require a variable shift.

Public Functions

inline Iterator(const PxBitMapBase &map)
inline Iterator &operator=(const Iterator &other)
inline PxU32 getNext()
inline void reset()

Public Static Attributes

static const PxU32 DONE = 0xffffffff
struct OR

Public Functions

inline PxU32 operator()(PxU32 a, PxU32 b)
class PxCircularIterator

Public Functions

inline PxCircularIterator(const PxBitMapBase &map, PxU32 index)
inline PxU32 getNext()

Public Static Attributes

static const PxU32 DONE = 0xffffffff
class PxLoopIterator

Public Functions

inline PxLoopIterator(const PxBitMapBase &map)
inline bool hasBits()
inline PxU32 getNext()
struct XOR

Public Functions

inline PxU32 operator()(PxU32 a, PxU32 b)