<div dir="ltr">Thanks Robert, I thought the structure may be a bit much but here is the high level breakdown:<div><div>osg::MatrixTransform</div><div>-osg::Group</div><div>--osg::StateSet</div><div>-osg::Group</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Group</div><div>--osg::Geode</div><div>--osg::Group</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Group</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Group</div><div>--osg::Group</div><div>--osg::Group</div><div>--osg::Group</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Geode</div><div>--osg::Group</div><div>---osg::Group "Main_Hub"</div><div>----osg::Geode</div><div>-----osg::Geometry</div><div>------osg::StateSet</div><div>-------osg::DrawArray</div><div>--------osg::Vec3Array</div><div>--osg::Group "Tail_Hub"</div></div><div><br></div><div>Again I'm looking to access the osg::Group "Main_Hub" get Transform functionality from it.</div><div><br></div><div>Jeremy</div><div><br><div><br>On Thursday, April 16, 2020 at 2:39:10 AM UTC-4, OpenSceneGraph Users wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div>Hi Jeremy,</div><div><br></div><div>The DOFTransform example you've come across only works for a osgSIM::DOFTransform because it was created with this type of DOFTransform. THE DOFTransform is written specifically for OpenFlight support so only created by the the OSG .flt loader, most other models will use other types of osg::Transform nodes such as osg::MatrixTransform or osg::<wbr>PositionAttitutudeTransform. <br></div><div><br></div><div>You haven't provide any details about the scene graphs structure of your helicopter.osgt so we can't tell what to look for, the model might not even have any Transform node in it, in which case you'll need to add one.</div><div><br></div><div>Robert.<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 15 Apr 2020 at 21:55, OpenSceneGraph Users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WLJpcQk6AgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@lists.<wbr>openscenegraph.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">First off, I hope everyone is staying sane and healthy during this pandemic.</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> </span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">I’m working with a collection of 3D models that have come from a variety of different source but are now all in osgb format. For several of the models I’d like to grab a “node” and apply rotation.</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> </span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">As I’m working through my understanding of the approach, I’ve created a simple application that loads the model, traverses the scene, returns a pointer to the “node”, casts to a DOFTransform and manipulate the “node” (DOFTransform). Snippet:</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;text-indent:0.5in;background-image:initial;background-position:initial;background-repeat:initial"><span style="font:inherit;vertical-align:baseline;color:inherit"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">FindNamedNodeVisitor fnnv("turret");</span></span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;text-indent:0.5in;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">scene->accept(fnnv);</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;text-indent:0.5in;background-image:initial;background-position:initial;background-repeat:initial"><span style="font:inherit;vertical-align:baseline;color:inherit"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">osg::ref_ptr<osgSim::<wbr>DOFTransform> dofTrans = new osgSim::DOFTransform();</span></span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;text-indent:0.5in;background-image:initial;background-position:initial;background-repeat:initial"><span style="font:inherit;vertical-align:baseline;color:inherit"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">dofTrans = dynamic_cast<osgSim::<wbr>DOFTransform*>(fnnv.<wbr>getFoundNode()->asTransform())<wbr>;</span></span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;text-indent:0.5in;background-image:initial;background-position:initial;background-repeat:initial"><span style="font:inherit;vertical-align:baseline;color:inherit"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">if(dofTrans != NULL)</span></span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font:inherit;vertical-align:baseline;color:inherit"><span style="padding:0in;border-width:1pt;border-style:none;border-color:windowtext;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> <wbr> </span></span><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">//manipulate (rotate)<span style="padding:0in;border-width:1pt;border-style:none;border-color:windowtext;font:inherit;vertical-align:baseline;color:inherit"><span style="font:inherit;vertical-align:baseline;color:inherit"> </span></span></span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> </span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">This approach works for the tank.osg model. Now I’m trying to apply this approach to a different model (helicopter for example). When I access the “node” of interest, “Main_Hub” which is an osg::Group I obviously can’t cast that to a osgSim::DOFTransform. I’m trying to get an understand of how I can change the model, now in osgt (readable) format, to a structure that can be used. I’ve been using the tank.osg as a guide and attempted to recreate a similar structure in the helicopter.osgt. I’m trying to take logical stabs in the dark, in the helicopter model I’ve attempted to simply renamed the “node” of interest from an osg::Group to osgSim::DOFTransform. The model still displays correctly, but the cast to osgSim::DOFTransform returns NULL. I thought there may be some required variables at are needed as part of the osgSim::DOFTransform structure, so I began adding currentHPR, currentTranslate, and currentScale and continued to add more bringing it in line with the tank.osg example. Through all the attempts I still getting NULL when casting.</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> </span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">I’m looking for any guidance/suggestions/lessons learned on how to properly do this.</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><br></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font:inherit;vertical-align:baseline;color:inherit"><span style="padding:0in;border-width:1pt;border-style:none;border-color:windowtext;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">Thanks</span></span><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> in advance</span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline"> </span></p><p style="color:rgb(0,0,0);font-size:12pt;font-family:"Times New Roman",serif;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:11pt;line-height:inherit;font-family:Calibri,sans-serif;vertical-align:baseline">Jeremy</span></p></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WLJpcQk6AgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@<wbr>googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/cbb4b132-24a7-4e75-b10f-7474c1a99378%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/osg-users/cbb4b132-24a7-4e75-b10f-7474c1a99378%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" onclick="this.href='https://groups.google.com/d/msgid/osg-users/cbb4b132-24a7-4e75-b10f-7474c1a99378%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;">https://groups.google.com/d/<wbr>msgid/osg-users/cbb4b132-24a7-<wbr>4e75-b10f-7474c1a99378%<wbr>40googlegroups.com</a>.<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WLJpcQk6AgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">osg-...@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Flists.openscenegraph.org%2Flistinfo.cgi%2Fosg-users-openscenegraph.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEhxcobqaKtkSCnaCeBWJ1fFl93mw';return true;">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div>
</blockquote></div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/ea7ac52d-bf9f-42bf-8b1c-a90bac81017b%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/ea7ac52d-bf9f-42bf-8b1c-a90bac81017b%40googlegroups.com</a>.<br />