Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Hi Jeremy, 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

Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Thanks Robert, I thought the structure may be a bit much but here is the high level breakdown: osg::MatrixTransform -osg::Group --osg::StateSet -osg::Group --osg::Geode --osg::Geode --osg::Geode --osg::Geode --osg::Geode --osg::Group --osg::Geode --osg::Group --osg::Geode --osg::Geode

Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Hi Jeremy, Yes programmatically. You simply create a Transform, DOFTransform, whatever and set all the children of the original Group as childs of the new one (transforms, as you surely know are groups too). Lastly you want to want to set the parent as well. I haven’t used OSG in a

Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Laurens, I focused on the osgSIM::DOFTransform since it was the example in the tank.osg file, but I will look into the other transform options. Thank you. On Thursday, April 16, 2020 at 4:55:21 AM UTC-4, Voerman, L. wrote: > > Hi Jeremy, > editing your helicopter.osgt should work, and while I

Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Sebastian, I've used the nodevisitor to find the node by name, the node just happens to be a osg::group. Could you explain what you mean by "replace them with a DOF-Transform"? I'm optimistic that you mean programmatically. My current approach is to replace it manually in the osgt file.

[osg-users] osgUtil::Tessellator issues

2020-04-16 Thread OpenSceneGraph Users
Hi Community, I am struggling with the Tessellator to make it work. I tried to consult the OpenGL spec for the winding types and I tried all of them without success :/. It is simple case where I have polygon with two wholes. The contour generation seams to be ok, like in the attached picture,

Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Hi Jeremy, editing your helicopter.osgt should work, and while I never work with osgSim::DOFTransform (I alway use osg::MatixTransform) both descend from osg::Group, and can be used in osg text files to replace a group. However, the optimizer might find a transform with an identity matrix, and

Re: [osg-users] Edit 3D (osgt) model to add DOFTransform and perform "node" rotation

2020-04-16 Thread OpenSceneGraph Users
Hi Jeremy, As your geometry-parts are usually under a transform /group you can use a NodeVisitor to collect those (Find the nodes by name) and replace them with a DOF-Transform. You could of course also mess with the osgt-files, but that would be a last resort. Cheers Sebastian