Login  Register

Camera class for parallel projection.

Posted by The.Scotsman on Jan 24, 2015; 1:32am
URL: https://forum.jogamp.org/Camera-class-for-parallel-projection-tp4033907.html

I've been working on a 3d graphics app for a while, and I've been utilizing a camera class (gleaned from here and elsewhere) to provide the mouse/keyboard pan/zoom/rotate functionality.

It uses gluPerspective+gluLookAt to provide the transformations, and it's worked fairly well (other than an annoying orientation "flip" during some zoom factors).

However, for other reasons, I need to switch to a parallel projection (i.e. glOrtho + gluLookAt) and:
1) For the life of me, I can't get it to work right.
2) Spent all day searching, and I can't find any examples anywhere (everybody these days uses perspective!)

I would be so grateful if someone would please put me out of my misery and show me where I can find a good working example (no gimble lock, handles large and small near/far values, etc.), suitable for someone who is severely linear algebra challenged...

Many, many thanks.