Hi Benjamin, There are limits on how much a general purpose code can handle different usage requirements, it may be that you've hit the limits of NodeTrackerManiplator. Perhaps NodeTrackerManipulator could be extended to allow one to control how the local center is computed - either from the last nodes bounding sphere or via a control point set in local coordinates. One could do this with a enum specificying how to compute the center and another to record the center when it should be assumed to be fixed.
Robert. On 7/30/07, Benjamin Cabut <[EMAIL PROTECTED]> wrote: > Robers, > > Tracking the Child is not correct for what I need to do. > > In our software we have to fly in the solar system. > > I want to "connect" the observer to earth. for earth we have 3 > differents referiential (PositionAttitudeTransform): > - One Planet equatorial syncrhonous (we turn with earth rotation (X > axis is GMT=0), and our vertical (Z axis) is the pole axis of the planet) > - One Planet equatorial (we do not turn with earth rotation (X axis > is the vernal point (moving depending time...), but the vertical is still > pole of the planet) > - One Planet Ecliptic (we do not turn with earth rotation (X axis is > still vernal point) and vertical is ecliptical perpendicular vector) > > So I need to have only one Child: Earth Group and this object as got > several PositionAttitudeTransform where I can "connect" (Track) the > observer, and the Geode is only added to one PositionAttitudeTransform. > > That's why I needed to track directly a Transform Node. > > Benjamin > > > > > ----- Original Message ----- > From: "Robert Osfield" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Monday, July 30, 2007 2:56 PM > Subject: Re: [osg-users] Correction of osgGA::NodeTrackerManipulator > > > > Hi Benjamin, > > > > The change doesn't feel right to me. Could you try tracking the child > > of the transform to see if that helps. > > > > Robert. > > > > On 7/30/07, Benjamin Cabut <[EMAIL PROTECTED]> wrote: > > > > > > > > > Hello, > > > > > > I tried to use osgGA::NodeTrackerManipulator, and I had a problem > when I > > > wanted to Track a PositionAttitudeTransform Node: > > > It does not track the center of the Node as it should, but apply > a > > > shift of the center value of the tracked matrix. > > > > > > I do this correction to the computeNodeCenterAndRotation function: > > > > > > instead of : > > > if (validateNodePath()) > > > nodeCenter = > > > osg::Vec3d(_trackNodePath.back()->getBound().center())*localToWorld(); > > > else > > > nodeCenter = osg::Vec3d(0.0f,0.0f,0.0f)*localToWolrd; > > > > > > I changed the if condition with > > > > > > if (validateNodePath() && !(dynamic_cast<const > > > osg::Transform*>(_trackNodePath.back().get())!=NULL)) > > > > > > So if the Node is a Transform node, it uses the second calculation. > > > > > > It works, but as this function is called every frame (in the > > > getInversdedMatrix) there might be an optimized solution for this (like > > > memorise this information when the TrakNode is changed). > > > > > > Is this correct, or is there a way to track a Transform Node > correctly? > > > > > > Benjamin > > > > > > CABUT Benjamin > > > Resp. Technique > > > RSA Cosmos > > > Tel: +33 (0)4 77 53 30 48 > > > Fax: +33 (0)4 77 53 38 61 > > > > > > www.rsacosmos.com > > > > > > NEW: RSA COSMOS.COM FORUM is online!! > > > In "Ressources" Tab. > > > We need you to share your experience! > > > You need to register to be able to access the Forum. > > > Do not hesitate to participate! > > > _______________________________________________ > > > osg-users mailing list > > > [email protected] > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

