fang
Class Spinner

java.lang.Object
  extended by fang.Transformer
      extended by fang.Spinner
All Implemented Interfaces:
Tracker

public class Spinner
extends Transformer

This class animates a Sprite spinning in place.

Author:
Robert C. Duvall

Constructor Summary
Spinner(double radiansPerSecond)
          Sets up an instance of this class by properly initializing its state
 
Method Summary
 void advance(double intervalPassed)
           
 double getRotation()
          get the tracker's current rotation rate.
 double getRotationAdditionRadians()
          Returns the amount to rotate this time interval
 void setRotation(double newRate)
          change the tracker's current rotation rate.
 void setRotationDegrees(double newRate)
          change the tracker's current rotation rate.
 void setRotationRevolutions(double newRate)
          change the tracker's current rotation rate.
 
Methods inherited from class fang.Transformer
advance, advanceTime, getGame, getRotationAddition, getRotationAdditionDegrees, getRotationAdditionRevolutions, getScaleFactor, getTranslation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spinner

public Spinner(double radiansPerSecond)
Sets up an instance of this class by properly initializing its state

Parameters:
degreesPerSecond - number of radians to spin per second
Method Detail

setRotation

public void setRotation(double newRate)
change the tracker's current rotation rate.


setRotationDegrees

public void setRotationDegrees(double newRate)
change the tracker's current rotation rate.


setRotationRevolutions

public void setRotationRevolutions(double newRate)
change the tracker's current rotation rate.


getRotation

public double getRotation()
get the tracker's current rotation rate.


getRotationAdditionRadians

public double getRotationAdditionRadians()
Returns the amount to rotate this time interval

Overrides:
getRotationAdditionRadians in class Transformer
Returns:
the amount to rotate in degrees
See Also:
fang.core.Tracker#getRotationAddition()

advance

public void advance(double intervalPassed)
Overrides:
advance in class Transformer