f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Add getters for camera parameters

Open Nokse22 opened this issue 1 year ago • 13 comments

Is your feature request related to a problem? Please describe. When using libf3d and an external window you will need to use yaw, azimuth, elevation to move but to get them in degree you would need to calculate them from the camera position.

Describe the solution you'd like It could be useful to have getters for these parameters. I know they are not actually parameters, but ways to manipulate the camera, but a getter for yaw/elevation that returns the angle of the camera to the model can be useful, also distance from the model etc.

Suggested implementation In camera.h and camera.cxx , add camera::getYaw, camera::getAzimuth, camera::getElevation. Implement them to be computed on the fly.

Nokse22 avatar May 03 '24 21:05 Nokse22

but a getter for yaw/elevation that returns the angle of the camera to the model can be useful

I suppose they could be computed for easier usage of the class indeed.

distance from the model etc.

This one is way more complex, unless you mean distance to the focal point.

mwestphal avatar May 04 '24 11:05 mwestphal

This one is way more complex, unless you mean distance to the focal point.

Yes, from the focal point.

Nokse22 avatar May 04 '24 12:05 Nokse22

I'd like to work on this.

Schwarzemann avatar Sep 24 '24 20:09 Schwarzemann