Struct LayersMask
The objects layers selection mask (from layers and tags settings). Uses 1 bit per layer (up to 32 layers).
Assembly: FlaxEngine.dll
File: Engine/Core/Types/LayersMask.h
Syntax
public struct LayersMask
Constructors
operator uint32()
Declaration
public operator uint32() const
Fields
Mask
The layers selection mask.
Declaration
public uint32 Mask = MAX_uint32
Field Value
|
uint32
|
Methods
GetMask(Span<StringView> layerNames)
Gets a layers mask from a specific layer name.
Declaration
public static LayersMask GetMask(Span<StringView> layerNames)
Parameters
|
Span<StringView>
layerNames
The names of the layers (from Layers settings). |
Returns
|
LayersMask
A layers mask with the Mask set to the same Mask as the layer name passed in. Returns a LayersMask with a mask of 0 if no layer found. |
HasLayer(const StringView& layerName)
Determines whether the specified layer name is set in the mask.
Declaration
public bool HasLayer(const StringView& layerName) const
Parameters
|
StringView
layerName
Name of the layer (from Layers settings). |
Returns
|
bool
|
HasLayer(int32 layerIndex)
Determines whether the specified layer index is set in the mask.
Declaration
public bool HasLayer(int32 layerIndex) const
Parameters
|
int32
layerIndex
Index of the layer (zero-based). |
Returns
|
bool
|
LayersMask()
Declaration
public LayersMask()
Returns
|
FORCE_INLINE
|
LayersMask(uint32 mask)
Declaration
public LayersMask(uint32 mask)
Parameters
|
uint32
mask
|
Returns
|
FORCE_INLINE
|
operator!=(const LayersMask& other)
Declaration
public bool operator!=(const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
bool
|
operator& (const LayersMask& other)
Declaration
public LayersMask operator& (const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator& =(const LayersMask& other)
Declaration
public LayersMask operator& =(const LayersMask& other)
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator-()
operator-(const LayersMask& other)
Declaration
public LayersMask operator-(const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator^(const LayersMask& other)
Declaration
public LayersMask operator^(const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator^=(const LayersMask& other)
Declaration
public LayersMask operator^=(const LayersMask& other)
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator|(const LayersMask& other)
Declaration
public LayersMask operator|(const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator|=(const LayersMask& other)
Declaration
public LayersMask operator|=(const LayersMask& other)
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator~()
operator+(const LayersMask& other)
Declaration
public LayersMask operator+(const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
LayersMask
|
operator==(const LayersMask& other)
Declaration
public bool operator==(const LayersMask& other) const
Parameters
|
LayersMask
other
|
Returns
|
bool
|