Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multitouch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Taddeüs Kroes
multitouch
Commits
18683177
Commit
18683177
authored
Jun 02, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied pyflakes and pep8.
parent
7ea7d1e4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
13 deletions
+7
-13
src/old/MultitouchInteractor.py
src/old/MultitouchInteractor.py
+0
-1
src/old/draw.py
src/old/draw.py
+2
-4
src/old/touch.py
src/old/touch.py
+2
-4
src/trackers/basic.py
src/trackers/basic.py
+1
-2
src/trackers/tap.py
src/trackers/tap.py
+1
-1
src/window.py
src/window.py
+1
-1
No files found.
src/old/MultitouchInteractor.py
View file @
18683177
import
vtk
from
math
import
degrees
from
threading
import
Thread
from
objreader
import
read_obj
from
touch
import
MultitouchServer
...
...
src/old/draw.py
View file @
18683177
#!/usr/bin/env python
import
pygame
import
sys
import
time
from
touch
import
MultitouchServer
,
screen_size
from
math
import
degrees
,
cos
,
sin
from
events
import
Rotate
pygame
.
init
()
FULLSCREEN
=
'-f'
in
sys
.
argv
[
1
:]
...
...
@@ -115,7 +112,8 @@ def update():
end_x
=
x
dtap
[
0
]
-=
BEAM_INCREMENT
pygame
.
draw
.
line
(
screen
,
BEAM_COLOR
,
(
start_x
,
y
),
(
end_x
,
y
),
BEAM_WIDTH
)
pygame
.
draw
.
line
(
screen
,
BEAM_COLOR
,
(
start_x
,
y
),
(
end_x
,
y
),
BEAM_WIDTH
)
# Update canvas
pygame
.
display
.
flip
()
...
...
src/old/touch.py
View file @
18683177
...
...
@@ -7,9 +7,8 @@ from threading import Thread
from
screen
import
screen_size
from
tuio_server
import
TuioServer2D
from
logger
import
Logger
from
events
import
Event
,
DownEvent
,
UpEvent
,
MoveEvent
,
Tap
,
\
SingleTap
,
DoubleTap
,
Flick
,
Rotate
,
Pinch
,
\
Pan
from
events
import
Event
,
DownEvent
,
UpEvent
,
MoveEvent
,
Tap
,
SingleTap
,
\
DoubleTap
,
Rotate
,
Pinch
,
Pan
# Heuristic constants
# TODO: Encapsulate screen resolution in distance heuristics
...
...
@@ -251,7 +250,6 @@ class MultitouchServer(Logger):
# There are no touch points, move the centroid out of the screen
self
.
centroid
=
-
1.
,
-
1.
def
centroid_movement
(
self
):
cx
,
cy
=
self
.
centroid
ocx
,
ocy
=
self
.
old_centroid
...
...
src/trackers/basic.py
View file @
18683177
from
..tracker
import
GestureTracker
,
Gesture
from
..geometry
import
Positionable
from
..tracker
import
GestureTracker
from
utils
import
PointGesture
...
...
src/trackers/tap.py
View file @
18683177
import
time
from
threading
import
Thread
from
..tracker
import
GestureTracker
,
Gesture
from
..tracker
import
GestureTracker
from
..geometry
import
Positionable
from
utils
import
PointGesture
...
...
src/window.py
View file @
18683177
...
...
@@ -65,7 +65,7 @@ class CircularWindow(Window, CircularSurface):
"""
Circular window.
"""
def
__init__
(
self
,
x
,
y
,
width
,
height
,
**
kwargs
):
def
__init__
(
self
,
x
,
y
,
radius
,
**
kwargs
):
Window
.
__init__
(
self
,
**
kwargs
)
CircularSurface
.
__init__
(
self
,
x
,
y
,
radius
)
...
...
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