272 GPGPU Programming for Games and Science
connecting the extreme points. The member
direction[1] is a perpendicular unit-
length vector, computed using the negative of the function
Vector2<Real>::Perp
so that direction[1] is a counterclockwise rotation of direction[0]. The idea is that
the points have intrinsic dimensionality of at least one with significant com-
ponents in the direction of the line
origin+t*direction[0].
The maximum distance from the input points to the line
origin+t*direction[0]
is computed, a quantity measured in the direction[1]. In fact, signed distances
are computed to support orientation information about the extreme set. We
know the point of maximum distance from the line and on which side of the
line it lives. The index into