API reference
API reference
Select your platform
No SDKs available
No versions available

GazeConecaster Class

Extends MonoBehaviour
An IGazeHitTester implementation which performs a conecast.

Fields

ConeAngle : float
Signature
float Oculus.Interaction.GazeConecaster.ConeAngle

Properties

DefaultComparer : Comparer
[Get][Set]
Sets the default comparer used to score interactables.
Signature
Comparer Oculus.Interaction.GazeConecaster.DefaultComparer
EqualAngleThreshold : float
[Get][Set]
(Degrees, World) The threshold below which angular offsets from the gaze ray are treated as equal for the purposes of ranking.
Signature
float Oculus.Interaction.GazeConecaster.EqualAngleThreshold
EqualDistanceThreshold : float
[Get][Set]
(Meters, World) The threshold below which distances to a surface are treated as equal for the purposes of ranking.
Signature
float Oculus.Interaction.GazeConecaster.EqualDistanceThreshold

Methods

ComputeBest ( interactor , candidates )
Signature
HitTestResult<GazeInteractable> Oculus.Interaction.GazeConecaster.ComputeBest(GazeInteractor interactor, List< GazeInteractable > candidates)
Parameters
interactor: GazeInteractor
candidates: List< GazeInteractable >
SetOverrideComparer ( comparer )
This method overrides the DefaultComparer used for hit test sorting with a custom comparer.
Clear this override by providing a null argument here, in which case the default comparer will be used.
Signature
void Oculus.Interaction.GazeConecaster.SetOverrideComparer(IComparer< ConecastResult< GazeInteractable >> comparer)
Parameters
comparer: IComparer< ConecastResult< GazeInteractable >>
Returns
void

Static Methods

ComputeBest< TComparer > ( source , cone , candidates , comparer )
Performs an intersection test between the source and set of candidates and returns the best intersection result based on the defined comparer .
Call this from a custom IGazeHitTester to get the default implementation but with a custom compare function.
Signature
static HitTestResult<GazeInteractable> Oculus.Interaction.GazeConecaster.ComputeBest< TComparer >(GazeInteractor source, Cone cone, List< GazeInteractable > candidates, TComparer comparer)
Parameters
source: GazeInteractor  The source of the cone.
cone: Cone  The cone to cast against the set of interactables.
candidates: List< GazeInteractable >  The set of objects that can be "hit" by the source .
comparer: TComparer  The compare implementation used to determine which of two given results is a "better" or "higher priority" result. This is how the results are sorted. When the compare function returns 0 (equal), the GazeInteractable.TiebreakerScore will be used.
Returns
HitTestResult< GazeInteractable >  The best intersection result.
Conecast ( cone , interactable , result )
Performs a conecast from the provided cone against the given interactable and retrieves the result.
Signature
static bool Oculus.Interaction.GazeConecaster.Conecast(Cone cone, GazeInteractable interactable, out ConecastResult< GazeInteractable > result)
Parameters
cone: Cone  The Cone to cast.
interactable: GazeInteractable  The GazeInteractable to cast against.
result: out ConecastResult< GazeInteractable >  The result of the conecast.
Returns
bool true if the cone intersects the given interactable surface, otherwise false.
CreateCone ( interactor , coneAngle )
Constructs a Cone for the given interactor .
Signature
static Cone Oculus.Interaction.GazeConecaster.CreateCone(GazeInteractor interactor, float coneAngle)
Parameters
interactor: GazeInteractor
coneAngle: float
Returns
Cone

Inner Enum

Comparer Enum

Enumeration Constants

Member
AngleDistance
DistanceAngle