summaryrefslogtreecommitdiff
path: root/indra/llmath/llbbox.cpp
diff options
context:
space:
mode:
authorAndrew Meadows <andrew@lindenlab.com>2010-12-22 10:28:16 -0800
committerAndrew Meadows <andrew@lindenlab.com>2010-12-22 10:28:16 -0800
commitbf20d1498b38ad2a15bbe9b013eaca94c437b843 (patch)
tree77548aa4a6737ee925c908b5b2d196c13b1301fc /indra/llmath/llbbox.cpp
parent375bdb6d1eb58e7f9f84be947d05ca44e550752d (diff)
parent740bd8dbfd791bdd548064912abad8c0bf230f4c (diff)
merge
Diffstat (limited to 'indra/llmath/llbbox.cpp')
-rw-r--r--indra/llmath/llbbox.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llmath/llbbox.cpp b/indra/llmath/llbbox.cpp
index b46a6e03d2..d2208f604e 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 rotiation = 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)