Exemplo n.º 1
0
 /// <summary>
 /// Adds a new persistent raycast. Persistent raycasts should be updated automatically until this
 /// provider is stopped or destroyed or the raycast is removed with
 /// <see cref="RemoveRaycast(TrackableId)"/>.
 /// </summary>
 /// <param name="ray">A ray in session-space defining the raycast</param>
 /// <param name="estimatedDistance">The estimated distance to the raycast target.</param>
 /// <param name="raycast">The newly added raycast. All spatial data should be reported relative to the session origin.</param>
 /// <returns>`True` if the raycast was added; otherwise `false`.</returns>
 public virtual bool TryAddRaycast(Ray ray, float estimatedDistance, out XRRaycast raycast)
 {
     raycast = XRRaycast.defaultValue;
     return(false);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Get the changes (arrays of added, updated, and removed) raycasts since the last call to this method.
 /// </summary>
 /// <param name="defaultRaycast">A default value for <see cref="XRRaycast"/>s. For backwards compatibility,
 /// this should be used to initialized the returned
 /// [NativeArray](https://docs.unity3d.com/ScriptReference/Unity.Collections.NativeArray_1.html)s.</param>
 /// <param name="allocator">The [Allocator](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html)
 /// to use when allocating the returned [NativeArray](https://docs.unity3d.com/ScriptReference/Unity.Collections.NativeArray_1.html)s.</param>
 /// <returns>Arrays of added, updated, and removed raycasts since the last call to this method. The
 /// changes should be allocated using <paramref name="allocator"/>. The caller owns the memory.</returns>
 public virtual TrackableChanges <XRRaycast> GetChanges(XRRaycast defaultRaycast, Allocator allocator) => default;
Exemplo n.º 3
0
 /// <summary>
 /// Adds a new persistent raycast. Persistent raycasts should be updated automatically until this
 /// provider is stopped or destroyed or the raycast is removed with
 /// <see cref="RemoveRaycast(TrackableId)"/>.
 /// </summary>
 /// <param name="screenPoint">A position on the screen in normalized screen coordinates (0, 0)..(1, 1)</param>
 /// <param name="estimatedDistance">The estimated distance to the raycast target.</param>
 /// <param name="raycast">The newly added raycast. All spatial data should be reported relative to the session origin.</param>
 /// <returns>`True` if the raycast was added; otherwise `false`.</returns>
 public virtual bool TryAddRaycast(Vector2 screenPoint, float estimatedDistance, out XRRaycast raycast)
 {
     raycast = XRRaycast.defaultValue;
     return(false);
 }