[osg-users] osgWidget::WindowManager::createParentOrthoCamera

2011-01-02 Thread Cosimo Luigi Manes
Hi,

what are the characteristics of the camera that returns 
osgWidget::WindowManager::createParentOrthoCamera ?


Thank you!

Cheers,
Cosimo

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





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


Re: [osg-users] Use OSG with QT

2010-11-30 Thread Cosimo Luigi Manes

bouffa wrote:
 Hi Cosimo, 
 
 Yes, take a look at osgviewerQT example.
 
 
 Mourad 
 
  --
 Post generated by Mail2Forum


I tried the example I uploaded but I have the following message of error:

 OsgViewerQt.obj : error LNK2001: unresolved external symbol public: virtual 
 int __thiscall OsgViewerQt::qt_metacall(enum QMetaObject::Call,int,void * *) 
 (?qt_metac...@osgviewerqt@@uaehw4c...@qmetaobject@@hpa...@z)
 OsgViewerQt.obj : error LNK2001: unresolved external symbol public: virtual 
 void * __thiscall OsgViewerQt::qt_metacast(char const *) 
 (?qt_metac...@osgviewerqt@@uaepax...@z)
 OsgViewerQt.obj : error LNK2001: unresolved external symbol public: virtual 
 struct QMetaObject const * __thiscall OsgViewerQt::metaObject(void)const  
 (?metaobj...@osgviewerqt@@UBEPBUQMetaObject@@XZ)
 OsgViewerQt.obj : error LNK2001: unresolved external symbol public: static 
 struct QMetaObject const OsgViewerQt::staticMetaObject 
 (?staticmetaobj...@osgviewerqt@@2UQMetaObject@@B)

how can I fix this?

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




Attachments: 
http://forum.openscenegraph.org//files/main_161_157.cpp


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


Re: [osg-users] Use OSG with QT

2010-11-30 Thread Cosimo Luigi Manes
[quote=bouffa]
 I tried the example I uploaded but I have the following message of error:
 
 
 This is rather a Qt issue.
 You need to move the OsgViewerQt class declaration to a header file, and 
 moc it.
 
 
 These links should help you :
 
  http://doc.trolltech.com/4.7/object.html 
  (http://doc.trolltech.com/4.7/object.html)http://doc.trolltech.com/4.7/moc.html
   (http://doc.trolltech.com/4.7/moc.html)To make your life easier with VS 
  and Qt, you may want to install QtVSAddin 
  (http://developer.qt.nokia.com/wiki/QtVSAddin 
  (http://developer.qt.nokia.com/wiki/QtVSAddin))Mourad 
  (http://doc.trolltech.com/4.7/object.html)
 
 
  --
 Post generated by Mail2Forum



thanks for the reply. I compiled the software, but in output I get a black 
screen viewing experience. Why?

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





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


[osg-users] Use OSG with QT

2010-11-29 Thread Cosimo Luigi Manes
Hi,

I want to integrate OSG(2.8.2) with QT(4.7.1). I tried the example 
http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osgQtBrowser/osgQtBrowser.cpp
 but when I compile it i have an error:
the inclusion file osgQt/QGraphicsViewAdapter is not found.

How i can solve it ?

There are other solution ?

Thank you!

Cheers,
Cosimo

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





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


Re: [osg-users] Use OSG with QT

2010-11-29 Thread Cosimo Luigi Manes

robertosfield wrote:
 Hi Cosimo,
 
 osgQt is part of the svn/trunk version of the OSG, it isn't available
 in the OSG-2.8.2 stable release.  So... you'll need to use svn/trunk.
 
 Robert.
 
 


I will try with svn/trunk. 

Meanwhile, are there other possibilities to implement OSG 2.8.2 with Qt?

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





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


Re: [osg-users] Rotation

2010-11-06 Thread Cosimo Luigi Manes
ok,

Thank you!

Cheers,
Cosimo

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





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


[osg-users] Rotation

2010-11-05 Thread Cosimo Luigi Manes
Hi,

I implemented the rotation of an object with a node PositionAttitudeTransform. 
How can I set the point around which the rotation takes place?

Thank you!

Cheers,
Cosimo

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





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


Re: [osg-users] perform a translation

2010-10-25 Thread Cosimo Luigi Manes
Hi,

ok, the object is translated rightly

Thank you!

Cheers,
Cosimo

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





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


Re: [osg-users] perform a translation

2010-10-24 Thread Cosimo Luigi Manes

Alberto Luaces wrote:
 
 
 place another object at the origin in order to check if your meshes are
 not being translated.
 
 


I tried to insert new objects in different positions but the translation is not 
made the same.

I don't understand !!!

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





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


[osg-users] perform a translation

2010-10-23 Thread Cosimo Luigi Manes
Hi,
I try to perform a translation with the following code:


Code:
aortaNode = osgDB::readNodeFile(aorta.ive);
cuoreNode = osgDB::readNodeFile(cuore.ive);
fegatoNode = osgDB::readNodeFile(fegato.ive);
milzaNode = osgDB::readNodeFile(milza.ive);
pancreasNode = osgDB::readNodeFile(pancreas.ive);
pelleNode = osgDB::readNodeFile(skin.ive);
polmoniNode = osgDB::readNodeFile(polmoni.ive);
reniNode = osgDB::readNodeFile(reni.ive);
scheletroNode = osgDB::readNodeFile(sistscheletrico.ive);
stomacoNode = osgDB::readNodeFile(stomaco.ive);
tumoreNode = osgDB::readNodeFile(tumore.ive);
venacavaNode = osgDB::readNodeFile(venacava.ive);

switchA-addChild((aortaNode), true);
switchA-addChild((cuoreNode), true);
switchA-addChild((fegatoNode), true);
switchA-addChild((milzaNode), true);
switchA-addChild((pancreasNode), true);
switchA-addChild((pelleNode), true);
switchA-addChild((polmoniNode), true);
switchA-addChild((reniNode), true);
switchA-addChild((scheletroNode), true);
switchA-addChild((stomacoNode), true);
switchA-addChild((tumoreNode), true);
switchA-addChild((venacavaNode), true);


//Matrix transform
osg::ref_ptrosg::MatrixTransform mtLeft = new osg::MatrixTransform;
osg::Matrix m;
m.makeTranslate( -6.f, 0.f, 0.f );
mtLeft-setMatrix( m );
mtLeft-addChild( switchA.get() );


root-addChild(mtLeft.get());

if(!wm) return 1;



osg::Group*  group  = new osg::Group();
osg::Camera* camera = wm-createParentOrthoCamera();

group-addChild(camera);

if(root) group-addChild(root);

viewer.addEventHandler(new osgWidget::MouseHandler(wm));
viewer.addEventHandler(new osgWidget::KeyboardHandler(wm));
viewer.addEventHandler(new osgWidget::ResizeHandler(wm, camera));
viewer.addEventHandler(new osgWidget::CameraSwitchHandler(wm, camera));
viewer.addEventHandler(new osgViewer::StatsHandler());
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
viewer.addEventHandler(new 
osgGA::StateSetManipulator(viewer.getCamera()-getOrCreateStateSet()));

wm-resizeAllWindows();

viewer.setSceneData(group);

return viewer.run();






but the translation does not occur !!

What's wrong?

Thank you!

Cheers,
Cosimo

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





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


Re: [osg-users] Add a new child

2010-09-30 Thread Cosimo Luigi Manes
I solved the problem with the following code:


Code:
osg::Vec3 achse(0.0, 0.0, 0.0);
osg::Matrixd myRotationMatrix;
//myRotationMatrix.makeRotate(osg::DegreesToRadians(2.0f), 
achse);
myRotationMatrix.makeTranslate(0.0,20.0,0.0);

viewer.getCameraManipulator()-setByMatrix(viewer.getCameraManipulator()-getMatrix()
 * myRotationMatrix); 



thanks anyway

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





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


Re: [osg-users] Add a new child

2010-09-29 Thread Cosimo Luigi Manes

Ulrich Hertlein wrote:
 On 28/09/10 18:45 , Cosimo Luigi Manes wrote:
 osgGA::CameraManipulator (the base class for the default manipulators) has a 
 'home()'
 method than will recompute the position if 'setAutoComputeHomePosition' is 
 true.
 


Thanks you for your answer. Could you post an example of code because i am a 
newbie. Also, if i want to run a rotation or translation or zoom, what should i 
do ?

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





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


Re: [osg-users] Add a new child

2010-09-29 Thread Cosimo Luigi Manes

Ulrich Hertlein wrote:
 
 I'd recommend you read the OSG QuickStartGuide, it covers this and many other 
 aspects of OSG.
 
 Basically what you need to do it modify the camera matrix to obtain 
 rotation/translation
 and modify the field-of-view to zoom.
 
 


thanks for the reply. I have already read QuickStartGuide OSG, but it isn't 
thorough. Can you post an example of code to execute for the operation of zoom, 
rotate and translation ? Where i can find other examples ?

thanks again

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





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


Re: [osg-users] Add a new child

2010-09-28 Thread Cosimo Luigi Manes

Ulrich Hertlein wrote:
 On 28/09/10 17:19 , Robert Osfield wrote:
 
 What happens when you press 'space' to reset the camera position?
 
 


Well, when i press 'space', software shows the nodes. How can i reset the 
camera position ?

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





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


[osg-users] Add a new child

2010-09-27 Thread Cosimo Luigi Manes
Hi,

i created a menu where i can select a model. When i select a button a fuction 
loads the nodes with the following code:

Code:

 listaComponenti.push_back(osgDB::readNodeFile(aorta.ive));
listaComponenti.push_back(osgDB::readNodeFile(cuore.ive));

unsigned int ii;
for(ii=0; ii  listaComponenti.size(); ii++)
switchA-addChild((listaComponenti[ii]), true);

root-addChild(switchA.get());



In the main fuction i have this code:

Code:

if(!wm) return 1;

osg::Group*  group  = new osg::Group();
osg::Camera* camera = wm-createParentOrthoCamera();

group-addChild(camera);

if(root) group-addChild(root);

viewer.addEventHandler(new osgWidget::MouseHandler(wm));
viewer.addEventHandler(new osgWidget::KeyboardHandler(wm));
viewer.addEventHandler(new osgWidget::ResizeHandler(wm, camera));
viewer.addEventHandler(new osgWidget::CameraSwitchHandler(wm, camera));
viewer.addEventHandler(new osgViewer::StatsHandler());
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
viewer.addEventHandler(new 
osgGA::StateSetManipulator(viewer.getCamera()-getOrCreateStateSet()));

wm-resizeAllWindows();

viewer.setSceneData(group);

/*/


//viewer.getCamera()-setClearColor(osg::Vec4(0.,0.,0.,1));

return viewer.run();




The problem is that the software doesn't show the node in execution but if i 
load the model before, without the button callback, the software shows the node.

Why?




Thank you!

Cheers,
Cosimo[/code]

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





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


Re: [osg-users] Add a new child

2010-09-27 Thread Cosimo Luigi Manes
the problem is that i load new nodes when the sg running

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





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