diva.sketch.toolbox
Class NormalizeTimeStrokeFilter

java.lang.Object
  extended by diva.sketch.toolbox.StrokeFilter
      extended by diva.sketch.toolbox.NormalizeTimeStrokeFilter

public class NormalizeTimeStrokeFilter
extends StrokeFilter

Interpolate a timed stroke so that its points are spaced evenly over time.

Version:
$Revision: 1.2 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Field Summary
static int DEFAULT_TIMESTEP
          The default timestep, 10ms.
 
Fields inherited from class diva.sketch.toolbox.StrokeFilter
PROPERTY_KEY
 
Constructor Summary
NormalizeTimeStrokeFilter()
          Interpolate to the default timestep.
NormalizeTimeStrokeFilter(int timestep)
          Interpolate to the given time step (in milliseconds)
 
Method Summary
 TimedStroke apply(TimedStroke s)
          Interpolate a timed stroke so that it contains a specified number of points.
 int getTimestep()
          Return the timestep that the filter interpolates to in millisecs.
static TimedStroke interpolate(TimedStroke s)
          Normalize an individual stroke to time increments according to DEFAULT_TIMESTEP.
static TimedStroke interpolate(TimedStroke s, int timestep)
          Normalize an individual stroke to time increments given by timestep.
 void setTimestep(int timestep)
          Set the timestep (milliseconds) that the filter interpolates to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMESTEP

public static int DEFAULT_TIMESTEP
The default timestep, 10ms.

Constructor Detail

NormalizeTimeStrokeFilter

public NormalizeTimeStrokeFilter(int timestep)
Interpolate to the given time step (in milliseconds)


NormalizeTimeStrokeFilter

public NormalizeTimeStrokeFilter()
Interpolate to the default timestep.

Method Detail

getTimestep

public int getTimestep()
Return the timestep that the filter interpolates to in millisecs.


setTimestep

public void setTimestep(int timestep)
Set the timestep (milliseconds) that the filter interpolates to.


apply

public TimedStroke apply(TimedStroke s)
Interpolate a timed stroke so that it contains a specified number of points.

Specified by:
apply in class StrokeFilter

interpolate

public static TimedStroke interpolate(TimedStroke s)
Normalize an individual stroke to time increments according to DEFAULT_TIMESTEP.


interpolate

public static TimedStroke interpolate(TimedStroke s,
                                      int timestep)
Normalize an individual stroke to time increments given by timestep.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.