BitMatrix

Engine/source/core/bitMatrix.h

A matrix of bits.

More...

Setters

Set all the bits in the matrix to false.

Set all the bits in the matrix to true.

Set a bit at a given location in the matrix.

Clear a bit at a given location in the matrix.

Queries

bool

Is the specified bit set?

bool

Is any bit in the given column set?

bool

Is any bit in the given row set?

Public Functions

BitMatrix(const U32 width, const U32 height)

Create a new bit matrix.

Detailed Description

A matrix of bits.

This class manages an array of bits. There are no limitations on the size of the bit matrix (beyond available memory).

note:

This class is currently unused.

Setters

clearAllBits()

Set all the bits in the matrix to false.

setAllBits()

Set all the bits in the matrix to true.

setBit(const U32 x, const U32 y)

Set a bit at a given location in the matrix.

clearBit(const U32 x, const U32 y)

Clear a bit at a given location in the matrix.

Queries

isSet(const U32 x, const U32 y)

Is the specified bit set?

isAnySetCol(const U32 x)

Is any bit in the given column set?

isAnySetRow(const U32 y)

Is any bit in the given row set?

Private Attributes

U8 * mBits 
BitVector mColFlags 
U32 mHeight 
U32 mRowByteWidth 
BitVector mRowFlags 
U32 mSize 
U32 mWidth 

Public Functions

BitMatrix(const U32 width, const U32 height)

Create a new bit matrix.

Parameters:

width

Width of matrix in bits.

height

Height of matrix in bits.

~BitMatrix()