Show / Hide Table of Contents

Class RayD

Defines a ray.

Inheritance
System.Object
RayD
Namespace: VRageMath
Assembly: VRage.Math.dll
Syntax
public sealed class RayD : ValueType, IEquatable<RayD>

Constructors

RayD(Vector3D, Vector3D)

Creates a new instance of Ray.

Declaration
public RayD(Vector3D position, Vector3D direction)
Parameters
Type Name Description
Vector3D position

The starting point of the Ray.

Vector3D direction

Unit vector describing the direction of the Ray.

RayD(ref Vector3D, ref Vector3D)

Declaration
public RayD(ref Vector3D position, ref Vector3D direction)
Parameters
Type Name Description
Vector3D position
Vector3D direction

Fields

Direction

Unit vector specifying the direction the Ray is pointing.

Declaration
public Vector3D Direction
Field Value
Type Description
Vector3D

Position

Specifies the starting point of the Ray.

Declaration
public Vector3D Position
Field Value
Type Description
Vector3D

Methods

Equals(Object)

Determines whether two instances of Ray are equal.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The Object to compare with the current Ray.

Returns
Type Description
System.Boolean

Equals(RayD)

Determines whether the specified Ray is equal to the current Ray.

Declaration
public bool Equals(RayD other)
Parameters
Type Name Description
RayD other

The Ray to compare with the current Ray.

Returns
Type Description
System.Boolean

GetHashCode()

Gets the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Intersects(BoundingBoxD)

Checks whether the Ray intersects a specified BoundingBox.

Declaration
public Nullable<double> Intersects(BoundingBoxD box)
Parameters
Type Name Description
BoundingBoxD box

The BoundingBox to check for intersection with the Ray.

Returns
Type Description
System.Nullable<System.Double>

Intersects(ref BoundingBoxD, out Nullable<Double>)

Checks whether the current Ray intersects a BoundingBox.

Declaration
public void Intersects(ref BoundingBoxD box, out Nullable<double> result)
Parameters
Type Name Description
BoundingBoxD box

The BoundingBox to check for intersection with.

System.Nullable<System.Double> result

[OutAttribute] Distance at which the ray intersects the BoundingBox or null if there is no intersection.

Intersects(BoundingFrustumD)

Checks whether the Ray intersects a specified BoundingFrustum.

Declaration
public Nullable<double> Intersects(BoundingFrustumD frustum)
Parameters
Type Name Description
BoundingFrustumD frustum

The BoundingFrustum to check for intersection with the Ray.

Returns
Type Description
System.Nullable<System.Double>

Intersects(ref BoundingSphere, out Nullable<Double>)

Checks whether the current Ray intersects a BoundingSphere.

Declaration
public void Intersects(ref BoundingSphere sphere, out Nullable<double> result)
Parameters
Type Name Description
BoundingSphere sphere

The BoundingSphere to check for intersection with.

System.Nullable<System.Double> result

[OutAttribute] Distance at which the ray intersects the BoundingSphere or null if there is no intersection.

Intersects(BoundingSphereD)

Checks whether the Ray intersects a specified BoundingSphere.

Declaration
public Nullable<double> Intersects(BoundingSphereD sphere)
Parameters
Type Name Description
BoundingSphereD sphere

The BoundingSphere to check for intersection with the Ray.

Returns
Type Description
System.Nullable<System.Double>

Intersects(PlaneD)

Determines whether this Ray intersects a specified Plane.

Declaration
public Nullable<double> Intersects(PlaneD plane)
Parameters
Type Name Description
PlaneD plane

The Plane with which to calculate this Ray's intersection.

Returns
Type Description
System.Nullable<System.Double>

Intersects(ref PlaneD, out Nullable<Double>)

Determines whether this Ray intersects a specified Plane.

Declaration
public void Intersects(ref PlaneD plane, out Nullable<double> result)
Parameters
Type Name Description
PlaneD plane

The Plane with which to calculate this Ray's intersection.

System.Nullable<System.Double> result

[OutAttribute] The distance at which this Ray intersects the specified Plane, or null if there is no intersection.

ToString()

Returns a String that represents the current Ray.

Declaration
public override string ToString()
Returns
Type Description
System.String

Operators

Equality(RayD, RayD)

Determines whether two instances of Ray are equal.

Declaration
public static bool operator ==(RayD a, RayD b)
Parameters
Type Name Description
RayD a

The object to the left of the equality operator.

RayD b

The object to the right of the equality operator.

Returns
Type Description
System.Boolean

Inequality(RayD, RayD)

Determines whether two instances of Ray are not equal.

Declaration
public static bool operator !=(RayD a, RayD b)
Parameters
Type Name Description
RayD a

The object to the left of the inequality operator.

RayD b

The object to the right of the inequality operator.

Returns
Type Description
System.Boolean
☀
☾
In This Article
  • Constructors
    • RayD(Vector3D, Vector3D)
    • RayD(ref Vector3D, ref Vector3D)
  • Fields
    • Direction
    • Position
  • Methods
    • Equals(Object)
    • Equals(RayD)
    • GetHashCode()
    • Intersects(BoundingBoxD)
    • Intersects(ref BoundingBoxD, out Nullable<Double>)
    • Intersects(BoundingFrustumD)
    • Intersects(ref BoundingSphere, out Nullable<Double>)
    • Intersects(BoundingSphereD)
    • Intersects(PlaneD)
    • Intersects(ref PlaneD, out Nullable<Double>)
    • ToString()
  • Operators
    • Equality(RayD, RayD)
    • Inequality(RayD, RayD)
Back to top
Generated by DocFX
☀
☾