# Ray struct

Namespace: [Grasshopper2.Imaging.Raycasting](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.imaging.raycasting.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public struct Ray
```

A ray in a raycasting process.

## Constructors

- [Ray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/ctor.md): Create a new ray. Use the Create() method if you're unsure whether x and y are within legal bounds.

## Properties

- [Index](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/index.md): Gets the layer index at which the ray originates.
- [ParamX](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/paramx.md): Gets the normalised parameter horizontally along the pixel.
- [ParamY](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/paramy.md): Gets the normalised parameter vertically along the pixel.
- [PixelX](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/pixelx.md): Gets the pixel x index.
- [PixelY](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/pixely.md): Gets the pixel y index.
- [X](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/x.md): Gets the floating point accurate x-coordinate of the ray in the image coordinate system.
- [Y](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/y.md): Gets the floating point accurate y-coordinate of the ray in the image coordinate system.

## Methods

- [Continue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/continue.md): Continue this ray along its current direction.
- [Nudge](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/nudge.md): Nudge this ray without changing its level.
- [NudgeAndContinue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/nudgeandcontinue.md): Create a ray positioned relative to this ray and one level deeper.
- [Transport](https://developer.rhino3d.com/api/gh2/type/grasshopper2.imaging.raycasting.ray/transport.md): Transport this ray to a new originating layer.
