Advertisement Jump to content
Sign in to follow this  
JPulham

Clockwise points

This topic is 4596 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

In the lighting tutorial and several resources I have read on CrossProduct, it says that the output is dependant on the input order. So how do I determine which way is clockwise? Do any formats export in this way and is there a way to calculate this?

Share this post


Link to post
Share on other sites
Advertisement
Crossproduct(v1,v2) returns a vector perpendicular to v1 and v2 with a length of length(v1)*length(v2)*sin(angle between v1 and v2). This vector points in the direction so that v1,v2,crossProduct(v1,v2) form a right-handed system.
Clicky
so crossProduct(v1,v2) = - crossProduct(v2,v1)

The counter-clockwise way is the way crossProduct(v1,v2) points to.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!