org.jscience.physics.kinematics
Class ClassicalParticle3D

java.lang.Object
  extended by org.jscience.physics.Particle
      extended by org.jscience.physics.kinematics.AbstractClassicalParticle
          extended by org.jscience.physics.kinematics.ClassicalParticle3D
All Implemented Interfaces:
java.io.Serializable, Positioned
Direct Known Subclasses:
RigidBody3D

public class ClassicalParticle3D
extends AbstractClassicalParticle

The ClassicalParticle3D class provides an object for encapsulating classical point particles that live in 3D.

See Also:
Serialized Form

Constructor Summary
ClassicalParticle3D()
          Constructs a classical particle.
ClassicalParticle3D(double m)
          Creates a new ClassicalParticle3D object.
 
Method Summary
 ClassicalParticle3D accelerate(double ax, double ay, double az, double dt)
          Accelerates this particle.
 AbstractClassicalParticle applyForce(double Fx, double Fy, double Fz, double dt)
          Applies a force to this particle.
 AbstractClassicalParticle applyForce(Force f, double t, double dt)
          Applies a force to this particle.
 double energy()
          Returns the kinetic energy.
 double getCharge()
          Returns the charge of this particle.
 int getDimension()
          DOCUMENT ME!
 double getMass()
          DOCUMENT ME!
 AbstractDoubleVector getMomentum()
          DOCUMENT ME!
 AbstractDoubleVector getPosition()
          DOCUMENT ME!
 AbstractDoubleVector getVelocity()
          DOCUMENT ME!
 double getXMomentum()
          DOCUMENT ME!
 double getXPosition()
          DOCUMENT ME!
 double getXVelocity()
          DOCUMENT ME!
 double getYMomentum()
          DOCUMENT ME!
 double getYPosition()
          DOCUMENT ME!
 double getYVelocity()
          DOCUMENT ME!
 double getZMomentum()
          DOCUMENT ME!
 double getZPosition()
          DOCUMENT ME!
 double getZVelocity()
          DOCUMENT ME!
 AbstractClassicalParticle move(double dt)
          Evolves this particle forward according to its kinematics.
 void setCharge(double e)
          Sets the charge of this particle.
 void setMass(double m)
          DOCUMENT ME!
 void setMomentum(double xMom, double yMom, double zMom)
          DOCUMENT ME!
 void setPosition(double xPos, double yPos, double zPos)
          DOCUMENT ME!
 void setVelocity(double xVel, double yVel, double zVel)
          DOCUMENT ME!
 void setXPosition(double xPos)
          DOCUMENT ME!
 void setXVelocity(double xVel)
          DOCUMENT ME!
 void setYPosition(double yPos)
          DOCUMENT ME!
 void setYVelocity(double yVel)
          DOCUMENT ME!
 void setZPosition(double zPos)
          DOCUMENT ME!
 void setZVelocity(double zVel)
          DOCUMENT ME!
 double speed()
          DOCUMENT ME!
 ClassicalParticle3D translate(double dt)
          Evolves this particle forward according to its linear kinematics.
 
Methods inherited from class org.jscience.physics.kinematics.AbstractClassicalParticle
addForce, getForces, removeAllForces, removeForce, setForces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassicalParticle3D

public ClassicalParticle3D()
Constructs a classical particle.


ClassicalParticle3D

public ClassicalParticle3D(double m)
Creates a new ClassicalParticle3D object.

Parameters:
m - DOCUMENT ME!
Method Detail

setMass

public void setMass(double m)
DOCUMENT ME!

Parameters:
m - DOCUMENT ME!

getMass

public double getMass()
DOCUMENT ME!

Specified by:
getMass in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

setCharge

public void setCharge(double e)
Sets the charge of this particle.

Parameters:
e - DOCUMENT ME!

getCharge

public double getCharge()
Returns the charge of this particle.

Specified by:
getCharge in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

setPosition

public void setPosition(double xPos,
                        double yPos,
                        double zPos)
DOCUMENT ME!

Parameters:
xPos - DOCUMENT ME!
yPos - DOCUMENT ME!
zPos - DOCUMENT ME!

getPosition

public AbstractDoubleVector getPosition()
DOCUMENT ME!

Specified by:
getPosition in interface Positioned
Specified by:
getPosition in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

setXPosition

public void setXPosition(double xPos)
DOCUMENT ME!

Parameters:
xPos - DOCUMENT ME!

getXPosition

public double getXPosition()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setYPosition

public void setYPosition(double yPos)
DOCUMENT ME!

Parameters:
yPos - DOCUMENT ME!

getYPosition

public double getYPosition()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setZPosition

public void setZPosition(double zPos)
DOCUMENT ME!

Parameters:
zPos - DOCUMENT ME!

getZPosition

public double getZPosition()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setVelocity

public void setVelocity(double xVel,
                        double yVel,
                        double zVel)
DOCUMENT ME!

Parameters:
xVel - DOCUMENT ME!
yVel - DOCUMENT ME!
zVel - DOCUMENT ME!

getVelocity

public AbstractDoubleVector getVelocity()
DOCUMENT ME!

Specified by:
getVelocity in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

getXVelocity

public double getXVelocity()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setXVelocity

public void setXVelocity(double xVel)
DOCUMENT ME!

Parameters:
xVel - DOCUMENT ME!

getYVelocity

public double getYVelocity()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setYVelocity

public void setYVelocity(double yVel)
DOCUMENT ME!

Parameters:
yVel - DOCUMENT ME!

getZVelocity

public double getZVelocity()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setZVelocity

public void setZVelocity(double zVel)
DOCUMENT ME!

Parameters:
zVel - DOCUMENT ME!

speed

public double speed()
DOCUMENT ME!

Overrides:
speed in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

setMomentum

public void setMomentum(double xMom,
                        double yMom,
                        double zMom)
DOCUMENT ME!

Parameters:
xMom - DOCUMENT ME!
yMom - DOCUMENT ME!
zMom - DOCUMENT ME!

getMomentum

public AbstractDoubleVector getMomentum()
DOCUMENT ME!

Overrides:
getMomentum in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

getXMomentum

public double getXMomentum()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getYMomentum

public double getYMomentum()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getZMomentum

public double getZMomentum()
DOCUMENT ME!

Returns:
DOCUMENT ME!

energy

public double energy()
Returns the kinetic energy.

Overrides:
energy in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

getDimension

public int getDimension()
DOCUMENT ME!

Specified by:
getDimension in class AbstractClassicalParticle
Returns:
DOCUMENT ME!

move

public AbstractClassicalParticle move(double dt)
Evolves this particle forward according to its kinematics. This method changes the particle's position.

Specified by:
move in class AbstractClassicalParticle
Parameters:
dt - DOCUMENT ME!
Returns:
this.

translate

public ClassicalParticle3D translate(double dt)
Evolves this particle forward according to its linear kinematics. This method changes the particle's position.

Parameters:
dt - DOCUMENT ME!
Returns:
this.

accelerate

public ClassicalParticle3D accelerate(double ax,
                                      double ay,
                                      double az,
                                      double dt)
Accelerates this particle. This method changes the particle's velocity. It is additive, that is accelerate(a1, dt).accelerate(a2, dt) is equivalent to accelerate(a1+a2, dt).

Parameters:
ax - DOCUMENT ME!
ay - DOCUMENT ME!
az - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
this.

applyForce

public AbstractClassicalParticle applyForce(double Fx,
                                            double Fy,
                                            double Fz,
                                            double dt)
Applies a force to this particle. This method changes the particle's velocity. It is additive, that is applyForce(F1, dt).applyForce(F2, dt) is equivalent to applyForce(F1+F2, dt).

Parameters:
Fx - DOCUMENT ME!
Fy - DOCUMENT ME!
Fz - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
this.

applyForce

public AbstractClassicalParticle applyForce(Force f,
                                            double t,
                                            double dt)
Applies a force to this particle. This method changes the particle's velocity. It is additive, that is applyForce(F1, dt).applyForce(F2, dt) is equivalent to applyForce(F1+F2, dt).

Specified by:
applyForce in class AbstractClassicalParticle
Parameters:
f - DOCUMENT ME!
t - DOCUMENT ME!
dt - DOCUMENT ME!
Returns:
this.
Throws:
IllegalDimensionException - DOCUMENT ME!
java.lang.IllegalArgumentException - DOCUMENT ME!