Quantum 3
3.0.9
The input mask is a utility struct to keep track of which players are included in a set of inputs. Max player count supported is 128. Internally the mask is split into two ulongs. More...
Public Member Functions | |
| InputSetMask () | |
| Create an empty mask. More... | |
| InputSetMask (int index) | |
| Constructor using a single player index. More... | |
| void | Add (int index) |
| Add a player index to the mask. More... | |
| readonly InputSetMask | Combine (InputSetMask other) |
| Combine two masks. An enabled player flag takes precedence. More... | |
| readonly bool | Contains (int index) |
| Check if a player is included in the mask. More... | |
| readonly override bool | Equals (Object other) |
| Equals method. More... | |
| readonly override int | GetHashCode () |
| Returns a unique hashcode for the mask. More... | |
| readonly InputSetMask | Intersects (InputSetMask other) |
| Intersect two masks and return a new mask with the players that are included in both masks. More... | |
| readonly InputSetMask | Inverse () |
| Inverse a mask. More... | |
| void | Remove (int index) |
| Remove a player index from the mask. More... | |
| void | Serialize (BitStream stream, int playerLength) |
| Serialize the mask to a bitstream. More... | |
Static Public Member Functions | |
| static InputSetMask | AllPlayersMask () |
| Create a mask that includes all players. More... | |
| static bool | operator!= (InputSetMask mask1, InputSetMask mask2) |
| Un-equals operator. More... | |
| static bool | operator== (InputSetMask mask1, InputSetMask mask2) |
| Equals operator. More... | |
The input mask is a utility struct to keep track of which players are included in a set of inputs. Max player count supported is 128. Internally the mask is split into two ulongs.
|
inline |
Constructor using a single player index.
| index | Player index |
|
inline |
Create an empty mask.
|
inlinestatic |
Create a mask that includes all players.
|
inline |
Check if a player is included in the mask.
| index | Player index |
true if the player is included
|
inline |
Combine two masks. An enabled player flag takes precedence.
| other | Other mask |
|
inline |
Intersect two masks and return a new mask with the players that are included in both masks.
| other | Other mask |
|
inline |
Inverse a mask.
|
inline |
Add a player index to the mask.
| index | Player index |
|
inline |
Remove a player index from the mask.
| index | Player index |
|
inline |
Serialize the mask to a bitstream.
| stream | Stream to write or read from |
| playerLength | The player length to optimize the amount of memory used. |
|
inlinestatic |
Equals operator.
| mask1 | Mask 1 |
| mask2 | Mask 2 |
true if both mask are equal
|
inlinestatic |
Un-equals operator.
| mask1 | Mask 1 |
| mask2 | Mask 2 |
true if the masks are different
|
inline |
Equals method.
| other | Other mask |
true if both masks are equal
|
inline |
Returns a unique hashcode for the mask.