diff options
author | Seth ProductEngine <slitovchuk@productengine.com> | 2011-08-06 14:28:53 +0300 |
---|---|---|
committer | Seth ProductEngine <slitovchuk@productengine.com> | 2011-08-06 14:28:53 +0300 |
commit | ef6e51db22ad3aec42b19bcf3e077ff000ba8929 (patch) | |
tree | 0099e5b3a9f04817afd7cbedf411188b9846c62e /indra/newview/llviewerobject.cpp | |
parent | 1b7b319ae22ac7598b7b3d75ccbec75263450e07 (diff) |
SH-2170 FIXED Detecting selection of objects that cross parcel bounds added.
In this case the land impacts data is not displayed for such selection.
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index b5fdca632b..34c73ee739 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -628,6 +628,20 @@ void LLViewerObject::constructAndAddReturnable( std::vector<PotentialReturnableO } } +bool LLViewerObject::crossesParcelBounds() +{ + 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; + boxes.push_back(LLBBox(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f).getAxisAligned()); + } + + return mRegionp && mRegionp->objectsCrossParcel(boxes); +} + BOOL LLViewerObject::setParent(LLViewerObject* parent) { if(mParent != parent) |