code review feedback

This commit is contained in:
Anthony J. Thibault 2017-12-07 10:08:18 -08:00
parent fbcecbfc89
commit 095bedcd3f
2 changed files with 9 additions and 1 deletions

View file

@ -1604,7 +1604,7 @@ float Avatar::getUnscaledEyeHeight() const {
// if we determine the mesh is much larger then the skeleton, then we use the mesh height instead.
// This helps prevent absurdly large avatars from exceeding the domain height limit.
const float MESH_SLOP_RATIO = 1.5;
const float MESH_SLOP_RATIO = 1.5f;
if (meshHeight > skeletonHeight * MESH_SLOP_RATIO) {
return meshHeight;
} else {

View file

@ -138,11 +138,19 @@ void AvatarData::setDomainMaximumHeight(float domainMaximumHeight) {
float AvatarData::getDomainMinScale() const {
const float unscaledHeight = getUnscaledHeight();
const float EPSILON = 1.0e-4f;
if (unscaledHeight <= EPSILON) {
unscaledHeight = DEFAULT_AVATAR_HEIGHT;
}
return _domainMinimumHeight / unscaledHeight;
}
float AvatarData::getDomainMaxScale() const {
const float unscaledHeight = getUnscaledHeight();
const float EPSILON = 1.0e-4f;
if (unscaledHeight <= EPSILON) {
unscaledHeight = DEFAULT_AVATAR_HEIGHT;
}
return _domainMaximumHeight / unscaledHeight;
}