Simple renderer in .net with SharpGL (openGL)


Re: Simple renderer in .net with direct3d
#18
I'm afraid setting up a decent camera system isn't done in a couple of lines, I use a handfull of different classes (window, frustum, boundingbox, etc) for it in my renderer.

Simplified:
First you (neg) translate your scene to the lookat point and apply optional rotation.
Then you calculate the distance from the lookat point to the eye (zoom and fov angle combined with trigonometry)
That value you use to (neg) translate the scene, so it ends up in front of the camera.
Last you determine far and near

In this situation the camera eye is always at 0,0,0 and you basically put the model inside it's view (frustum).
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Simple renderer in .net with direct3d - by Roland Melkert - 2013-11-23, 20:50

Forum Jump:


Users browsing this thread: 6 Guest(s)