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

Inherits MonoBehaviour.

Public Member Functions

void ChangeStaticHandColor (Color color)
 

Public Attributes

bool rightHand = true
 
OVRInput.Controller raycastController = OVRInput.Controller.RTouch
 
OVRInput.Button raycastButton = OVRInput.Button.One
 
OVRInput.Button triggerButton = OVRInput.Button.PrimaryIndexTrigger
 
LayerMask layerMask
 
MeshRenderer staticIndexRenderer
 
GameObject staticHandObject
 
GameObject defaultHandObject
 
float minHitDist = 0.01f
 
float hysteresisDist = 0.03f
 
Color nullCol = Color.cyan
 
Color holdCol = new Color(1f, 0.6f, 0f)
 
Color hitCol = Color.red
 
Color endCol = Color.yellow
 
float hapFreq = 0.5f
 
float nullAmp = 0f
 
float hitAmp = 0.9f
 
float holdAmp = 0.3f
 
float endAmp = 0f
 
bool mouseMode = false
 

Private Types

enum class  StateCode : sbyte { NULL , HIT , HOLD , END }
 

Private Member Functions

void Start ()
 
void FixedUpdate ()
 
void TryRaycastHit ()
 If raycastButton is pressed, attempt to raycast to valid target and activate valid raycastTrigger events on the target More...
 

Private Attributes

RaycastEventManager activeTriggerManager
 
int activeObjectID = -1
 
bool valid = false
 
bool clicked = false
 
bool touched = false
 
bool hitTriggered
 
bool holdTriggered
 
bool endTriggered
 
bool validHitEvent
 
bool validHoldEvent
 
bool validEndEvent
 
Vector3 relativeForward = new Vector3(0, 0, 1)
 
LineRenderer lineRend
 
bool invisible = false
 
StateCode currentState = StateCode.NULL
 

Member Enumeration Documentation

◆ StateCode

enum C2M2.Interaction.RaycastForward.StateCode : sbyte
strongprivate
Enumerator
NULL 
HIT 
HOLD 
END 

Member Function Documentation

◆ ChangeStaticHandColor()

void C2M2.Interaction.RaycastForward.ChangeStaticHandColor ( Color  color)

◆ FixedUpdate()

void C2M2.Interaction.RaycastForward.FixedUpdate ( )
private

◆ Start()

void C2M2.Interaction.RaycastForward.Start ( )
private

◆ TryRaycastHit()

void C2M2.Interaction.RaycastForward.TryRaycastHit ( )
private

If raycastButton is pressed, attempt to raycast to valid target and activate valid raycastTrigger events on the target

Don't draw the line renderer

Member Data Documentation

◆ activeObjectID

int C2M2.Interaction.RaycastForward.activeObjectID = -1
private

◆ activeTriggerManager

RaycastEventManager C2M2.Interaction.RaycastForward.activeTriggerManager
private

◆ clicked

bool C2M2.Interaction.RaycastForward.clicked = false
private

◆ currentState

StateCode C2M2.Interaction.RaycastForward.currentState = StateCode.NULL
private

◆ defaultHandObject

GameObject C2M2.Interaction.RaycastForward.defaultHandObject

◆ endAmp

float C2M2.Interaction.RaycastForward.endAmp = 0f

◆ endCol

Color C2M2.Interaction.RaycastForward.endCol = Color.yellow

◆ endTriggered

bool C2M2.Interaction.RaycastForward.endTriggered
private

◆ hapFreq

float C2M2.Interaction.RaycastForward.hapFreq = 0.5f

◆ hitAmp

float C2M2.Interaction.RaycastForward.hitAmp = 0.9f

◆ hitCol

Color C2M2.Interaction.RaycastForward.hitCol = Color.red

◆ hitTriggered

bool C2M2.Interaction.RaycastForward.hitTriggered
private

◆ holdAmp

float C2M2.Interaction.RaycastForward.holdAmp = 0.3f

◆ holdCol

Color C2M2.Interaction.RaycastForward.holdCol = new Color(1f, 0.6f, 0f)

◆ holdTriggered

bool C2M2.Interaction.RaycastForward.holdTriggered
private

◆ hysteresisDist

float C2M2.Interaction.RaycastForward.hysteresisDist = 0.03f

◆ invisible

bool C2M2.Interaction.RaycastForward.invisible = false
private

◆ layerMask

LayerMask C2M2.Interaction.RaycastForward.layerMask

◆ lineRend

LineRenderer C2M2.Interaction.RaycastForward.lineRend
private

◆ minHitDist

float C2M2.Interaction.RaycastForward.minHitDist = 0.01f

◆ mouseMode

bool C2M2.Interaction.RaycastForward.mouseMode = false

◆ nullAmp

float C2M2.Interaction.RaycastForward.nullAmp = 0f

◆ nullCol

Color C2M2.Interaction.RaycastForward.nullCol = Color.cyan

◆ raycastButton

OVRInput.Button C2M2.Interaction.RaycastForward.raycastButton = OVRInput.Button.One

◆ raycastController

OVRInput.Controller C2M2.Interaction.RaycastForward.raycastController = OVRInput.Controller.RTouch

◆ relativeForward

Vector3 C2M2.Interaction.RaycastForward.relativeForward = new Vector3(0, 0, 1)
private

◆ rightHand

bool C2M2.Interaction.RaycastForward.rightHand = true

◆ staticHandObject

GameObject C2M2.Interaction.RaycastForward.staticHandObject

◆ staticIndexRenderer

MeshRenderer C2M2.Interaction.RaycastForward.staticIndexRenderer

◆ touched

bool C2M2.Interaction.RaycastForward.touched = false
private

◆ triggerButton

OVRInput.Button C2M2.Interaction.RaycastForward.triggerButton = OVRInput.Button.PrimaryIndexTrigger

◆ valid

bool C2M2.Interaction.RaycastForward.valid = false
private

◆ validEndEvent

bool C2M2.Interaction.RaycastForward.validEndEvent
private

◆ validHitEvent

bool C2M2.Interaction.RaycastForward.validHitEvent
private

◆ validHoldEvent

bool C2M2.Interaction.RaycastForward.validHoldEvent
private

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