Vb.net - Dx9 - Translation + Rotation with Meshes problem.

Started by
12 comments, last by Dean1988 18 years, 8 months ago
Quote:Original post by Mushu
arrr!

*** Source Snippet Removed ***
^ does that work?

MDX in C++ is, essentially the same as in VB, minus all the language differences [wink] its the same library afaik


That should work, but you will have to keep track of the total angle (not the change in the angle).

Yes, MDX will work in c++ but what is the point. Unmanaged isn't too difficult to learn (for me anyways). If you are pretty comfortable in c++ and understand the basics of DX, you should do fine in unmanaged. Really, my only gripes are how it is less organized than managed and how there is no "autocomplete" for the 2^43 different constants.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
Advertisement
Okay

1) I meant unmanaged :P I just never really have a need to call it unmanaged hehe.

2) That code still keeps it stationary, it's really weird...

I don't understand when you say keep track of it?

Cheers.

Dean.
I''m new,so take it easy.
By keep track of the angle, he means store the angle in a variable or something.
// render a mesh at x,y,z rotated by r degrees on the y-axisdxClass.dxDevice.Transform.World = Matrix.Identity()dxClass.dxDevice.Transform.World = Matrix.Multiply(Matrix.RotationY(r*PI/180), Matrix.Translation(x, y, z))  dxMesh1.RenderMesh()// becasuse Matrix.Identity() undos all the previous transforms// you can't rely on it to actually "rotate" anything (ie,// spin). You have to incriment a variable and rotate the object// a little more each pass (ie, increasing r in the above code)

If the code I pasted before (which is essentially the same as above) doesn't work, then we're going to need to see more code. Because (assuming all the MDX functions are right) it does work.

Blah, I'm off to bed (getting late over here :X) Sorry I couldn't be of more help.
I thought so :)

I just didn't want to try it, and make myself look even more like a tit :P

Cheers guys, it's working great now.

Thanks for your time :)

Dean.
I''m new,so take it easy.

This topic is closed to new replies.

Advertisement