Drag[en]gine Script Module DragonScript
1.23
|
Layer mask. More...
Public Member Functions | |
Management | |
void | clearMask () |
Clear the mask. More... | |
void | setBit (int bit) |
Set bit. More... | |
void | clearBit (int bit) |
Clear bit. More... | |
bool | isEmpty () |
All bits are cleared. More... | |
bool | isBitSet (int bit) |
Bit is set. More... | |
bool | isBitCleared (int bit) |
Bit is cleared. More... | |
bool | matches (LayerMask layerMask) |
Layer masks share at least one bit. More... | |
bool | matchesNot (LayerMask layerMask) |
Layer masks share no bits. More... | |
String | toBitString () |
Bit string representation. More... | |
void | setFromBitString (String string) |
Set bits from bit string. More... | |
String | toHexString () |
Hex string representation. More... | |
void | setFromHexString (String string) |
Set bits from hex string. More... | |
String | toString () |
Convert to string representation. More... | |
bool | equals (Object other) |
Collision filter is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
Operators | |
LayerMask | operator~ () |
Inverse of layer mask with bits set where not set and vice versa. More... | |
LayerMask | operator& (LayerMask layerMask) |
Layer mask with all bits shared by both layer masks. More... | |
LayerMask | operator| (LayerMask layerMask) |
Layer mask with all bits set which are set in at least one layer mask. More... | |
LayerMask | operator^ (LayerMask layerMask) |
Layer mask with all bits set which are not set or cleared at the same time in both layer masks. More... | |
LayerMask | operator&= (LayerMask layerMask) |
Clear all bits which are not set in layerMask. More... | |
LayerMask | operator|= (LayerMask layerMask) |
Set all bits which are set in layerMask. More... | |
LayerMask | operator^= (LayerMask layerMask) |
Set all bits that are different in layerMask and clear all which are identical. More... | |
Constructors | |
LayerMask | new () |
Create layer mask. More... | |
LayerMask | new (LayerMask copy) |
Create copy of layer mask. More... | |
static LayerMask | newWith (int bit) |
Create layer mask with 1 bit set. More... | |
static LayerMask | newWith (int bit1, int bit2) |
Create layer mask with 2 bits set. More... | |
static LayerMask | newWith (int bit1, int bit2, int bit3) |
Create layer mask with 3 bits set. More... | |
static LayerMask | newWith (int bit1, int bit2, int bit3, int bit4) |
Create layer mask with 4 bits set. More... | |
static LayerMask | newAll () |
Create layer mask with all bits set. More... | |
Layer mask.
Bit mask holding up to 64 bits.
This is a native class.
void Dragengine.Scenery.LayerMask.clearBit | ( | int | bit | ) |
Clear bit.
EOutOfBoundary | bit is less than 0 or larger than 63. |
void Dragengine.Scenery.LayerMask.clearMask | ( | ) |
Clear the mask.
bool Dragengine.Scenery.LayerMask.equals | ( | Object | other | ) |
Collision filter is equal to another object.
Implements Object.equals(Object).
int Dragengine.Scenery.LayerMask.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
bool Dragengine.Scenery.LayerMask.isBitCleared | ( | int | bit | ) |
Bit is cleared.
EOutOfBoundary | bit is less than 0 or larger than 63. |
bool Dragengine.Scenery.LayerMask.isBitSet | ( | int | bit | ) |
Bit is set.
EOutOfBoundary | bit is less than 0 or larger than 63. |
bool Dragengine.Scenery.LayerMask.isEmpty | ( | ) |
All bits are cleared.
bool Dragengine.Scenery.LayerMask.matches | ( | LayerMask | layerMask | ) |
Layer masks share at least one bit.
bool Dragengine.Scenery.LayerMask.matchesNot | ( | LayerMask | layerMask | ) |
Layer masks share no bits.
LayerMask Dragengine.Scenery.LayerMask.new | ( | ) |
Create layer mask.
|
static |
Create layer mask with all bits set.
|
static |
Create layer mask with 1 bit set.
|
static |
Create layer mask with 2 bits set.
|
static |
Create layer mask with 3 bits set.
|
static |
Create layer mask with 4 bits set.
Layer mask with all bits shared by both layer masks.
Clear all bits which are not set in layerMask.
Layer mask with all bits set which are not set or cleared at the same time in both layer masks.
Set all bits that are different in layerMask and clear all which are identical.
Layer mask with all bits set which are set in at least one layer mask.
Set all bits which are set in layerMask.
LayerMask Dragengine.Scenery.LayerMask.operator~ | ( | ) |
Inverse of layer mask with bits set where not set and vice versa.
void Dragengine.Scenery.LayerMask.setBit | ( | int | bit | ) |
Set bit.
EOutOfBoundary | bit is less than 0 or larger than 63. |
void Dragengine.Scenery.LayerMask.setFromBitString | ( | String | string | ) |
Set bits from bit string.
void Dragengine.Scenery.LayerMask.setFromHexString | ( | String | string | ) |
Set bits from hex string.
String Dragengine.Scenery.LayerMask.toBitString | ( | ) |
Bit string representation.
String Dragengine.Scenery.LayerMask.toHexString | ( | ) |
Hex string representation.
String Dragengine.Scenery.LayerMask.toString | ( | ) |
Convert to string representation.