Commit bbc5cf2143c8e6201ebe13d905842f8826902227
1 parent
ab51f390
Exists in
master
Corrige função do movimento circular
Showing
4 changed files
with
8 additions
and
13 deletions
Show diff stats
Makefile
@@ -6,7 +6,7 @@ CLEAR = @echo -n "\033c" | @@ -6,7 +6,7 @@ CLEAR = @echo -n "\033c" | ||
6 | CACHE = __pycache__ | 6 | CACHE = __pycache__ |
7 | SCRIPT = libras.py | 7 | SCRIPT = libras.py |
8 | AVATAR = avatar_Hozana_wikiLibras.blend | 8 | AVATAR = avatar_Hozana_wikiLibras.blend |
9 | -JSON = '{"userId": 4,"rightHand": ["circular", "perpendicular", "horario", 0.6, 1, 20, 4, 6], "leftHand":["pontual", 10, 3, 3], "facialExp": [6], "signName":"teste_circular"}' | 9 | +JSON = '{"userId": 2,"rightHand": ["circular", "plano", "horario", 1, 2, 0, 50, 20], "leftHand":[], "facialExp": [6], "signName":"teste_circular"}' |
10 | 10 | ||
11 | default: main | 11 | default: main |
12 | 12 |
libras.py
@@ -83,21 +83,16 @@ def configureHands(): | @@ -83,21 +83,16 @@ def configureHands(): | ||
83 | generationConfigurations(actions[i], json_input[hands[i]][-3:], hands_default_frames, bones_[i]) | 83 | generationConfigurations(actions[i], json_input[hands[i]][-3:], hands_default_frames, bones_[i]) |
84 | if(move == "circular" or move == "semicircular"): | 84 | if(move == "circular" or move == "semicircular"): |
85 | orientation, direction, radius, laps = json_input[hands[i]][1:5] | 85 | orientation, direction, radius, laps = json_input[hands[i]][1:5] |
86 | - endFrame = circular_or_semiCircular(pose, orientation, direction, radius, laps, 5) | 86 | + endFrame = moves.circular_or_semiCircular(pose, orientation, direction, radius, laps, 5) |
87 | generationConfigurations(actions[i], json_input[hands[i]][-3:], [endFrame], bones_[i]) | 87 | generationConfigurations(actions[i], json_input[hands[i]][-3:], [endFrame], bones_[i]) |
88 | elif(move == "retilineo"): | 88 | elif(move == "retilineo"): |
89 | generationConfigurations(actions[i], json_input[hands[i]][-6:-3], hands_default_frames, bones_[i]) | 89 | generationConfigurations(actions[i], json_input[hands[i]][-6:-3], hands_default_frames, bones_[i]) |
90 | generationConfigurations(actions[i], json_input[hands[i]][-3:],hands_frames_retilineo, bones_[i]) | 90 | generationConfigurations(actions[i], json_input[hands[i]][-3:],hands_frames_retilineo, bones_[i]) |
91 | -<<<<<<< HEAD | ||
92 | - | ||
93 | - | ||
94 | -======= | ||
95 | elif(json_input[hands[i]][0] == "senoidal"): | 91 | elif(json_input[hands[i]][0] == "senoidal"): |
96 | orientation, direction, radius, laps = json_input[hands[i]][1:5] | 92 | orientation, direction, radius, laps = json_input[hands[i]][1:5] |
97 | endFrame = circular_or_semiCircular(pose, orientation, direction, radius, laps, 5) | 93 | endFrame = circular_or_semiCircular(pose, orientation, direction, radius, laps, 5) |
98 | generationConfigurations(actions[i], json_input[hands[i]][-3:], [endFrame], bones_[i]) | 94 | generationConfigurations(actions[i], json_input[hands[i]][-3:], [endFrame], bones_[i]) |
99 | 95 | ||
100 | ->>>>>>> 4973c0eb8bf544c810f4405a8974cf6e962d7bd4 | ||
101 | # Função que inicia a configuração da face | 96 | # Função que inicia a configuração da face |
102 | def configureFace(): | 97 | def configureFace(): |
103 | global endFrame | 98 | global endFrame |
moves.py
@@ -6,19 +6,19 @@ def circular_or_semiCircular(pose, orientation, direction, radius, laps, intensi | @@ -6,19 +6,19 @@ def circular_or_semiCircular(pose, orientation, direction, radius, laps, intensi | ||
6 | center = pose.location.x, pose.location.y, pose.location.z | 6 | center = pose.location.x, pose.location.y, pose.location.z |
7 | if(orientation == 'perpendicular'): | 7 | if(orientation == 'perpendicular'): |
8 | if(direction == 'horario'): | 8 | if(direction == 'horario'): |
9 | - endFrame = moves.locationCircular(center, radius, 1, 0, 2, pose, 0, laps, intensity, initialFrame,turn) | 9 | + endFrame = locationCircular(center, radius, 1, 0, 2, pose, 0, laps, intensity, initialFrame,turn) |
10 | else: | 10 | else: |
11 | - endFrame = moves.locationCircular(center, radius, 0, 1, 2, pose, 0, laps, intensity, initialFrame,turn) | 11 | + endFrame = locationCircular(center, radius, 0, 1, 2, pose, 0, laps, intensity, initialFrame,turn) |
12 | elif(orientation == 'paralelo'): | 12 | elif(orientation == 'paralelo'): |
13 | if(direction == 'horario'): | 13 | if(direction == 'horario'): |
14 | - endFrame = moves.locationCircular(center, radius, 1, 2, 0, pose, 0, laps, intensity, initialFrame,turn) | 14 | + endFrame = locationCircular(center, radius, 1, 2, 0, pose, 0, laps, intensity, initialFrame,turn) |
15 | else: | 15 | else: |
16 | - endFrame = moves.locationCircular(center, radius, 2, 1, 0, pose, 0, laps, intensity, initialFrame,turn) | 16 | + endFrame = locationCircular(center, radius, 2, 1, 0, pose, 0, laps, intensity, initialFrame,turn) |
17 | elif(orientation == 'plano'): | 17 | elif(orientation == 'plano'): |
18 | if(direction == 'horario'): | 18 | if(direction == 'horario'): |
19 | - endFrame = moves.locationCircular(center, radius, 2, 0, 1, pose, 0, laps, intensity, initialFrame,turn) | 19 | + endFrame = locationCircular(center, radius, 2, 0, 1, pose, 0, laps, intensity, initialFrame,turn) |
20 | else: | 20 | else: |
21 | - endFrame = moves.locationCircular(center, radius, 0, 2, 1, pose, 0, laps, intensity, initialFrame,turn) | 21 | + endFrame = locationCircular(center, radius, 0, 2, 1, pose, 0, laps, intensity, initialFrame,turn) |
22 | return endFrame | 22 | return endFrame |
23 | 23 | ||
24 | # center[3]: float vector (posição xyz centro) | 24 | # center[3]: float vector (posição xyz centro) |