[x3d-public] Playback controller

Leonard Daly Leonard.Daly at realism.com
Wed Mar 18 17:42:59 PDT 2015


Mike,

I had to do this for something many years ago. I think I set up a Script 
node to manage the playback time. Try using the TimeSensor to just keep 
time, set the duration to 1 second and have it repeat. Use a Script node 
to track the current position and advance the slider according to the 
changes to a PlaneSensor plus an adjustment for the TimeSensor. You will 
need to keep track of seconds within the Script. It should be doable by 
using a minute-long loop in the TimeSensor instead.

Each full cycle represents some fractional part of the range of the 
PlaneSensor. You just convert the TimeSensor fractional input to the 
PlaneSensor range and keep adding. If the user changes the position of 
the slider (and hence a PlaneSensor event), then the current position 
(fraction) changes.

All of this generates a fractional event (SFFloat) to drive the model 
position and orientation through its path.


Leonard Daly



1) TimeSensor starts (on command or world-load)
2) Feeds
> Hello,
>
> I have an hour's worth of platform orientation data that I can play 
> back with a TimeSensor. I'd like to give the viewer a slider to be 
> able to "scrub" through the data.
>
> I can route in a PlaneSensor to control the OrientationInterpolators, 
> but when the PlaneSensor is not active the TimeSensor resumes with its 
> value not being changed.
>
> What I'd like to do is to route a value into a 'set_fraction' field of 
> TimeSensor, but that is not in the X3D specification.
>
> Are there any other ideas on how to accomplish this? (I'd think that 
> this would be a common use case: basically a video playback controller 
> for any sort of time dependent data.)
>
> -Mike
>
> --
> Mike McCann
> Software Engineer
> Monterey Bay Aquarium Research Institute
> 7700 Sandholdt Road
> Moss Landing, CA 95039-9644
> Voice: 831.775.1769  Fax: 831.775.1736 http://www.mbari.org
>
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org


-- 
*Leonard Daly*
X3D Co-Chair
3D Systems & Cloud Consultant
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150318/af3282f0/attachment.html>


More information about the x3d-public mailing list