Jump to content


rotating an object


1 reply to this topic

#1 broli86

    Member

  • Members
  • PipPip
  • 81 posts

Posted 26 April 2008 - 06:33 PM

to rotate an object about an axis by angle theta, is it necessary to rotate all the vertices by that angle about that axis using the standard matrix for rotation.
or is there a smarter way out ?

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4782 posts
  • LocationBellevue, WA

Posted 26 April 2008 - 08:22 PM

If you're using OpenGL or Direct3D, you can use the graphics card's built-in matrix multiplication features to do the transformation for you.

If you're doing raytracing, you could try transforming all rays by the inverse rotation before intersecting them with the object. That might or might not be any faster than transforming each vertex of the object once before raytracing starts.
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users