Commit graph

1341 commits

Author SHA1 Message Date
Kalila L
df7fd920d7 Change INVALID_JOINT_INDEX to AnimSkeleton::INVALID_JOINT_INDEX 2021-02-25 23:28:00 -05:00
Kalila L
0e03eccbdf Change NO_PARENT_INDEX to INVALID_JOINT_INDEX. 2021-02-25 21:43:17 -05:00
Kalila L
4276ea295c Change -1 to NO_PARENT_INDEX. 2021-02-25 21:29:54 -05:00
Kalila
c79eb479f0
Update AnimInverseKinematics.cpp 2021-02-25 20:36:45 -05:00
Kalila
080d42be39
Update AnimInverseKinematics.cpp 2021-02-25 20:35:02 -05:00
Phil Palmer
8c7c91ed6f Remove const from variable declarations as suggested in the review.
Suggested here: https://github.com/vircadia/vircadia/pull/928/files#r549830690

The ones I've left are either
- values known at compile time, eg. const float MIN_LENGTH_FOR_NORMALIZE = 0.061f;
- consts that were already there in the previous code, eg. const float MAX_DISPLACEMENT = 0.5f * _radius;
2020-12-29 19:31:35 -05:00
Phil Palmer
3e25e32f18 Revert temporary "added pragmas" (optimize off)
This reverts commit 20e4f952ab.
2020-12-27 02:52:52 -05:00
Phil Palmer
c9cf7eb75d Merge branch 'fix/vr-recenter-PRAGMAS' into fix/vr-recenter 2020-12-26 23:22:16 -05:00
Phil Palmer
20e4f952ab added pragmas 2020-12-26 23:19:21 -05:00
Phil Palmer
a489e9ddca Code style: made some little things more conformant with the coding standards and the rest of the codebase.
https://github.com/vircadia/vircadia/blob/master/CODING_STANDARD.md
2020-12-23 19:00:05 -05:00
Phil Palmer
2179c153de VR fixes for: couldn't sit on the floor, wrong walk directions.
- Divided the option "Avatar leaning behavior" into two options that work more usefully: "Allow my avatar to stand" and "Allow my avatar to lean" (PreferencesDialog.cpp).  Made the necessary fixes so that the avatar can be set to stand only when the user is standing (more details below).
- The logic controlling the direction of MyAvatar's action motor is now centralised in calculateScaledDirection (was previously split between there and updateMotors).  calculateScaledDirection now returns a velocity in world space.
- CharacterController::FollowHelper now uses separate follow timers for rotation, horizontal and vertical (previously followed all three based on the longest of their follow times).  Where appropriate, FollowHelper can now snap immediately to the desired rotation/horizontal/vertical independently (see FOLLOW_TIME_IMMEDIATE_SNAP).
- FollowHelper::FollowType has therefore moved to CharacterController::FollowType.
- MyAvatar::FollowHelper::postPhysicsUpdate: If MyAvatar is not allowed to stand when the user is sitting, this now avoids recentring the body based on the head height.
- Removed Q_PROPERTY(MyAvatar::SitStandModelType, as the sitting/standing/leaning model uses different enums now (see setAllowAvatarStandingPreference, setAllowAvatarLeaningPreference).
- Removed Q_PROPERTY(bool isSitStandStateLocked which is no longer used, because we now always track the user's real-world sit/stand state, regardless of what we're doing with it.
- MyAvatar::FollowHelper::shouldActivateHorizontal: If MyAvatar is not allowed to lean, this now returns true to recentre the footing if the head is outside the base of support.
- MyAvatar::FollowHelper::shouldActivateHorizontalCG: If MyAvatar is not allowed to lean, this now always returns true to recentre the footing.  Rearranged to avoid computing values that weren't used depending on the conditions.  Resolved some duplicated code.
- MyAvatar::setUserRecenterModel previously set HMDLeanRecenterEnabled based on the chosen mode, but it got reset when getting out of a sit.  Now HMDLeanRecenterEnabled is only controlled by the scripts.
- Added Rig::getUnscaledHipsHeight (like getUnscaledEyeHeight).  Refactored a little to avoid duplicated code.  Added DEFAULT_AVATAR_HIPS_HEIGHT which is the value that Rig::getUnscaledHipsHeight returns when using the default avatar.
- Fix for recentring not behaving as requested by the user after getting up from click-to-sit (always behaving like 'Auto') : MyAvatar::endSit now passes false to centerBody for 'forceFollowYPos'.
- Fix for incorrect vertical position of the avatar and viewpoint after changing lean recentre mode while not standing in the real world: MyAvatar::setAllowAvatarStandingPreference now calls centerBody with false for 'forceFollowYPos'.
- computeHipsInSensorFrame: The code now matches the comments in that it only skips the dampening of the hips rotation if the centre-of-gravity model is being used.
2020-12-22 14:22:27 -05:00
Kasen IO
44e5bbb591 Add init for timer to constructor. 2020-07-04 00:48:03 -04:00
Kasen IO
0ad7e25b49 Revise names. 2020-07-03 14:40:56 -04:00
Kasen IO
aaf19db286 Debounce missing joint log spam to 30s intervals 2020-06-23 00:42:05 -04:00
Kasen IO
21fd10d154 Revert commit 359248829c using -m 1 to temporarily fix issue 383. 2020-06-03 16:08:18 -04:00
David Rowe
ffeb37e7aa Merge remote-tracking branch 'hifi/master' into merge-hifi-master
# Conflicts:
#	CMakeLists.txt
#	README.md
#	cmake/externals/glad32es/CMakeLists.txt
#	cmake/externals/glad41/CMakeLists.txt
#	cmake/externals/glad45/CMakeLists.txt
#	cmake/externals/polyvox/CMakeLists.txt
#	cmake/externals/quazip/CMakeLists.txt
#	cmake/externals/vhacd/CMakeLists.txt
#	cmake/init.cmake
#	cmake/ports/hifi-deps/CONTROL
#	cmake/ports/sdl2/CONTROL
#	cmake/ports/sdl2/disable-hidapi-for-uwp.patch
#	cmake/ports/sdl2/enable-winrt-cmake.patch
#	cmake/ports/sdl2/fix-arm64-headers.patch
#	cmake/ports/sdl2/fix-x86-windows.patch
#	cmake/ports/sdl2/portfile.cmake
#	cmake/ports/sdl2/vcpkg-cmake-wrapper.cmake
#	cmake/ports/tbb/portfile.cmake
#	hifi_vcpkg.py
#	interface/src/avatar/MyAvatar.h
#	libraries/avatars-renderer/src/avatars-renderer/Avatar.h
#	libraries/avatars/src/AvatarData.h
#	libraries/entities-renderer/src/RenderableEntityItem.h
#	libraries/entities/src/EntityItem.cpp
#	libraries/entities/src/EntityItem.h
#	libraries/fbx/src/GLTFSerializer.cpp
#	libraries/graphics-scripting/src/graphics-scripting/Forward.h
#	libraries/networking/src/AddressManager.cpp
#	libraries/networking/src/DomainHandler.h
#	libraries/procedural/src/procedural/ProceduralMaterialCache.cpp
#	libraries/render-utils/src/HighlightEffect.cpp
#	libraries/render-utils/src/MeshPartPayload.cpp
#	libraries/render-utils/src/Model.cpp
#	libraries/render-utils/src/RenderShadowTask.cpp
#	libraries/script-engine/src/WebSocketClass.cpp
2020-04-09 16:46:27 +12:00
Dale Glass
68d10a2fe1 Make default copy constructors explicit
Recent versions of gcc generate a warning without this
2020-01-19 00:20:49 +01:00
David Rowe
2dd981493e Update classes' JSDoc per @hideconstructor 2019-12-23 14:13:48 +13:00
David Rowe
5eb6e9dadd Add recently added properties to caches' JSDoc 2019-11-26 17:00:13 +13:00
Brad Hefta-Gaub
0f428f0afb
Merge pull request #16498 from DouglasWilcox/improve_seated_rotation
Improve seated rotation
2019-11-19 10:22:08 -08:00
Sabrina Shanman
518d6a530a
Merge pull request #16507 from highfidelity/master
Merge master into instancing
2019-11-18 13:54:33 -08:00
DouglasWilcox
37010648be Abandon exponential acceleration and use constant acceleration. Hook up turn->sit transitions. 2019-11-14 13:12:01 -08:00
DouglasWilcox
b8e85aedc7 Merge branch 'master' into improve_seated_rotation 2019-11-13 13:11:30 -08:00
sabrina-shanman
516debdcb2 Fix code style / remove cruft 2019-11-13 12:50:13 -08:00
DouglasWilcox
a3de25618a Handle HMD in input vars and remove/fix json transitions in/out of HMD strafe states.
(cherry picked from commit f9f28fc286)
2019-11-13 09:52:56 -08:00
DouglasWilcox
f9f28fc286 Handle HMD in input vars and remove/fix json transitions in/out of HMD strafe states. 2019-11-12 14:15:19 -08:00
DouglasWilcox
995f5f92cd Do not use turningSpeed when setting seatedTurn vars, and iterate acceleration formula 2019-11-12 11:11:19 -08:00
Sabrina Shanman
769a332d22
Merge pull request #16485 from highfidelity/master
Merge master into instancing
2019-11-12 10:07:28 -08:00
DouglasWilcox
64634f51b1 Merge branch 'master' into improve_seated_rotation 2019-11-11 11:31:56 -08:00
DouglasWilcox
c36c4a17b1 first pass hookup of seated rotation with acceleration and animation response 2019-11-11 11:31:34 -08:00
dooglifeSF
055d5cdf9b Simplify boolean statements, revise several settle anims 2019-11-08 13:46:38 -08:00
Sabrina Shanman
eebb9ad51f
Merge pull request #16475 from highfidelity/master
Merge master into instancing
2019-11-08 10:10:50 -08:00
dooglifeSF
8e11d91c03 Merge branch 'master' into rand_settles_and_by_momentum 2019-11-07 15:09:10 -08:00
dooglifeSF
73202b9caf Different settle transition depending on momentum 2019-11-07 09:52:26 -08:00
Anthony J. Thibault
6e7f222608 Fix for assert in AnimBlendDirectional on startup
Specifically, std::vector subscript out of range.
2019-11-05 14:16:10 -08:00
Sabrina Shanman
05ac16536e
Merge pull request #16436 from highfidelity/master
Merge master into instancing
2019-10-31 17:39:15 -07:00
Oren Hurvitz
70c3bb2748 Emit an event when failing to load an avatar.
Previously, MyAvatar only emitted an event (onLoadComplete) if the load succeeded.
Now it also emits an event (onLoadFailed) if the load failed.
2019-10-27 10:55:31 +02:00
sabrina-shanman
4e0db5d641 Fix build warnings 2019-10-24 15:49:03 -07:00
Sabrina Shanman
6db993fe05
Merge pull request #16397 from sabrina-shanman/instancing_skinning
(DEV-561) First pass at skinning for GLTF
2019-10-23 15:41:12 -07:00
sabrina-shanman
ca164375f1 New skinning for GLTF 2019-10-23 10:41:36 -07:00
Sam Gateau
a95a4b5aa2 Address warnings and comments from review 2019-10-18 11:43:25 -07:00
Sam Gateau
695b9cdba6 Clening up left over comments and typos, simplify the code to update Matrices in the model classes and removed renderITemsIdMap because not needed, chasing the problem of the physics objects transform 2019-10-18 03:31:06 -07:00
Sam Gateau
e9e9d1cdfe Merge branch 'instancing' of github.com:highfidelity/hifi into instancing 2019-10-16 13:15:40 -07:00
Shannon Romano
71ef645781
Merge pull request #16351 from dooglifeSF/transition-locomotion-to-idle-based-on-input-and-speed
Fix sliding when stopping from run.
2019-10-16 09:03:00 -07:00
Sam Gateau
eecaeb1155 FOund the issue why the skinning was incorrect, removed unecessary data structures in the newly added objects and renamed Deformer to SkinCluster and DYnamicTransform to SkinDeformer 2019-10-16 04:02:05 -07:00
dooglifeSF
0510215240 Move magic number to constant for SLOW_SPEED_THRESHOLD. 2019-10-15 17:48:06 -07:00
Anthony J. Thibault
14e5962675 Bugfix for legacy sit scripts
Don't return additive clip nodes as valid "roles" for users to override.
2019-10-15 15:29:24 -07:00
dooglifeSF
a043f0a17e Create isNotInputSlow var for stategraph switch when no input and speed less than 1.5 m/s 2019-10-15 14:51:42 -07:00
Sam Gateau
05ac9aefa8 the clusterMatrices should be working, but n skin index and weights are assigned yet 2019-10-14 02:21:01 -07:00
dooglifeSF
85b681e70e switch abs() to fabsf() 2019-10-09 11:07:14 -07:00