Class TrackQRCode
Component used to track a Evergine.Framework.XR.QR.QRCode pose with an entity Evergine.Framework.Graphics.Transform3D.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Components.XR
Assembly: Evergine.Components.dll
Syntax
public class TrackQRCode : Behavior, IDependencyObject
Fields
qRCodeWatcherService
The Evergine.Framework.XR.QR.IQRCodeWatcherService dependency.
Declaration
[BindService(true)]
protected IQRCodeWatcherService qRCodeWatcherService
Field Value
Type | Description |
---|---|
IQRCodeWatcherService |
trackedQRCode
The currently tracked Evergine.Framework.XR.QR.QRCode.
Declaration
protected QRCode trackedQRCode
Field Value
Type | Description |
---|---|
QRCode |
transform3D
The Evergine.Framework.Graphics.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 match a Evergine.Framework.XR.QR.QRCode to be tracked automatically.
Declaration
public bool AutoMatching { get; set; }
Property Value
Type | Description |
---|---|
bool |
DataFilter
Gets or sets the filter used against the Evergine.Framework.XR.QR.QRCode.Data to match.
Declaration
public string DataFilter { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
When IsRegexDataFilter, this filter will be considered as a regular expression matching pattern. Otherwise, the filter
will be considered as literal.
When set to null
, first detected QR will be matched.
IsRegexDataFilter
Gets or sets a value indicating whether the DataFilter will be considered as 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 Evergine.Framework.Graphics.Transform3D.Scale will be updated based on the Evergine.Framework.XR.QR.QRCode.PhysicalSideLength property of the TrackedQRCode.
Declaration
public bool ScaleBasedOnPhysicalLength { get; set; }
Property Value
Type | Description |
---|---|
bool |
TrackedQRCode
Gets or sets the tracked Evergine.Framework.XR.QR.QRCode.
Declaration
public QRCode TrackedQRCode { get; set; }
Property Value
Type | Description |
---|---|
QRCode |
Methods
OnActivated()
Invoked when the object is activated once 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 Evergine.Framework.XR.QR.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
This method will not be executed if the Evergine.Framework.Component, or the Evergine.Framework.Entity
owning it are not Active
.
Events
Updated
Occurs when the TrackedQRCode is updated.
Declaration
public event EventHandler Updated
Event Type
Type | Description |
---|---|
EventHandler |