Class RayD
Defines a ray.
Inheritance
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
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. |
obj | The Object to compare with the current Ray. |
Returns
Type | Description |
---|---|
System. |
Equals(RayD)
Determines whether the specified Ray is equal to the current Ray.
Declaration
public bool Equals(RayD other)
Parameters
Type | Name | Description |
---|---|---|
Ray |
other | The Ray to compare with the current Ray. |
Returns
Type | Description |
---|---|
System. |
GetHashCode()
Gets the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System. |
Intersects(BoundingBoxD)
Checks whether the Ray intersects a specified BoundingBox.
Declaration
public Nullable<double> Intersects(BoundingBoxD box)
Parameters
Type | Name | Description |
---|---|---|
Bounding |
box | The BoundingBox to check for intersection with the Ray. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Bounding |
box | The BoundingBox to check for intersection with. |
System. |
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 |
---|---|---|
Bounding |
frustum | The BoundingFrustum to check for intersection with the Ray. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Bounding |
sphere | The BoundingSphere to check for intersection with. |
System. |
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 |
---|---|---|
Bounding |
sphere | The BoundingSphere to check for intersection with the Ray. |
Returns
Type | Description |
---|---|
System. |
Intersects(PlaneD)
Determines whether this Ray intersects a specified Plane.
Declaration
public Nullable<double> Intersects(PlaneD plane)
Parameters
Type | Name | Description |
---|---|---|
Plane |
plane | The Plane with which to calculate this Ray's intersection. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Plane |
plane | The Plane with which to calculate this Ray's intersection. |
System. |
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. |
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 |
---|---|---|
Ray |
a | The object to the left of the equality operator. |
Ray |
b | The object to the right of the equality operator. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Ray |
a | The object to the left of the inequality operator. |
Ray |
b | The object to the right of the inequality operator. |
Returns
Type | Description |
---|---|
System. |