diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-21 15:55:55 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-21 15:55:55 -0500 |
commit | d034d8d9289a9e5511d32ec048b75837b89264ad (patch) | |
tree | c3fd25eb7d1096baef0290b5bf86321f7ed447ad /indra/llmath/llbbox.cpp | |
parent | 6150e4ed7cf86a2afc0061ba89b0cb049d6f036e (diff) | |
parent | 97a9211d87fac90994846e5bf91a78a708ec5a9c (diff) |
merge changes for vwr-24347
Diffstat (limited to 'indra/llmath/llbbox.cpp')
-rw-r--r-- | indra/llmath/llbbox.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llmath/llbbox.cpp b/indra/llmath/llbbox.cpp index b46a6e03d2..3e2c05a6e6 100644 --- a/indra/llmath/llbbox.cpp +++ b/indra/llmath/llbbox.cpp @@ -89,6 +89,19 @@ void LLBBox::addBBoxAgent(const LLBBox& b) } } +LLBBox LLBBox::getAxisAligned() const +{ + // no rotation = axis aligned rotation + LLBBox aligned(mPosAgent, LLQuaternion(), LLVector3(), LLVector3()); + + // add the center point so that it's not empty + aligned.addPointAgent(mPosAgent); + + // add our BBox + aligned.addBBoxAgent(*this); + + return aligned; +} void LLBBox::expand( F32 delta ) { @@ -147,6 +160,15 @@ BOOL LLBBox::containsPointAgent(const LLVector3& p) const return containsPointLocal(point_local); } +LLVector3 LLBBox::getMinAgent() const +{ + return localToAgent(mMinLocal); +} + +LLVector3 LLBBox::getMaxAgent() const +{ + return localToAgent(mMaxLocal); +} /* LLBBox operator*(const LLBBox &a, const LLMatrix4 &b) |