Merge branch 'master' of https://github.com/highfidelity/hifi into tot

This commit is contained in:
Sam Gateau 2015-01-05 11:27:53 -08:00
commit b8e44a3e7a
3 changed files with 9 additions and 7 deletions

View file

@ -146,11 +146,6 @@ void SixenseManager::update(float deltaTime) {
#ifdef HAVE_SIXENSE
Hand* hand = Application::getInstance()->getAvatar()->getHand();
if (_isInitialized && _isEnabled) {
// Disable the hands (and return to default pose) if both controllers are at base station
for (std::vector<PalmData>::iterator it = hand->getPalms().begin(); it != hand->getPalms().end(); it++) {
it->setActive(!_controllersAtBase);
}
#ifdef __APPLE__
SixenseBaseFunction sixenseGetNumActiveControllers =
(SixenseBaseFunction) _sixenseLibrary->resolve("sixenseGetNumActiveControllers");
@ -213,6 +208,14 @@ void SixenseManager::update(float deltaTime) {
qDebug("Found new Sixense controller, ID %i", data->controller_index);
}
// Disable the hands (and return to default pose) if both controllers are at base station
if (foundHand) {
palm->setActive(!_controllersAtBase);
} else {
palm->setActive(false); // if this isn't a Sixsense ID palm, always make it inactive
}
// Read controller buttons and joystick into the hand
palm->setControllerButtons(data->buttons);
palm->setTrigger(data->trigger);

View file

@ -176,7 +176,7 @@ void JointState::clearTransformTranslation() {
void JointState::applyRotationDelta(const glm::quat& delta, bool constrain, float priority) {
// NOTE: delta is in model-frame
assert(_fbxJoint != NULL);
if (priority < _animationPriority || delta.null) {
if (priority < _animationPriority || delta == glm::quat()) {
return;
}
_animationPriority = priority;

View file

@ -590,7 +590,6 @@ void Model::recalculateMeshBoxes(bool pickAgainstTriangles) {
bool calculatedMeshTrianglesNeeded = pickAgainstTriangles && !_calculatedMeshTrianglesValid;
if (!_calculatedMeshBoxesValid || calculatedMeshTrianglesNeeded) {
PerformanceTimer perfTimer("calculatedMeshBoxes");
const FBXGeometry& geometry = _geometry->getFBXGeometry();
int numberOfMeshes = geometry.meshes.size();
_calculatedMeshBoxes.resize(numberOfMeshes);