Jump to content
  • Advertisement
Sign in to follow this  

how moves the mesh??

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

DirectX has three projections: WORLD, VIEW and PROJECTION. You set up the PROJECTION in the beginning to get the near/far clipping and camera field of view; you set VIEW also in the beginning to position/rotate the camera in the world; then you set the WORLD transform for each mesh instance you draw to draw that instance in various positions/orientations.

Share this post

Link to post
Share on other sites
As mentioned by hplus0603,
You basically have a world transformation matrix for each mesh and this transformation places the mesh in the world. So you can follow a simple pattern

1) Set World Transformation Matrix
2) Render Mesh
3) Set World Transformation Matrix
4) Render 2nd Mesh
... and so forth.

example c++

pDevice->SetTransform(D3DTS_WORLD, &matWorld);

example C#

Device.Transform.World = matWorld;

I hope this helps.
Take care.

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!