Game Development Reference
In-Depth Information
Figure 8 - Calculating the distance from a point to a line.
We can then compute the projection and perpendicular component,
The distance to the point is then given by ||w˔||.
1.2.1.6Cross Product
The cross product between two vectors yields a vector that is perpendicular to both. In
game development the cross product is a very useful tool, we will see use it when we con-
struct geometry procedurally as it will help us in calculating and orthographic basis from a
direction vector.
The cross product is defined as a vector w which is perpendicular to the vectors v x u
It is important to remember that the cross product of two vectors of the same direction, or
if one of the vectors has a zero magnitude the result will be a zero vector .
Search WWH ::




Custom Search