OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

"hooking" into the Trackballmanipulator transform


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
loopy
User


Joined: 11 Mar 2009
Posts: 78

PostPosted: Tue May 08, 2018 7:42 pm    Post subject:
"hooking" into the Trackballmanipulator transform
Reply with quote

Hi,
I need to "hook" into the TrackballManipulator to provide feedback to the user. As the user rotates the model, I want to get the matrix and extract Euler angles.
I'm stuck at how to get notified when the when the view matrix changes. Should I derive a new class from TrackballManipulator ?

OSG 3.4.1
Thanks
Andrew
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 462
Location: France

PostPosted: Tue May 08, 2018 10:29 pm    Post subject:
Re: "hooking" into the Trackballmanipulator transform
Reply with quote

Hi
Indeed derivation is the answer and overriding
Code:
virtual bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us );

should be sufficient

Cheers

loopy wrote:
Hi,
I need to "hook" into the TrackballManipulator to provide feedback to the user. As the user rotates the model, I want to get the matrix and extract Euler angles.
I'm stuck at how to get notified when the when the view matrix changes. Should I derive a new class from TrackballManipulator ?

OSG 3.4.1
Thanks
Andrew

_________________
Twirling twirling twirling toward freedom
Back to top
View user's profile Send private message Visit poster's website
loopy
User


Joined: 11 Mar 2009
Posts: 78

PostPosted: Tue May 08, 2018 11:15 pm    Post subject:
Reply with quote

Yup you are right, that works great!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts [Crash issue] no error info even set ... pwang General 1 Sun Jul 29, 2018 1:20 pm View latest post
No new posts get some "std::bad_alloc" e... surveyors General 3 Tue Apr 24, 2018 10:56 am View latest post
No new posts Transform RangeMode From PIXEL_SIZE_... xiaoming General 0 Mon Apr 09, 2018 9:38 am View latest post
No new posts "INSTALL.vcxproj" -- FAILED ceranco Build system [build] 6 Fri Dec 15, 2017 1:25 pm View latest post
No new posts osgDB::ImagePaged don't have "Pa... tang General 0 Mon Nov 13, 2017 2:51 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP