save version 0.1. Last version working on wiiuse 0.9 API.
git-svn-id: http://wiiusej.googlecode.com/svn/trunk@35 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
81
tag1/WiiUseJ/src/wiiusej/GForce.java
Normal file
81
tag1/WiiUseJ/src/wiiusej/GForce.java
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
package wiiusej;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents gravity force on each axis.
|
||||||
|
* @author gduche
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class GForce {
|
||||||
|
|
||||||
|
private float x;
|
||||||
|
private float y;
|
||||||
|
private float z;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor;
|
||||||
|
*/
|
||||||
|
public GForce(){
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
z = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor with gravity force on each axis.
|
||||||
|
* @param xx x value
|
||||||
|
* @param yy x value
|
||||||
|
* @param zz x value
|
||||||
|
*/
|
||||||
|
public GForce(float xx, float yy, float zz){
|
||||||
|
x = xx;
|
||||||
|
y = yy;
|
||||||
|
z = zz;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the x
|
||||||
|
*/
|
||||||
|
public float getX() {
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param x the x to set
|
||||||
|
*/
|
||||||
|
public void setX(float x) {
|
||||||
|
this.x = x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the y
|
||||||
|
*/
|
||||||
|
public float getY() {
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param y the y to set
|
||||||
|
*/
|
||||||
|
public void setY(float y) {
|
||||||
|
this.y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the z
|
||||||
|
*/
|
||||||
|
public float getZ() {
|
||||||
|
return z;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param z the z to set
|
||||||
|
*/
|
||||||
|
public void setZ(float z) {
|
||||||
|
this.z = z;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Gravity force : ("+x+", "+y+","+z+")";
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user