Neuro-VISOR  0.2.0
Visualize and interact with computational simulations using a virtual reality interface
C2M2.Interaction.MouseEventSignaler Class Reference

Inherits C2M2.Interaction.RaycastEventSignaler.

Public Attributes

KeyCode[] grabKeys = new KeyCode[] { KeyCode.G }
 
- Public Attributes inherited from C2M2.Interaction.RaycastEventSignaler
bool rightHand = true
 
LayerMask layerMask
 
float maxRaycastDistance = 10f
 

Protected Member Functions

override void OnAwake ()
 
override void OnStart ()
 
override bool RaycastRequested ()
 Rrequire some condition before raycast requests are made. More...
 
override bool RaycastingMethod (out RaycastHit hit, float maxDistance, LayerMask layerMask)
 This builds a ray from the mouse's position, and attempts a raycast using that ray More...
 
override bool PressCondition ()
 Require a second condition before raycast events are triggered More...
 
- Protected Member Functions inherited from C2M2.Interaction.RaycastEventSignaler
void Awake ()
 
override void OnHoverHold ()
 
override void OnHoverEnd ()
 
override void OnPressBegin ()
 
override void OnPressHold ()
 
override void OnPressEnd ()
 
- Protected Member Functions inherited from C2M2.Interaction.PressEventSignaler
virtual void OnHoverBegin ()
 

Private Attributes

Transform grabTransform
 
PublicOVRGrabber grabber
 
SphereCollider grabVolume
 

Additional Inherited Members

- Properties inherited from C2M2.Interaction.PressEventSignaler
bool Pressing [get, set]
 Was the input source pressed in the previous frame? More...
 
bool Hovering [get, set]
 

Member Function Documentation

◆ OnAwake()

override void C2M2.Interaction.MouseEventSignaler.OnAwake ( )
protectedvirtual

◆ OnStart()

override void C2M2.Interaction.MouseEventSignaler.OnStart ( )
protectedvirtual

◆ PressCondition()

override bool C2M2.Interaction.MouseEventSignaler.PressCondition ( )
protectedvirtual

Require a second condition before raycast events are triggered

In Oculus, this is the trigger button. The user must hold "One" to begin raycasting, and then the trigger once they want to see events triggered. This way, raycasts can be visualized in VR before events are triggered with the raycast. With mouse raycasting, this simply returns "true", since we don't need to visualize raycasts before triggering events. We can just skip right to triggering events

Implements C2M2.Interaction.RaycastEventSignaler.

◆ RaycastingMethod()

override bool C2M2.Interaction.MouseEventSignaler.RaycastingMethod ( out RaycastHit  hit,
float  maxDistance,
LayerMask  layerMask 
)
protectedvirtual

This builds a ray from the mouse's position, and attempts a raycast using that ray

Implements C2M2.Interaction.RaycastEventSignaler.

◆ RaycastRequested()

override bool C2M2.Interaction.MouseEventSignaler.RaycastRequested ( )
protectedvirtual

Rrequire some condition before raycast requests are made.

You can require a button be pressed before raycasting. In Oculus, this returns true if button "One" is pressed down. With mouse raycasting, this returns true if the mouse button is pressed down

Implements C2M2.Interaction.RaycastEventSignaler.

Member Data Documentation

◆ grabber

PublicOVRGrabber C2M2.Interaction.MouseEventSignaler.grabber
private

◆ grabKeys

KeyCode [] C2M2.Interaction.MouseEventSignaler.grabKeys = new KeyCode[] { KeyCode.G }

◆ grabTransform

Transform C2M2.Interaction.MouseEventSignaler.grabTransform
private

◆ grabVolume

SphereCollider C2M2.Interaction.MouseEventSignaler.grabVolume
private

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