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

PointableElement Class

Extends MonoBehaviour
Canonical implementation of IPointableElement, this is a base type for components which represent something users can interact with by "pointing" at it.
As such, a PointableElement will receive, handles, and propagates (i.e., re-emits) PointerEvents generated by interactors pointing at the instance (typically PointerInteractor<TInteractor, TInteractable>s).
The Interaction SDK contains many examples of PointableElements, but one of the most versatile and important is the PointableCanvas, which allows a Unity Canvas (which can contain conventional 2D Unity UI) to be targed by Interaction SDK pointer interactions.

Protected Fields

_pointIds : List< int >
Signature
List<int> Oculus.Interaction.PointableElement._pointIds
_points : List< Pose >
Signature
List<Pose> Oculus.Interaction.PointableElement._points
_selectingPointIds : List< int >
Signature
List<int> Oculus.Interaction.PointableElement._selectingPointIds
_selectingPoints : List< Pose >
Signature
List<Pose> Oculus.Interaction.PointableElement._selectingPoints
_started : bool
Signature
bool Oculus.Interaction.PointableElement._started

Fields

Points : List< Pose >
The set of all points (positions and orientations) to which anything is currently "pointing" without selecting; i.e., the set of locations at which hovering interactions currently exist.
Signature
List<Pose> Oculus.Interaction.PointableElement.Points
PointsCount : int
Convenience method for counting the number of elements in Points; equivalent to calling Points.Count.
Signature
int Oculus.Interaction.PointableElement.PointsCount
SelectingPoints : List< Pose >
The set of all points (positions and orientations) to which anything is currently "pointing" while selecting; i.e., the set of locations at which select interactions currently exist.
Signature
List<Pose> Oculus.Interaction.PointableElement.SelectingPoints
SelectingPointsCount : int
Convenience method for counting the number of elements in SelectingPoints; equivalent to calling SelectingPoints.Count.
Signature
int Oculus.Interaction.PointableElement.SelectingPointsCount

Properties

AddNewPointsToFront : bool
[Get][Set]
If checked, when you select an object, that hand’s Vector3 points are added to the beginning of the list of Vector3 points instead of the end.
This property has very unique use cases, so in most cases you should use TransferOnSecondSelection instead.
Signature
bool Oculus.Interaction.PointableElement.AddNewPointsToFront
ForwardElement : IPointableElement
[Get]
Optional IPointableElement to which this element will automatically forward its PointerEvents.
This is equivalent to programmatically adding that element's IPointableElement.ProcessPointerEvent(PointerEvent) method as a handler to this element's WhenPointerEventRaised event; this property simplyl allows that relationship to be set up in the UnityEditor.
Signature
IPointableElement Oculus.Interaction.PointableElement.ForwardElement
TransferOnSecondSelection : bool
[Get][Set]
If checked, if you’re selecting an object with one hand and then select it with the other hand, the original hand is forced to release the object.
Signature
bool Oculus.Interaction.PointableElement.TransferOnSecondSelection

Events

WhenPointerEventRaised : Action< PointerEvent >
Implementation of IPointable.WhenPointerEventRaised; for details, please refer to the related documentation provided for that interface.
Signature
Action<PointerEvent> Oculus.Interaction.PointableElement.WhenPointerEventRaised

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.PointableElement.Awake()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.PointableElement.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.PointableElement.OnEnable()
Returns
void
PointableElementUpdated ( evt )
Signature
virtual void Oculus.Interaction.PointableElement.PointableElementUpdated(PointerEvent evt)
Parameters
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.PointableElement.Start()
Returns
void

Methods

InjectOptionalForwardElement ( forwardElement )
Sets an IPointableElement to which a dynamically instantiated PointableElement should forward its PointerEvents.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.PointableElement.InjectOptionalForwardElement(IPointableElement forwardElement)
Parameters
forwardElement: IPointableElement
Returns
void
ProcessPointerEvent ( evt )
Implementation of IPointableElement.ProcessPointerEvent(PointerEvent); for details, please refer to the related documentation provided for that interface.
Signature
virtual void Oculus.Interaction.PointableElement.ProcessPointerEvent(PointerEvent evt)
Parameters
Returns
void