Struct Ray
- Namespace
- Lime
- Assembly
- Lime.dll
Representation of endless ray.
public struct Ray : IEquatable<Ray>
- Implements
- Inherited Members
Constructors
Ray(Vector3, Vector3)
public Ray(Vector3 position, Vector3 direction)
Parameters
Fields
Direction
[YuzuMember]
public Vector3 Direction
Field Value
Position
[YuzuMember]
public Vector3 Position
Field Value
Methods
Equals(Ray)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Ray other)
Parameters
other
RayAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Intersects(BoundingSphere)
Calculates the distance between the center of this ray and border of sphere.
public float? Intersects(BoundingSphere sphere)
Parameters
sphere
BoundingSphereSphere to check intersection for.
Returns
- float?
The distance between the center of this ray and border of sphere. Returns 0.0f if ray is inside of sphere. Returns null if ray is pointed away from sphere.
Intersects(Plane)
public float? Intersects(Plane plane)
Parameters
plane
Plane
Returns
IntersectsTriangle(Vector3, Vector3, Vector3)
public float? IntersectsTriangle(Vector3 a, Vector3 b, Vector3 c)
Parameters
Returns
Transform(Matrix44)
public Ray Transform(Matrix44 matrix)
Parameters
matrix
Matrix44
Returns
Operators
operator ==(Ray, Ray)
public static bool operator ==(Ray a, Ray b)
Parameters
Returns
operator !=(Ray, Ray)
public static bool operator !=(Ray a, Ray b)