Hi Joan,
I'm using osgManipulator with vrjuggler and it works quite well.
You juste have to create a dummy osgGA::GUIActionAdapter en create a
osgGA::GUIEventAdapter that maps VRJuggler events.
I recently introduce the possibility in PointerInfo to use a VR device instead
of a mouse.
Beware that for translations, current manipulators should do fine, but using
them for rotations is a bit awkward, you'll have to develop you own
manipulators.
Just define
**************************************************************************
class DummyActionAdapter : public osgGA::GUIActionAdapter{
void requestRedraw(void){};
void requestContinuousUpdate(bool){};
void requestWarpPointer(float,float) {};
};
************************************************************************
And in OsgNav::preFrame() :
**************************************************************************************
const osg::ref_ptr<osgGA::GUIEventAdapter> ea = new osgGA::GUIEventAdapter();
DummyActionAdapter aa;
switch (mButton2->getData())
{
case gadget::Digital::TOGGLE_ON:
{
ea->setEventType(osgGA::GUIEventAdapter::PUSH);
osgUtil::LineSegmentIntersector::Intersections intersections;
_pointer.reset();
osgUtil::LineSegmentIntersector * picker = new
osgUtil::LineSegmentIntersector(wandTrans,wandDir);
osgUtil::IntersectionVisitor iv(picker);
mRootNode->accept(iv);
etc. (same thing as with osgViewer)
**************************************************************************************************
Luc
Luc FRAUCIEL - BRGM
Unité Calcul, 3D et réalité virtuelle
Service Systèmes et Technologies de l'Information
3, av C. Guillemin BP 6009 - 45060 Orléans Cedex 2, France
Tél. 02 38 64 35 65
Fax 02 38 64 39 70
-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Joan Slottow
Envoyé : jeudi 26 juillet 2007 23:38
À : [email protected]
Objet : [osg-users] Using the osgManipulator Draggers withosgUtil::SceneView
(fwd)
I would like to use one of the osgManipulator::Draggers. However, I am using
osgUtil::SceneView and dont have any osgViewer::Viewers. Also my application
is using vrJuggler and vrJuggler is what is getting the keyboard mouse events
and I am getting them from vrJuggler. From what I determined from the
osgmanipulator example and by looking around at your source code is that I have
to call handle on the Dragger every frame and pass it an
osgManipulator::PointerInfo, osgGA::GUIEventAdapter, and
osgGA::GUIActionAdapter. However, since I am not using a Viewer I don't have
these. I am thinking that I have to create a GUIEventAdapter and set the key
and mouse information that vrJuggler is passing me and use that one with the
Dragger. Same witht the PointerInfo. Am I on the right track or is there some
other way that I should be going about this?
Thanks
Joan Slottow
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
**********************************************************************************************
Pensez à l'environnement avant d'imprimer ce message
Think Environment before printing
Le contenu de ce mél et de ses pièces jointes est destiné à l'usage exclusif du
(des) destinataire(s) désigné(s)
comme tel(s).
En cas de réception par erreur, le signaler à son expéditeur et ne pas en
divulguer le contenu.
L'absence de virus a été vérifiée à l'émission, il convient néanmoins de
s'assurer de l'absence de
contamination à sa réception.
The contents of this email and any attachments areconfidential. They are
intended for the named recipient(s)
only.
If you have received this email in error please notifythe system manager or the
sender immediately and do not
disclose the contents to anyone or make copies.
eSafe scanned this email for viruses, vandals and malicious content.
**********************************************************************************************
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org