← Standard library

Ray2

struct Ray2
import Ray2 from Wax;

A parametric ray defined by origin and direction. The direction is stored without normalization, and PointAt also accepts negative parameters.

Geometry2D.wax:271

Members

originfield

public float2 origin

The position at parameter zero.

Geometry2D.wax:275

directionfield

public float2 direction

The displacement per unit parameter; need not have unit length.

Geometry2D.wax:279

constructorconstructor

public constructor (float2 origin, float2 direction)

Stores origin and direction without normalization.

Geometry2D.wax:284

PointAtmethod

public fn PointAt(float t) : float2

Returns origin + direction*t. The parameter is a physical distance only when direction has unit length; negative t is allowed.

Geometry2D.wax:293

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.