Click or drag to resize
Ab4d.SharpEngine logo

Ray Structure

Represents a three dimensional line based on a point in space and a direction.
Inheritance Hierarchy
SystemObject
  SystemValueType
    Ab4d.SharpEngine.CommonRay

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public struct Ray : IEquatable<Ray>, IFormattable

The Ray type exposes the following members.

Constructors
 NameDescription
Public methodRay Initializes a new instance of the Ray struct.
Top
Properties
 NameDescription
Public propertyIsValid True when the Direction is not a zero vector.
Top
Methods
 NameDescription
Public methodEquals(Object) Determines whether the specified Object is equal to this instance.
(Overrides ValueTypeEquals(Object))
Public methodEquals(Ray) Determines whether the specified Vector4 is equal to this instance.
Public methodEquals(Ray) Determines whether the specified Vector4 is equal to this instance.
Public methodStatic memberFindClosestRay FindClosestRay is a static method that returns a Ray that goes from ray1 to ray2 and starts on the closest point between two rays. If closest cannot be found, the returned Ray has zero length (its IsValid property is false).
Public methodGetHashCode Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode)
Public methodNormalizeDirection Normalizes the direction
Public methodRayIntersectsBox Determines whether there is an intersection between this ray and a BoundingBox.
Public methodToString Returns a String that represents this instance.
(Overrides ValueTypeToString)
Public methodToString(IFormatProvider) Returns a String that represents this instance.
Public methodToString(String) Returns a String that represents this instance.
Public methodToString(String, IFormatProvider) Returns a String that represents this instance.
Public methodTransform Transforms this ray with the specified matrix. The transformation is done with transforming the ray's position and its direction (direction is transformed without translation and then normalized).
Top
Operators
 NameDescription
Public operatorStatic memberEquality(Ray, Ray) Tests for equality between two objects.
Public operatorStatic memberInequality(Ray, Ray) Tests for inequality between two objects.
Top
Fields
 NameDescription
Public fieldDirection The normalized direction in which the ray points.
Public fieldPosition The position in three dimensional space where the ray starts.
Top
See Also