Photon Quantum 3.0.0

Public Member Functions | Properties | List of all members
Quantum.LayerInfo Class Reference

Physics layer information. More...

Public Member Functions

 LayerInfo (String[] layers, Int32[] defaultMatrix)
 Creates a new LayerInfo instance. More...
 
Int32 GetLayerIndex (String name)
 Converts a layer name to the layer index. More...
 
Int32 GetLayerMask (params String[] layers)
 Get the combined layer mask for multiple layer names. More...
 
Int32 GetLayerMask (String layer)
 Get the layer mask for a layer name. More...
 
Int32 GetLayerMask (String layer0, String layer1)
 Get the combined layer mask for two layer names. More...
 
Int32 GetLayerMask (String layer0, String layer1, String layer2)
 Get the combined layer mask for three layer names. More...
 
String GetLayerName (Int32 index)
 Convert the layer index to a layer name. More...
 
Boolean LayerExists (String name)
 Checks if the layer name exists. More...
 

Properties

Int32[] DefaultLayerMatrix [get]
 Returns the default layer matrix. More...
 

Detailed Description

Physics layer information.

Constructor & Destructor Documentation

◆ LayerInfo()

Quantum.LayerInfo.LayerInfo ( String[]  layers,
Int32[]  defaultMatrix 
)
inline

Creates a new LayerInfo instance.

Parameters
layersAvailable names layers
defaultMatrixThe default matrix

Member Function Documentation

◆ LayerExists()

Boolean Quantum.LayerInfo.LayerExists ( String  name)
inline

Checks if the layer name exists.

Parameters
nameLayer name
Returns
true if the layer name exists

◆ GetLayerIndex()

Int32 Quantum.LayerInfo.GetLayerIndex ( String  name)
inline

Converts a layer name to the layer index.

Parameters
nameLayer name
Returns
Layer index or -1 if layer name was not found

◆ GetLayerMask() [1/4]

Int32 Quantum.LayerInfo.GetLayerMask ( String  layer)
inline

Get the layer mask for a layer name.

Parameters
layerLayer name
Returns
Layer mask for a given layer

◆ GetLayerMask() [2/4]

Int32 Quantum.LayerInfo.GetLayerMask ( String  layer0,
String  layer1 
)
inline

Get the combined layer mask for two layer names.

Parameters
layer0Layer name one
layer1Layer name two
Returns
A mask combined of two layers

◆ GetLayerMask() [3/4]

Int32 Quantum.LayerInfo.GetLayerMask ( String  layer0,
String  layer1,
String  layer2 
)
inline

Get the combined layer mask for three layer names.

Parameters
layer0Layer name one
layer1Layer name two
layer2Layer name three
Returns
A mask combined of three layers

◆ GetLayerMask() [4/4]

Int32 Quantum.LayerInfo.GetLayerMask ( params String[]  layers)
inline

Get the combined layer mask for multiple layer names.

Parameters
layersMultiple layer names
Returns
A layer mask combined of input layer names

◆ GetLayerName()

String Quantum.LayerInfo.GetLayerName ( Int32  index)
inline

Convert the layer index to a layer name.

Parameters
indexLayer index
Returns
Layer name or "" if the index could not be mapped to name

Property Documentation

◆ DefaultLayerMatrix

Int32 [] Quantum.LayerInfo.DefaultLayerMatrix
get

Returns the default layer matrix.