Table of Contents

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

position Vector2

A point along the ray.

direction Vector2

A 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

other Vector2Ray

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override readonly int GetHashCode()

Returns

int

ToString()

public override readonly string ToString()

Returns

string

Operators

operator ==(Vector2Ray, Vector2Ray)

public static bool operator ==(Vector2Ray left, Vector2Ray right)

Parameters

left Vector2Ray
right Vector2Ray

Returns

bool

operator !=(Vector2Ray, Vector2Ray)

public static bool operator !=(Vector2Ray left, Vector2Ray right)

Parameters

left Vector2Ray
right Vector2Ray

Returns

bool