mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-22 03:51:26 +00:00
- inline kexBBox::Center and kexBBox::Extents as they are also time critical
This commit is contained in:
parent
be5b3a79db
commit
d3d7174c77
2 changed files with 18 additions and 20 deletions
|
@ -87,26 +87,6 @@ void kexBBox::AddPoint(const kexVec3 &vec)
|
|||
max.Set(hix, hiy, hiz);
|
||||
}
|
||||
|
||||
//
|
||||
// kexBBox::Center
|
||||
//
|
||||
|
||||
kexVec3 kexBBox::Center() const
|
||||
{
|
||||
return kexVec3(
|
||||
(max.x + min.x) * 0.5f,
|
||||
(max.y + min.y) * 0.5f,
|
||||
(max.z + min.z) * 0.5f);
|
||||
}
|
||||
|
||||
kexVec3 kexBBox::Extents() const
|
||||
{
|
||||
return kexVec3(
|
||||
(max.x - min.x) * 0.5f,
|
||||
(max.y - min.y) * 0.5f,
|
||||
(max.z - min.z) * 0.5f);
|
||||
}
|
||||
|
||||
//
|
||||
// kexBBox::Radius
|
||||
//
|
||||
|
|
|
@ -1519,3 +1519,21 @@ inline float &kexVec4::operator[](int index)
|
|||
{
|
||||
return (&x)[index];
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline kexVec3 kexBBox::Center() const
|
||||
{
|
||||
return kexVec3(
|
||||
(max.x + min.x) * 0.5f,
|
||||
(max.y + min.y) * 0.5f,
|
||||
(max.z + min.z) * 0.5f);
|
||||
}
|
||||
|
||||
inline kexVec3 kexBBox::Extents() const
|
||||
{
|
||||
return kexVec3(
|
||||
(max.x - min.x) * 0.5f,
|
||||
(max.y - min.y) * 0.5f,
|
||||
(max.z - min.z) * 0.5f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue