From 77acea6243ab7c739fd7159f446fe566b8b2d1c7 Mon Sep 17 00:00:00 2001 From: "guilhem.duche" Date: Tue, 12 Feb 2008 15:27:57 +0000 Subject: [PATCH] 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 --- tag1/WiiUseJ/src/wiiusej/Orientation.java | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tag1/WiiUseJ/src/wiiusej/Orientation.java diff --git a/tag1/WiiUseJ/src/wiiusej/Orientation.java b/tag1/WiiUseJ/src/wiiusej/Orientation.java new file mode 100644 index 0000000..52ebd7c --- /dev/null +++ b/tag1/WiiUseJ/src/wiiusej/Orientation.java @@ -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+")"; + } + +}