Re: [osg-users] PAT and getWorldMatrices difference
You also need to show how you are extracting the rotational values and how your setting them To add to the issue there are many ways to set Quats up and retrieve the rotational values out of them which can return different results And again as Robert pointed out getting a transforms matrix and getting its WolrdMatrices are not the same thing -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Melis Sent: Monday, August 04, 2008 6:44 AM To: OpenSceneGraph Users Subject: Re: [osg-users] PAT and getWorldMatrices difference Hi Vincent, Vincent Bourdier wrote: > My question is : why there is difference in the rotation when I get it > from a PAT (attached under the root) or when I do a getWolrdMatrices > on the same PAT > > Translation seems to be the same, but not rotation. You ask a question which can't really be answered in general. You need to show exactly what values you're getting and what you are expecting. Even better would be a very simple test program (or scene in .osg format) that demonstrates the problem. Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
Hi Vincent, Vincent Bourdier wrote: My question is : why there is difference in the rotation when I get it from a PAT (attached under the root) or when I do a getWolrdMatrices on the same PAT Translation seems to be the same, but not rotation. You ask a question which can't really be answered in general. You need to show exactly what values you're getting and what you are expecting. Even better would be a very simple test program (or scene in .osg format) that demonstrates the problem. Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
On Mon, Aug 4, 2008 at 9:35 AM, Vincent Bourdier <[EMAIL PROTECTED]> wrote: > So you agree that it is not normal to have a difference in the rotation, if > no transform is above the PAT ? The line of questioning is what is not normal. I can't say anything else about what you are doing/expecting. The world transform code in the OSG *works* reliably a has done since its introduction. The PositionAttitudeTransform code in the OSG *works* reliably and has done for many years. The rest is is almost certainly just your own misunderstanding. From what you have written I really can't say where you're understanding has gone of the road into the dirt. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
So you agree that it is not normal to have a difference in the rotation, if no transform is above the PAT ? thanks, Regards Vincent 2008/8/4 Robert Osfield <[EMAIL PROTECTED]> > On Mon, Aug 4, 2008 at 7:21 AM, Vincent Bourdier > <[EMAIL PROTECTED]> wrote: > > Hi Robert, > > > > Sorry if it was not understandable. > > > > My question is : why there is difference in the rotation when I get it > from > > a PAT (attached under the root) or when I do a getWolrdMatrices on the > same > > PAT > > > > Translation seems to be the same, but not rotation. > > You ask me, how long is a piece of string that you are holding. > > Can I answer this? Without seeing the string?? > > No. > > As for why your rotation is not what you are expecting, I also can't > answer this, it's your scene graph, only you have it in front of you. > My best guess is that you Transform above the PAT has a rotation in > it. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
On Mon, Aug 4, 2008 at 7:21 AM, Vincent Bourdier <[EMAIL PROTECTED]> wrote: > Hi Robert, > > Sorry if it was not understandable. > > My question is : why there is difference in the rotation when I get it from > a PAT (attached under the root) or when I do a getWolrdMatrices on the same > PAT > > Translation seems to be the same, but not rotation. You ask me, how long is a piece of string that you are holding. Can I answer this? Without seeing the string?? No. As for why your rotation is not what you are expecting, I also can't answer this, it's your scene graph, only you have it in front of you. My best guess is that you Transform above the PAT has a rotation in it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
Hi Robert, Sorry if it was not understandable. My question is : why there is difference in the rotation when I get it from a PAT (attached under the root) or when I do a getWolrdMatrices on the same PAT Translation seems to be the same, but not rotation. Thanks. Regards, Vincent 2008/8/3 Robert Osfield <[EMAIL PROTECTED]> > HI Vincent, > > I can't really work out exactly what the problem you have, I presume > others too had a problem understanding what the issue you have is as > otherwise others would have posted a reply... > > My best guess is that you are confusing what getWorldMatrices() > provides... if so please just read the doxygen docs for it... > >/** Get the list of matrices that transform this node from > local coordinates to world coordinates. > * The optional Node* haltTraversalAtNode allows the user to > prevent traversal beyond a specifed node. */ >MatrixList getWorldMatrices(osg::Node* haltTraversalAtNode=0) const; > > Please note, WorldMatrices is not local matrices, its exactly what it > says. local matrices and world matrices only every coincide when you > have now transforms in your parental path. > > Robert. > > On Wed, Jul 30, 2008 at 8:24 AM, Vincent Bourdier > <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > Working on a way to find the good world matrix for a node, I've > encountered > > some problems : > > > > My structure is this one : > > > > -root > > |-Node...(not osg::Tranform) > > |-PAT (osg::PositionAtitudeTransform) > > > > If I get the PAT translation and rotation, I've a vector and a Quat, > which > > looks good, > > if I consider pat as a node and use _node->getWorldMatrices()[0] and get > > Rotation and Translation, the results are not the same... > > > > What can do this ? > > How to get real world coordinate form a node (Transform or not) ? > > > > thanks, > > > > Regards, > >Vincent. > > > > ___ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
HI Vincent, I can't really work out exactly what the problem you have, I presume others too had a problem understanding what the issue you have is as otherwise others would have posted a reply... My best guess is that you are confusing what getWorldMatrices() provides... if so please just read the doxygen docs for it... /** Get the list of matrices that transform this node from local coordinates to world coordinates. * The optional Node* haltTraversalAtNode allows the user to prevent traversal beyond a specifed node. */ MatrixList getWorldMatrices(osg::Node* haltTraversalAtNode=0) const; Please note, WorldMatrices is not local matrices, its exactly what it says. local matrices and world matrices only every coincide when you have now transforms in your parental path. Robert. On Wed, Jul 30, 2008 at 8:24 AM, Vincent Bourdier <[EMAIL PROTECTED]> wrote: > Hi All, > > Working on a way to find the good world matrix for a node, I've encountered > some problems : > > My structure is this one : > > -root > |-Node...(not osg::Tranform) > |-PAT (osg::PositionAtitudeTransform) > > If I get the PAT translation and rotation, I've a vector and a Quat, which > looks good, > if I consider pat as a node and use _node->getWorldMatrices()[0] and get > Rotation and Translation, the results are not the same... > > What can do this ? > How to get real world coordinate form a node (Transform or not) ? > > thanks, > > Regards, >Vincent. > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PAT and getWorldMatrices difference
Hi, I make an update to have some answers if possible... Thanks. Regards, Vincent. 2008/7/30 Vincent Bourdier <[EMAIL PROTECTED]> > Hi All, > > Working on a way to find the good world matrix for a node, I've encountered > some problems : > > My structure is this one : > > -root > |-Node...(not osg::Tranform) > |-PAT (osg::PositionAtitudeTransform) > > If I get the PAT translation and rotation, I've a vector and a Quat, which > looks good, > if I consider pat as a node and use _node->getWorldMatrices()[0] and get > Rotation and Translation, the results are not the same... > > What can do this ? > How to get real world coordinate form a node (Transform or not) ? > > thanks, > > Regards, >Vincent. > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PAT and getWorldMatrices difference
Hi All, Working on a way to find the good world matrix for a node, I've encountered some problems : My structure is this one : -root |-Node...(not osg::Tranform) |-PAT (osg::PositionAtitudeTransform) If I get the PAT translation and rotation, I've a vector and a Quat, which looks good, if I consider pat as a node and use _node->getWorldMatrices()[0] and get Rotation and Translation, the results are not the same... What can do this ? How to get real world coordinate form a node (Transform or not) ? thanks, Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org