API reference

LabelFilter Struct

A struct that can filter certain labels.
The default is to allow all labels.

Constructors

LabelFilter ( labelFlags , componentTypes )
Creates a label filter that includes only the specified labels and component types.
Signature
LabelFilter(MRUKAnchor.SceneLabels? labelFlags=null, MRUKAnchor.ComponentType? componentTypes=null)
Parameters
labelFlags: MRUKAnchor.SceneLabels?  Enum flags representing labels to include.
componentTypes: MRUKAnchor.ComponentType?  Enum flags representing component types to include.

Fields

ComponentTypes : MRUKAnchor.? ComponentType
Optional enum flags representing component types to include, null is equivalent to all component types.
Signature
MRUKAnchor.? ComponentType ComponentTypes
SceneLabels : MRUKAnchor.? SceneLabels
A list of labels to include, null is equivalent to all labels.
Signature
MRUKAnchor.? SceneLabels SceneLabels

Methods

PassesFilter ( labels )
Checks if the specified string labels pass the current filter.
This method is obsolete. Use the enum-based 'PassesFilter' method instead for type safety and better performance.
Signature
bool PassesFilter(List< string > labels)
Parameters
labels: List< string >  A list of labels to check, specified as strings.
Returns
bool  True if the labels pass the filter, false otherwise.
PassesFilter ( labelFlags )
Checks if the given enum of labels passes the filter.
Signature
bool PassesFilter(MRUKAnchor.SceneLabels labelFlags)
Parameters
labelFlags: MRUKAnchor.SceneLabels  Enum flags representing labels to check.
Returns
bool  True if the labels pass the filter, false otherwise.

Static Methods

Excluded ( excluded )
Creates a label filter that excludes the specified labels.
This method is obsolete. Use the enum-based 'Excluded' method instead for type safety and better performance.
Signature
static LabelFilter Excluded(List< string > excluded)
Parameters
excluded: List< string >  A list of labels to exclude, specified as strings.
Returns
LabelFilter  A LabelFilter that excludes the specified labels.
Excluded ( labelFlags )
Creates a label filter that excludes the specified labels.
Signature
static LabelFilter Excluded(MRUKAnchor.SceneLabels labelFlags)
Parameters
labelFlags: MRUKAnchor.SceneLabels  Enum flags representing labels to exclude.
Returns
LabelFilter  A LabelFilter that excludes specified labels.
FromEnum ( labels )
Creates a label filter from the specified enum labels.
This method is obsolete. Use the 'Included' method instead which directly accepts an enum of labels.
Signature
static LabelFilter FromEnum(MRUKAnchor.SceneLabels labels)
Parameters
labels: MRUKAnchor.SceneLabels  The labels specified as an enum.
Returns
LabelFilter  A LabelFilter that includes the specified labels.
Included ( included )
Creates a label filter that includes the specified labels.
This method is obsolete. Use the enum-based 'Included' method instead for type safety and better performance.
Signature
static LabelFilter Included(List< string > included)
Parameters
included: List< string >  A list of labels to include, specified as strings.
Returns
LabelFilter  A LabelFilter that includes the specified labels.
Included ( labelFlags )
Creates a label filter that includes only the specified labels.
Signature
static LabelFilter Included(MRUKAnchor.SceneLabels labelFlags)
Parameters
labelFlags: MRUKAnchor.SceneLabels  Enum flags representing labels to include.
Returns
LabelFilter  A LabelFilter that includes specified labels.