mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 21:01:32 +02:00
comment the code
This commit is contained in:
parent
07eb1d89e1
commit
257813ec38
1 changed files with 2 additions and 0 deletions
|
@ -850,6 +850,8 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
glm::quat sensorToWorldQuat;
|
glm::quat sensorToWorldQuat;
|
||||||
unpackOrientationQuatFromSixBytes(data->sensorToWorldQuat, sensorToWorldQuat);
|
unpackOrientationQuatFromSixBytes(data->sensorToWorldQuat, sensorToWorldQuat);
|
||||||
float sensorToWorldScale;
|
float sensorToWorldScale;
|
||||||
|
// Grab a local copy of sensorToWorldScale to be able to use the unpack function with a pointer on it,
|
||||||
|
// a direct pointer on the struct attribute triggers warnings because of potential misalignement.
|
||||||
auto srcSensorToWorldScale = data->sensorToWorldScale;
|
auto srcSensorToWorldScale = data->sensorToWorldScale;
|
||||||
unpackFloatScalarFromSignedTwoByteFixed((int16_t*)&srcSensorToWorldScale, &sensorToWorldScale, SENSOR_TO_WORLD_SCALE_RADIX);
|
unpackFloatScalarFromSignedTwoByteFixed((int16_t*)&srcSensorToWorldScale, &sensorToWorldScale, SENSOR_TO_WORLD_SCALE_RADIX);
|
||||||
glm::vec3 sensorToWorldTrans(data->sensorToWorldTrans[0], data->sensorToWorldTrans[1], data->sensorToWorldTrans[2]);
|
glm::vec3 sensorToWorldTrans(data->sensorToWorldTrans[0], data->sensorToWorldTrans[1], data->sensorToWorldTrans[2]);
|
||||||
|
|
Loading…
Reference in a new issue