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 

Help with OSG


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
glottore
Newbie


Joined: 15 May 2014
Posts: 1

PostPosted: Thu May 15, 2014 5:43 pm    Post subject:
Help with OSG
Reply with quote

Hello, I'm am finishing an assignment with OSG and I need help with a few bits. I have finished all the hard stuff it's just the optional stuff that I need to do now and any help or support would be much appreciated.

This is the code I have used to implement a Trackball Dragger into my program:

osgManipulator::TrackballDragger *pDragger=new osgManipulator::TrackballDragger();
pDragger->addTransformUpdating(pMatrixTransform);
pDragger->setInitialBound(pSwitch->computeBound());
((osg::Group*)pMatrixTransform->getParent(0))->addChild(pDragger);
pDragger->setupDefaultGeometry();
//float scale = pDragger->getBound().radius() * 1.6;
//pDragger->setMatrix(osg::Matrix::scale(scale, scale, scale)*osg::Matrix::translate(pDragger->getBound().center(), pDragger->getBound().center(), pDragger->getBound().center()));
pDragger->setHandleEvents(true);
pDragger->setActivationModKeyMask(osgGA::GUIEventAdapter::MODKEY_CTRL);

I have implemented a Trackball Dragger to interact with a robot I have created but want to know how I can select the robot I have made using the mouse. If this is overly complicated, don't worry about it.
Also, how do I make it so that the trackball dragger geometry is only visible when holding the CTRL key?

Again any help would be very much appreciated.
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 [forum] 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



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