I have written a simple importer for LightWave 6.5 .lwo and .lws files. The code can display models (using triangles and quads) just fine, but I’m having problems replicating the cameras assigned in the scene (.lws) file by LightWave.
I have four cameras in the scene: the front one is positioned roughly at the front of the object (a spaceship), shows the ship’s forefront and points out in the distance; the back one is positioned behind and above the object, and it points at the object (but not at the origin); the left and right ones are positioned on the wings of the ship and point out in the distance. Basically, for each camera I have its position and its target (“eye” and “at” in gluLookAt() terms).
I understand that in order to replicate these views I cannot just pass the camera position and target to gluLookAt() [tried that and it didn’t work], and I was wondering whether anyone could point me to some sample code to compute the inverse transforms required to replicate the cameras described above.