Back to class index
Line[Class Summary]
pos
dir
ctor (+3 overloads)
IsFinite()[const]
GetPoint(distance)[const]
Translate(offset)
Transform(transform) (+3 overloads)
Contains(...)[const] (+2 overloads)
Equals(line,epsilon)[const]
BitEquals(other)[const]
Distance(point)[const] (+12 overloads)
ClosestPoint(targetPoint)[const] (+13 overloads)
Intersects(...)[const] (+10 overloads)
IntersectsDisc(disc)[const]
ToRay()[const]
ToLineSegment(d)[const] (+1 overload)
ProjectToAxis(...)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
AreCollinear(p1,p2,p3,epsilon)[static]
ClosestPointLineLine(...)[static]
FromString(str,outEndStr)[static] (+1 overload)

Line::GetPoint

Syntax

float4 Line::GetPoint(float distance) const; [5 lines of code]

Gets a point along the line at the given distance.

Use this function to convert a 1D parametric point along the Line to a 3D point in the linear space.

Parameters

floatdistanceThe point to compute. GetPoint(0) will return pos. GetPoint(t) will return a point at distance |t| from pos, towards the direction specified by dir. If a negative value is specified, a point towards the direction -dir is returned.

Return Value

pos + distance * dir.

See Also

pos, dir.