camera view problem

Dear all,

Please help.
I just recently move a cad program from Direct3D to OpenGL. (Direct3D uses Left hand rule, I use Right hand rule axis system for my OpenGL).
Direct3D sometimes gives me blank picture without any warning.

Using DelphiX 2000 and Delphi 5, After creating the objects and the camera using OpenGL, I come with truncated view. I have tried to change the FocalLength and DepthOfView but still I can not see the whole scene, only part of an object. I can rotate it, but can not make it smaller although I use very small FocalLength (1.0).

Please help me to fix this problem.
Thanks.

Unless I’n getting your point all wrong here,
why not just move the camera back instead of changing the field of view?
Just use gluLookAt to reposition the camera.

Perhaps there is something wrong with your field of view calculation… How do you set the focal length?

Finally I figured out the problem source. Something wrong with the GLScene component for Delphi. I install the latest version of GLScene and it display the view correctly.

But please explain more how should I calculate the camera parameters to capture whole object with any size (zoom all command) :

  • For example, I have a mesh with object center at xo,yo,zo and with object size A

  • I want to put camera at xc,yc,zc

  • How do I calculate xc,yc,zc and DepthofView and FocalLength to get the whole scene on viewport?

Thanks for your advice.
Nathan