|
|
On Wed, 16 Jul 2003 11:24:38 EDT, "herb" <nomail@nomail> wrote:
> 1. Given a openGL view defined by the GL_PROJECTION and the GL_MODELVIEW
> matrix
> 2. Find the POVRAY camera setting that corrispond to the same view
Ray Gardener made it in oposite direction. See at function
daylon_CameraChanged() in package
http://www.daylongraphics.com/other/povray/patches/povgl.zip
ABX
Post a reply to this message
|
|
|
|
ABX wrote:
>On Wed, 16 Jul 2003 11:24:38 EDT, "herb" <nomail[at]nomail> wrote:
>> 1. Given a openGL view defined by the GL_PROJECTION and the GL_MODELVIEW
>> matrix
>> 2. Find the POVRAY camera setting that corrispond to the same view
>
>Ray Gardener made it in oposite direction. See at function
>daylon_CameraChanged() in package
>http://www.daylongraphics.com/other/povray/patches/povgl.zip
>
>ABX
>
Thanks for the help. In the meantime,I have solved the question like this
camera {
perspective
direction <0,0,-1> // This is to account for POV begin RHR
angle 45.000000 // FOV from OPenGL
transform {
matrix <
1.000000,0.000000,0.000000, // Rotation from MODELVIEW
0.000000,1.000000,0.000000, // Rotation from MODELVIEW
0.000000,0.000000,1.000000, // Rotation from MODELVIEW
0,0,0 // Translation from MODELVIEW
>
inverse } //Needed as we are moving the camera in POV and not the MODEL as
in OGL
}
The MODELVIEW matrix is obtained from OpenGL by
glGetDoublev(GL_MODELVIEW_MATRIX,&m);
This is now working fine for me, as far as I can see there is no reason why
orthographic should not be as easy.
- Herb
Post a reply to this message
|
|