How do I use ThrowSVI ?

Jun 10, 2009 at 10:25 AM

Hi,

I came across the SurfaceAnimationUtility ThrowSVI in the Utilities.

It sounds like it could be very useful, any hints on how to install and use it?

Bruce

Coordinator
Jun 10, 2009 at 1:19 PM

You found the secret bonus!

There is an AnimateUtility in InfoStrat.VE.Utilities and a SurfaceAnimateUtility in InfoStrat.VE.NUI.Utilities.  SurfaceAnimateUtility derives from AnimateUtility but adds the ThrowSVI method.

The methods are all static, so just call them.  It is fire-and-forget.  If you want an SVI to move to some place from anywhere, just call

public static void ThrowSVI(ScatterViewItem svi, Point targetPoint, double targetOrientation, double fromTime, double toTime);

The fromTime and toTime are in seconds, targetOrientation in degrees. targetPoint is the point relative to the containing ScatterView (same as the SVI.Center property).

I don't recall if this code version has the bugs worked out with fromTime, so if fromTime > 0 doesn't work, just keep it at 0.