Aardvark.Base


Ray2d

A two-dimensional ray with an origin and a direction.

Constructors

ConstructorDescription
new(origin, direction)
Signature: (origin:V2d * direction:V2d) -> unit

Creates Ray from origin point and directional vector

Instance members

Instance memberDescription
AnyNaN
Signature: bool

Returns true if either the origin or the direction contains any NaN value.

BoundingBox2d
Signature: Box2d
Modifiers: abstract
Equals(other)
Signature: other:obj -> bool
Modifiers: abstract

Checks if 2 objects are equal.

GetClosestPointOnRay(p)
Signature: p:V2d -> V2d

Gets the point on the ray that is closest to the given point. Ray direction must be normalized (length 1).

GetDistanceToRay(p)
Signature: p:V2d -> float
GetHashCode()
Signature: unit -> int
Modifiers: abstract

Calculates Hash-code of the given ray.

GetLine2dOnRay(range)
Signature: range:Range1d -> Line2d

Gets segment on the ray starting at range.Min direction from origin and ending at range.Max direction from origin.

GetLine2dOnRay(tMin, tMax)
Signature: (tMin:float * tMax:float) -> Line2d

Gets segment on the ray starting at tMin direction from origin and ending at tMax direction from origin.

GetPointOnRay(t)
Signature: t:float -> V2d

Gets the point on the ray that is t * direction from origin.

GetPointSide(p)
Signature: p:V2d -> float

Returns a signed value where left is negative and right positive. The magnitude is equal to the double size of the triangle the ray + direction and p.

GetT(p)
Signature: p:V2d -> float

Gets the t for a point p on this ray.

Intersect(r)
Signature: r:Ray2d -> V2d
Intersect(dirVector)
Signature: dirVector:V2d -> V2d
IsInvalid
Signature: bool
Modifiers: abstract

A ray is invalid if its direction is zero.

IsValid
Signature: bool
Modifiers: abstract

A ray is valid if its direction is non-zero.

LexicalCompare(other)
Signature: other:Ray2d -> int
Line2d
Signature: Line2d
Plane2d
Signature: Plane2d
Reversed
Signature: Ray2d
ToString()
Signature: unit -> string
Modifiers: abstract

Static members

Static memberDescription
FromEndPoints(origin, target)
Signature: (origin:V2d * target:V2d) -> Ray2d
op_Equality(a, b)
Signature: (a:Ray2d * b:Ray2d) -> bool
op_Inequality(a, b)
Signature: (a:Ray2d * b:Ray2d) -> bool
Parse(s)
Signature: s:string -> Ray2d
Fork me on GitHub