com.aparapi.examples.oopnbody.Body Maven / Gradle / Ivy
/**
* This product currently only contains code developed by authors
* of specific components, as identified by the source code files.
*
* Since product implements StAX API, it has dependencies to StAX API
* classes.
*
* For additional credits (generally to people who reported problems)
* see CREDITS file.
*/
package com.aparapi.examples.oopnbody;
import java.util.List;
public final class Body{
protected final float delT = .005f;
protected final float espSqr = 1.0f;
public static Body[] allBodies;
public Body(float _x, float _y, float _z, float _m) {
x = _x;
y = _y;
z = _z;
m = _m;
}
float x, y, z, m, vx, vy, vz;
public float getX() {
return x;
}
public float getY() {
return y;
}
public float getZ() {
return z;
}
public float getVx() {
return vx;
}
public float getVy() {
return vy;
}
public float getVz() {
return vz;
}
public float getM() {
return m;
}
public void setM(float _m) {
m = _m;
}
public void setX(float _x) {
x = _x;
}
public void setY(float _y) {
y = _y;
}
public void setZ(float _z) {
z = _z;
}
public void setVx(float _vx) {
vx = _vx;
}
public void setVy(float _vy) {
vy = _vy;
}
public void setVz(float _vz) {
vz = _vz;
}
}