decLayerMask Class Reference

Layer Mask. More...

#include <decLayerMask.h>

List of all members.

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
decLayerMaskoperator= (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.

Detailed Description

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.

Author:
Plüss Roland.
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

decLayerMask::decLayerMask (  )

Creates a new layer mask.

decLayerMask::decLayerMask ( const decLayerMask layerMask )

Creates a new layer mask as a copy of another layer mask.

Parameters:
layerMaskLayer mask to copy from.
decLayerMask::~decLayerMask (  )

Cleans up layer mask.


Member Function Documentation

void decLayerMask::ClearBit ( int  bit )

Clears a bit.

Parameters:
bitNumber if bit to clear.
void decLayerMask::ClearMask (  )

Clears the mask.

bool decLayerMask::IsBitSet ( int  bit ) const

Determines if a bit is set.

Parameters:
bitBit to test.
Returns:
True if the bit is set.
bool decLayerMask::Matches ( const decLayerMask layerMask ) const

Determines if this mask shares at least one bit with another mask.

Returns:
True if both masks have at least one bit in common.
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.

Parameters:
bitNumber of bit to set.

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