Jump to content
  • Advertisement
Sign in to follow this  
Alex Pavel

How can i apply transformation matrix to mesh?

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

We can answer your question, but it probably wont help. Open a book on opengl d3d or game mathematics...

Transforming a mesh means mathematically converting the vertex coordinates from one coordinate space (like object space) to another (like world space or camera space).

When rendering, this is normally done by the grapgics api (and hardware), so you suppily the matrix (or matricies), then you suppily the mesh verticies in object space. The rendering api (and your shader) transforms the mesh into camera space, then screen space, during rendering.

If you need to transform something on the cpu, you jut multiply the vertex (x,y,z) by the transformation matrix. There are normally functions to do this for you, or you can look up matrix math on wikipedia.

Fyi, matrix math is not communitative, so order matters. Also opengl and d3d typically organize transformation matricies differently, which affects the direction operations are performed in.

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!