com.planeth.gtroids.obj.base
Class AbstractTumblingObject

java.lang.Object
  extended bycom.planeth.gtroids.obj.base.PaintableObject
      extended bycom.planeth.gtroids.obj.base.AbstractGameObject
          extended bycom.planeth.gtroids.obj.base.AbstractPhysicalObject
              extended bycom.planeth.gtroids.obj.base.AbstractAnimatedObject
                  extended bycom.planeth.gtroids.obj.base.AbstractTumblingObject
All Implemented Interfaces:
ITimeControllable
Direct Known Subclasses:
AbstractBonusItem, Boss

public abstract class AbstractTumblingObject
extends AbstractAnimatedObject

The abstraction of a tumbling object
(object with excentric rotation)

Author:
Andreas Grässer, gal@planet-h.com
created 23.12.2005

Constructor Summary
AbstractTumblingObject(Shape baseShape, Vector2D vel, double rotationVelDeg)
          Constructor for AbstractTumblingObject.
 
Method Summary
 void move(Vector2D movementVector)
          Moves the object with the values of the passed vector.
protected  void update(double timeFactor, double speedFactor)
          Does one time and speed dependent update step for the Object
 
Methods inherited from class com.planeth.gtroids.obj.base.AbstractAnimatedObject
checkBorderJump, getCircumferentialVel, getLastPos, getRealTimeControl, getRotationVelDeg, getVel, isSpeedDependent, paint, pause, setBorderJumper, setCircumferentialVel, setRotationVelDeg, setSpeedDependent, setVel, update
 
Methods inherited from class com.planeth.gtroids.obj.base.AbstractPhysicalObject
die, getCenterOfMass, getElast, getExplodeSound, getGamePanel, getGravit, getObjectFactory, getQuadrantCoords, getVolume, hitWith, hitWithBomb, isAffectingGame, setAffectingGame, setGamePanel, setGravit, setLifeTime, setQuadrantCoords, split
 
Methods inherited from class com.planeth.gtroids.obj.base.AbstractGameObject
cure, getAudioResource, getColorBackup, getStats, getTimerManager, initStats, isEnemy, isReadyToDie, kill, setColorBackup, setColorFixed, setReadyToDie
 
Methods inherited from class com.planeth.gtroids.obj.base.PaintableObject
addShape, explodeBaseShape, getAvgDiameter, getAvgVector, getBaseColor, getBaseVertexes, getBounds, getMaxRadius, getNrOfVertexes, getOrientation, getPos, paintAtPos, randomizeBaseShape, rotate, setBaseColor, splitBaseShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTumblingObject

public AbstractTumblingObject(Shape baseShape,
                              Vector2D vel,
                              double rotationVelDeg)
Constructor for AbstractTumblingObject.

Parameters:
baseShape - the baseShape of the object
vel - the velocity for the object in degrees
rotationVelDeg - the rotationVel for the object in degrees
Method Detail

update

protected void update(double timeFactor,
                      double speedFactor)
Description copied from class: AbstractAnimatedObject
Does one time and speed dependent update step for the Object

Overrides:
update in class AbstractAnimatedObject
Parameters:
timeFactor - the timefactor which affects the stepsize
speedFactor - the speedfactor which affects the stepsize
See Also:
AbstractAnimatedObject.update(double, double)

move

public void move(Vector2D movementVector)
Moves the object with the values of the passed vector.
The method extends the one of PaintableObject with the movement of the extraRotationCenter (for the excentric rotation).

Overrides:
move in class PaintableObject
Parameters:
movementVector - the movement to be done
See Also:
PaintableObject.move(com.planeth.common.math.Vector2D)