diff options
| author | Andrew Meadows <andrew@lindenlab.com> | 2010-12-17 19:52:45 -0800 |
|---|---|---|
| committer | Andrew Meadows <andrew@lindenlab.com> | 2010-12-17 19:52:45 -0800 |
| commit | 7fc9d701190a75c8f96a0a808d793dbc34860916 (patch) | |
| tree | 9d4079adaad40a72b287c70ed22db0c86a223b76 /indra/newview/llviewerobject.cpp | |
| parent | 3be87bb04685e971965ab5ac4166165c3785476f (diff) | |
For object-vs-parcel overlap we now use list of axis aligned boxes
one box for each prim, for less slop on queries
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ae2154d63b..18d6e4c8c8 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -518,18 +518,21 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list) // agent. bool LLViewerObject::isReturnable() { - LLBBox bounding_box(getPositionRegion(), getRotationRegion(), getScale() * -0.5f, getScale() * 0.5f); + if (isAttachment()) + { + return false; + } + std::vector<LLBBox> boxes; + boxes.push_back(LLBBox(getPositionRegion(), getRotationRegion(), getScale() * -0.5f, getScale() * 0.5f).getAxisAligned()); for (child_list_t::iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) { LLViewerObject* child = *iter; - LLBBox child_box(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f); - bounding_box.addBBoxAgent(child_box); + boxes.push_back(LLBBox(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f).getAxisAligned()); } - return !isAttachment() - && mRegionp - && mRegionp->objectIsReturnable(getPositionRegion(), bounding_box); + return mRegionp + && mRegionp->objectIsReturnable(getPositionRegion(), boxes); } BOOL LLViewerObject::setParent(LLViewerObject* parent) |
