FAQ Database Discussion Community


OpenGL perspective projection matrix trouble

java,opengl,matrix,perspective
I really don't understand what I am doing wrong in the perspective matrix creation code: public static Matrix4f perspective(float fov, float width, float height, float Near, float Far) { Matrix4f projection = new Matrix4f(0); float a = width / height; float h = 1.0f/(float) Math.tan(Math.toRadians(fov / 2)); float depth =...

Why IPerspectiveListener.perspectiveChanged() isn't called when an editor is closed?

java,eclipse,plugins,perspective
If I open an editor the IPerspectiveListener.perspectiveChanged() will be called but if I close an editor it won't. Why? I thought it must be called with IWorkbenchPage.CHANGE_EDITOR_CLOSE as the value of changeId argument....

2D perspective transform in JavaScript

javascript,geometry,2d,spatial,perspective
Looking for a code example of how to calculate (accurately) the dimensions of a rectangle from a top down view (90 degrees) at a particular angle. e.g. I have a rectangle of 1200mm x 2000mm How would i determine the new perspective measurements of the rectangle if it was angled...

perspective*lookAt transformation in qt openGL behaving unexpectedly not even keeping w==1

qt,opengl,perspective
I am attempting in an openGL window to identify whether or not the mouse pointer is situated within a given 3D rectangle visible within the rendered scene. The story so far The rectangle's coordinates I already have as world coordinates. I also have the matrix QMatrix4x4 camera = perspective(..) *...

Eclipse RCP - Perspective Layout

eclipse,rcp,perspective
I'm currently developing an Eclipse RCP application. I want to create a perspective where I have 3 views (project explorer, editors area, and a custom view), each in a different column. Below them I want to have the console view. I don't know how to put the console view at...