Back to class index

Class LineSegment

Summary

A line segment in 3D space is a finite line with a start and end point.

Member Reference

LineSegmentA line segment in 3D space is a finite line with a start and end point.
aThe starting point of this line segment.
bThe end point of this line segment.
ctor (+3 overloads)The default constructor does not initialize any members of this class.
GetPoint(d)[const]Returns a point on the line.
CenterPoint()[const]Returns the center point of this line segment.
Reverse()Reverses the direction of this line segment.
Dir()[const]Returns the normalized direction vector that points in the direction a->b.
AnyPointFast()[const]Quickly returns an arbitrary point inside this LineSegment. Used in GJK intersection test.
ExtremePoint(direction)[const] (+1 overload)Computes an extreme point of this LineSegment in the given direction.
Translate(offset)Translates this LineSegment in world space.
Transform(transform) (+3 overloads)Applies a transformation to this line.
Length()[const]Computes the length of this line segment.
LengthSq()[const]Computes the squared length of this line segment.
IsFinite()[const]Tests if this line segment is finite.
Equals(...)[const]Tests if this line segment represents the same set of points than the given line segment.
BitEquals(other)[const]Compares whether this LineSegment and the given LineSegment are identical bit-by-bit in the underlying representation.
Contains(...)[const] (+1 overload)Tests if the given point or line segment is contained on this line segment.
ClosestPoint(point)[const] (+10 overloads)Computes the closest point on this line segment to the given object.
Distance(point)[const] (+13 overloads)Computes the distance between this line segment and the given object.
DistanceSq(point)[const] (+1 overload)
Intersects(plane)[const] (+12 overloads)Tests whether this line segment and the given object intersect.
IntersectsDisc(disc)[const]Tests if this line segment intersects the given disc.
ToRay()[const]Converts this LineSegment to a Ray.
ToLine()[const]Converts this LineSegment to a Line.
ProjectToAxis(...)[const]Projects this LineSegment onto the given 1D axis direction vector.
ToString()[const]Returns a human-readable representation of this LineSegment. Most useful for debugging purposes.
SerializeToString()[const]
SerializeToCodeString()[const]Returns a string of C++ code that can be used to construct this object. Useful for generating test cases from badly behaving objects.
FromString(str,outEndStr)[static] (+1 overload)
Back to class index