Commit graph

63 commits

Author SHA1 Message Date
Anthony J. Thibault
bcd31e3d99 Adjust size and offset of grab balls to better align with hand controllers.
(cherry picked from commit d97a8c2e7eace2494d3142e8187022a33aedc060)
2016-10-19 15:59:26 -07:00
Brad Davis
5a9be817df PR comments 2016-06-29 10:28:55 -07:00
Brad Davis
21d2c977a3 Remove roll from cursor in HMD 2016-06-28 18:30:07 -07:00
Anthony J. Thibault
a1c32f8c44 Merge branch 'master' into tony/improved-avatar-mixer-precision 2016-05-23 10:24:52 -07:00
Zach Pomerantz
59e17c2d5f Fix abs of unsigned warning 2016-05-17 22:57:29 -07:00
Anthony J. Thibault
2c6b0e5c95 Fix for linux warning. 2016-05-17 17:32:09 -07:00
Anthony J. Thibault
818d1f4601 Added six byte quaternion compression routines & tests 2016-05-16 17:48:54 -07:00
Anthony J. Thibault
9821c276ad warning fix in release 2016-05-09 13:56:56 -07:00
Anthony J. Thibault
7f5296f566 Increased tolerance for near zero length vectors
Also, replaced some magic numbers with constants.
2016-05-09 11:53:09 -07:00
Anthony J. Thibault
641e152699 Eye tracking bug fix and debug rendering improvement
* Bug fix for eye tracking in HMD, the "up" orientation of your eyes now match your head.
* DebugDraw: added drawRay method.
* Application: Renamed preRender to postUpdate
* AvatarManager: added postUpdate method that iterates over all avatars.
* MyAvatar: Renamed preRender to preDisplaySide
* MyAvatar: split preRender code into postUpdate and preDisplaySide.
* Removed "Show who is looking at me", "Render focus indicator" and "Render lookat target" debug draw.
* Split "Show Look At Vectors" into "Show My Look At Vectors" and "Show Other Look At Vectors", to make it easier to debug eye tracking.
* "Show Look at Vectors" now draws the right eye red and the left eye blue.
* Removed Avatar and MyAvatar renderBody
* Removed look at rendering from head.
* GLMHelpers: Bugfix for generateBasisVectors when up primary and secondary axis were orthogonal
2016-05-08 16:20:32 -07:00
Andrew Meadows
4d7efbc43f faster isNaN() and friends 2016-04-14 11:18:10 -07:00
Seth Alves
69bb0ebd74 Revert "faster kinematic motion for entities" 2016-04-04 16:11:54 -07:00
Andrew Meadows
e1602b57fa faster isNaN checks 2016-04-01 13:14:03 -07:00
Anthony J. Thibault
5eeb4ca594 Fix one frame lag controller lag/jitter
Move userInputMapper->update() after inputPlugin->pluginUpdate().
2016-03-11 09:28:25 -08:00
Anthony J. Thibault
0d62b10a8f Added Mat4 support to script
Also, hooked up MyAvatar.sensorToWorldMatrix access to script.
2016-03-07 16:16:14 -08:00
Anthony J. Thibault
111ed65bf8 Controller Pose values are relative to Avatar.
Pass a InputCalibrationData to each inputPlugin and inputDevice.
This contains the most up sensorToWorldMatrix, avatarMat and hmdSensorMatrix.
Each input plugin can use this data to transform it's poses into Avatar space
before sending it up the chain.

This fixes a bug in the handControllerGrab.js script that relied on the hand controller
rotation/positions being in the avatar frame.
2016-02-11 17:18:01 -08:00
Anthony J. Thibault
8bfa80d5fc Merge remote-tracking branch 'upstream/master' into tony/hmd-recenter-on-rotation 2016-01-22 13:37:43 -08:00
Anthony J. Thibault
61b760038a Address feedback from code review 2016-01-22 11:54:28 -08:00
Seth Alves
2633cb1f27 rename NaN functions for vec3 and quat 2016-01-22 11:54:24 -08:00
Seth Alves
a9cf836cb0 added isVec3NaN and isQuatNaN functions 2016-01-22 11:13:55 -08:00
Anthony J. Thibault
a91c181a89 MyAvatar: Recenter when the head turns away from the hips
Compute HMD facing moving average.
When the moving average diverges from the hips by more then 45 degrees, recenter the body.

Also, the follow code has been changed, instead of a follow velocity being passed to the CharacterController
a desired target is passed.  The CharacterController homes toward it's target based on the time remaining.
Any follow deltas applied to move the avatar's position closer to it's target is stored and re-applied
to the bodySensorMatrix.  This centralizes the moving/homing code to one place, the CharacterContoller.

A new FollowHelper class was also introduced, it groups together the data and logic necessary to perform the
re-centering/follow procedure.  This "hopefully" makes it easier to maintain.
2016-01-21 16:38:42 -08:00
Atlante45
1d513cfbba Merge branch 'master' of https://github.com/highfidelity/hifi into particle 2015-12-09 15:09:19 -08:00
Atlante45
bd23a4137e Move toGlm to GLMHelpers 2015-12-03 15:01:17 -08:00
Anthony J. Thibault
b56cf58e33 Fix for mirrored transforms in FBX models
extractScale will now return negative scale for left-handed matrices.
2015-12-02 16:55:04 -08:00
Anthony J. Thibault
9c0b4bc2a2 Fix for model entities with non-uniform scaled mesh
Logic which extracted rotations from a non-uniformly scaled matrices was sometimes incorrect.

This should fix the roads in Qbit as well as the blocks in toybox.
2015-12-02 14:09:47 -08:00
Anthony J. Thibault
14189ac909 Move Y_180 flip rotation out of Rig
This Y_180 flip is defined in skeletonModel not in the rig.
This is important if we wish to use the Rig for both Avatars (180 flip) and Entity models (no 180 flip).

We can hide this 180 flip from script, if we wish, by including it in all the accessors to and from
MyAvatar -> skeletalModel -> Rig.

Added Quaternions::Y_180 to GLMHelpers.
2015-11-23 19:31:27 -08:00
Anthony J. Thibault
54408a9c87 AnimVars are now in avatar/rig space
This makes it much simpler for code out side of the rig to manipulate AnimVars

* Removed mat4 type from AnimVars
* AnimVariantMap now has a _rigToGeometryTransform matrix
  used to transform positions and rotations into the correct coordinate frame.
* Moved AnimPose code to extract a quat from a scaled matrix into GLMHelpers
2015-11-20 18:29:17 -08:00
Atlante45
118d05d824 Use a clearer function 2015-11-11 17:24:50 -08:00
Atlante45
115b63a117 Simplify rotationBetween 2015-11-11 15:54:48 -08:00
Seth Alves
ddeed8b4ee code review 2015-09-29 06:51:24 -07:00
Seth Alves
50dd8eba45 Relay joint translations across network. Apply animation's root-joint translation to avatar. 2015-09-26 11:40:39 -07:00
David Rowe
d063f3488d Back out fromSpherical code addition 2015-09-24 19:14:26 -07:00
David Rowe
12e2cf3ce9 Emit in all directions from a point or the surface of a spheroid 2015-09-17 17:14:35 -07:00
Anthony J. Thibault
3716d5612b Merge branch 'master' into ajt/new-anim-system 2015-09-03 19:20:06 -07:00
Brad Davis
8dc3905767 Add common vector constants to JS, add some missing quaternion functionality 2015-09-03 11:51:35 -07:00
Anthony J. Thibault
d151474446 Merge branch 'master' into ajt/new-anim-system 2015-09-02 10:00:36 -07:00
Anthony J. Thibault
54aa0677f6 Merge branch 'master' into ajt/new-anim-system 2015-08-31 10:47:50 -07:00
Andrew Meadows
614fad0811 remove warnings from linux build 2015-08-27 19:12:25 -07:00
Stephen Birarda
1d6f43e0d0 cleaned up some warnings 2015-08-27 18:26:55 -07:00
Anthony J. Thibault
b7a9b54628 Better AnimDebugDraw rendering 2015-08-26 16:42:08 -07:00
Anthony J. Thibault
c1333e16ed Merge branch 'master' into ajt/new-anim-system 2015-08-26 11:59:03 -07:00
Andrew Meadows
f857ccfe16 fix Vectors::MIN 2015-08-26 11:46:50 -07:00
Anthony J. Thibault
46c1e008bc Merge branch 'master' into ajt/new-anim-system 2015-08-26 10:37:39 -07:00
Brad Davis
d311e4f2ea Fixing problems reported by static analysis tool 2015-08-25 19:18:55 -07:00
Anthony J. Thibault
fa5256eefd Merge branch 'master' into ajt/new-anim-system 2015-08-24 14:32:28 -07:00
Brad Davis
ccc4a59992 Cleanup and PR comments 2015-08-08 13:54:37 -07:00
Anthony J. Thibault
da809efcd6 WIP commit, DOES NOT BUILD.
* Added AnimSkeleton class
* Attempt to copy animation frames when _networkAnimation has
  finished loading.  Fill in the holes with bind pose.
2015-08-04 18:14:46 -07:00
Brad Davis
5744200f64 Merge remote-tracking branch 'upstream/master' into plugins
Conflicts:
	interface/CMakeLists.txt
	interface/src/Application.cpp
	interface/src/Application.h
	interface/src/avatar/MyAvatar.h
2015-07-20 19:21:02 -07:00
SamGondelman
a4cbb7f412 const references in glmhelpers 2015-07-20 17:30:23 -07:00
Atlante45
b4121eb464 Remove unnecessary move 2015-07-16 13:14:17 -07:00