Rename COBBox members to be consistent

This commit is contained in:
Phillip Stephens 2016-04-26 19:39:56 -07:00
parent ac98ebf428
commit 48b0aa4601
1 changed files with 16 additions and 16 deletions

View File

@ -14,8 +14,8 @@ public:
#if ZE_ATHENA_TYPES
void readBig(athena::io::IStreamReader& in)
{
m_transform.read34RowMajor(in);
m_extents.readBig(in);
transform.read34RowMajor(in);
extents.readBig(in);
}
static COBBox ReadBig(athena::io::IStreamReader& in)
{
@ -26,16 +26,16 @@ public:
#endif
CTransform m_transform;
CVector3f m_extents;
CTransform transform;
CVector3f extents;
COBBox()
{}
COBBox(const CAABox& aabb)
: m_extents(aabb.volume())
: extents(aabb.volume())
{
m_transform.m_origin = aabb.center();
transform.m_origin = aabb.center();
}
COBBox(const CTransform& xf, const CVector3f& point)
@ -43,11 +43,11 @@ public:
}
CAABox calculateAABox(const CTransform& transform = CTransform())
CAABox calculateAABox(const CTransform& transform = CTransform()) const
{
CAABox ret = CAABox::skInvertedBox;
CTransform trans = transform * m_transform;
CTransform trans = transform * transform;
static const CVector3f basis[8] ={
{ 1.0, 1.0, 1.0},
{ 1.0, 1.0, -1.0},
@ -58,22 +58,22 @@ public:
{-1.0, 1.0, -1.0},
{-1.0, 1.0, 1.0}
};
CVector3f p = m_extents * basis[0];
CVector3f p = extents * basis[0];
ret.accumulateBounds(trans * p);
p = m_extents * basis[1];
p = extents * basis[1];
ret.accumulateBounds(trans * p);
p = m_extents * basis[2];
p = extents * basis[2];
ret.accumulateBounds(trans * p);
p = m_extents * basis[3];
p = extents * basis[3];
ret.accumulateBounds(trans * p);
p = m_extents * basis[4];
p = extents * basis[4];
ret.accumulateBounds(trans * p);
p = m_extents * basis[5];
p = extents * basis[5];
ret.accumulateBounds(trans * p);
p = m_extents * basis[6];
p = extents * basis[6];
ret.accumulateBounds(trans * p);
p = m_extents * basis[7];
p = extents * basis[7];
ret.accumulateBounds(trans * p);
return ret;