# GvrPointerGraphicRaycaster Class Reference

# GvrPointerGraphicRaycaster

This script provides a raycaster for use with the `https://developers.google.com/vr/reference/unity/class/GvrPointerInputModule#classGvrPointerInputModule`.

## Summary

This behaves similarly to the standards Graphic raycaster, except that it utilize raycast modes specifically for Gvr.

See `GvrBasePointerRaycaster.cs` and `GvrPointerInputModule.cs` for more details.

### Inheritance

Inherits from: [GvrBasePointerRaycaster](https://developers.google.com/vr/reference/unity/class/GvrBasePointerRaycaster)

| ### Public types ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a9a381d0946cb409ff44032570e3806c3{ https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a9a381d0946cb409ff44032570e3806c3a6adf97f83acf6453d4a6a4b1070f3754 = 0, https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a9a381d0946cb409ff44032570e3806c3a7fec533aaab2dc4c675964c8ff8a747b = 1, https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a9a381d0946cb409ff44032570e3806c3a31a45a851a6939edcdc88b6533deec13 = 2, https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a9a381d0946cb409ff44032570e3806c3ab1c94ca2fbc3e78fc30069c8d0f01680 = 3 }` | enumTypes of blocking objects this object's raycasts can hit. |

| ### Public attributes ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a6ffc12382c07b53de292e55ac74ea52e = NO_EVENT_MASK_SET` | `LayerMask` The blocking layer mask to use when raycasting. |
| `https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a2511ad46ae7f37db69484a537bb36aca = BlockingObjects.ThreeD` | `https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a9a381d0946cb409ff44032570e3806c3` The type of objects which can block raycasts. |
| `https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a026d61ff3545fc5b212dd4e40a844ccb = true` | `bool` Flag for ignoring reversed graphics direction. |

| ### Properties ||
|---|---|
| `https://developers.google.com/vr/reference/unity/class/GvrPointerGraphicRaycaster#classGvrPointerGraphicRaycaster_1a5cfbadbd00cc51b30f3c8649ad251aa5` | `override Camera` Gets the event Camera used for gaze-based raycasts. |

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

## Public types

### BlockingObjects

```c#
 BlockingObjects
```
Types of blocking objects this object's raycasts can hit.

| Properties ||
|---|---|
| `All` | This can hit all objects. |
| `None` | This cannot hit any objects. |
| `ThreeD` | This can hit only 3D objects. |
| `TwoD` | This can hit only 2D objects. |

## Public attributes

### blockingMask

```c#
LayerMask blockingMask = NO_EVENT_MASK_SET
```
The blocking layer mask to use when raycasting.

### blockingObjects

```c#
BlockingObjects blockingObjects = BlockingObjects.ThreeD
```
The type of objects which can block raycasts.

### ignoreReversedGraphics

```c#
bool ignoreReversedGraphics = true
```
Flag for ignoring reversed graphics direction.

## Properties

### eventCamera

```c#
override Camera eventCamera
```
Gets the event Camera used for gaze-based raycasts.

The event camera.

## Protected functions

### GvrPointerGraphicRaycaster

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

### PerformRaycast

```c#
virtual override 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. |