mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 07:44:09 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into dev4
This commit is contained in:
commit
5373f85d30
4 changed files with 37 additions and 25 deletions
|
@ -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
|
// But, also identify the sender, and keep track of the contained jurisdiction root for this server
|
||||||
Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
|
Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
|
||||||
|
|
||||||
|
// quick fix for crash... why would voxelServer be NULL?
|
||||||
|
if (voxelServer) {
|
||||||
uint16_t nodeID = voxelServer->getNodeID();
|
uint16_t nodeID = voxelServer->getNodeID();
|
||||||
|
|
||||||
VoxelPositionSize jurisditionDetails;
|
VoxelPositionSize jurisditionDetails;
|
||||||
|
@ -3979,7 +3982,7 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng
|
||||||
}
|
}
|
||||||
// store jurisdiction details for later use
|
// store jurisdiction details for later use
|
||||||
_voxelServerJurisdictions[nodeID] = jurisditionDetails;
|
_voxelServerJurisdictions[nodeID] = jurisditionDetails;
|
||||||
|
}
|
||||||
return statsMessageLength;
|
return statsMessageLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ BendyLine::BendyLine(){
|
||||||
|
|
||||||
_gravityForce = glm::vec3(0.0f, 0.0f, 0.0f);
|
_gravityForce = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||||
_basePosition = 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);
|
_midPosition = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||||
_endPosition = 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);
|
_midVelocity = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||||
|
|
|
@ -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 EYEBALL_RADIUS = 0.017;
|
||||||
const float EYELID_RADIUS = 0.019;
|
const float EYELID_RADIUS = 0.019;
|
||||||
const float EYEBALL_COLOR[3] = { 0.9f, 0.9f, 0.8f };
|
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_SPRING_FORCE = 15.0f;
|
||||||
const float HAIR_GRAVITY_FORCE = 0.02f;
|
const float HAIR_TORQUE_FORCE = 0.2f;
|
||||||
|
const float HAIR_GRAVITY_FORCE = 0.001f;
|
||||||
const float HAIR_DRAG = 10.0f;
|
const float HAIR_DRAG = 10.0f;
|
||||||
|
|
||||||
const float HAIR_LENGTH = 0.09f;
|
const float HAIR_LENGTH = 0.09f;
|
||||||
const float HAIR_THICKNESS = 0.03f;
|
const float HAIR_THICKNESS = 0.03f;
|
||||||
const float NOSE_LENGTH = 0.025;
|
const float NOSE_LENGTH = 0.025;
|
||||||
|
@ -129,7 +131,6 @@ void Head::reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Head::resetHairPhysics() {
|
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 ++) {
|
||||||
for (int t = 0; t < NUM_HAIR_TUFTS; t ++) {
|
for (int t = 0; t < NUM_HAIR_TUFTS; t ++) {
|
||||||
|
|
||||||
|
@ -334,8 +335,15 @@ void Head::setScale (float scale) {
|
||||||
delete[] _mohawkColors;
|
delete[] _mohawkColors;
|
||||||
createMohawk();
|
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() {
|
void Head::createMohawk() {
|
||||||
uint16_t nodeId = UNKNOWN_NODE_ID;
|
uint16_t nodeId = UNKNOWN_NODE_ID;
|
||||||
|
@ -737,6 +745,7 @@ void Head::renderLookatVectors(glm::vec3 leftEyePosition, glm::vec3 rightEyePosi
|
||||||
}
|
}
|
||||||
|
|
||||||
void Head::updateHairPhysics(float deltaTime) {
|
void Head::updateHairPhysics(float deltaTime) {
|
||||||
|
|
||||||
glm::quat orientation = getOrientation();
|
glm::quat orientation = getOrientation();
|
||||||
glm::vec3 up = orientation * IDENTITY_UP;
|
glm::vec3 up = orientation * IDENTITY_UP;
|
||||||
glm::vec3 front = orientation * IDENTITY_FRONT;
|
glm::vec3 front = orientation * IDENTITY_FRONT;
|
||||||
|
|
Loading…
Reference in a new issue