Jump to content
  • Advertisement
Sign in to follow this  
math3d

how to use gdi or gdi+ draw a cube and rotate it ?

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

--------------begin hi---------------- how to use gdi or gdi+ draw a cube and rotate it ? who can help me ? i hope use 3d math class. who can give some help .write a simple demo? --------------e n d hi---------------- only use gdi or gdi+ please help me.thanks very very much.

Share this post


Link to post
Share on other sites
Advertisement
If you are gonne be satisfied with orthogonal view and wireframe filling then you simply have to calculate rotation matrice and multiply it with the position vectors of your vertices, and ignore the Z value to draw on your canvas :) "3d Transformation matrices" would be a good start for searching.

Share this post


Link to post
Share on other sites
if anybody give me a simple demo example,it is best.i wanna very very thanks.
i'm a newbie.please give me some help.thanks a lot.

Share this post


Link to post
Share on other sites
Hi. I found the following link, which contains C# code using GDC+ to draw a 3D cube. I make no promises that the code is good. No, it is not C++, but hopefully you can adapt it yourself.

Rotating a 3D Cube and Sphere with GDI+

Now...although I've provided a link to someone's example code, I do highly recommend that you go an learn about 3D projection matrices, and the 3D graphics pipeline yourself. If you hope to do any serious 3D programming, you will need to truly understand the underlying math and geometry.

Share this post


Link to post
Share on other sites
Having someone hand you a solution is not the best way to learn. Providing you with an "example" that you can directly use in your project without truely understanding it, will do you nothing.

All this would show is that you have the abillity to steal other peoples work.

Learn how to do things yourself, it is the only way that you will learn!

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!