Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.LayerMask Class Reference

Layer mask. More...

Inheritance diagram for Dragengine.Scenery.LayerMask:

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

Detailed Description

Layer mask.

Bit mask holding up to 64 bits.

This is a native class.

Member Function Documentation

◆ clearBit()

void Dragengine.Scenery.LayerMask.clearBit ( int  bit)

Clear bit.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

◆ clearMask()

void Dragengine.Scenery.LayerMask.clearMask ( )

Clear the mask.

◆ equals()

bool Dragengine.Scenery.LayerMask.equals ( Object  other)

Collision filter is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type LayerMask and both have the same bits set in the filter and category.

◆ hashCode()

int Dragengine.Scenery.LayerMask.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ isBitCleared()

bool Dragengine.Scenery.LayerMask.isBitCleared ( int  bit)

Bit is cleared.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

◆ isBitSet()

bool Dragengine.Scenery.LayerMask.isBitSet ( int  bit)

Bit is set.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

◆ isEmpty()

bool Dragengine.Scenery.LayerMask.isEmpty ( )

All bits are cleared.

◆ matches()

bool Dragengine.Scenery.LayerMask.matches ( LayerMask  layerMask)

Layer masks share at least one bit.

◆ matchesNot()

bool Dragengine.Scenery.LayerMask.matchesNot ( LayerMask  layerMask)

Layer masks share no bits.

◆ new() [1/2]

LayerMask Dragengine.Scenery.LayerMask.new ( )

Create layer mask.

◆ new() [2/2]

LayerMask Dragengine.Scenery.LayerMask.new ( LayerMask  copy)

Create copy of layer mask.

◆ newAll()

static LayerMask Dragengine.Scenery.LayerMask.newAll ( )
static

Create layer mask with all bits set.

◆ newWith() [1/4]

static LayerMask Dragengine.Scenery.LayerMask.newWith ( int  bit)
static

Create layer mask with 1 bit set.

◆ newWith() [2/4]

static LayerMask Dragengine.Scenery.LayerMask.newWith ( int  bit1,
int  bit2 
)
static

Create layer mask with 2 bits set.

◆ newWith() [3/4]

static LayerMask Dragengine.Scenery.LayerMask.newWith ( int  bit1,
int  bit2,
int  bit3 
)
static

Create layer mask with 3 bits set.

◆ newWith() [4/4]

static LayerMask Dragengine.Scenery.LayerMask.newWith ( int  bit1,
int  bit2,
int  bit3,
int  bit4 
)
static

Create layer mask with 4 bits set.

◆ operator&()

LayerMask Dragengine.Scenery.LayerMask.operator& ( LayerMask  layerMask)

Layer mask with all bits shared by both layer masks.

◆ operator&=()

LayerMask Dragengine.Scenery.LayerMask.operator&= ( LayerMask  layerMask)

Clear all bits which are not set in layerMask.

◆ operator^()

LayerMask Dragengine.Scenery.LayerMask.operator^ ( LayerMask  layerMask)

Layer mask with all bits set which are not set or cleared at the same time in both layer masks.

◆ operator^=()

LayerMask Dragengine.Scenery.LayerMask.operator^= ( LayerMask  layerMask)

Set all bits that are different in layerMask and clear all which are identical.

◆ operator|()

LayerMask Dragengine.Scenery.LayerMask.operator| ( LayerMask  layerMask)

Layer mask with all bits set which are set in at least one layer mask.

◆ operator|=()

LayerMask Dragengine.Scenery.LayerMask.operator|= ( LayerMask  layerMask)

Set all bits which are set in layerMask.

◆ operator~()

LayerMask Dragengine.Scenery.LayerMask.operator~ ( )

Inverse of layer mask with bits set where not set and vice versa.

◆ setBit()

void Dragengine.Scenery.LayerMask.setBit ( int  bit)

Set bit.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

◆ setFromBitString()

void Dragengine.Scenery.LayerMask.setFromBitString ( String  string)

Set bits from bit string.

◆ setFromHexString()

void Dragengine.Scenery.LayerMask.setFromHexString ( String  string)

Set bits from hex string.

◆ toBitString()

String Dragengine.Scenery.LayerMask.toBitString ( )

Bit string representation.

◆ toHexString()

String Dragengine.Scenery.LayerMask.toHexString ( )

Hex string representation.

◆ toString()

String Dragengine.Scenery.LayerMask.toString ( )

Convert to string representation.


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