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

IConecastTarget Interface

An object in the scene that can be conecasted by Conecaster.

Properties

Id : int
[Get]
The unique ID representing this target.
This should be unique among IConecastTargets, meaning multiple targets should not have the same value for this field. If multiple targets do share the same Id, the behavior is undefined.
Signature
int Oculus.Interaction.IConecastTarget.Id

Methods

TiebreakWith ( other )
Optional.
In the event the conecaster cannot determine the best target, this can be implemented to return a comparison value. See the IComparable interface for information on the return value.
Signature
int Oculus.Interaction.IConecastTarget.TiebreakWith(IConecastTarget other)
Parameters
Returns
int
TryConecast ( cone , hitPoint , surfaceNormal )
A conecast is defined here as the closest point on the object's surface to the Cone.Ray, where that point is within the cone's volume.
Signature
bool Oculus.Interaction.IConecastTarget.TryConecast(in Cone cone, out Vector3 hitPoint, out Vector3 surfaceNormal)
Parameters
cone: in Cone  Only elements within this cone volume should be considered as valid results.
hitPoint: out Vector3  The surface point on the object nearest the cone ray.
surfaceNormal: out Vector3  The normal of the object's surface at the hitPoint
Returns
bool  True if closest point on object is within cone volume.
TryGetChildren ( children )
If a successful conecast is performed on this IConecastTarget, where TryConecast returns true, this method will be called to fetch child targets for further conecasting.
Signature
bool Oculus.Interaction.IConecastTarget.TryGetChildren(IList< IConecastTarget > children)
Parameters
children: IList< IConecastTarget >  An empty list should be provided here to be populated with child targets, if they exist.
Returns
bool  True if any child targets are added to the list.