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::ToLineSegment

Syntax

LineSegment Line::ToLineSegment(float d) const; [4 lines of code]

Converts this Line to a LineSegment.

Parameters

floatdSpecifies the position of the other endpoint along this Line. This parameter may be negative.

Return Value

A LineSegment with point a at pos, and point b at pos + d * dir.

See Also

pos, dir, Line::Line, class LineSegment, ToRay().

Syntax

LineSegment Line::ToLineSegment(float dStart, float dEnd) const; [4 lines of code]

Converts this Line to a LineSegment.

Parameters

floatdStartSpecifies the position of the first endpoint along this Line. This parameter may be negative, in which case the starting point lies to the opposite direction of the Line. floatdEndSpecifies the position of the second endpoint along this Line. This parameter may also be negative.

Return Value

A LineSegment with point a at pos + dStart * dir, and point b at pos + dEnd * dir.

See Also

pos, dir, Line::Line, class LineSegment, ToLine().