• Advertisement
Sign in to follow this  

How can i apply transformation matrix to mesh?

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