torque Torque Game Engine Documentation
TGE Version 1.5.2

BitMatrix Class Reference

#include <bitMatrix.h>


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.


Public Member Functions

 BitMatrix (const U32 width, const U32 height)
 Create a new bit matrix.
 ~BitMatrix ()
Setters
void clearAllBits ()
 Set all the bits in the matrix to false.
void setAllBits ()
 Set all the bits in the matrix to true.
void setBit (const U32 x, const U32 y)
 Set a bit at a given location in the matrix.
void clearBit (const U32 x, const U32 y)
 Clear a bit at a given location in the matrix.
Queries
bool isSet (const U32 x, const U32 y) const
 Is the specified bit set?
bool isAnySetCol (const U32 x)
 Is any bit in the given column set?
bool isAnySetRow (const U32 y)
 Is any bit in the given row set?

Private Attributes

U32 mWidth
U32 mHeight
U32 mRowByteWidth
U8mBits
U32 mSize
BitVector mColFlags
BitVector mRowFlags


Constructor & Destructor Documentation

BitMatrix::BitMatrix ( const U32  width,
const U32  height 
) [inline]

Create a new bit matrix.

Parameters:
width Width of matrix in bits.
height Height of matrix in bits.

BitMatrix::~BitMatrix (  )  [inline]


Member Function Documentation

void BitMatrix::clearAllBits (  )  [inline]

Set all the bits in the matrix to false.

void BitMatrix::setAllBits (  )  [inline]

Set all the bits in the matrix to true.

void BitMatrix::setBit ( const U32  x,
const U32  y 
) [inline]

Set a bit at a given location in the matrix.

void BitMatrix::clearBit ( const U32  x,
const U32  y 
) [inline]

Clear a bit at a given location in the matrix.

bool BitMatrix::isSet ( const U32  x,
const U32  y 
) const [inline]

Is the specified bit set?

bool BitMatrix::isAnySetCol ( const U32  x  )  [inline]

Is any bit in the given column set?

bool BitMatrix::isAnySetRow ( const U32  y  )  [inline]

Is any bit in the given row set?


Field Documentation

U8* BitMatrix::mBits [private]

U32 BitMatrix::mSize [private]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen