KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > physics > Force3D


1 package JSci.physics;
2
3 import JSci.maths.vectors.AbstractDoubleVector;
4 import JSci.maths.vectors.Double3Vector;
5
6 /**
7 * The Force3D class provides an object for encapsulating forces in 3D.
8 * @version 1.0
9 * @author Mark Hale
10 */

11 public abstract class Force3D extends Force {
12         public abstract double getXComponent(double t);
13         public abstract double getYComponent(double t);
14         public abstract double getZComponent(double t);
15         public AbstractDoubleVector getVector(double t) {
16                 return new Double3Vector(getXComponent(t), getYComponent(t), getZComponent(t));
17         }
18 }
19
20
Popular Tags