summaryrefslogtreecommitdiff
path: root/indra/llmath/llbbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/llbbox.cpp')
-rw-r--r--indra/llmath/llbbox.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/llmath/llbbox.cpp b/indra/llmath/llbbox.cpp
index b46a6e03d2..72c906b5ca 100644
--- a/indra/llmath/llbbox.cpp
+++ b/indra/llmath/llbbox.cpp
@@ -89,6 +89,20 @@ 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 +161,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)