Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
BitMatrix Class Reference

`#include <bitMatrix.h>`

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

## 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.

## Constructor & Destructor Documentation

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 | ( |  | ) |
| inline

## Member Function Documentation

void clearAllBits | ( |  | ) |
| inline

Set all the bits in the matrix to false.

void clearBit | ( | const U32 | x,
|  | const U32 | y
| ) |  |
| inline

Clear a bit at a given location in the matrix.

bool isAnySetCol | ( | const U32 | x | ) |
| inline

Is any bit in the given column set?

bool isAnySetRow | ( | const U32 | y | ) |
| inline

Is any bit in the given row set?

bool isSet | ( | const U32 | x,
|  | const U32 | y
| ) |  | const
| inline

Is the specified bit set?

void setAllBits | ( |  | ) |
| inline

Set all the bits in the matrix to true.

void setBit | ( | const U32 | x,
|  | const U32 | y
| ) |  |
| inline

Set a bit at a given location in the matrix.

The documentation for this class was generated from the following file:

- collection/bitMatrix.h