-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDeviatorsGroup.js
44 lines (30 loc) · 1.17 KB
/
DeviatorsGroup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class DeviatorsGroup {
constructor(){
// FINGERS FLEX
this.musclesForces_Uln_dev = new MusclesForces('force_ulnar_deviation', 20);
this.musclesForces_Rad_dev = new MusclesForces('force_radial_deviation', 30);
}
addDeviatorsToScene(mscene){
// Fingers Flex
this.musclesForces_Uln_dev.addHelpers(mscene);
this.musclesForces_Rad_dev.addHelpers(mscene);
}
applyForces_RadialDeviation(activationLevel, musclesBonesConstraints) {
this.musclesForces_Rad_dev.applyForcesToBones(musclesBonesConstraints.objRadius,
musclesBonesConstraints.objCarpi,
new THREE.Vector3(40, 0, 0),
new THREE.Vector3(40, 0, 0),
activationLevel,
musclesBonesConstraints.jCarpiR
)
}
applyForces_UlnarDeviation(activationLevel, musclesBonesConstraints){
this.musclesForces_Uln_dev.applyForcesToBones(musclesBonesConstraints.objUlna,
musclesBonesConstraints.objCarpi,
new THREE.Vector3(-40, 0, 0),
new THREE.Vector3(-40, 0, 0),
activationLevel,
musclesBonesConstraints.jCarpiU
)
}
}