Merge branch 'master' of https://github.com/worklist/hifi into dev4

This commit is contained in:
Eric Johnston 2013-08-07 11:13:42 -07:00
commit 5373f85d30
4 changed files with 37 additions and 25 deletions

View file

@ -3962,6 +3962,9 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng
// But, also identify the sender, and keep track of the contained jurisdiction root for this server
Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
// quick fix for crash... why would voxelServer be NULL?
if (voxelServer) {
uint16_t nodeID = voxelServer->getNodeID();
VoxelPositionSize jurisditionDetails;
@ -3979,7 +3982,7 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng
}
// store jurisdiction details for later use
_voxelServerJurisdictions[nodeID] = jurisditionDetails;
}
return statsMessageLength;
}

View file

@ -24,7 +24,7 @@ BendyLine::BendyLine(){
_gravityForce = glm::vec3(0.0f, 0.0f, 0.0f);
_basePosition = glm::vec3(0.0f, 0.0f, 0.0f);
_baseDirection = glm::vec3(0.0f, 0.0f, 0.0f);
_baseDirection = glm::vec3(0.0f, 1.0f, 0.0f);
_midPosition = glm::vec3(0.0f, 0.0f, 0.0f);
_endPosition = glm::vec3(0.0f, 0.0f, 0.0f);
_midVelocity = glm::vec3(0.0f, 0.0f, 0.0f);

View file

@ -30,10 +30,12 @@ const float MINIMUM_EYE_ROTATION_DOT = 0.5f; // based on a dot product: 1.0 is
const float EYEBALL_RADIUS = 0.017;
const float EYELID_RADIUS = 0.019;
const float EYEBALL_COLOR[3] = { 0.9f, 0.9f, 0.8f };
const float HAIR_SPRING_FORCE = 7.0f;
const float HAIR_TORQUE_FORCE = 0.1f;
const float HAIR_GRAVITY_FORCE = 0.02f;
const float HAIR_SPRING_FORCE = 15.0f;
const float HAIR_TORQUE_FORCE = 0.2f;
const float HAIR_GRAVITY_FORCE = 0.001f;
const float HAIR_DRAG = 10.0f;
const float HAIR_LENGTH = 0.09f;
const float HAIR_THICKNESS = 0.03f;
const float NOSE_LENGTH = 0.025;
@ -129,7 +131,6 @@ void Head::reset() {
}
void Head::resetHairPhysics() {
//glm::vec3 up = getUpDirection();
for (int t = 0; t < NUM_HAIR_TUFTS; t ++) {
for (int t = 0; t < NUM_HAIR_TUFTS; t ++) {
@ -334,9 +335,16 @@ void Head::setScale (float scale) {
delete[] _mohawkColors;
createMohawk();
resetHairPhysics();
if (USING_PHYSICAL_MOHAWK) {
for (int t = 0; t < NUM_HAIR_TUFTS; t ++) {
_hairTuft[t].setLength (_scale * HAIR_LENGTH );
_hairTuft[t].setThickness(_scale * HAIR_THICKNESS);
}
}
}
void Head::createMohawk() {
uint16_t nodeId = UNKNOWN_NODE_ID;
if (_owningAvatar->getOwningNode()) {
@ -737,6 +745,7 @@ void Head::renderLookatVectors(glm::vec3 leftEyePosition, glm::vec3 rightEyePosi
}
void Head::updateHairPhysics(float deltaTime) {
glm::quat orientation = getOrientation();
glm::vec3 up = orientation * IDENTITY_UP;
glm::vec3 front = orientation * IDENTITY_FRONT;