/// <summary> /// Performs a raycast from an arbitrary ray against the types /// specified by <paramref name="trackableTypeMask"/>. Results /// should be sorted by distance from the ray origin. /// </summary> /// <param name="defaultRaycastHit">The default raycast hit that should be used as a template when populating the returned <c>NativeArray</c>.</param> /// <param name="ray">A ray in session space from which to raycast.</param> /// <param name="trackableTypeMask">The types to raycast against.</param> /// <param name="allocator">The allocator with which to allocate the returned <c>NativeArray</c>.</param> /// <returns>A <c>NativeArray</c> of all the resulting ray intersections.</returns> public virtual NativeArray <XRRaycastHit> Raycast( XRRaycastHit defaultRaycastHit, Ray ray, TrackableType trackableTypeMask, Allocator allocator) { throw new NotSupportedException("Raycasting using a Ray is not supported."); }
/// <summary> /// Performs a raycast from the camera against the types /// specified by <paramref name="trackableTypeMask"/>. Results /// should be sorted by distance from the ray origin. /// </summary> /// <param name="defaultRaycastHit">The default raycast hit that should be used as a template when populating the returned <c>NativeArray</c>.</param> /// <param name="screenPoint">A point on the screen in normalized (0...1) coordinates</param> /// <param name="trackableTypeMask">The types to raycast against.</param> /// <param name="allocator">The allocator with which to allocate the returned <c>NativeArray</c>.</param> /// <returns>A <c>NativeArray</c> of all the resulting ray intersections.</returns> public virtual NativeArray <XRRaycastHit> Raycast( XRRaycastHit defaultRaycastHit, Vector2 screenPoint, TrackableType trackableTypeMask, Allocator allocator) { throw new NotSupportedException("Raycasting using a screen point is not supported."); }
/// <summary> /// Constructor. Do not invoke directly; use the <c>SubsystemManager</c> /// to enumerate the available <see cref="XRRaycastSubsystemDescriptor"/>s /// and call <c>Create</c> on the desired descriptor. /// </summary> public XRRaycastSubsystem() { m_Provider = CreateProvider(); m_DefaultRaycastHit = XRRaycastHit.GetDefault(); }