Post

 Resources 

Console


RE: Simple but Hard bet you can't solve this. Corre (0 replies, 0 views) (2000-Jul-28)
-
What is it that you want to do? If you just want to use Direct3D to blit the plane (to take advantage of Alpha blitting and such for example) you could just use transformed vertices. On the other hand, if you have like a 3D world and want a surface to fill the entire screen, you could do it using view transformations. You COULD do this by moving the camera, but it would probably be easier to make the matrix yourself. If the coordinates of your plane is, say, -1900,300,1800,2000 you could set up a matrix something like this Dim ViewMatrix As D3DMATRIX With ViewMatrix Dx.IdentityMatrix ViewMatrix .rc41=1900 'These two values will move the plane to 0,0 .rc42=-300 .rc11=(1800+1900)/800 'These two values will scale the plane to be 800x600 .rc22=(2000-300)/600 Then just set your d3d device to use this matrix as view (camera) matrix: Device.SetTransform D3DTRANSFORMSTATE_VIEW, ViewMatrix This is basically a very standard transformation matrix. If you don't get what it does, you should pick up a book on linear algebra... If you are serious about programming 3d, you must know linear algebra. Also, there are a sectionin the DX SDK about Matrices and transformation which might be good to look at. /Corre, MiCo Games http://www.micogames.com


-
Up One Level | Back to Forum


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 52 visitors within the last 20 minutes
RSS News Feed