[osg-users] Tracking an object from a moving vehicle
robert.osfield at gmail.com
Wed Oct 3 06:49:22 PDT 2007
Moving the vehicle can be done via osg::AnimationPathCallback attached
to a MatrixTransform.
Tracking the vehicle will require something along the lines of
NodeTrackerManipulator - you'll need to accumulate the world transform
on every frame and compute the view matrix accordingly. How best to
compute this is your problem, I could point you in the right direction
but it's not my role to teach you how to write your application.
On 10/3/07, Harash Sharma <harashsharma at yahoo.com> wrote:
> Hi Robert,
> I am trying to simulate observation of an object from a vehicle. The
> task is as follows:
> 1. The observer is placed in a moving vehicle that is following a
> pre-programmed path.
> 2. The observer is constantly looking at a fixed (or moving) object from
> within this vehicle.
> How do I achieve this effect?
> I have tried using the NodeTrackerManipulator. I have derived a class from
> this. The node to be tracked is placed within this vehicle. Override the
> handle function.
> But how to compute the view matrices? And is the procedure proper or is
> there any better mechanism? Thanks in advance.
> Need a vacation? Get great deals to amazing places on Yahoo! Travel.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users