|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--fi.utu.cs.physics.Particle
|
+--fi.utu.cs.physics.Body
|
+--fi.utu.cs.physics.FrictionalBody
A moving physical body with mass and dimensionality. The outline of
the body is approximated with a bounding circle of a given radius,
which is used in detecting overlaps. The body can be owned by
an instance of the class Universe, which may impose limits
to the position.
| Constructor Summary | |
protected |
FrictionalBody(double m,
double r,
Friction f)
Constructs a body with the mass m,
the radius r and friction f.
|
protected |
FrictionalBody(double m,
double r,
Point2 p,
Friction f)
Constructs a body with the mass m,
the radius r, the position p
and friction f.
|
protected |
FrictionalBody(double m,
double r,
Point2 p,
Vector2 v,
Friction f)
Constructs a body with the mass m,
the radius r, the position p,
the velocity v and friction f.
|
protected |
FrictionalBody(double m,
double r,
Point2 p,
Vector2 v,
Vector2 a,
Friction f)
Constructs a body with the mass m,
the radius r, the position p,
the velocity v, the acceleration a
and friction f.
|
| Method Summary | |
Vector2 |
futureVelocity(double dt)
Returns the velocity of the body after seconds. |
Friction |
getFriction()
Returns the friction of the body. |
void |
setFriction(Friction f)
Sets the friction of the body to f. |
java.lang.String |
toString()
Returns a string that contains the values of the attributes. |
| Methods inherited from class fi.utu.cs.physics.Body |
advance, elasticCollision, futurePosition, getAcceleration, getMass, getPosition, getRadius, getVelocity, inelasticCollision, isColliding, isOverlapping, setAcceleration, setAcceleration, setMass, setPosition, setPosition, setRadius, setVelocity, setVelocity |
| Methods inherited from class fi.utu.cs.physics.Particle |
addCollisionNotification, clearCollisionNotifications, getOwner, isCollisionNotified, isCollisionNotified, isCorporeal, removeCollisionNotification, setCorporeal, setEthereal, setOwner |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected FrictionalBody(double m,
double r,
Friction f)
m,
the radius r and friction f.
The body resides in the
origin and has a zero velocity and a zero acceleration.
The body is corporeal and has no owner.
protected FrictionalBody(double m,
double r,
Point2 p,
Friction f)
m,
the radius r, the position p
and friction f.
The body has a zero velocity and a zero acceleration.
The body is corporeal and has no owner.
protected FrictionalBody(double m,
double r,
Point2 p,
Vector2 v,
Friction f)
m,
the radius r, the position p,
the velocity v and friction f.
The body has a
zero acceleration.
The body is corporeal and has no owner.
protected FrictionalBody(double m,
double r,
Point2 p,
Vector2 v,
Vector2 a,
Friction f)
m,
the radius r, the position p,
the velocity v, the acceleration a
and friction f.
The body is corporeal and has no owner.
| Method Detail |
public Friction getFriction()
public void setFriction(Friction f)
f.
public Vector2 futureVelocity(double dt)
futureVelocity in class BodyBody.advance(double),
Body.futurePosition(double)public java.lang.String toString()
toString in class Body
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||