movements
Class SinusoidalMovement

java.lang.Object
  extended bymovements.SingleDimensionalMovement
      extended bymovements.SinusoidalMovement
All Implemented Interfaces:
java.io.Serializable

class SinusoidalMovement
extends SingleDimensionalMovement


Field Summary
private  double acceleration
           
private  double amplitude
           
private  double center
           
private  double phase
           
private  double speed
           
 
Constructor Summary
(package private) SinusoidalMovement(double center, double amplitude, double phase, double speed)
           
(package private) SinusoidalMovement(double center, double amplitude, double phase, double speed, double acceleration)
           
 
Method Summary
(package private)  double GetPosition(int ticksIntoMovement)
          Given a point of time as the number of 'ticks' after the start of the movement, this method returns the position at that point of time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

center

private double center

amplitude

private double amplitude

phase

private double phase

speed

private double speed

acceleration

private double acceleration
Constructor Detail

SinusoidalMovement

SinusoidalMovement(double center,
                   double amplitude,
                   double phase,
                   double speed,
                   double acceleration)

SinusoidalMovement

SinusoidalMovement(double center,
                   double amplitude,
                   double phase,
                   double speed)
Method Detail

GetPosition

double GetPosition(int ticksIntoMovement)
Description copied from class: SingleDimensionalMovement
Given a point of time as the number of 'ticks' after the start of the movement, this method returns the position at that point of time. If the 'tick' parameter is less than zero or is greater than the number of ticks in the movement then the result of this method is undefined.

Specified by:
GetPosition in class SingleDimensionalMovement


Copyright © 2003 Nigel Westbury