quit At 2012-03-27 03:03:53,[email protected] wrote: >Send osg-users mailing list submissions to > [email protected] > >To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >or, via email, send a message with subject or body 'help' to > [email protected] > >You can reach the person managing the list at > [email protected] > >When replying, please edit your Subject line so it is more specific >than "Re: Contents of osg-users digest..." > > >Today's Topics: > > 1. Re: Camera attached to object (Sergey Bocharov) > 2. Re: OSG + Qt + threading. (Aitor Ardanza) > 3. Questions on AutoTransform (Carsten Scharfe) > 4. Passing dae data in shader. (Peterakos) > 5. Re: Passing dae data in shader. (Christian Buchner) > 6. constant size overlay (Michael Schanne) > 7. Re: Passing dae data in shader. (Peterakos) > 8. Cleanup of (trailing) whitespace in OSG code (commit 13041) > (Erik den Dekker) > 9. Re: Cleanup of (trailing) whitespace in OSG code (commit > 13041) (Robert Osfield) > 10. Re: Wiki (Jason Daly) > 11. Re: constant size overlay (Jason Daly) > 12. Re: Getting animations initial frame bones matrix (Aitor Ardanza) > 13. Re: Wiki (Robert Osfield) > 14. Re: Wiki (Jason Daly) > 15. Set object attitude using a normal and a heading (Aurelien Albert) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Mon, 26 Mar 2012 09:33:35 +0200 >From: "Sergey Bocharov" <[email protected]> >To: [email protected] >Subject: Re: [osg-users] Camera attached to object >Message-ID: <[email protected]> >Content-Type: text/plain; charset=UTF-8 > >Hi, Sergey > >I cannot get the right result. >Please help me if you can. >79250103663 > >... > >Thank you! > >Cheers, >Sergey > >------------------ >Read this topic online here: >http://forum.openscenegraph.org/viewtopic.php?p=46581#46581 > > > > > > > >------------------------------ > >Message: 2 >Date: Mon, 26 Mar 2012 10:07:06 +0200 >From: "Aitor Ardanza" <[email protected]> >To: [email protected] >Subject: Re: [osg-users] OSG + Qt + threading. >Message-ID: <[email protected]> >Content-Type: text/plain; charset="utf-8" > >Hi Aurelien, > >It seems that already works! I attached code... > >Code: > >_qtViewer = new osgGenerals::ViewerQT(this); >ui.OSGRenderLayout->addWidget(_qtViewer); >_qtViewer->updateCamera(center,eye,up); >_qtViewer->setSceneData(_mainLogic->getRootGroup()); >_qtViewer->startRendering(); > > > > >Thank you! > >Cheers, >Aitor > >------------------ >Read this topic online here: >http://forum.openscenegraph.org/viewtopic.php?p=46582#46582 > > > >-------------- next part -------------- >An embedded and charset-unspecified text was scrubbed... >Name: OSGQtRender.h >URL: ><http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20120326/393e096a/attachment.h> >-------------- next part -------------- >A non-text attachment was scrubbed... >Name: OSGQtRender.cpp >Type: text/x-c++src >Size: 10280 bytes >Desc: not available >URL: ><http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20120326/393e096a/attachment-0001.cpp> > >------------------------------ > >Message: 3 >Date: Mon, 26 Mar 2012 09:00:14 +0000 >From: Carsten Scharfe <[email protected]> >To: 'OpenSceneGraph Users' <[email protected]> >Subject: [osg-users] Questions on AutoTransform >Message-ID: > <[email protected]> >Content-Type: text/plain; charset="iso-8859-1" > >Hi, > >I'm having to views, one normal 3d view and one top view with an camera icon, >that represents the camera of the 3d view (orientation and position). >The top view (with an orthogonal projection) kann be zoomed in and zoomed out. >Of course, zooming out the top view will scale the camera icon, which I want >to prevent. The camera icon shall have the same size at all times. >Therefore I want to use the Autotransform, but I do not get the expected >results. > >Here's how I set up the icon geometry with the AutoTransform: > > MatrixTransform > | > | > AutoTransform > | > | > IconGeometry (several Geodes) > >The MatrixTransform controls the orientation an position of the icon. >The AutoTransform shall do the automatic scaling, so that the icon always >stays the same size. > >Here's an excerpt from the initialization code: > > cameraIcon = new osg::MatrixTransform; > cameraIcon->setMatrix(DsTOsgMatrix4::translate(2, g_fCameraIconHeight, > 0)); > > osg::ref_ptr<osg::AutoTransform> camAutoScale = new osg::AutoTransform; > camAutoScale->setAutoScaleToScreen(true); > > cameraIcon->addChild(camAutoScale); > camAutoScale->addChild(camBody); > camAutoScale->addChild(camMoveHandle); > camAutoScale->addChild(camRotateHandle); > >The effect I'm getting is that the icon is not visible. If I comment out the >line where I set the autoscaletoscreen as true, display of the icon is normal. >I guess I'm missing something in the setup of the AutoTransform. > >I'm using Osg 3.0.0. Zooming is done by changing the orthogonal projection >matrix of the view's camera appriately. >I'm using a right handed coordinate system with the z-axis as up-axis. > >Do I have to set special axis in the AutoTransform? >Does the position has to be set in the AutoTransform, when the icon's position >changes? > >Can somebody help me out? Any hints are welcome. > >Cheers, >Carsten > >_________________________ > >Carsten Scharfe >Software Developer >Experiment Software ESIM > >dSPACE GmbH >Rathenaustra?e 26 >33102 Paderborn >Germany > >Tel.: +49 5251 1638-1920 >http://www.dspace.com >mailto:[email protected] >_________________________ > > > > >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: ><http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20120326/2fbdefed/attachment-0001.htm> > >------------------------------ > >Message: 4 >Date: Mon, 26 Mar 2012 14:43:48 +0300 >From: Peterakos <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: [osg-users] Passing dae data in shader. >Message-ID: > <CAKAOe5KVL18Ph3T0x=ouz+zk9tqd84vh2ryxugzbzua2u82...@mail.gmail.com> >Content-Type: text/plain; charset="iso-8859-1" > >Hello. > >Is there any way using the dae plugin in osg, to pass the vertices in >shader code as attributes? >What i do now for simple geometry shapes (lets assume we have a quad), is >to use > >setAttributeValues( ... ); passing the vertices' positions, colors normals >etc. >How can i get this information from a dae file and use the same shader? > >Thank you. >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: ><http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20120326/587c06a9/attachment-0001.htm> > >------------------------------ > >Message: 5 >Date: Mon, 26 Mar 2012 14:00:29 +0200 >From: Christian Buchner <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: Re: [osg-users] Passing dae data in shader. >Message-ID: > <calm6u+pouswub3etbmrbkrn+oh_bvkxqc7ncsapc3bi223f...@mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >I'd say you would have to modify the DAE reader according to your >shader's needs, or alternatively you'd need to do some postprocessing >on the returned geometry. > >I would think that modifying the reader might be easier than >processing its generated output. > >Christian > > >------------------------------ > >Message: 6 >Date: Mon, 26 Mar 2012 15:03:01 +0200 >From: "Michael Schanne" <[email protected]> >To: [email protected] >Subject: [osg-users] constant size overlay >Message-ID: <[email protected]> >Content-Type: text/plain; charset=UTF-8 > >Hi, > >I want to use OSG to create an overlay where I have different symbols marking >certain points in my scene. I want these symbols to remain a constant size in >screen coordinates until crossing certain thresholds (for example, they are >size A when at a distance < X from the camera, then change to size B once >distance > X). It?s a little different than a HUD because I want the symbols >to move as I pan the camera, so that they stay at the same world coordinates. >I am using an orthographic projection where the camera is directly overhead in >the Z direction, and it will only pan in the X-Y plane. > >I took a look at the OverlayNode class, but the description didn?t sound like >what I wanted. The LOD class sounded more like what I need, so I could switch >between multiple sized children based on the camera distance, but I?m still >not quite sure how to make each child have a constant size within its camera >distance range. Does anyone have any suggestions for me? > > >Thank you! > >Cheers, >Michael > >------------------ >Read this topic online here: >http://forum.openscenegraph.org/viewtopic.php?p=46587#46587 > > > > > > > >------------------------------ > >Message: 7 >Date: Mon, 26 Mar 2012 17:24:43 +0300 >From: Peterakos <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: Re: [osg-users] Passing dae data in shader. >Message-ID: > <cakaoe5lhbvspdnd7xxwosm+edm_xwufjt5akz_veom4yijf...@mail.gmail.com> >Content-Type: text/plain; charset="iso-8859-1" > >Hello. > >Is there any Sample/Example for this ? > >Thank you again. > >On 26 March 2012 15:00, Christian Buchner <[email protected]>wrote: > >> I'd say you would have to modify the DAE reader according to your >> shader's needs, or alternatively you'd need to do some postprocessing >> on the returned geometry. >> >> I would think that modifying the reader might be easier than >> processing its generated output. >> >> Christian >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: ><http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20120326/c9797eca/attachment-0001.htm> > >------------------------------ > >Message: 8 >Date: Mon, 26 Mar 2012 16:50:22 +0200 >From: Erik den Dekker <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: [osg-users] Cleanup of (trailing) whitespace in OSG code > (commit 13041) >Message-ID: <[email protected]> >Content-Type: text/plain; charset=us-ascii > >Hi Robert, > > >I see that you have recently run a script over the OSG code to (from commit >message 13041) 'remove trailing spaces and tabs'. While I am a proponent of >this effort and greatly appreciate the move, I do have some questions about it: > > 1) Does the 'trailing' in this case also apply to tabs, or does it mean > you want to eradicate all tabs (replace them with spaces)? > > 2) In current SVN head, I still encounter many files that contain > trailing whitespace, as well as files that contain tabs. Is it still work in > progress, are they forgotten, or is there a specific reason why you did not > apply the script to these particular parts of the codebase? > >I would like to offer you my assistance in this cause, if in any way you would >wish to use it. > > >Cheers, > > Erik den Dekker > >------------------------------ > >Message: 9 >Date: Mon, 26 Mar 2012 16:37:07 +0100 >From: Robert Osfield <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: Re: [osg-users] Cleanup of (trailing) whitespace in OSG code > (commit 13041) >Message-ID: > <CAFN7Y+WFxdVGt3Dt6onsetNZqZy=8fibrs1h878ozgxrp91...@mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >HI Erik, > >On 26 March 2012 15:50, Erik den Dekker <[email protected]> wrote: >> I see that you have recently run a script over the OSG code to (from commit >> message 13041) 'remove trailing spaces and tabs'. While I am a proponent of >> this effort and greatly appreciate the move, I do have some questions about >> it: >> >> ? ? ? ?1) Does the 'trailing' in this case also apply to tabs, or does it >> mean you want to eradicate all tabs (replace them with spaces)? > >For the recent check in the script I used removed trailing spaces and tabs. > >When I do a graphical merge I run a script that converts tabs to four >spaces, although sometimes I have to tweak things to fix things. >There are some older parts of bits that have been merged without me >running the script than have tabs that I haven't yet converted. > >> ? ? ? ?2) In current SVN head, I still encounter many files that contain >> trailing whitespace, as well as files that contain tabs. Is it still work in >> progress, are they forgotten, or is there a specific reason why you did not >> apply the script to these particular parts of the codebase? > >I didn't do all the files as I wanted to make sure nothing broke in >the process. So far no complaints... When I first started reading >your post I did initial think oh uh something must have gone wrong... > >What parts are still spotting the training spaces? > >> I would like to offer you my assistance in this cause, if in any way you >> would wish to use it. > >Point me in the direction of files/directories that still have >training spaces would be useful. > >This is generally a low priority task though, it doesn't fix any bugs >or make the code more readable. > >Robert. > > >------------------------------ > >Message: 10 >Date: Mon, 26 Mar 2012 11:43:39 -0400 >From: Jason Daly <[email protected]> >To: <[email protected]> >Subject: Re: [osg-users] Wiki >Message-ID: <[email protected]> >Content-Type: text/plain; charset="ISO-8859-1"; format=flowed > >On 03/22/2012 04:29 PM, Robert Osfield wrote: >>> I can also just submit the app if that's the preferred way of doing it. >> You could just send the entry text and link to me and I could add it for you. > >Hi, Robert, > >I sent these to you last week (off-list). No rush it getting it posted, >but I just wanted to make sure that you did actually receive them. > >Thanks again, > >--"J" > > > >------------------------------ > >Message: 11 >Date: Mon, 26 Mar 2012 11:48:51 -0400 >From: Jason Daly <[email protected]> >To: "[email protected]" > <[email protected]> >Subject: Re: [osg-users] constant size overlay >Message-ID: <[email protected]> >Content-Type: text/plain; charset="UTF-8"; format=flowed > >On 03/26/2012 09:03 AM, Michael Schanne wrote: >> Hi, >> >> I want to use OSG to create an overlay where I have different symbols >> marking certain points in my scene. I want these symbols to remain a >> constant size in screen coordinates until crossing certain thresholds (for >> example, they are size A when at a distance< X from the camera, then change >> to size B once distance> X). It?s a little different than a HUD because I >> want the symbols to move as I pan the camera, so that they stay at the same >> world coordinates. I am using an orthographic projection where the camera >> is directly overhead in the Z direction, and it will only pan in the X-Y >> plane. >> >> I took a look at the OverlayNode class, but the description didn?t sound >> like what I wanted. The LOD class sounded more like what I need, so I could >> switch between multiple sized children based on the camera distance, but I?m >> still not quite sure how to make each child have a constant size within its >> camera distance range. Does anyone have any suggestions for me? > >Hi, Michael, > >There's not an existing OSG construct that will do exactly what you >want, but you might take a look at AutoTransform to see if you can build >what you want based on that. > >--"J" > > > >------------------------------ > >Message: 12 >Date: Mon, 26 Mar 2012 17:49:56 +0200 >From: "Aitor Ardanza" <[email protected]> >To: [email protected] >Subject: Re: [osg-users] Getting animations initial frame bones matrix >Message-ID: <[email protected]> >Content-Type: text/plain; charset=UTF-8 > >Hi, > >For those who need to know how to do ... > > >Code: > >std::map\std::string,osg::Matrix> desiredMatrixs; > osg::ref_ptr\osgAnimation::Animation> anim = > _AnimationManager->getAnimation(name); > if(anim.valid()){ > > osgAnimation::ChannelList channelList = > anim->getChannels(); > > for(int i=0;i\_boneChains_index.size();i++) > { > std::string targetName = > _boneChains_index[i].back().first; > std::string actualBoneName = targetName; > osg::Matrix desiredMatrix; > > osg::ref_ptr\osgAnimation::Bone> actualBone = > _AnimationManager->getSkeletonBone(actualBoneName); > while(actualBone->getParents().size()>0) > { > float rotateX, rotateY, rotateZ; > osg::Vec3 pos; > for(int j=0;j\channelList.size();j++) > { > osgAnimation::Channel* channel > = channelList[j]; > > if(!channel->getTargetName().compare(actualBoneName)) > { > > channel->update(channel->getStartTime(),1.0,1.0); > > if(!channel->getName().compare("translate")){ > > osg::ref_ptr\osgAnimation::Vec3Target> posTarget = > > dynamic_cast\osgAnimation::Vec3Target*>(channel->getTarget()); > pos = > posTarget->getValue(); > } > else > if(!channel->getName().compare("rotateX")){ > > osg::ref_ptr\osgAnimation::FloatTarget> xTarget = > > dynamic_cast\osgAnimation::FloatTarget*>(channel->getTarget()); > rotateX = > xTarget->getValue(); > } > else > if(!channel->getName().compare("rotateY")){ > > osg::ref_ptr\osgAnimation::FloatTarget> yTarget = > > dynamic_cast\osgAnimation::FloatTarget*>(channel->getTarget()); > rotateY = > yTarget->getValue(); > } > else > if(!channel->getName().compare("rotateZ")){ > > osg::ref_ptr\osgAnimation::FloatTarget> zTarget = > > dynamic_cast\osgAnimation::FloatTarget*>(channel->getTarget()); > rotateZ = > zTarget->getValue(); > > break; > } > } > } > osg::Quat rot(rotateZ,osg::Vec3(0,0,1), > rotateY,osg::Vec3(0,1,0), rotateX,osg::Vec3(1,0,0)); > osg::Matrix > mat(osg::Matrix::rotate(rot)); > mat.setTrans(pos); > desiredMatrix.postMult(mat); > > actualBoneName = > actualBone->getParent(0)->getName(); > actualBone = > _AnimationManager->getSkeletonBone(actualBoneName); > if(!actualBone.valid()) > break; > } > > desiredMatrixs[targetName] = desiredMatrix; > > } > } > else > return; > > > >Thank you! > >Cheers, >Aitor > >------------------ >Read this topic online here: >http://forum.openscenegraph.org/viewtopic.php?p=46593#46593 > > > > > > > >------------------------------ > >Message: 13 >Date: Mon, 26 Mar 2012 17:44:49 +0100 >From: Robert Osfield <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: Re: [osg-users] Wiki >Message-ID: > <CAFN7Y+Vm+89BMMUbNSLcqZOFscsEyLqTt0hPYeEtBaP8WX=y...@mail.gmail.com> >Content-Type: text/plain; charset=ISO-8859-1 > >Hi Jason, > >On 26 March 2012 16:43, Jason Daly <[email protected]> wrote: >> On 03/22/2012 04:29 PM, Robert Osfield wrote: >> I sent these to you last week (off-list). ?No rush it getting it posted, but >> I just wanted to make sure that you did actually receive them. > >I got it thanks. Presently trying to work where is the best place for it. > >We have Applications page liked to off the Community section: > > http://www.openscenegraph.org/projects/osg/wiki/Community/Applications > >I'm open to suggestions. > >Robert. > > >------------------------------ > >Message: 14 >Date: Mon, 26 Mar 2012 13:54:19 -0400 >From: Jason Daly <[email protected]> >To: OpenSceneGraph Users <[email protected]> >Subject: Re: [osg-users] Wiki >Message-ID: <[email protected]> >Content-Type: text/plain; charset="ISO-8859-1"; format=flowed > >On 03/26/2012 12:44 PM, Robert Osfield wrote: >> Hi Jason, >> >> On 26 March 2012 16:43, Jason Daly<[email protected]> wrote: >>> On 03/22/2012 04:29 PM, Robert Osfield wrote: >>> I sent these to you last week (off-list). No rush it getting it posted, but >>> I just wanted to make sure that you did actually receive them. >> I got it thanks. Presently trying to work where is the best place for it. >> >> We have Applications page liked to off the Community section: >> >> http://www.openscenegraph.org/projects/osg/wiki/Community/Applications >> >> I'm open to suggestions. > >That's the page that the customer suggested, too. If you're OK with it, >that would be perfect. > >Thanks! > >--"J" > > > >------------------------------ > >Message: 15 >Date: Mon, 26 Mar 2012 20:29:49 +0200 >From: "Aurelien Albert" <[email protected]> >To: [email protected] >Subject: [osg-users] Set object attitude using a normal and a heading >Message-ID: <[email protected]> >Content-Type: text/plain; charset=UTF-8 > >Hi, > >I want to set an object attitude (represented by a quaternion) using two >parameters : > >- a normal vector (to set rotation around X and Y axis) >- a heading angle (rotation around non-transformed Z axis) > >I tried to set the attitude quaternion : > >1/ using the normal vector : > > >Code: >osg::Vec3d myNormal(0.0, 1.0, 1.0); >myNormal.normalize(); >osg::Quat attitudeNormal; >attitudeNormal.makeRotate(osg::Vec3d(0.0, 0.0, 1.0), myNormal) > > > >2/ using the heading angle : > >Code: >double heading = osg::PI_2; >osg::Quat attitudeHeading; >attitudeHeading.makeRotate(heading, osg::Vec3d(0.0, 0.0, 1.0)) > > > >But how can I combine the two parameters ? > >If I do : > >Code: >attitude = attitudeHeading*attitudeNormal > > >the normal constraint is no more valid because X and Y axis are transformed by >the attitudeHeading and affect attitudeNormal > >If I do : > >Code: >attitude = attitudeNormal*attitudeHeading > > >the heading constraint s no more valid because Z is transformed by the >attitudeNormal and affect attitudeHeading > >Did I miss something ? > >Thank you! > >Cheers, >Aurelien > >------------------ >Read this topic online here: >http://forum.openscenegraph.org/viewtopic.php?p=46598#46598 > > > > > > > >------------------------------ > >_______________________________________________ >osg-users mailing list >[email protected] >http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > >End of osg-users Digest, Vol 57, Issue 45 >*****************************************
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

