Re: [osg-users] Disable the Mouse default event in osg

2010-10-29 Thread Lalit Manchwari
Hi,

... Thanks for reply..
If i comment the manipulator then data is not displaying. I m using code...


...
...
lasGeometry-setVertexArray( lasVertices);
lasGeometry-setColorArray(colors);
lasGeometry-setColorBinding(osg::Geometry::BIND_PER_VERTEX);
lasGeometry-addPrimitiveSet(lasPrimitive);
root-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF);

//viewer.setCameraManipulator(new osgGA::TrackballManipulator());

viewer.setSceneData( root );
viewer.addEventHandler(new osgViewer::StatsHandler);
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
viewer.realize();
while( !viewer.done() )
{
viewer.frame();
}   
...
.

And is there any osg functions that i can directly for rotate pan and zoom 
buttons.  

Thank you!

Cheers,
Lalit

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33221#33221





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable the Mouse default event in osg

2010-10-29 Thread Ulrich Hertlein
On 29/10/10 18:30 , Lalit Manchwari wrote:
 ... Thanks for reply..
 If i comment the manipulator then data is not displaying. I m using code...

That's because your camera isn't positioned properly which means it's not 
actually looking
at the object.

You have to setup the camera view matrix accordingly to your requirements.

/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable the Mouse default event in osg

2010-10-29 Thread Mourad Boufarguine
Hi Lalit,

If i comment the manipulator then data is not displaying.


When you don't use a camera manipulator, you should take care of the the
view matrix of the viewer.
You can use something like

viewer.getCamera()-setViewMatrixAsLookAt(eye, center, up);

For more information about this function, google gluLookAt.

Mourad
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Disable the Mouse default event in osg

2010-10-28 Thread Lalit Manchwari
Hi,

... I am new in OpenSceneGraph. I want to disable the mouse event and use these 
event (Rotate, Zoom, Pan ) in separate buttons.  

Thank you!

Cheers,
Lalit Manchwari

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=33198#33198





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable the Mouse default event in osg

2010-10-28 Thread Ulrich Hertlein
Hi,

On 29/10/10 3:50 , Lalit Manchwari wrote:
 ... I am new in OpenSceneGraph. I want to disable the mouse event and use 
 these event
 (Rotate, Zoom, Pan ) in separate buttons.

What do you mean 'disable the mouse event'?  If you don't attach a manipulator 
then no
events will be processed.  You can then control the camera view matrix 
externally via GUI
buttons.

HTH,
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org