sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 54 forks source link

interactive camera motion #52

Closed nilsbecker closed 5 years ago

nilsbecker commented 6 years ago

is it currently possible to pan the camera with the mouse? there is a headline in the docs but i did not find anything so far?

FlorianRhiem commented 6 years ago

No, but you can build your own system depending on your GUI toolkit and a camera model of your choice by using gr3_cameralookat, which positions the camera and orients it for a given center point and an up vector.

nilsbecker commented 6 years ago

i saw later that mogli contains a version of this - i may try to copy-and-paste the relevant bits for my purpose. iiuc, this functionality is not included in gr because it depends on the GUI toolkit used? i can understand that. nonetheless i think it would be a nice addition to have some panning and mouse interactivity options out of the box

FlorianRhiem commented 6 years ago

Correct, interactivity out of the box isn't possible due to the GUI dependence. What we could do would be to provide callback functions for mouse movement and implement camera movement that way, like I did in another library, but there I found that requirements for and opinions on the camera model used can vary widely, both due to different use cases and personal preferences.