public readonly struct RayA half-line: an origin and a direction. Picking, line-of-sight queries, and every raycast the physics and navigation layers make.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The direction is expected to be unit length — every distance this type reports is measured in units of it, so a direction of length 2 halves every answer.
Fields and properties (2)
Methods (14)
public Ray(Vector3 origin, Vector3 direction)Builds a ray.
public Vector3 GetPoint(float distance)The point along the ray.
public bool Intersects(Plane plane, out float distance)Where the ray meets a plane.
public bool Intersects(BoundingSphere sphere, out float distance)Where the ray enters a sphere.
public bool Intersects(BoundingBox box, out float distance)Where the ray enters a box.
public bool Intersects(Vector3 a, Vector3 b, Vector3 c, out float distance)Where the ray meets a triangle.
public static Ray Transform(Ray ray, in Matrix4x4 matrix)The ray after a transform.
public static bool operator ==(Ray left, Ray right)Exact equality, IEEE semantics.
public static bool operator !=(Ray left, Ray right)The negation of op_Equality.
public bool Equals(Ray other)Indicates whether the current object is equal to another object of the same type.
public override bool Equals(object? obj)Indicates whether this instance and a specified object are equal.
public override int GetHashCode()Returns the hash code for this instance.
public override string ToString()Returns the fully qualified type name of this instance.
public string ToString(string? format, IFormatProvider? formatProvider)Formats the value of the current instance using the specified format.
Used by (28)
- RectangleAndViewportTestsVixen.Core.Mathematics.Tests
- TypeRegistrationVixen.Core.Mathematics
- ViewportVixen.Core.Mathematics
- Vixen_Core_Mathematics_RaySerializerVixen.Core.Mathematics
- VolumeTestsVixen.Core.Mathematics.Tests
- BlockoutCreateTestsVixen.Editor.Blockout.Tests
- BlockoutModeVixen.Editor.Blockout
- CameraTestsVixen.Editor.SceneView.Tests
- EditorApplicationVixen.Editor.App
- EditorCameraVixen.Editor.SceneView
- FoliageModeVixen.Editor.Terrain
- IScenePickerVixen.Editor.SceneView
- ISceneProbeVixen.Editor.SceneView
- ISurfaceProbeVixen.Editor.SceneView
- NothingPickerVixen.Editor.SceneView.Tests
- OutlinerColumnTestsVixen.Editor.App.Tests
- PickingTestsVixen.Editor.SceneView.Tests
- ScenePickerVixen.Editor.SceneView
- ScenePlacementVixen.Editor.SceneView
- SceneProbeVixen.Editor.SceneView
- SceneTestsVixen.Editor.SceneView.Tests
- SceneViewportVixen.Editor.SceneView
- SnapContextTestsVixen.Editor.SceneView.Tests
- SnapTestsVixen.Editor.SceneView.Tests
- StubProbeVixen.Editor.SceneView.Tests
- SubObjectPickerVixen.Editor.SceneView
- TerrainModeVixen.Editor.Terrain
- TransformGizmoVixen.Editor.SceneView