Re: [osg-users] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Hi again list Actually the math is present in the osgGA::TerrainManipulator (void TerrainManipulator::clampOrientation()) and it works just great with some mods (the 3D transforms for nodes are bit different then for the View matrix. I am all set. Sebastian, thanks a lot ! Cheers, Nick On

Re: [osg-users] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Thanks Sebastian! I will write you off-list On Wed, Feb 1, 2017 at 12:36 PM, Sebastian Messerschmidt < sebastian.messerschm...@gmx.de> wrote: > Hi Trajce, > > based on Euler with optional smoothing (to avoid jaggy movement), this > algorithm will adapt a local pose conserving heading. The

Re: [osg-users] combining Quats

2017-02-01 Thread Sebastian Messerschmidt
Hi Trajce, based on Euler with optional smoothing (to avoid jaggy movement), this algorithm will adapt a local pose conserving heading. The smoothing part is mainly to get a smooth transition between adjacend terrain normals. Sorry for the cluttered code. IN: gmtl::Vec3d

Re: [osg-users] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Hi Sebastian, the code will be welcome. I was expecting that the proper way is to go through Eulers Thanks a lot! On Wed, Feb 1, 2017 at 9:48 AM, Sebastian Messerschmidt < sebastian.messerschm...@gmx.de> wrote: > Hi Trajce, > > Did I miss the question :-) If it is working: fine. :-) > > In

Re: [osg-users] combining Quats

2017-02-01 Thread Sebastian Messerschmidt
Hi Trajce, Did I miss the question :-) If it is working: fine. :-) In general you are extracting the heading I guess (with the modelOrientation) and put it on top the tilted normal, which will put you on in this pose. The problem might be, that you introduce unwanted roll with this. I can

[osg-users] combining Quats

2017-02-01 Thread Trajce Nikolov NICK
Hi community, this is sort of easy math question (btw, I missed that part in my classes ;-) ) I want to check it with you. It is about node following terrain. my node is MatrixTransform and I have to set it in world coordinates. The node has it's own rotation and I just need to take the terrain