Commit e6cf607c authored by Nicolas Gilmard's avatar Nicolas Gilmard
Browse files

Add documentation

parent ad6f716a
......@@ -28,7 +28,7 @@ import java.util.logging.Logger;
* @author Nicolas GILMARD [nicolas.gilmard@list.lu]
* @author Eric TOBIAS [eric.tobias@list.lu]
* @since 2.0
* @version 2.0.2
* @version 2.0.41
*/
@NonNullByDefault
public class TangibleObject {
......@@ -366,7 +366,7 @@ public class TangibleObject {
return rotationAccel;
}
/***
/**
* Simple setter method for the rotation acceleration
*
* @param rotationAccel
......
......@@ -151,4 +151,16 @@ public abstract class TuiAdapter {
EventLogger.getInstance().addCurInfo(tangibleObject.getObjectId(), tangibleObject.getX(), tangibleObject.getY(), operation, tangibleObject.getTotalMilliseconds());
}
/**
* create a string representation of a tangible object to the logging mechanism
*
* @param tangibleObject
* is the concerned blob.
* @param operation
* is the move done.
*/
public synchronized void addBlobInfo(TangibleObject tangibleObject, String operation) {
EventLogger.getInstance().addObjInfo(tangibleObject.getObjectId(), tangibleObject.getX(), tangibleObject.getY(), tangibleObject.getAngle(), operation, tangibleObject.getTotalMilliseconds());
}
}
......@@ -176,7 +176,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
* @return tangibleObject with TuioCursor's values
*/
private TangibleObject convertTuioBlobToTangibleObject(TuioBlob tuioBlob) {
Preconditions.checkArgument(tuioBlob != null, "The passed tangible cursor cannot be null!"); //$NON-NLS-1$
Preconditions.checkArgument(tuioBlob != null, "The passed tangible blob cannot be null!"); //$NON-NLS-1$
// get the object if present
TangibleObject updateObject = tangibleObjectList.get(tuioBlob.getBlobID());
TangibleObject convertedTangibleObject;
......@@ -233,12 +233,12 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
/** {@inheritDoc} */
@Override
public void addTuioBlob(TuioBlob tangibleObject) {
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
Preconditions.checkArgument(tangibleObject != null, "The passed tangible blob cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioBlobToTangibleObject(tangibleObject);
tangibleObjectList.put(convertedTangibleObject.getObjectId(), convertedTangibleObject);
super.addObjInfo(convertedTangibleObject, "down"); //$NON-NLS-1$
super.addBlobInfo(convertedTangibleObject, "down"); //$NON-NLS-1$
objectManager.dropObject(convertedTangibleObject);
......@@ -286,11 +286,11 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
/** {@inheritDoc} */
@Override
public void removeTuioBlob(TuioBlob tuioBlob) {
Preconditions.checkArgument(tuioBlob != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
Preconditions.checkArgument(tuioBlob != null, "The passed tangible blob cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioBlobToTangibleObject(tuioBlob);
tangibleObjectList.remove(convertedTangibleObject.getObjectId());
super.addObjInfo(convertedTangibleObject, "up"); //$NON-NLS-1$
super.addBlobInfo(convertedTangibleObject, "up"); //$NON-NLS-1$
objectManager.liftObject(convertedTangibleObject);
}
......@@ -318,7 +318,6 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
Preconditions.checkArgument(tangibleObject != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioObjectToTangibleObject(tangibleObject);
// convertedTangibleObject.getPath().forEach(path -> System.out.println(path.getAngle()));
super.addObjInfo(convertedTangibleObject, "move"); //$NON-NLS-1$
objectManager.updateObject(convertedTangibleObject);
......@@ -331,7 +330,7 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
Preconditions.checkArgument(tuioBlob != null, "The passed tangible object cannot be null!"); //$NON-NLS-1$
TangibleObject convertedTangibleObject = convertTuioBlobToTangibleObject(tuioBlob);
super.addObjInfo(convertedTangibleObject, "move"); //$NON-NLS-1$
super.addBlobInfo(convertedTangibleObject, "move"); //$NON-NLS-1$
objectManager.updateObject(convertedTangibleObject);
}
......
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