Tomlinson, Gordon wrote:
> As you don't show your code I have to ask a couple of obvious questions 
> 
> Is the node you loaded a child of the PAT?
> 
> Has the PAT been added to the Scene?
> 
> 
> Gordon Tomlinson
> Product Manager 3d Technology & Project Wyvern
> Overwatch(r)
> An Operating Unit of Textron Systems
> 
> -----Original Message-----
> From: 
> [mailto:] On Behalf Of daniele
> argiolas
> Sent: Wednesday, April 14, 2010 12:00 PM
> To: 
> Subject:  Absolute position of an object
> 
> Hi,
> I create a simple scene with osg where I load an osg model.
> Then I try to position it with PositionAttitudeTransform and setPosition
> but it remains always in the same position (center of the scene).
> How can I position objects in absolute way?
> 
> 
> Thank you!
> 
> Cheers,
> daniele
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=26790#26790
> 
> 
> 
> 
> 
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum



Hi, Thank you.

My code is simply.


Code:

osgViewer::Viewer viewer;

        osg::Node* node1 = NULL;
        osg::Group* root = new osg::Group();
                node1 = osgDB::readNodeFile("1.osg");

        osg::PositionAttitudeTransform* node1Xform =
           new osg::PositionAttitudeTransform();
        
        root->addChild(node1Xform);
        node1Xform->addChild(node1);
        osg::Vec3 node1Posit(1200,0,0);
        node1Xform->setPosition( node1Posit );

viewer.setSceneData( root );

viewer.setSceneData( root );
return viewer.run();





If I add a plane, how can I set my camera to frame the plan in its full width?

Thanks!

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26814#26814





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to