Back to class index
LineSegment[Class Summary]
a
b
ctor (+3 overloads)
GetPoint(d)[const]
CenterPoint()[const]
Reverse()
Dir()[const]
AnyPointFast()[const]
ExtremePoint(direction)[const] (+1 overload)
Translate(offset)
Transform(transform) (+3 overloads)
Length()[const]
LengthSq()[const]
IsFinite()[const]
Equals(...)[const]
BitEquals(other)[const]
Contains(...)[const] (+1 overload)
ClosestPoint(point)[const] (+10 overloads)
Distance(point)[const] (+13 overloads)
DistanceSq(point)[const] (+1 overload)
Intersects(plane)[const] (+12 overloads)
IntersectsDisc(disc)[const]
ToRay()[const]
ToLine()[const]
ProjectToAxis(...)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
FromString(str,outEndStr)[static] (+1 overload)

LineSegment::GetPoint

Syntax

float4 LineSegment::GetPoint(float d) const; [4 lines of code]

Returns a point on the line.

Note
The meaning of d here differs from Line::GetPoint and Ray::GetPoint. For the class LineSegment, GetPoint(0) returns a, and GetPoint(1) returns b. This means that GetPoint(1) will not generally be exactly one unit away from the starting point of this line segment, as is the case with Line and Ray.

Parameters

floatdThe normalized distance along the line segment to compute. If a value in the range [0, 1] is passed, then the returned point lies along this line segment. If some other value is specified, the returned point lies on the line defined by this line segment, but not inside the interval from a to b.

Return Value

(1-d)*a + d*b.

See Also

a, b, Line::GetPoint(), Ray::GetPoint().