PDA

View Full Version : winmobo and directx : touchable 3d objects


giddy
19th November 2008, 06:55 AM
hi,

So I see there are tutorials and books out there about drawing a 3d object,
but what I want to do is, after I draw the object, how do I have it respond to the mouse/stylus (touchscreen!). Like have a cube on the screen and allow the user to rotate it around its vertical axis?

In Winforms, I would do something like Inherit from Control then override paint and paint a circle/square, after that I would track mouse movement by checking the X,Y cords of the mouse and whether it lies in my area.

But, now in 3d how do I check if the X,Y mouse coordinates is *ON* the object. Also, if its not too difficult, how do I put a picture on each side of the cube.

I'm sorry if the questions are a little silly, I'm a noob at WinMobo and DirectX, but very good at Winforms


Thanks so much.