Posted Thursday, 15 September, 2011 - 19:17 by the Fiddler
You want to use a left-handed coordinate system (OpenGL uses a right-handed system by convention). A simple way to achieve this is to multiply your modelview matrix with a scale matrix of (1, 1, -1).
Posted Tuesday, 4 October, 2011 - 18:09 by haplokuon
When you create the projection matrix, orthographic or perspective, the parameters zNear and zFar control the clip planes of the scene. This defines the viewing volume, objects outside this volume are clipped and not drawn in the final scene.
Posted Wednesday, 5 October, 2011 - 17:07 by haplokuon
Like in a real camera the parameter:
- fovy controls the field of view, the aperture angle measure in radians.
- aspect controls the aspect ratio of the view, window width / window height. It's like the aspect ratio of your monitor, you can find 4:3, 16:10, 16:9.
For an extended discussion check the internet, there are many tutorials that deals with the opengl basics.
Comments
Re: Point of View
You want to use a left-handed coordinate system (OpenGL uses a right-handed system by convention). A simple way to achieve this is to multiply your modelview matrix with a scale matrix of (1, 1, -1).
Re: Point of View
But my modelview-matrix is a Matrix4 and i cant multiply it with a Vector3 (1,1,-1) ??
Re: Point of View
The scale matrix of (1,1,-1) fiddler showed you means a matrix in cartesian coordinates
| 1 0 0 |
| 0 1 0 |
| 0 0 -1 |
Re: Point of View
But the modelview Matrix is a 4x4 Matrix. I tried this:
| 1 0 0 0|
| 0 1 0 0 |
| 0 0 -1 0 |
But it didn´t work.
Re: Point of View
OpenTK.Matrix4d.Scale
Re: Point of View
Ok, but when i zoom out, theres a point in which i cant see the objects which are far away, How can i stretch the range of view?
regards
Re: Point of View
When you create the projection matrix, orthographic or perspective, the parameters zNear and zFar control the clip planes of the scene. This defines the viewing volume, objects outside this volume are clipped and not drawn in the final scene.
Re: Point of View
thanks a lot, but what are the 2 parameters "fovy" and "aspect" in that method and why are they often declared like this:
(float)Math.PI / 4 (fovy)
Width / (float)Height (aspect)
Re: Point of View
Like in a real camera the parameter:
- fovy controls the field of view, the aperture angle measure in radians.
- aspect controls the aspect ratio of the view, window width / window height. It's like the aspect ratio of your monitor, you can find 4:3, 16:10, 16:9.
For an extended discussion check the internet, there are many tutorials that deals with the opengl basics.