diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-01-27 19:04:26 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-01-27 19:04:26 -0500 |
| commit | ee2678be57668844221a462ed1e215c3c7cbd841 (patch) | |
| tree | 5c88a0e1609b13eb5c843c50a323a39b00ff89b7 /indra/llmath/llbbox.cpp | |
| parent | 7b7e9b0d0bd9c35acb346ae359f9a08a48b248a2 (diff) | |
| parent | 1e346e085d9af460657342f20d8fde45b6982913 (diff) | |
merge beta tags
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) |
