|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fi.utu.cs.physics.Body | +--fi.utu.cs.physics.MomentaryBody | +--fi.utu.cs.asteroids.Decoration
An ethereal body which has a zero mass and finite lifetime.
Constructor Summary | |
protected |
Decoration(double r,
double lt)
Constructs a decoration with the radius r and
the lifetime lt .
|
protected |
Decoration(double r,
double lt,
Point2 p)
Constructs a decoration with the radius r , the lifetime lt
and the position p .
|
protected |
Decoration(double r,
double lt,
Point2 p,
Vector2 v)
Constructs a decoration with the radius r , the lifetime lt ,
the position p
and the velocity v . |
protected |
Decoration(double r,
double lt,
Point2 p,
Vector2 v,
Vector2 a)
Constructs a decoration with the radius r , the lifetime lt ,
the position p ,
the velocity v and the acceleration a .
|
Method Summary | |
abstract java.awt.Color |
color()
Returns a Color object that is used for drawing
the outline. |
void |
die()
Removes the body from the universe that owns it. |
abstract boolean |
isDrawn()
Returns a boolean value indicating whether the outline of the shape is drawn or not. |
abstract boolean |
isFilled()
Returns a boolean value indicating whether the shape is filled or not. |
abstract java.awt.Paint |
paint()
Returns a Paint object that is used for filling
the shape. |
abstract java.awt.Shape |
shape()
Returns a Shape object that defines the appearance
of the object. |
abstract java.awt.Stroke |
stroke()
Returns a Stroke object that is used for drawing
the outline. |
Methods inherited from class fi.utu.cs.physics.MomentaryBody |
advance, getLifetime, setLifetime |
Methods inherited from class fi.utu.cs.physics.Body |
elasticCollision, getAcceleration, getMass, getOwner, getPosition, getRadius, getVelocity, isColliding, isCorporeal, isOverlapping, setAcceleration, setAcceleration, setCorporeal, setEthereal, setMass, setOwner, setPosition, setPosition, setRadius, setVelocity, setVelocity, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Decoration(double r, double lt)
r
and
the lifetime lt
.
The decoration resides in the origin and has a zero velocity and
a zero acceleration. The decoration has no owner.protected Decoration(double r, double lt, Point2 p)
r
, the lifetime lt
and the position p
.
The decoration has a zero velocity and a zero acceleration.
The decoration has no owner.protected Decoration(double r, double lt, Point2 p, Vector2 v)
r
, the lifetime lt
,
the position p
and the velocity v
. The decoration has a
zero acceleration. The decoration has no owner.protected Decoration(double r, double lt, Point2 p, Vector2 v, Vector2 a)
r
, the lifetime lt
,
the position p
,
the velocity v
and the acceleration a
.
The decoration has no owner.Method Detail |
public void die()
die
in class MomentaryBody
public abstract java.awt.Shape shape()
Shapable
Shape
object that defines the appearance
of the object.shape
in interface Shapable
fi.utu.cs.appearance.Shapable
Shape
public abstract boolean isDrawn()
Shapable
isDrawn
in interface Shapable
fi.utu.cs.appearance.Shapable
Shapable.stroke()
,
Shapable.color()
public abstract java.awt.Stroke stroke()
Shapable
Stroke
object that is used for drawing
the outline.stroke
in interface Shapable
fi.utu.cs.appearance.Shapable
Shapable.isDrawn()
,
Stroke
public abstract java.awt.Color color()
Shapable
Color
object that is used for drawing
the outline.color
in interface Shapable
fi.utu.cs.appearance.Shapable
Shapable.isDrawn()
,
Color
public abstract boolean isFilled()
Shapable
isFilled
in interface Shapable
fi.utu.cs.appearance.Shapable
Shapable.paint()
public abstract java.awt.Paint paint()
Shapable
Paint
object that is used for filling
the shape.paint
in interface Shapable
fi.utu.cs.appearance.Shapable
Shapable.isFilled()
,
Paint
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |