# GvrBasePointerRaycaster Class Reference

# GvrBasePointerRaycaster

**This is an abstract class.**   

This script provides shared functionality used by all Gvr raycasters.

## Summary

### Inheritance

Inherits from: BaseRaycaster  
Direct Known Subclasses:[GvrPointerGraphicRaycaster](https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster), [GvrPointerPhysicsRaycaster](https://developers.google.com/vr/reference/unity/class/GvrPointerPhysicsRaycaster)

| ### Properties ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster_1a9c9e3439ba814f049b385b28c7efb760` | `https://developers.google.com/vr/reference/unity/class/GvrBasePointer#classGvrBasePointer_1a8de79b1db10e6f55fe6738a4358b73fe` Gets the mode used for raycasting. |

| ### Protected functions ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster_1a995723a818f34be673086bfa3858f3d1()` | ` `` Initializes a new instance of the https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster class. ` |
| `https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster_1a37465d7b96d84970874d404916b0fb4e(https://developers.google.com/vr/reference/unity/struct/GvrBasePointer/PointerRay#structGvrBasePointer_1_1PointerRay pointerRay, float radius, PointerEventData eventData, List< RaycastResult > resultAppendList)` | `virtual abstract bool` Perform raycast on the scene. |

| ### Public functions ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster_1a5b697f9d854eb1e77eecc81451e2a891()` | `https://developers.google.com/vr/reference/unity/struct/GvrBasePointer/PointerRay#structGvrBasePointer_1_1PointerRay` Gets the last ray created. |
| `https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster_1a24012d583650dbd92a8edc8b36503df7(PointerEventData eventData, List< RaycastResult > resultAppendList)` | `override void` Raycast against the scene. |

## Properties

### CurrentRaycastModeForHybrid

```c#
GvrBasePointer.RaycastMode CurrentRaycastModeForHybrid
```
Gets the mode used for raycasting.

The mode used for raycasting.

## Protected functions

### GvrBasePointerRaycaster

```c#
 GvrBasePointerRaycaster()
```
Initializes a new instance of the [GvrBasePointerRaycaster](https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster#classGvrBasePointerRaycaster) class.

### PerformRaycast

```c#
virtual abstract bool PerformRaycast(
  GvrBasePointer.PointerRay pointerRay,
  float radius,
  PointerEventData eventData,
  List< RaycastResult > resultAppendList
)
```
Perform raycast on the scene.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `pointerRay` | The ray to use for the operation. | | `radius` | The radius of the ray to use when testing for hits. | | `eventData` | The event data triggered by any resultant Raycast hits. | | `resultAppendList` | The results are appended to this list. | |
| **Returns** | Returns `true` if the Raycast has at least one hit, `false` otherwise. |

## Public functions

### GetLastRay

```c#
GvrBasePointer.PointerRay GetLastRay()
```
Gets the last ray created.

<br />

| Details ||
|---|---|
| **Returns** | The last ray created. |

### Raycast

```c#
override void Raycast(
  PointerEventData eventData,
  List< RaycastResult > resultAppendList
)
```
Raycast against the scene.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `eventData` | The pointer event data. | | `resultAppendList` | The result of the raycast is appended to this list. | |