|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSci.physics.Particle
JSci.physics.ClassicalParticle2D
JSci.physics.RigidBody2D
public class RigidBody2D
The RigidBody2D class provides an object for encapsulating rigid bodies that live in 2D.
Field Summary | |
---|---|
protected double |
ang
Angle (orientation). |
protected double |
angMass
Moment of inertia. |
protected double |
angVel
Angular velocity. |
Fields inherited from class JSci.physics.ClassicalParticle2D |
---|
mass, vx, vy, x, y |
Constructor Summary | |
---|---|
RigidBody2D()
Constructs a rigid body. |
Method Summary | |
---|---|
RigidBody2D |
angularAccelerate(double a,
double dt)
|
RigidBody2D |
angularCollide(RigidBody2D p,
double e)
Collides this particle with another. |
ClassicalParticle2D |
applyForce(Force2D F,
double dt)
|
RigidBody2D |
applyTorque(double T,
double dt)
|
RigidBody2D |
collide(RigidBody2D p,
double e)
Collides this particle with another. |
double |
energy()
Returns the kinetic and rotational energy. |
double |
getAngle()
Returns the angle (orientation) of this body. |
double |
getAngularMomentum()
|
double |
getAngularVelocity()
|
double |
getMomentOfInertia()
|
ClassicalParticle2D |
move(double dt)
Evolves the particle forward according to its kinematics. |
RigidBody2D |
rotate(double dt)
|
void |
setAngle(double angle)
Sets the angle (orientation) of this body. |
void |
setAngularMomentum(double angleMom)
|
void |
setAngularVelocity(double angleVel)
|
void |
setMomentOfInertia(double MoI)
|
Methods inherited from class JSci.physics.ClassicalParticle2D |
---|
accelerate, applyForce, collide, getMass, getXMomentum, getXPosition, getXVelocity, getYMomentum, getYPosition, getYVelocity, gravitate, setMass, setMomentum, setPosition, setVelocity, setXPosition, setYPosition, speed, translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double angMass
protected double ang
protected double angVel
Constructor Detail |
---|
public RigidBody2D()
Method Detail |
---|
public void setMomentOfInertia(double MoI)
public double getMomentOfInertia()
public void setAngle(double angle)
angle
- an angle in radianspublic double getAngle()
public void setAngularVelocity(double angleVel)
public double getAngularVelocity()
public void setAngularMomentum(double angleMom)
public double getAngularMomentum()
public double energy()
energy
in class ClassicalParticle2D
public ClassicalParticle2D move(double dt)
move
in class ClassicalParticle2D
public RigidBody2D rotate(double dt)
public RigidBody2D angularAccelerate(double a, double dt)
public RigidBody2D applyTorque(double T, double dt)
public ClassicalParticle2D applyForce(Force2D F, double dt)
applyForce
in class ClassicalParticle2D
public RigidBody2D collide(RigidBody2D p, double e)
e
- coefficient of restitutionpublic RigidBody2D angularCollide(RigidBody2D p, double e)
e
- coefficient of restitution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |