Class TrackQRCode
Component used to track a QRCode pose with an entity Transform3D.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.XR
Assembly: Evergine.Components.dll
Syntax
public class TrackQRCode : Behavior, IDependencyObject
Fields
qRCodeWatcherService
The IQRCodeWatcherService dependency.
Declaration
[BindService(true)]
protected IQRCodeWatcherService qRCodeWatcherService
Field Value
Type | Description |
---|---|
IQRCodeWatcherService |
trackedQRCode
The currently tracked QRCode.
Declaration
protected QRCode trackedQRCode
Field Value
Type | Description |
---|---|
QRCode |
transform3D
A Transform3D dependency.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
protected Transform3D transform3D
Field Value
Type | Description |
---|---|
Transform3D |
Properties
AutoMatching
Gets or sets a value indicating whether this component will automatically match a QRCode to be tracked.
Declaration
public bool AutoMatching { get; set; }
Property Value
Type | Description |
---|---|
bool |
DataFilter
Gets or sets the filter used against the Data to match.
Declaration
public string DataFilter { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
When IsRegexDataFilter, this filter will be considered a regular expression matching pattern. Otherwise, the filter
will be considered literal.
When set to null
, the first detected QR will be matched.
IsRegexDataFilter
Gets or sets a value indicating whether the DataFilter will be considered a regular expression matching pattern.
Declaration
public bool IsRegexDataFilter { get; set; }
Property Value
Type | Description |
---|---|
bool |
ScaleBasedOnPhysicalLength
Gets or sets a value indicating whether the Scale will be updated based on the PhysicalSideLength property of the TrackedQRCode.
Declaration
public bool ScaleBasedOnPhysicalLength { get; set; }
Property Value
Type | Description |
---|---|
bool |
TrackedQRCode
Gets or sets the tracked QRCode.
Declaration
public QRCode TrackedQRCode { get; set; }
Property Value
Type | Description |
---|---|
QRCode |
Methods
OnActivated()
Invoked when the object is activated once it is attached.
Declaration
protected override void OnActivated()
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
TryMatchWithDetectedCodes()
Tries to match with already detected codes from the IQRCodeWatcherService.
Declaration
public bool TryMatchWithDetectedCodes()
Returns
Type | Description |
---|---|
bool |
|
Update(TimeSpan)
Allows this instance to execute custom logic during its Update
.
Declaration
protected override void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The game time. |
Overrides
Remarks
Events
Updated
Occurs when the TrackedQRCode is updated.
Declaration
public event EventHandler Updated
Event Type
Type | Description |
---|---|
EventHandler |