UnityMol  1.0.25beta
VRTK.VRTK_StraightPointerRendererNoRB Class Reference

A visual pointer representation of a straight beam with an optional cursor at the end. More...

Inheritance diagram for VRTK.VRTK_StraightPointerRendererNoRB:

Public Member Functions

override void UpdateRenderer ()
 The UpdateRenderer method is used to run an Update routine on the pointer. More...
 
override GameObject [] GetPointerObjects ()
 The GetPointerObjects returns an array of the auto generated GameObjects associated with the pointer. More...
 

Public Attributes

float maximumLength = 100f
 
float scaleFactor = 0.002f
 
float cursorScaleMultiplier = 25f
 
bool cursorMatchTargetRotation = false
 
bool cursorDistanceRescale = false
 
Vector3 maximumCursorScale = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity)
 
GameObject customTracer
 
GameObject customCursor
 
GameObject actualTracer
 

Protected Member Functions

override void ToggleRenderer (bool pointerState, bool actualState)
 
override void CreatePointerObjects ()
 
override void DestroyPointerObjects ()
 
override void ChangeMaterial (Color givenColor)
 
override void UpdateObjectInteractor ()
 
virtual void CreateTracer ()
 
virtual void CreateCursor ()
 
virtual void CheckRayMiss (bool rayHit, RaycastHit pointerCollidedWith)
 
virtual void CheckRayHit (bool rayHit, RaycastHit pointerCollidedWith)
 
virtual float CastRayForward ()
 
virtual void SetPointerAppearance (float tracerLength)
 

Protected Attributes

GameObject actualContainer
 
GameObject actualCursor
 
Vector3 cursorOriginalScale = Vector3.one
 

Detailed Description

A visual pointer representation of a straight beam with an optional cursor at the end.

Optional Components:

  • VRTK_PlayAreaCursor - A Play Area Cursor that will track the position of the pointer cursor.
  • VRTK_PointerDirectionIndicator - A Pointer Direction Indicator that will track the position of the pointer cursor.

Script Usage:

  • Place the VRTK_StraightPointerRenderer script on the same GameObject as the Pointer script it is linked to.
  • Link this Pointer Renderer script to the Pointer Renderer parameter on the required Pointer script.

Script Dependencies:

  • A Pointer script to control the activation of this Pointer Renderer script.

VRTK/Examples/003_Controller_SimplePointer shows the simple pointer in action and code examples of how the events are utilised and listened to can be viewed in the script VRTK/Examples/ExampleResources/Scripts/VRTK_ControllerPointerEvents_ListenerExample.cs

Member Function Documentation

◆ CastRayForward()

virtual float VRTK.VRTK_StraightPointerRendererNoRB.CastRayForward ( )
protectedvirtual

◆ ChangeMaterial()

override void VRTK.VRTK_StraightPointerRendererNoRB.ChangeMaterial ( Color  givenColor)
protected

◆ CheckRayHit()

virtual void VRTK.VRTK_StraightPointerRendererNoRB.CheckRayHit ( bool  rayHit,
RaycastHit  pointerCollidedWith 
)
protectedvirtual

◆ CheckRayMiss()

virtual void VRTK.VRTK_StraightPointerRendererNoRB.CheckRayMiss ( bool  rayHit,
RaycastHit  pointerCollidedWith 
)
protectedvirtual

◆ CreateCursor()

virtual void VRTK.VRTK_StraightPointerRendererNoRB.CreateCursor ( )
protectedvirtual

◆ CreatePointerObjects()

override void VRTK.VRTK_StraightPointerRendererNoRB.CreatePointerObjects ( )
protected

◆ CreateTracer()

virtual void VRTK.VRTK_StraightPointerRendererNoRB.CreateTracer ( )
protectedvirtual

◆ DestroyPointerObjects()

override void VRTK.VRTK_StraightPointerRendererNoRB.DestroyPointerObjects ( )
protected

◆ GetPointerObjects()

override GameObject [] VRTK.VRTK_StraightPointerRendererNoRB.GetPointerObjects ( )

The GetPointerObjects returns an array of the auto generated GameObjects associated with the pointer.

Returns
An array of pointer auto generated GameObjects.

◆ SetPointerAppearance()

virtual void VRTK.VRTK_StraightPointerRendererNoRB.SetPointerAppearance ( float  tracerLength)
protectedvirtual

◆ ToggleRenderer()

override void VRTK.VRTK_StraightPointerRendererNoRB.ToggleRenderer ( bool  pointerState,
bool  actualState 
)
protected

◆ UpdateObjectInteractor()

override void VRTK.VRTK_StraightPointerRendererNoRB.UpdateObjectInteractor ( )
protected

◆ UpdateRenderer()

override void VRTK.VRTK_StraightPointerRendererNoRB.UpdateRenderer ( )

The UpdateRenderer method is used to run an Update routine on the pointer.

Member Data Documentation

◆ actualContainer

GameObject VRTK.VRTK_StraightPointerRendererNoRB.actualContainer
protected

◆ actualCursor

GameObject VRTK.VRTK_StraightPointerRendererNoRB.actualCursor
protected

◆ actualTracer

GameObject VRTK.VRTK_StraightPointerRendererNoRB.actualTracer

◆ cursorDistanceRescale

bool VRTK.VRTK_StraightPointerRendererNoRB.cursorDistanceRescale = false

◆ cursorMatchTargetRotation

bool VRTK.VRTK_StraightPointerRendererNoRB.cursorMatchTargetRotation = false

◆ cursorOriginalScale

Vector3 VRTK.VRTK_StraightPointerRendererNoRB.cursorOriginalScale = Vector3.one
protected

◆ cursorScaleMultiplier

float VRTK.VRTK_StraightPointerRendererNoRB.cursorScaleMultiplier = 25f

◆ customCursor

GameObject VRTK.VRTK_StraightPointerRendererNoRB.customCursor

◆ customTracer

GameObject VRTK.VRTK_StraightPointerRendererNoRB.customTracer

◆ maximumCursorScale

Vector3 VRTK.VRTK_StraightPointerRendererNoRB.maximumCursorScale = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity)

◆ maximumLength

float VRTK.VRTK_StraightPointerRendererNoRB.maximumLength = 100f

◆ scaleFactor

float VRTK.VRTK_StraightPointerRendererNoRB.scaleFactor = 0.002f

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