Struct Vector2Ray
- Namespace
- OmegaEngine.Foundation.Geometry
- Assembly
- OmegaEngine.Foundation.dll
Defines a ray in two dimensions, specified by an origin and a direction.
[TypeConverter(typeof(Vector2RayConverter))]
public struct Vector2Ray : IEquatable<Vector2Ray>
- Implements
- Extension Methods
Constructors
Vector2Ray(Vector2, Vector2)
Defines a ray in two dimensions, specified by an origin and a direction.
public Vector2Ray(Vector2 position, Vector2 direction)
Parameters
positionVector2A point along the ray.
directionVector2A unit vector specifying the direction in which the ray is pointing (automatically normalized).
Properties
Direction
A unit vector specifying the direction in which the ray is pointing (automatically normalized).
public Vector2 Direction { readonly get; set; }
Property Value
- Vector2
Position
A point along the ray.
public readonly Vector2 Position { get; }
Property Value
- Vector2
Methods
Equals(Vector2Ray)
public bool Equals(Vector2Ray other)
Parameters
otherVector2Ray
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override readonly int GetHashCode()
Returns
ToString()
public override readonly string ToString()
Returns
Operators
operator ==(Vector2Ray, Vector2Ray)
public static bool operator ==(Vector2Ray left, Vector2Ray right)
Parameters
leftVector2RayrightVector2Ray
Returns
operator !=(Vector2Ray, Vector2Ray)
public static bool operator !=(Vector2Ray left, Vector2Ray right)
Parameters
leftVector2RayrightVector2Ray