« That Was My Sushi Lunch | Home | Pope Calls Bush the Anti-Christ? »

June 1, 2004

3D Viewport Width

Messing about with Direct3D (some more). Ideally by the end I will have the skillz to put together some funky little games with sound effects and crud. I will be going for something in the "puzzle" genre with a nice "tactile" experience; big chunky, colorful 3D objects with appealing sound effects and relatively "deep" gameplay ("combo" bonuses, etc). Brushing up on my trigonometry for this project, today I decided that; Width of the viewport (in 3D world units) = 2 * Sin(Field_of_View / 2) * Object_Distance / Cos(Field_of_View / 2) * Aspect_Ratio Or something like that. Anyway, this function seems to help me decide how many vertices are to the left/right of a mouseclick, so that is good enough for now. P.S.; Dear Father; yes, I am still alive! Even though I have not updated my site in forever... Your new puppy is very cute, maybe I will post some of the pictures here, if that is okay...

1 Comment

Totally OK to post pix of the puppy.

Pop