Archived

This topic is now archived and is closed to further replies.

TheEmotion

Feedback with DirectX

Recommended Posts

TheEmotion    122
1: In DirectX... Is there a way to receive back where points are drawn on the screen after camera and projection transformations? for example point (2,3,4) would be drawn at point (?,?) on screen taking camera and other matrices into consideration.. (I believe this is what is called feedback in OpenGL) 2: Is there a way, In DirectX, to send 2d point(x,y) of mouse and receive what line in the DirectX 3d world that that point makes up. For example any point on the 2d viewport could be a line in 3d. If I could get 2 points that fall on the line then I could get the line from that.?

Share this post


Link to post
Share on other sites
neneboricua19    634
1. Use D3DXVec3Project to do this.

2. Use D3DXVec3Unproject for this. Also, if you''re trying to get a ray or do picking, take a look at the Pick sample that comes with the SDK.

neneboricua

Share this post


Link to post
Share on other sites