Hi,
I have an issue that I have been trying to get to work without success.
I want to put a camera inside a box so I can see the inside of it, let's say the box is 1000x1000x1000 and I want to place the camera at 500x500x500, how can I do that?
I use the class Graphic3d_Camera:
(as well as testing with setCetner, setDistance etc...).
I can change the camera position but it does not behave the way I want to.
Any help is greatly appreciated.
Regards
Staffan
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
I can change the camera position but it does not behave the way I want to.
And how observed behavior differs from expected?
camera.setEye(gp_Pnt(500,500,500))
Graphic3d_Camera::SetEye() sets new Eye position and keeps Graphic3d_Camera::Center() position as is (meaning that Graphic3d_Camera::Direction() is changed).
There is Graphic3d_Camera::MoveEyeTo() method in case If you need moving Eye and preserve camera Direction.
Normally, you would need also switching camera from orthographic to perspective projection.
02Author
Hi, thank you, I was missing the perspective projection.
Regards Staffan