Drag[en]gine Script Module DragonScript Script API  1.0
LayerMask Class Reference

Layer mask. More...

Inheritance diagram for 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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ clearBit()

void clearBit ( int  bit)

Clear bit.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

§ clearMask()

void clearMask ( )

Clear the mask.

§ equals()

bool 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 hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ isBitCleared()

bool isBitCleared ( int  bit)

Bit is cleared.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

§ isBitSet()

bool isBitSet ( int  bit)

Bit is set.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

§ isEmpty()

bool isEmpty ( )

All bits are cleared.

§ matches()

bool matches ( LayerMask  layerMask)

Layer masks share at least one bit.

§ matchesNot()

bool matchesNot ( LayerMask  layerMask)

Layer masks share no bits.

§ new() [1/2]

LayerMask new ( )

Create layer mask.

§ new() [2/2]

LayerMask new ( LayerMask  copy)

Create copy of layer mask.

§ newAll()

static LayerMask newAll ( )
static

Create layer mask with all bits set.

§ newWith() [1/4]

static LayerMask newWith ( int  bit)
static

Create layer mask with 1 bit set.

§ newWith() [2/4]

static LayerMask newWith ( int  bit1,
int  bit2 
)
static

Create layer mask with 2 bits set.

§ newWith() [3/4]

static LayerMask newWith ( int  bit1,
int  bit2,
int  bit3 
)
static

Create layer mask with 3 bits set.

§ newWith() [4/4]

static LayerMask newWith ( int  bit1,
int  bit2,
int  bit3,
int  bit4 
)
static

Create layer mask with 4 bits set.

§ operator &()

LayerMask operator& ( LayerMask  layerMask)

Layer mask with all bits shared by both layer masks.

§ operator &=()

LayerMask operator&= ( LayerMask  layerMask)

Clear all bits which are not set in layerMask.

§ operator^()

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 operator^= ( LayerMask  layerMask)

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

§ operator|()

LayerMask operator| ( LayerMask  layerMask)

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

§ operator|=()

LayerMask operator|= ( LayerMask  layerMask)

Set all bits which are set in layerMask.

§ operator~()

LayerMask operator~ ( )

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

§ setBit()

void setBit ( int  bit)

Set bit.

Exceptions
EOutOfBoundarybit is less than 0 or larger than 63.

§ setFromBitString()

void setFromBitString ( String  string)

Set bits from bit string.

§ setFromHexString()

void setFromHexString ( String  string)

Set bits from hex string.

§ toBitString()

String toBitString ( )

Bit string representation.

§ toHexString()

String toHexString ( )

Hex string representation.

§ toString()

String toString ( )

Convert to string representation.


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