com.planeth.gtroids.obj
Class Asteroid

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.Asteroid
All Implemented Interfaces:
ITimeControllable

public class Asteroid
extends AbstractAnimatedObject

Defines an Asteroid of variable shape and size.
Asteroids are affected by the environment gravitation.

Author:
Andreas Grässer, gal@planet-h.com.
created May 28, 2005

Constructor Summary
Asteroid()
          Constructor for Asteroid.
Asteroid(Shape shape)
          Constructor for Asteroid.
Asteroid(Shape shape, Vector2D vel)
          Constructor for Asteroid.
Asteroid(Vector2D vel)
          Constructor for Asteroid.
 
Method Summary
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, move, 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

Asteroid

public Asteroid()
Constructor for Asteroid.


Asteroid

public Asteroid(Vector2D vel)
Constructor for Asteroid.

Parameters:
vel - the base velocity for the Asteroid

Asteroid

public Asteroid(Shape shape)
Constructor for Asteroid.

Parameters:
shape - the base shape for the Asteroid

Asteroid

public Asteroid(Shape shape,
                Vector2D vel)
Constructor for Asteroid.

Parameters:
shape - the base shape for the Asteroid
vel - the base velocity for the Asteroid
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)