mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
code review feedback
This commit is contained in:
parent
fbcecbfc89
commit
095bedcd3f
2 changed files with 9 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue