so im arguing with my friend about GetWorldTransform(). im saying that this DEVICE->GetTransform(D3DTS_WORLD, &matWorld); is the same as GetWorldTransform() in gdi+.
am i right or wrong? if im wrong what is it than in directx?
Yeah you are definitely wrong. The GDI+ world transform is very simple and only allows transformations in 2D. Checkout the XFORM structure to see how different it is to a Direct 3D matrix. Its not even homogeneous. The 2 "may" end up going to the same hardware functionality but there is no guarantee of this. GDI+ is quite a high level wrapper where Direct3D is much closer to the metal. The 2 really aren't comparable.
Well, AFAIK GDI+ is 2D and DirectX is 3D. so they are not equal in that matter, and continuing on that, there wouldn't be a match either.
So according to me:
am i right or wrong?
You are wrong.
if im wrong what is it than in directx?
There is no equivalent.
Related
I'm new in direct3d and i got a newbie question.
I got a point in the world and the location of the camera. I would like to know where i will see the point on my screen. I know the width/height of my screen, the field of view of the camera and everything else. I think that there will be function that do that and i don't need to calculate my self.
I searched a lot and couldn't find it, how do i do that?
The only thing i found is: http://msdn.microsoft.com/en-us/library/bb205516%28VS.85%29.aspx but i didn't understand what to give to him (im new in direct3d as i said)
Thank you for your help
First of all, Direct3D is not a solution to world to screen transformation, it is an API that lets you use the GPU to solve that problem faster on the GPU, but if you don't know, how to do it without Direct3D, then Direct3D will probably of no help. So you have to learn the linear Algebra, and the Rendering Pipeline (which is already documented in a lot of places).
The user will input two co ordinates. We have to change them to opposite co ordinates and we should output a rectangle on the screen. Can we do it in C++ ??
Sure we can, it's just not quite as simple. You will need an external library to achieve this result - personally I recommend looking into these two tutorials:
I suggest you learn this if you want 2D graphics
Or this if you want to go all the way
With both SDL and OpenGL, once you learn to understand them of course, your issue will be easy to resolve by writing very simple code - writing a rectangle or a similar object is usually the first thing being taught. The difference is that SDL encompasses fairly complex framework that allows you an efficient use of 2D graphics, while OpenGL (which SDL is based upon) is much more difficult to deal with - the reward, on the other hand, is far more freedom in what you can do.
I would like to get help in using C++ in order to draw a polygon using an array of 3d points. I already sort my array so that my points are arranged in order(i.e one points follow the other). Any help will be appreciated in advance. Thanks
Unless I am misreading the question, you will need a 3D-Rendering API such as Direct3D or OpenGL. There are other options, but those two are by far the most popular.
You do have to be aware that Direct3D is available only on Windows, while OpenGL is supported on most major platforms. But Direct3D is part of DirectX which is an entire package of multimedia APIs while OpenGL is strictly graphics (aside from OpenAL for audio).
Whichever you choose, there are countless tutorials online about drawing basic polygons that are just a quick Google search away.
Well, i'm looking for a good guide to program Topdown 3D in C++. Where i can find a good one?
Thanks.
Topdown isn't any different than any other 3D programming - except for the position of the viewer.
You can get some more information about what you want to do by checking out gluLookAt()
Your "up" would be X or Z depending on what you wanted to do and if you still wanted to use right-handed coordinates for everything else.
Check out Isometric at the nehe tutorials site.
I need to graph XYZ coordinates in a 3D cube that I can rotate. Im look for code that will basically take a 3d array of 1s and 0s and build a cube. Coloring of the points would also be nice. The program that creates the point is in C/C++ so I would prefer something that would play nicely will that but Im not picky. Im alright aware that Mathematica can do this , but Im looking for something that can be "live" updated so I can watch the progress
Thanks in advance
One obvious possibility would be something like Direct3D (for Windows, X-box and Windows Phone 7) or OpenGL (for pretty much anything that can do 3D except X-box or Windows Phone 7).
There are quite a few libraries and sample code for things like this.
If you're working on Unix/Linux, you may or may not have OpenGL installed. If you don't, you might want to check into Mesa3D.
I would go with Jerry's suggestion of using OpenGL. There are some good tutorials out there too - have a look at the nehe series which have examples for doing precisely what you're after.
Refer this tutorial link : http://www.directxtutorial.com/
This will help you to implement three dimensional cube.