mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 20:25:00 +02:00
explicit casts to remove warnings
This commit is contained in:
parent
fbf4600a4c
commit
9079c3ecd8
4 changed files with 7 additions and 6 deletions
|
@ -185,10 +185,11 @@ int MetavoxelSystem::SimulateVisitor::visit(MetavoxelInfo& info) {
|
||||||
}
|
}
|
||||||
QRgb color = info.inputValues.at(0).getInlineValue<QRgb>();
|
QRgb color = info.inputValues.at(0).getInlineValue<QRgb>();
|
||||||
QRgb normal = info.inputValues.at(1).getInlineValue<QRgb>();
|
QRgb normal = info.inputValues.at(1).getInlineValue<QRgb>();
|
||||||
int alpha = qAlpha(color);
|
quint8 alpha = qAlpha(color);
|
||||||
if (alpha > 0) {
|
if (alpha > 0) {
|
||||||
Point point = { glm::vec4(info.minimum + glm::vec3(info.size, info.size, info.size) * 0.5f, info.size),
|
Point point = { glm::vec4(info.minimum + glm::vec3(info.size, info.size, info.size) * 0.5f, info.size),
|
||||||
{ qRed(color), qGreen(color), qBlue(color), alpha }, { qRed(normal), qGreen(normal), qBlue(normal) } };
|
{ quint8(qRed(color)), quint8(qGreen(color)), quint8(qBlue(color)), alpha },
|
||||||
|
{ quint8(qRed(normal)), quint8(qGreen(normal)), quint8(qBlue(normal)) } };
|
||||||
_points.append(point);
|
_points.append(point);
|
||||||
}
|
}
|
||||||
return STOP_RECURSION;
|
return STOP_RECURSION;
|
||||||
|
|
|
@ -206,8 +206,8 @@ void Hand::collideAgainstOurself() {
|
||||||
}
|
}
|
||||||
// ignoring everything below the parent of the parent of the last free joint
|
// ignoring everything below the parent of the parent of the last free joint
|
||||||
int skipIndex = skeletonModel.getParentJointIndex(skeletonModel.getParentJointIndex(
|
int skipIndex = skeletonModel.getParentJointIndex(skeletonModel.getParentJointIndex(
|
||||||
skeletonModel.getLastFreeJointIndex(((int)i == leftPalmIndex) ? skeletonModel.getLeftHandJointIndex() :
|
skeletonModel.getLastFreeJointIndex((int(i) == leftPalmIndex) ? skeletonModel.getLeftHandJointIndex() :
|
||||||
((int)i == rightPalmIndex) ? skeletonModel.getRightHandJointIndex() : -1)));
|
(int(i) == rightPalmIndex) ? skeletonModel.getRightHandJointIndex() : -1)));
|
||||||
|
|
||||||
handCollisions.clear();
|
handCollisions.clear();
|
||||||
if (_owningAvatar->findSphereCollisions(palm.getPosition(), scaledPalmRadius, handCollisions, skipIndex)) {
|
if (_owningAvatar->findSphereCollisions(palm.getPosition(), scaledPalmRadius, handCollisions, skipIndex)) {
|
||||||
|
|
|
@ -140,7 +140,7 @@ void SkeletonModel::applyPalmData(int jointIndex, const QVector<int>& fingerJoin
|
||||||
direction += fingerVector / length;
|
direction += fingerVector / length;
|
||||||
}
|
}
|
||||||
fingerVector = glm::inverse(palmRotation) * fingerVector * -sign;
|
fingerVector = glm::inverse(palmRotation) * fingerVector * -sign;
|
||||||
IndexValue indexValue = { i, atan2f(fingerVector.z, fingerVector.x) };
|
IndexValue indexValue = { int(i), atan2f(fingerVector.z, fingerVector.x) };
|
||||||
fingerIndices.append(indexValue);
|
fingerIndices.append(indexValue);
|
||||||
}
|
}
|
||||||
qSort(fingerIndices.begin(), fingerIndices.end());
|
qSort(fingerIndices.begin(), fingerIndices.end());
|
||||||
|
|
|
@ -1096,7 +1096,7 @@ QScriptValue ScriptedMetavoxelGuide::visit(QScriptContext* context, QScriptEngin
|
||||||
QScriptValue minimum = infoValue.property(guide->_minimumHandle);
|
QScriptValue minimum = infoValue.property(guide->_minimumHandle);
|
||||||
MetavoxelInfo info = {
|
MetavoxelInfo info = {
|
||||||
glm::vec3(minimum.property(0).toNumber(), minimum.property(1).toNumber(), minimum.property(2).toNumber()),
|
glm::vec3(minimum.property(0).toNumber(), minimum.property(1).toNumber(), minimum.property(2).toNumber()),
|
||||||
infoValue.property(guide->_sizeHandle).toNumber(), guide->_visitation->info.inputValues,
|
float(infoValue.property(guide->_sizeHandle).toNumber()), guide->_visitation->info.inputValues,
|
||||||
guide->_visitation->info.outputValues, infoValue.property(guide->_isLeafHandle).toBool() };
|
guide->_visitation->info.outputValues, infoValue.property(guide->_isLeafHandle).toBool() };
|
||||||
|
|
||||||
// extract and convert the values provided by the script
|
// extract and convert the values provided by the script
|
||||||
|
|
Loading…
Reference in a new issue