Layer Mask. More...
#include <decLayerMask.h>
Public Member Functions | |
Constructors and Destructors | |
| decLayerMask () | |
| Creates a new layer mask. | |
| decLayerMask (const decLayerMask &layerMask) | |
| Creates a new layer mask as a copy of another layer mask. | |
| ~decLayerMask () | |
| Cleans up layer mask. | |
Management | |
| void | ClearMask () |
| Clears the mask. | |
| void | SetBit (int bit) |
| Sets a bit. | |
| void | ClearBit (int bit) |
| Clears a bit. | |
| bool | IsBitSet (int bit) const |
| Determines if a bit is set. | |
| bool | Matches (const decLayerMask &layerMask) const |
| Determines if this mask shares at least one bit with another mask. | |
Operators | |
| decLayerMask & | operator= (const decLayerMask &layerMask) |
| Sets this layer mask to another one. | |
| bool | operator== (const decLayerMask &layerMask) const |
| Determines if the layer masks are equal. | |
| bool | operator!= (const decLayerMask &layerMask) const |
| Determines if the layer masks are not equal. | |
Layer Mask.
Provides a simple mask to organize objects into different layers. Objects can be located on multiple layers depending on the bits set. The number of layers is restricted to 64 which should be enough even for complex scenes.
| decLayerMask::decLayerMask | ( | ) |
Creates a new layer mask.
| decLayerMask::decLayerMask | ( | const decLayerMask & | layerMask ) |
Creates a new layer mask as a copy of another layer mask.
| layerMask | Layer mask to copy from. |
| decLayerMask::~decLayerMask | ( | ) |
Cleans up layer mask.
| void decLayerMask::ClearBit | ( | int | bit ) |
Clears a bit.
| bit | Number if bit to clear. |
| void decLayerMask::ClearMask | ( | ) |
Clears the mask.
| bool decLayerMask::IsBitSet | ( | int | bit ) | const |
Determines if a bit is set.
| bit | Bit to test. |
| bool decLayerMask::Matches | ( | const decLayerMask & | layerMask ) | const |
Determines if this mask shares at least one bit with another mask.
| bool decLayerMask::operator!= | ( | const decLayerMask & | layerMask ) | const |
Determines if the layer masks are not equal.
| decLayerMask& decLayerMask::operator= | ( | const decLayerMask & | layerMask ) |
Sets this layer mask to another one.
| bool decLayerMask::operator== | ( | const decLayerMask & | layerMask ) | const |
Determines if the layer masks are equal.
| void decLayerMask::SetBit | ( | int | bit ) |
Sets a bit.
| bit | Number of bit to set. |
1.7.2