Archived

This topic is now archived and is closed to further replies.

Dot-Product

This topic is 5115 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hmm, not very many "straight" answers there though.

As I understand it, the DP returns how similar two vectors are.

0 being perpendicular
|u|*|v| being completely orthogonal

(DP is also equal to |u|*|v|*cos(angle between u and v) fyi)

it''s calculated as the sum of the product of each ... element/part? of the vector:

DP = u.x*v.x + u.y*v.y + u.z*v.z
for a 3d vector

-Michael

Share this post


Link to post
Share on other sites
Have a look at Chapter 61 in Abrash''s "Game Programming Black Book". The entire text of the book is available online at http://public.planetmirror.com/pub/gpbb.

Share this post


Link to post
Share on other sites