|
||||||||||
| 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.OrientedBody
A moving physical body with mass, dimensionality and orientation. The body can have static and kinetic friction.
Friction| Constructor Summary | |
protected |
OrientedBody(double m,
double r,
Vector2 o)
Constructs a body with the mass m,
the radius r and the orientation o.
|
protected |
OrientedBody(double m,
double r,
Vector2 o,
Point2 p)
Constructs a body with the mass m,
the radius r, the orientation o
and the position p.
|
protected |
OrientedBody(double m,
double r,
Vector2 o,
Point2 p,
Vector2 v)
Constructs a body with the mass m,
the radius r, the orientation o,
the position p
and the velocity v. |
protected |
OrientedBody(double m,
double r,
Vector2 o,
Point2 p,
Vector2 v,
Vector2 a)
Constructs a body with the mass m,
the radius r, the orientation o,
the position p,
the velocity v and the acceleration a.
|
| Method Summary | |
Vector2 |
futureVelocity(double dt)
Returns the velocity of the body after seconds. |
Friction |
getNormalFriction()
Returns the normal friction. |
Vector2 |
getOrientation()
Returns the orientation of this body. |
Friction |
getTangentFriction()
Returns the tangent friction. |
void |
setNormalFriction(Friction f)
Sets the normal friction to f |
void |
setOrientation(Vector2 o)
Sets the orientation to o. |
void |
setTangentFriction(Friction f)
Sets the tangent friction 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 OrientedBody(double m,
double r,
Vector2 o)
m,
the radius r and the orientation o.
The body resides in the origin and has a zero velocity and
a zero acceleration. The body is corporeal and frictionless
and has no owner.
protected OrientedBody(double m,
double r,
Vector2 o,
Point2 p)
m,
the radius r, the orientation o
and the position p.
The body has a zero velocity and a zero acceleration.
The body is corporeal and frictionless and has no owner.
protected OrientedBody(double m,
double r,
Vector2 o,
Point2 p,
Vector2 v)
m,
the radius r, the orientation o,
the position p
and the velocity v. The body has a
zero acceleration. The body is corporeal and frictionless and
has no owner.
protected OrientedBody(double m,
double r,
Vector2 o,
Point2 p,
Vector2 v,
Vector2 a)
m,
the radius r, the orientation o,
the position p,
the velocity v and the acceleration a.
The body is corporeal and frictionless and has no owner.
| Method Detail |
public Vector2 getOrientation()
getOrientation().length() == 1.0).
public void setOrientation(Vector2 o)
o. The vector o
needs not to be a unit vector. However, the resulting orientation
vector is a unit vector that has the same direction as o.
public Friction getTangentFriction()
public void setTangentFriction(Friction f)
f
public Friction getNormalFriction()
public void setNormalFriction(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 | |||||||||