mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 00:23:01 +02:00
Minor bug fixes for networked Leap hands
This commit is contained in:
parent
c1d23f5f63
commit
6c42922288
3 changed files with 7 additions and 7 deletions
|
@ -1275,7 +1275,6 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
|||
}
|
||||
}
|
||||
}
|
||||
_hand.render(lookingInMirror);
|
||||
} else {
|
||||
// Render the body's voxels
|
||||
float alpha = getBallRenderAlpha(BODY_BALL_HEAD_BASE, lookingInMirror);
|
||||
|
@ -1283,6 +1282,7 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
|||
_voxels.render(false);
|
||||
}
|
||||
}
|
||||
_hand.render(lookingInMirror);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -236,9 +236,9 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
fingerPositions.resize(numFingers);
|
||||
for (size_t i = 0; i < numFingers; ++i)
|
||||
{
|
||||
sourceBuffer += unpackFloatScalarFromSignedTwoByteFixed((uint16_t*) sourceBuffer, &(fingerPositions[i].x), 4);
|
||||
sourceBuffer += unpackFloatScalarFromSignedTwoByteFixed((uint16_t*) sourceBuffer, &(fingerPositions[i].y), 4);
|
||||
sourceBuffer += unpackFloatScalarFromSignedTwoByteFixed((uint16_t*) sourceBuffer, &(fingerPositions[i].z), 4);
|
||||
sourceBuffer += unpackFloatScalarFromSignedTwoByteFixed((int16_t*) sourceBuffer, &(fingerPositions[i].x), 4);
|
||||
sourceBuffer += unpackFloatScalarFromSignedTwoByteFixed((int16_t*) sourceBuffer, &(fingerPositions[i].y), 4);
|
||||
sourceBuffer += unpackFloatScalarFromSignedTwoByteFixed((int16_t*) sourceBuffer, &(fingerPositions[i].z), 4);
|
||||
}
|
||||
_handData->setFingerPositions(fingerPositions);
|
||||
}
|
||||
|
@ -259,9 +259,9 @@ int packFloatScalarToSignedTwoByteFixed(unsigned char* buffer, float scalar, int
|
|||
return sizeof(uint16_t);
|
||||
}
|
||||
|
||||
int unpackFloatScalarFromSignedTwoByteFixed(uint16_t* byteFixedPointer, float* destinationPointer, int radix) {
|
||||
int unpackFloatScalarFromSignedTwoByteFixed(int16_t* byteFixedPointer, float* destinationPointer, int radix) {
|
||||
*destinationPointer = *byteFixedPointer / (float)(1 << radix);
|
||||
return sizeof(uint16_t);
|
||||
return sizeof(int16_t);
|
||||
}
|
||||
|
||||
int packFloatAngleToTwoByte(unsigned char* buffer, float angle) {
|
||||
|
|
|
@ -169,6 +169,6 @@ int unpackFloatFromByte(unsigned char* buffer, float& value, float scaleBy);
|
|||
|
||||
// Allows sending of fixed-point numbers: radix 1 makes 15.1 number, radix 8 makes 8.8 number, etc
|
||||
int packFloatScalarToSignedTwoByteFixed(unsigned char* buffer, float scalar, int radix);
|
||||
int unpackFloatScalarFromSignedTwoByteFixed(uint16_t* byteFixedPointer, float* destinationPointer, int radix);
|
||||
int unpackFloatScalarFromSignedTwoByteFixed(int16_t* byteFixedPointer, float* destinationPointer, int radix);
|
||||
|
||||
#endif /* defined(__hifi__AvatarData__) */
|
||||
|
|
Loading…
Reference in a new issue