Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TULIP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NUI
TULIP
Commits
e6cf607c
Commit
e6cf607c
authored
May 12, 2015
by
Nicolas Gilmard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation
parent
ad6f716a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
9 deletions
+20
-9
TULIP/src/lu/list/itis/dkd/tui/adapter/TangibleObject.java
TULIP/src/lu/list/itis/dkd/tui/adapter/TangibleObject.java
+2
-2
TULIP/src/lu/list/itis/dkd/tui/adapter/TuiAdapter.java
TULIP/src/lu/list/itis/dkd/tui/adapter/TuiAdapter.java
+12
-0
TULIP/src/lu/list/itis/dkd/tui/adapter/TuioAdapter.java
TULIP/src/lu/list/itis/dkd/tui/adapter/TuioAdapter.java
+6
-7
No files found.
TULIP/src/lu/list/itis/dkd/tui/adapter/TangibleObject.java
View file @
e6cf607c
...
...
@@ -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
...
...
TULIP/src/lu/list/itis/dkd/tui/adapter/TuiAdapter.java
View file @
e6cf607c
...
...
@@ -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
());
}
}
TULIP/src/lu/list/itis/dkd/tui/adapter/TuioAdapter.java
View file @
e6cf607c
...
...
@@ -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
.
add
Obj
Info
(
convertedTangibleObject
,
"down"
);
//$NON-NLS-1$
super
.
add
Blob
Info
(
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
.
add
Obj
Info
(
convertedTangibleObject
,
"up"
);
//$NON-NLS-1$
super
.
add
Blob
Info
(
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
.
add
Obj
Info
(
convertedTangibleObject
,
"move"
);
//$NON-NLS-1$
super
.
add
Blob
Info
(
convertedTangibleObject
,
"move"
);
//$NON-NLS-1$
objectManager
.
updateObject
(
convertedTangibleObject
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment