Commit 50838c1a authored by Christian Moll's avatar Christian Moll
Browse files

replacing tuio by newer libTUIO-1.1.5, see issue #25

parent 89c05871
......@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry exported="true" kind="lib" path="libs/jdom-2.0.5.jar" sourcepath="libs/jdom-2.0.5-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/TUI%20Framework/libs/jdom-2.0.5-javadoc.jar!/"/>
......@@ -13,10 +13,10 @@
<attribute name="javadoc_location" value="jar:platform:/resource/TUI%20Framework/libs/guava-15.0-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="libs/tuio-1.4.jar" sourcepath="C:/Users/tobias/.m2/repository/net/sourceforge/tuio/tuio/1.4/tuio-1.4-sources.jar"/>
<classpathentry exported="true" kind="lib" path="libs/dbc.annotation.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="libs/bluecove-2.1.1-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="libs/RXTXcomm.jar"/>
<classpathentry kind="lib" path="libs/libTUIO.jar" sourcepath="libs/libTUIO_src.zip"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -23,6 +23,7 @@ import lu.list.itis.dkd.tui.utility.Point;
import lu.tudor.ssi.kiss.dbc.annotation.NonNullByDefault;
import lu.tudor.ssi.kiss.dbc.annotation.Nullable;
import TUIO.TuioBlob;
import TUIO.TuioClient;
import TUIO.TuioCursor;
import TUIO.TuioListener;
......@@ -30,6 +31,7 @@ import TUIO.TuioObject;
import TUIO.TuioTime;
import com.google.common.base.Preconditions;
import com.google.common.collect.Iterables;
import java.util.Collection;
import java.util.Vector;
......@@ -125,7 +127,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
tangibleObject.getPath().forEach(path -> tempPath.addElement(new Point(path.getX(), path.getY(), tangibleObject.getAngle())));
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(tangibleObject.getSymbolID(), Type.OBJECT, tangibleObject.getPath().lastElement().getX(), tangibleObject.getPath().lastElement().getY()).withSeconds(tangibleObject.getTuioTime().getSeconds()).withMicroSeconds(tangibleObject.getTuioTime().getMicroseconds()).withxSpeed(tangibleObject.getXSpeed()).withySpeed(tangibleObject.getYSpeed()).withMotionSpeed(tangibleObject.getMotionSpeed()).withMotionAccel(tangibleObject.getMotionAccel()).withRotationSpeed(tangibleObject.getRotationSpeed()).withRotationAccel(tangibleObject.getRotationAccel()).withPath(tempPath).withState(tangibleObject.getTuioState()).build();
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(tangibleObject.getSymbolID(), Type.OBJECT, Iterables.getLast(tangibleObject.getPath()).getX(), Iterables.getLast(tangibleObject.getPath()).getY()).withSeconds(tangibleObject.getTuioTime().getSeconds()).withMicroSeconds(tangibleObject.getTuioTime().getMicroseconds()).withxSpeed(tangibleObject.getXSpeed()).withySpeed(tangibleObject.getYSpeed()).withMotionSpeed(tangibleObject.getMotionSpeed()).withMotionAccel(tangibleObject.getMotionAccel()).withRotationSpeed(tangibleObject.getRotationSpeed()).withRotationAccel(tangibleObject.getRotationAccel()).withPath(tempPath).withState(tangibleObject.getTuioState()).build();
return convertedTangibleObject;
}
......@@ -145,7 +147,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
Vector<Point> tempPath = new Vector<>();
tangibleCursor.getPath().forEach(path -> tempPath.addElement(new Point(path.getX(), path.getY(), 0)));
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorID(tangibleCursor.getCursorID()), Type.CURSOR, tangibleCursor.getPath().lastElement().getX(), tangibleCursor.getPath().lastElement().getY()).withSeconds(tangibleCursor.getTuioTime().getSeconds()).withMicroSeconds(tangibleCursor.getTuioTime().getMicroseconds()).withxSpeed(tangibleCursor.getXSpeed()).withySpeed(tangibleCursor.getYSpeed()).withMotionSpeed(tangibleCursor.getMotionSpeed()).withMotionAccel(tangibleCursor.getMotionAccel()).withPath(tempPath).withState(tangibleCursor.getTuioState()).build();
TangibleObject convertedTangibleObject = new TangibleObjectBuilder(IDMapper.remapCursorID(tangibleCursor.getCursorID()), Type.CURSOR, Iterables.getLast(tangibleCursor.getPath()).getX(), Iterables.getLast(tangibleCursor.getPath()).getY()).withSeconds(tangibleCursor.getTuioTime().getSeconds()).withMicroSeconds(tangibleCursor.getTuioTime().getMicroseconds()).withxSpeed(tangibleCursor.getXSpeed()).withySpeed(tangibleCursor.getYSpeed()).withMotionSpeed(tangibleCursor.getMotionSpeed()).withMotionAccel(tangibleCursor.getMotionAccel()).withPath(tempPath).withState(tangibleCursor.getTuioState()).build();
return convertedTangibleObject;
}
......@@ -301,4 +303,25 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
return convertTuioObjectToTangibleObject(client.getTuioObject(id));
}
/** {@inheritDoc} */
@Override
public void addTuioBlob(TuioBlob arg0) {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
@Override
public void removeTuioBlob(TuioBlob arg0) {
// TODO Auto-generated method stub
}
/** {@inheritDoc} */
@Override
public void updateTuioBlob(TuioBlob arg0) {
// TODO Auto-generated method stub
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment