FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.UI.CanvasInteractions.CanvasInteractionsCursor Class Reference

Handles the cursor for the Buddy HUD. The cursor is used to interact with widgets, simulating a mouse cursor. More...

Public Member Functions

void Refresh (bool isActive, RaycastHit hit, Vector3 point, bool isPressed, bool isPrimaryButtonPressed, Vector2 scrollDelta)
 Refreshes the cursor with the new state.
 
void Refresh (bool isActive, Transform hit, Vector3 point, bool isPressed, bool isPrimaryButtonPressed, Vector2 scrollDelta)
 Refreshes the cursor with the new state.
 
void SendHapticImpulse (uint channel, float amplitude, float duration)
 Sends a haptic impulse to the cursor. This is only relevant for controllers, as haptic feedback doesn't work with hand tracking for obvious reasons.
 

Public Attributes

Action< bool > OnActiveChanged
 Event triggered when the active state of the cursor changes.
 

Properties

bool PressedDown [get]
 True on the frame the button was pressed down.
 
bool PressedUp [get]
 True on the frame the button was released.
 
bool IsActive [get]
 True if the cursor is active, used to properly handle hover behavior.
 
Vector3 Point [get]
 The current position of the cursor.
 
Vector3 LastPoint [get]
 The position of the cursor on the previous frame.
 
Vector2 Delta [get]
 The difference between the current and last position of the cursor.
 

Events

Action< uint, float, float > HapticImpulseTriggered
 Event triggered when a haptic impulse occurs.
 

Detailed Description

Handles the cursor for the Buddy HUD. The cursor is used to interact with widgets, simulating a mouse cursor.

Member Function Documentation

◆ Refresh() [1/2]

void FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.Refresh ( bool isActive,
RaycastHit hit,
Vector3 point,
bool isPressed,
bool isPrimaryButtonPressed,
Vector2 scrollDelta )
inline

Refreshes the cursor with the new state.

Parameters
isActiveThe new active state of the cursor.
hitThe raycast hit.
pointThe new position of the cursor.
isPressedThe new pressed state of the cursor.
isPrimaryButtonPressedTrue if the primary button is pressed.
scrollDeltaThe new scroll delta of the cursor.

◆ Refresh() [2/2]

void FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.Refresh ( bool isActive,
Transform hit,
Vector3 point,
bool isPressed,
bool isPrimaryButtonPressed,
Vector2 scrollDelta )
inline

Refreshes the cursor with the new state.

Parameters
isActiveThe new active state of the cursor.
hitThe raycast hit.
pointThe new position of the cursor.
isPressedThe new pressed state of the cursor.
isPrimaryButtonPressedTrue if the primary button is pressed.
scrollDeltaThe new scroll delta of the cursor.

◆ SendHapticImpulse()

void FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.SendHapticImpulse ( uint channel,
float amplitude,
float duration )
inline

Sends a haptic impulse to the cursor. This is only relevant for controllers, as haptic feedback doesn't work with hand tracking for obvious reasons.

Parameters
channelThe channel to send the impulse to.
amplitudeThe amplitude of the impulse.
durationThe duration of the impulse.

Member Data Documentation

◆ OnActiveChanged

Action<bool> FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.OnActiveChanged

Event triggered when the active state of the cursor changes.

Property Documentation

◆ Delta

Vector2 FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.Delta
get

The difference between the current and last position of the cursor.

◆ IsActive

bool FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.IsActive
get

True if the cursor is active, used to properly handle hover behavior.

◆ LastPoint

Vector3 FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.LastPoint
get

The position of the cursor on the previous frame.

◆ Point

Vector3 FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.Point
get

The current position of the cursor.

◆ PressedDown

bool FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.PressedDown
get

True on the frame the button was pressed down.

◆ PressedUp

bool FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.PressedUp
get

True on the frame the button was released.

Event Documentation

◆ HapticImpulseTriggered

Action<uint, float, float> FMAR.UI.CanvasInteractions.CanvasInteractionsCursor.HapticImpulseTriggered

Event triggered when a haptic impulse occurs.


The documentation for this class was generated from the following file: