Added a bunch of files synched with 0.8.42

This commit is contained in:
Don BURNS
2001-09-19 21:08:56 +00:00
parent fed86f3f03
commit e8f256a59d
446 changed files with 58397 additions and 10552 deletions

View File

@@ -9,11 +9,11 @@ void BoundingSphere::expandBy(const Vec3& v)
Vec3 dv = v-_center;
float r = dv.length();
if (r>_radius)
{
{
float dr = (r-_radius)*0.5f;
_center += dv*(dr/r);
_radius += dr;
} // else do nothing as vertex is within sphere.
} // else do nothing as vertex is within sphere.
}
else
{
@@ -22,6 +22,7 @@ void BoundingSphere::expandBy(const Vec3& v)
}
}
void BoundingSphere::expandRadiusBy(const Vec3& v)
{
if (isValid())
@@ -37,6 +38,7 @@ void BoundingSphere::expandRadiusBy(const Vec3& v)
}
}
void BoundingSphere::expandBy(const BoundingSphere& sh)
{
if (sh.isValid())
@@ -47,13 +49,13 @@ void BoundingSphere::expandBy(const BoundingSphere& sh)
float dv_len = dv.length();
if (dv_len+sh._radius>_radius)
{
Vec3 e1 = _center-(dv*(_radius/dv_len));
Vec3 e2 = sh._center+(dv*(sh._radius/dv_len));
_center = (e1+e2)*0.5f;
_radius = (e2-_center).length();
} // else do nothing as vertex is within sphere.
} // else do nothing as vertex is within sphere.
}
else
{
@@ -62,6 +64,8 @@ void BoundingSphere::expandBy(const BoundingSphere& sh)
}
}
}
void BoundingSphere::expandRadiusBy(const BoundingSphere& sh)
{
if (sh.isValid())