- This topic has 5 replies, 3 voices, and was last updated 9 years, 4 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › [SOLVED] New Mouse Interaction
Tagged: interaction, mouse
Hi everyone,
I would like to access mouse position and camera settings from a component of my plugin. This would allow me to do some picking on other components that contain vertices. I looked at mouseOperations and the different performers but I don’t understand how to create a new mouse operation / performer only in my plugin, without being intrusive to the rest of sofa.
Is there anyone who knows the proper way to create a new mouse interaction ?
Thanks !
For the mouse position, I don’t really know for now but for the camera settings, just get the InteractiveCamera from the scene and link (with”@”) the position and orientation to your customized component, e.g
<InteractiveCamera name=”camera” />
…
<CustomComponent position=”@camera.position” orientation=”@camera.orientation” />
Great, that’s a good idea !
Just remain the mouse position and I’m up to go.
Thanks !
Hi,
A priori the PickHandler includes the MousePosition but there is no function allowing to directly get the position.
But Pierre-Luc, I tried recently to do that and I finally wrote an Engine drawing a rectangle in the field of view to select nodes / triangles. This is not in the public version yet (soon) but I can send it to you if you need it with an example scene.
Cheers,
Hugo
Hi and sorry for the delay,
I am definitely interested by your engine and if you want maybe we can make a wiki page to describe how to set mouse operations up.
Until now, I thought it was strongly linked to the GUI that was used, it is very good news that it is not the case.
Hi,
I sent you the some files in a private email.
I closed the thread, but new mouse interactions have to be further implemented in SOFA.
This is therefore a subject to be continued !
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.