Commit graph

357 commits

Author SHA1 Message Date
Andrew Meadows
718b98f70a Only build shapes for models that need them 2014-06-12 18:15:44 -07:00
Andrew Meadows
e0ebc61b25 merge upstream/master into andrew/ragdoll 2014-06-10 15:26:16 -07:00
Andrew Meadows
c9ba71aa01 fix for broken neck on some body models 2014-06-10 09:38:38 -07:00
Andrew Meadows
589b2e8fb7 recover some code for one less magic vec3 2014-06-09 16:12:54 -07:00
Andrew Meadows
e8b6338de9 Fix IK for hydra hands. 2014-06-09 15:40:29 -07:00
Andrew Meadows
5a76a9b4b1 RagDoll keeps a pointer to list of shapes 2014-06-09 11:04:20 -07:00
Andrew Meadows
8e536ebd9a Use NULL Shape* for non-colliding joints in Models 2014-06-09 09:35:27 -07:00
Andrew Meadows
131a2c27b8 move RagDoll to libraries/shared 2014-06-06 15:51:50 -07:00
Andrew Meadows
551029c2f5 slave SkeletonModel's collision shapes to RagDoll 2014-06-06 08:51:22 -07:00
Andrew Meadows
1b2cd2e144 adding RagDoll scaffold 2014-06-05 11:07:35 -07:00
Andrew Meadows
212ac13802 setRotation -> setJointRotationFromBindFrame 2014-06-04 14:10:28 -07:00
Andrew Meadows
323fa70cf3 remove last of "InModelFrame" qualifiers 2014-06-04 14:03:29 -07:00
Andrew Meadows
ccfd620c84 setJointPositionInModelFrame -> setJointPosition 2014-06-04 13:56:37 -07:00
Andrew Meadows
3af4b1b333 getJointPositionInModelFrame -> getJointPosition 2014-06-04 13:51:43 -07:00
Andrew Meadows
971268d4f2 setRotationInModelFrame -> setRotation 2014-06-04 13:46:08 -07:00
Andrew Meadows
b3cabb8156 applyRotationDeltaInModelFrame -> applyRotationDelta 2014-06-04 13:43:15 -07:00
Andrew Meadows
d8f5e10947 getPositionInModelFrame -> getPosition 2014-06-04 13:36:54 -07:00
Andrew Meadows
4a3fbfcdee getRotationInModelFrame -> getRotation 2014-06-04 13:34:58 -07:00
Andrew Meadows
4ae58153e0 computeTransformInModelFrame -> computeTransform 2014-06-04 13:31:31 -07:00
Andrew Meadows
d32e14ca04 renames of JointState data members 2014-06-04 13:27:28 -07:00
Andrew Meadows
19f0f453a5 remove JointState::setRotation()
instead use JointState::setRotationInModelFrame()
2014-06-04 11:52:07 -07:00
Andrew Meadows
30d936c15b getJointPosition -> getJointPositionInWorldFrame 2014-06-04 10:52:10 -07:00
Andrew Meadows
14e782e439 remove some JointState::getHybridTransform() calls 2014-06-04 10:42:04 -07:00
Andrew Meadows
7f46e9d514 remove JointState::getJointRotation()
(use getRotationModelFrame() instead)
2014-06-03 15:42:38 -07:00
Andrew Meadows
e7f32c211b remove world-frame hand/palm set methods 2014-06-03 14:48:57 -07:00
Andrew Meadows
05af993262 Add more model-frame methods 2014-06-03 14:24:04 -07:00
Andrew Meadows
03bf1fe69d Add joint manipulations in model-frame 2014-06-03 14:04:09 -07:00
Andrew Meadows
f99489c157 rolling back previous change for IK instability 2014-06-03 10:40:30 -07:00
Andrew Meadows
d7be5faa9d unravel rotation code by giving proper names
The goal is: eliminate dependency on JointState::_combinedRotation
(which is joint-to-world) and store joint-to-model transforms instead
2014-06-02 14:43:25 -07:00
Andrew Meadows
9b3773fa3b remove 'fromBind' argument to getJointRotation() 2014-06-02 14:20:13 -07:00
Andrew Meadows
a62a270004 merge andrew/inertia into andrew/ragdoll
Conflicts:
	interface/src/avatar/Avatar.cpp
	interface/src/renderer/Model.h
2014-06-02 11:56:27 -07:00
Andrew Meadows
9e60b758df Made JointState transforms private.
Also changed some function names to be more descriptive.
Using "Hybrid" to describe frame with world-rotation + model-local-origin.
2014-06-02 11:34:59 -07:00
Andrew Meadows
8e7daed2b3 Merge upsrtream/master into andrew/inertia
Conflicts:
	interface/src/renderer/Model.cpp
2014-06-02 11:32:23 -07:00
Andrzej Kapolka
164192fb50 If the skeleton doesn't have eye joints (as with the Fuse models), make up
some positions based on the head and neck joints.
2014-05-30 11:03:46 -07:00
Andrew Meadows
4eb4334ed8 replace Model::setJointRotation() with JointState::setRotation() 2014-05-30 09:57:32 -07:00
Andrew Meadows
6efa851104 minor cleanup + use 'fraction' instead of 'percent' 2014-05-29 15:44:27 -07:00
Andrew Meadows
2e99d316ac remove JointState::_translation
(use corresponding data in FBXJoint instead)
2014-05-29 12:52:05 -07:00
Andrew Meadows
a898fcbf75 move details of getJointRotation() into JointState
also: remove unused getLeft/RightHandRotation() methods
2014-05-29 11:43:25 -07:00
Andrew Meadows
4cf5628783 move applyRotationDelta() from Model to JointState 2014-05-29 10:00:55 -07:00
Andrew Meadows
9f2a4ae626 Make JointState a proper class
JointState gets a pointer to its corresponding FBXJoint
2014-05-28 16:49:39 -07:00
Andrew Meadows
13f11e1056 Remove "fromBind" arg in Model::setJointRotation
It was always set 'true'.
2014-05-28 14:53:32 -07:00
Andrew Meadows
9f72d6ca3f fix bug -- negate logic around invalid joint index 2014-05-27 15:53:20 -07:00
Andrew Meadows
ae3b792a35 move face/head code from Model into SkeletonModel 2014-05-27 15:28:41 -07:00
Andrew Meadows
6efa417742 move hand/arm stuff from Model to SkeletonModel 2014-05-27 15:06:50 -07:00
Andrzej Kapolka
d4af39a9f5 Working on handling animation priorities to prevent Hydra move/restore from
interfering with scripted animations.
2014-05-22 14:41:46 -07:00
Andrzej Kapolka
4a23c0cfd9 Fix for arms' getting twisted up with new IK. 2014-05-16 16:25:24 -07:00
Andrzej Kapolka
301234a397 Tabs -> spaces. 2014-05-15 15:34:01 -07:00
Andrzej Kapolka
3eefb6a93e Rotation bits for alternate IK. 2014-05-15 15:32:32 -07:00
Andrzej Kapolka
7bee0478be More work on integrating IK solution from Sixense. 2014-05-15 11:30:09 -07:00
Andrzej Kapolka
8388255542 Working on alternate IK mode. 2014-05-14 15:29:16 -07:00
Andrzej Kapolka
cf230d1cc3 PrioVR tweaks. 2014-05-14 13:36:26 -07:00
Andrzej Kapolka
498f9e73ac Merge branch 'master' of https://github.com/highfidelity/hifi into priority
Conflicts:
	interface/src/avatar/SkeletonModel.cpp
2014-05-14 10:23:44 -07:00
Andrew Meadows
498f2843b0 Fix for bad hand rotations 2014-05-14 09:06:46 -07:00
Andrzej Kapolka
eceb600de7 More work on PrioVR integration. 2014-05-13 14:44:24 -07:00
Andrzej Kapolka
0321821b55 More work on PrioVR integration. 2014-05-13 11:38:24 -07:00
Andrew Meadows
cea472b730 remove the last of Leap specific cruft 2014-05-12 11:48:56 -07:00
Andrew Meadows
49dedb72c9 remove FingerData class and related cleanup 2014-05-12 11:09:12 -07:00
Philip Rosedale
2c6c57eec2 increase hand restoration rate, improve function name clarity 2014-05-08 00:28:02 -07:00
Andrzej Kapolka
963434f784 Try using the head neck/eye rotation updates on the skeleton. 2014-05-02 11:04:52 -07:00
Andrzej Kapolka
141250d51c Don't constrain elbow when rotating forearm with wrist. 2014-04-23 12:22:24 -07:00
Andrzej Kapolka
0386dec2a6 Provide option to align wrists with forearms. 2014-04-23 12:09:54 -07:00
Andrzej Kapolka
511fc8367f More work on IK. 2014-04-23 11:34:34 -07:00
Andrzej Kapolka
f7bc1ae62c Working on integrating rotation into IK. 2014-04-23 10:47:24 -07:00
Andrzej Kapolka
6add0dfb42 Tweaked Hydra "IK" to propagate delta rotations up the hierarchy while
preserving joint constraints.
2014-04-18 15:04:42 -07:00
Andrzej Kapolka
30248747d6 Provide a means of visualizing the joint constraints. 2014-04-18 14:26:34 -07:00
Stephen Birarda
684c6b5372 run regex header replacement on all cpp files 2014-04-09 09:35:42 -07:00
Andrew Meadows
715f2c53d5 merge upstream/master into avatar-interaction
Conflicts:
	interface/interface_en.ts
2014-04-02 17:28:22 -07:00
Andrew Meadows
933cade6b0 Re-add fullUpdate hint to Model::simulate() 2014-04-02 16:34:33 -07:00
Andrew Meadows
97ba5250a5 Only simulate() Avatar Models when necessary
Also: rebuild collision shapes when Model scale changes
2014-04-02 12:01:18 -07:00
Andrzej Kapolka
865ca7de20 Align forearms with wrists. Closes #2577. 2014-04-01 16:01:29 -07:00
Andrew Meadows
b65855a384 merge upstream/master into avatar-interaction 2014-04-01 12:53:47 -07:00
Andrew Meadows
1bbdc9d78b Adding bounding capsule shape for Model
Also:
Cleaned up the automatic geometry LOD loading
Removed staticExtents data member from FBXGeometry
Split debug rendering of bounding shapes from joint shapes
2014-04-01 09:25:25 -07:00
Andrew Meadows
5406490719 rename _shapes -> _jointShapes
also stubbed Model::createBoundingShape()
2014-03-28 11:00:30 -07:00
Stephen Birarda
3c8aa90ae0 Merge pull request #2559 from AndrewMeadows/avatar-interaction-2
split lean input from lean perturbations
2014-03-28 09:25:36 -07:00
Andrew Meadows
796d20168e splitting lean input from lean perturbations 2014-03-27 15:30:30 -07:00
Andrew Meadows
c383b69b61 merge upstream/master into enforce-standard
Conflicts:
	interface/src/avatar/Hand.cpp
2014-03-27 10:53:54 -07:00
Andrew Meadows
4c64c11144 making some type casts abide by coding standard 2014-03-26 16:58:47 -07:00
Andrew Meadows
9a4db152ff avatar responds to hand-vs-head collisions again 2014-03-26 13:20:18 -07:00
Andrew Meadows
fff7a36b54 merge upstream/master into physics project
Conflicts:
	interface/src/avatar/Hand.cpp
	interface/src/avatar/Hand.h
	interface/src/avatar/SkeletonModel.cpp
	interface/src/avatar/SkeletonModel.h
	interface/src/renderer/Model.h
2014-03-25 15:55:26 -07:00
Andrzej Kapolka
62884f1f4f Don't use textures/fancy shaders when rendering shadow map. Closes #2270. 2014-03-24 13:15:03 -07:00
Andrew Meadows
02c58447df merge upstream/master into "shapes" project
Conflicts:
	interface/src/avatar/MyAvatar.cpp
	interface/src/avatar/SkeletonModel.cpp
	interface/src/avatar/SkeletonModel.h
	libraries/avatars/src/HandData.h
	libraries/shared/src/SharedUtil.h
2014-03-18 12:41:20 -07:00
Andrew Meadows
9079c3ecd8 explicit casts to remove warnings 2014-03-18 10:41:14 -07:00
Andrew Meadows
d4c7e25f8e Merge branch upstream/master into "hands" project 2014-03-14 14:28:50 -07:00
Andrew Meadows
a045a87cca Remove arm stretching, add sixense calibration 2014-03-14 11:11:00 -07:00
Andrzej Kapolka
43feef3ebd Only update the full set of joints when we've received new data from the
mixer.  Closes #2274.
2014-03-13 12:03:02 -07:00
Andrew Meadows
cd7da205de improved index sanity checking 2014-03-12 15:49:46 -07:00
Andrzej Kapolka
f088912ecf More GCC warning fixes. 2014-03-12 12:51:43 -07:00
Andrzej Kapolka
e249b29b45 Merge pull request #2268 from AndrewMeadows/radians
prefer radians over degrees
2014-03-12 12:10:29 -07:00
Andrew Meadows
aa8c2fc8cb use radians instead of degrees (almost) everywhere 2014-03-11 17:26:58 -07:00
Andrzej Kapolka
35d0fa7189 Don't render avatars until they've been simulated, init before first simulate.
Closes #2262.
2014-03-11 13:46:58 -07:00
Andrew Meadows
47e340dafe Merge upstream/master
Conflicts:
	interface/src/avatar/MyAvatar.cpp
2014-03-07 09:16:33 -08:00
Andrzej Kapolka
3adea84b81 Basic joint data sending. Closes #2166. 2014-03-06 17:07:29 -08:00
Andrew Meadows
37b088ebfa Hands can collide with avatar head again 2014-03-06 12:38:07 -08:00
Stephen Birarda
90d4bbee78 Merge branch 'master' of https://github.com/highfidelity/hifi into external-glm 2014-03-06 09:16:22 -08:00
Andrew Meadows
7db5aaaf37 new collision pipeline for avatar shapes 2014-03-05 07:08:59 -08:00
Stephen Birarda
7451cfe130 remove glm so it is referenced only externally 2014-03-04 15:19:47 -08:00
Andrzej Kapolka
cd2bd32210 Delay loading models until we know that we need them (i.e., that we're not
beyond billboard distance).  Closes #2121.
2014-02-27 12:30:46 -08:00
Andrew Meadows
4010f3ab3f Remove Avatar::_head, use AvatarData::_headData 2014-02-18 17:41:46 -08:00
Andrew Meadows
c134b8de5b Remove Avatar::_hand, use AvatarData::_handData 2014-02-18 17:08:12 -08:00
Andrzej Kapolka
91fac4eebe Merge branch 'master' of https://github.com/highfidelity/hifi 2014-02-13 17:38:23 -08:00
Andrzej Kapolka
b08d452749 Fix for head appearing at wrong position for a single frame. 2014-02-13 16:49:42 -08:00
Andrzej Kapolka
6a39290bf5 Basic LOD switching based on distance to camera. 2014-02-13 13:37:29 -08:00
Andrew Meadows
312bc7521f Making arm restoration rate independent of FPS and easier to tune. 2014-02-13 10:04:58 -08:00
Andrew Meadows
64ca66a2b7 Making renderCollisionProxies() public and measuring bounding volumes of hands. 2014-02-06 14:09:08 -08:00
Andrzej Kapolka
50d224661c Pruning more avatar bits. 2014-01-16 14:47:39 -08:00
Andrew Meadows
1266ffd0ca merge of windows-build
Conflicts:
	domain-server/src/DomainServer.cpp
	interface/src/Application.cpp
	interface/src/Menu.cpp
	libraries/avatars/src/AvatarData.h
	libraries/shared/src/NodeList.h
2014-01-16 09:00:13 -08:00
Andrew Meadows
32f3621855 merge upstream work into local repo 2014-01-15 14:13:48 -08:00
Brad Hefta-Gaub
170dbe6e85 Merge branch 'master' of git://github.com/worklist/hifi into windows_build
Conflicts:
	assignment-client/src/audio/AudioMixer.cpp
	domain-server/src/DomainServer.cpp
	interface/src/Audio.cpp
	interface/src/DataServerClient.cpp
	interface/src/Oscilloscope.cpp
	interface/src/PairingHandler.cpp
	interface/src/Util.cpp
	interface/src/avatar/MyAvatar.cpp
	interface/src/devices/Faceshift.cpp
	interface/src/devices/SerialInterface.cpp
	interface/src/renderer/FBXReader.cpp
	libraries/avatars/src/AvatarData.h
	libraries/octree-server/src/OctreeServer.cpp
	libraries/octree-server/src/OctreeServer.h
	libraries/octree/src/ViewFrustum.cpp
	libraries/shared/src/Logging.cpp
	libraries/shared/src/Node.cpp
	libraries/shared/src/Node.h
	libraries/shared/src/NodeList.cpp
	libraries/shared/src/NodeList.h
	libraries/shared/src/PerfStat.cpp
	libraries/shared/src/SharedUtil.cpp
	libraries/voxels/src/VoxelTree.cpp
	voxel-edit/src/main.cpp
2014-01-15 10:20:21 -08:00
Andrew Meadows
22679687c5 Minor cleanup: moved #include out of header and into cpp file. 2014-01-14 16:17:37 -08:00
Andrzej Kapolka
5d88953f12 First cut at stretching the arms out and aligning forearms with wrists.
Closes #1423, #1504.
2014-01-14 15:27:28 -08:00
Brad Hefta-Gaub
55babbf7b6 windows type mismatch warning fixes 2014-01-13 00:30:23 -08:00
Brad Hefta-Gaub
825c1c8876 fix windows warnings 2014-01-11 00:07:35 -08:00
Andrzej Kapolka
0461335887 Align hand with forearm in mouse-pointing mode. 2014-01-02 14:56:29 -08:00
Andrzej Kapolka
41fdbcb30f Fix for crash that Philip was seeing. 2013-12-13 15:25:03 -08:00
Philip Rosedale
3bd8c53115 Fix to get other avatar’s model data 2013-12-07 11:36:51 -08:00
Andrzej Kapolka
b90c5bdae8 Option to render collision proxies, more general avatar penetration test, fix
for meshes with only one joint influence.
2013-12-05 14:00:38 -08:00
Andrzej Kapolka
70ca1106b1 Working on testing the Leap/Hydra hands against the avatar body. 2013-12-03 17:28:36 -08:00
Andrzej Kapolka
905320a963 That didn't really help. What did help was simply ignoring the wrist
constraints.
2013-12-03 11:30:47 -08:00
Andrzej Kapolka
817946bed5 Attempting to rotate longitudinally at elbow, rather than wrist. 2013-12-03 11:05:38 -08:00
Andrzej Kapolka
c76af1ca12 Scratch that; didn't work. 2013-11-13 13:58:14 -08:00
Andrzej Kapolka
76d8bd0a9c Finger IK, take two. 2013-11-13 13:53:41 -08:00
Andrzej Kapolka
3e4c5f84ed Only rotate if we have at least three active fingers. 2013-11-13 13:26:36 -08:00
Andrzej Kapolka
a36f9d52af Constraint fix, apply constraints to wrists. 2013-11-12 15:43:11 -08:00
Andrzej Kapolka
0eaaa89c9a Read the palm direction from the FST, use that to determine Leap rotations. 2013-11-08 15:38:20 -08:00
Andrzej Kapolka
3446337cc5 Trying incremental rotations for Leap palms. 2013-11-08 15:11:56 -08:00
Andrzej Kapolka
62134ebc4c Sign fix. 2013-11-07 18:00:21 -08:00
Andrzej Kapolka
11fedb23cd Try finding the fingers using the rotation about the palm. 2013-11-07 17:51:54 -08:00
Andrzej Kapolka
f5889934a2 Derp, have to set the rotation after adjusting it. 2013-11-07 17:01:29 -08:00
Andrzej Kapolka
4bf4accba7 Rotate the palm according to the average finger direction. 2013-11-07 16:57:07 -08:00
Andrzej Kapolka
d35356348b Demagicked a couple of numbers. 2013-11-07 16:24:46 -08:00
Andrzej Kapolka
a29dfe9c63 Yet another finger attempt. 2013-11-07 16:14:23 -08:00
Andrzej Kapolka
c3049d4378 Another shot at the fingers. Not attempting IK on the anymore. 2013-11-07 14:25:01 -08:00
Andrzej Kapolka
aec7dbca08 Attempting the fingers again. 2013-11-07 13:57:54 -08:00
Andrzej Kapolka
797645a209 More palm fixes. 2013-11-07 13:29:17 -08:00
Andrzej Kapolka
4360621daf Adjustments to wrist rotations. 2013-11-07 13:17:08 -08:00
Andrzej Kapolka
f0e72d8d0c Removed unused variable, debugging code. 2013-11-07 12:16:17 -08:00
Andrzej Kapolka
e6cd9a7368 Working on wiring up the fingers. 2013-11-07 12:12:48 -08:00
Andrzej Kapolka
1ae8a211bb Swap the palms if they're in the wrong order. 2013-11-06 17:34:40 -08:00
Andrzej Kapolka
2e9625ebd5 Check palms' active state, apply rotations. 2013-11-06 16:57:30 -08:00
Andrzej Kapolka
2b4db0ea0e Apply Leap data directly to skeleton. 2013-11-06 16:47:03 -08:00
Andrzej Kapolka
9460fb87c2 Return arm to neutral position when mouse pointer is invisible. 2013-11-05 16:06:11 -08:00
Andrzej Kapolka
b2ed29dbff Work around precision issues with multiplying matrices with high translation
magnitudes (by using relative translation).
2013-11-04 16:49:12 -08:00
Stephen Birarda
ddcaa513a1 fix broken build from merge in Skeleton 2013-10-31 15:38:00 -07:00
Ryan
8b781bf9cd Merge remote-tracking branch 'origin/master' 2013-10-31 08:59:09 -07:00
Ryan
1279f3c3bb Made the stick and ball radius much smaller so they don’t break through the new meshes. 2013-10-31 08:55:37 -07:00
Andrzej Kapolka
9c5ebfcf77 If the skeleton has meshes, don't render the balls and sticks. 2013-10-30 16:44:40 -07:00
Andrzej Kapolka
b56d47929b Extremely basic IK based on implementation of the cyclic coordinate descent
algorithm.  Actually seems to work pretty well.
2013-10-28 13:38:22 -07:00
Andrzej Kapolka
240f65b7c5 Scale fixes. 2013-10-23 16:15:03 -07:00
Andrzej Kapolka
e8885332f2 Code review fixes. 2013-10-23 11:39:30 -07:00
Andrzej Kapolka
9dd41f4206 Render sticks, use avatar colors. 2013-10-22 16:52:44 -07:00
Andrzej Kapolka
41775912d8 Back to using matrices. 2013-10-22 15:39:45 -07:00
Andrzej Kapolka
1f8bed9d9c More transform rejiggery. 2013-10-22 15:31:27 -07:00
Andrzej Kapolka
d393bdcea6 Wheeee, let's try a different way of applying the lean rotation. 2013-10-22 15:04:49 -07:00
Andrzej Kapolka
cd4b88acaa More rotation tweaks. 2013-10-22 13:39:51 -07:00
Andrzej Kapolka
a33c7ce20c More work on extracting rotations. 2013-10-22 12:54:32 -07:00
Andrzej Kapolka
349f7b363a More work on custom skeletons. 2013-10-21 16:14:38 -07:00
Andrzej Kapolka
7e174093e4 Factoring the FBX model code out to a shared base class. 2013-10-18 17:26:03 -07:00