save version 0.1. Last version working on wiiuse 0.9 API.
git-svn-id: http://wiiusej.googlecode.com/svn/trunk@37 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
77
tag1/WiiUseJ/src/wiiusej/Orientation.java
Normal file
77
tag1/WiiUseJ/src/wiiusej/Orientation.java
Normal file
@@ -0,0 +1,77 @@
|
||||
package wiiusej;
|
||||
|
||||
/**
|
||||
* Class that represents the orientation of the wiimote.
|
||||
* @author gduche
|
||||
*
|
||||
*/
|
||||
public class Orientation {
|
||||
|
||||
private float roll;
|
||||
private float pitch;
|
||||
private float yaw;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
public Orientation(){
|
||||
roll = 0;
|
||||
pitch = 0;
|
||||
yaw = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contructor with raw, pitch , yaw.
|
||||
* @param r raw
|
||||
* @param p pitch
|
||||
* @param y yaw
|
||||
*/
|
||||
public Orientation(float r, float p, float y){
|
||||
roll = r;
|
||||
pitch = p;
|
||||
yaw = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the roll
|
||||
*/
|
||||
public float getRoll() {
|
||||
return roll;
|
||||
}
|
||||
/**
|
||||
* @param roll the roll to set
|
||||
*/
|
||||
public void setRoll(float roll) {
|
||||
this.roll = roll;
|
||||
}
|
||||
/**
|
||||
* @return the pitch
|
||||
*/
|
||||
public float getPitch() {
|
||||
return pitch;
|
||||
}
|
||||
/**
|
||||
* @param pitch the pitch to set
|
||||
*/
|
||||
public void setPitch(float pitch) {
|
||||
this.pitch = pitch;
|
||||
}
|
||||
/**
|
||||
* @return the yaw
|
||||
*/
|
||||
public float getYaw() {
|
||||
return yaw;
|
||||
}
|
||||
/**
|
||||
* @param yaw the yaw to set
|
||||
*/
|
||||
public void setYaw(float yaw) {
|
||||
this.yaw = yaw;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Orientation : (roll: "+roll+", pitch: "+pitch+", yaw: "+yaw+")";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user