compas-dev / compas_view2

Standalone viewer for COMPAS
https://compas.dev/compas_view2/
MIT License
6 stars 8 forks source link

add scale and lookat to camera #160

Closed Licini closed 1 year ago

Licini commented 1 year ago
  1. Adding scale factor to camera, which will multiply near, far and pan_delta, see scripts/v120_camera_scale.py. We need try a bit to see what number works best for what unit. Also the definition for units might be more relevant to live in code base of inheriting class like ifc_viewer.

  2. Added look_at function for better camera positioning. See scripts/v120_camera_lookat.py. Right now the camera has been setup in the "target prioritised" way, which means setting position will automatically update rotation to maintain target unchanged. But setting target directly will end up updating position (like a shifting action), this might be the reason it was previously not working as expected. look_at allows look at new target at same time maintaining current position.