JSci.physics
Class Force2D

java.lang.Object
  extended by JSci.physics.Force2D
All Implemented Interfaces:
java.io.Serializable

public class Force2D
extends java.lang.Object
implements java.io.Serializable

The Force2D class provides an object for encapsulating forces and torques in 2D.

Version:
1.0
Author:
Mark Hale
See Also:
Serialized Form

Field Summary
protected  double Fx
           
protected  double Fy
           
protected  double T
           
 
Constructor Summary
Force2D(double w)
          Constructs a torque.
Force2D(double fx, double fy)
          Constructs a force that acts on the centre of mass.
Force2D(double fx, double fy, double w)
          Constructs a force and a torque.
Force2D(double fx, double fy, double x, double y)
          Constructs a force acting at a point.
 
Method Summary
 Force2D add(Force2D F)
          Returns the addition of this force and another.
 double getTorque()
           
 double getXComponent()
           
 double getYComponent()
           
 Force2D subtract(Force2D F)
          Returns the subtraction of this force by another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Fx

protected double Fx

Fy

protected double Fy

T

protected double T
Constructor Detail

Force2D

public Force2D(double fx,
               double fy)
Constructs a force that acts on the centre of mass.


Force2D

public Force2D(double w)
Constructs a torque.


Force2D

public Force2D(double fx,
               double fy,
               double w)
Constructs a force and a torque.


Force2D

public Force2D(double fx,
               double fy,
               double x,
               double y)
Constructs a force acting at a point.

Method Detail

add

public Force2D add(Force2D F)
Returns the addition of this force and another.


subtract

public Force2D subtract(Force2D F)
Returns the subtraction of this force by another.


getXComponent

public double getXComponent()

getYComponent

public double getYComponent()

getTorque

public double getTorque()