Class GazeBehavior
Gaze behavior class.
Inheritance
GazeBehavior
Implements
Inherited Members
Namespace: Evergine.Components.Toolkit
Assembly: Evergine.Components.dll
Syntax
public class GazeBehavior : Behavior, IDependencyObject
Fields
AirTapEntity
Gets or sets AirTap prefab instance.
Declaration
public Entity AirTapEntity
Field Value
Type | Description |
---|---|
Entity |
DefaultDistance
Gets or sets cursor distance (meters).
Declaration
[RenderPropertyAsFInput(0.1, 20, Tooltip = "Maximum gaze distance, in meters, for calculating a hit.", AsSlider = true, DesiredChange = 0.1, DesiredLargeChange = 1, DefaultValue = 2)]
public float DefaultDistance
Field Value
Type | Description |
---|---|
float |
HandleMouse
Gets a value indicating whether this gaze will handle mouse inputs.
Declaration
public bool HandleMouse
Field Value
Type | Description |
---|---|
bool |
KeepScale
Gets or sets a value indicating whether gets or sets cursor keep scale behavior.
Declaration
[RenderProperty(Tooltip = "Always maintain cursor scale.")]
public bool KeepScale
Field Value
Type | Description |
---|---|
bool |
MaxGazeDistance
Gets or sets cursor distance (meters).
Declaration
[RenderPropertyAsFInput(0.2, 100000, Tooltip = "Maximum gaze distance, in meters, for calculating a hit.", DefaultValue = 100)]
public float MaxGazeDistance
Field Value
Type | Description |
---|---|
float |
ReadyEntity
Gets or sets ready prefab instance.
Declaration
public Entity ReadyEntity
Field Value
Type | Description |
---|---|
Entity |
UndetectedEntity
Gets or sets undetected prefab instance.
Declaration
public Entity UndetectedEntity
Field Value
Type | Description |
---|---|
Entity |
Properties
CurrentState
Gets cursor current state.
Declaration
public GazeBehavior.States CurrentState { get; }
Property Value
Type | Description |
---|---|
GazeBehavior.States |
GazeAirTapState
Gets the current gaze button state.
Declaration
public ButtonState GazeAirTapState { get; }
Property Value
Type | Description |
---|---|
ButtonState |
GazeHitResult
Gets the current gaze hit result.
Declaration
public HitResult3D GazeHitResult { get; }
Property Value
Type | Description |
---|---|
HitResult3D |
GazeRay
Gets gaze ray.
Declaration
public Ray GazeRay { get; }
Property Value
Type | Description |
---|---|
Ray |
Methods
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
Update(TimeSpan)
Update method.
Declaration
protected override void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | game time. |
Overrides
Events
AirTapEvent
AirTap state event
Declaration
public event EventHandler<HitResult3D> AirTapEvent
Event Type
Type | Description |
---|---|
EventHandler<HitResult3D> |
ReadyEvent
Ready state event
Declaration
public event EventHandler ReadyEvent
Event Type
Type | Description |
---|---|
EventHandler |
UndetectedEvent
Undetected state event
Declaration
public event EventHandler UndetectedEvent
Event Type
Type | Description |
---|---|
EventHandler |