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