Photon Fusion 2.0.4

Public Member Functions | Static Public Member Functions | Properties | List of all members
Mask256 Struct Reference

Mask256 is a 256-bit mask that can be used to store 256 boolean values. More...

Inherits IEquatable< Mask256 >.

Public Member Functions

void Clear ()
 Sets all bits to 0. More...
 
bool Equals (Mask256 other)
 Returns true if the masks are equal. More...
 
override bool Equals (object obj)
 Returns true if the masks are equal. More...
 
bool GetBit (int bitIndex)
 Returns a specific bit from the mask. More...
 
override int GetHashCode ()
 Calculates the hash code of the mask. More...
 
bool IsNothing ()
 Returns true if the mask is empty. More...
 
 Mask256 (long a, long b=0, long c=0, long d=0)
 Creates a new mask with specified initial values. More...
 
void SetBit (int bitIndex, bool set)
 Sets a specific bit in the mask. More...
 
override string ToString ()
 Converts the mask to a string in the form of "a:b:c:d". More...
 

Static Public Member Functions

static implicit operator long (Mask256 mask)
 Equivalent to More...
 
static implicit operator Mask256 (long value)
 Converts a long value to a mask. More...
 
static Mask256 operator& (Mask256 a, Mask256 b)
 Performs a logical-AND operation. More...
 
static Mask256 operator| (Mask256 a, Mask256 b)
 Performs a logical-OR operation. More...
 
static Mask256 operator~ (Mask256 a)
 Performs a logical-NOT operation. More...
 

Properties

long this[int i] [get, set]
 Returns selected 64-bit value from the mask. More...
 

Detailed Description

Mask256 is a 256-bit mask that can be used to store 256 boolean values.

Constructor & Destructor Documentation

◆ Mask256()

Mask256 ( long  a,
long  b = 0,
long  c = 0,
long  d = 0 
)

Creates a new mask with specified initial values.

Member Function Documentation

◆ Clear()

void Clear ( )

Sets all bits to 0.

◆ Equals() [1/2]

bool Equals ( Mask256  other)

Returns true if the masks are equal.

◆ Equals() [2/2]

override bool Equals ( object  obj)

Returns true if the masks are equal.

◆ GetBit()

bool GetBit ( int  bitIndex)

Returns a specific bit from the mask.

◆ GetHashCode()

override int GetHashCode ( )

Calculates the hash code of the mask.

◆ IsNothing()

bool IsNothing ( )

Returns true if the mask is empty.

Returns

◆ operator long()

static implicit operator long ( Mask256  mask)
static

Equivalent to

mask[0]

◆ operator Mask256()

static implicit operator Mask256 ( long  value)
static

Converts a long value to a mask.

◆ operator&()

static Mask256 operator& ( Mask256  a,
Mask256  b 
)
static

Performs a logical-AND operation.

◆ operator|()

static Mask256 operator| ( Mask256  a,
Mask256  b 
)
static

Performs a logical-OR operation.

◆ operator~()

static Mask256 operator~ ( Mask256  a)
static

Performs a logical-NOT operation.

◆ SetBit()

void SetBit ( int  bitIndex,
bool  set 
)

Sets a specific bit in the mask.

◆ ToString()

override string ToString ( )

Converts the mask to a string in the form of "a:b:c:d".

Property Documentation

◆ this[int i]

long this[int i]
getset

Returns selected 64-bit value from the mask.

Parameters
i