ER-407 child bounding boxes not rotated properly for encroachment returnability
Using the correct method for joining BBoxes in the agent frame ::addBBoxAgent()master
parent
5663f9dd55
commit
3be87bb046
|
|
@ -102,20 +102,6 @@ LLBBox LLBBox::getAxisAligned() const
|
|||
|
||||
return aligned;
|
||||
}
|
||||
// Increases the size to contain other_box
|
||||
void LLBBox::join(const LLBBox& other_box)
|
||||
{
|
||||
LLVector3 other_min = (other_box.mPosAgent - mPosAgent) - other_box.mMinLocal;
|
||||
mMinLocal.mV[VX] = llmin( other_min.mV[VX], mMinLocal.mV[VX] );
|
||||
mMinLocal.mV[VY] = llmin( other_min.mV[VY], mMinLocal.mV[VY] );
|
||||
mMinLocal.mV[VZ] = llmin( other_min.mV[VZ], mMinLocal.mV[VZ] );
|
||||
|
||||
LLVector3 other_max = (other_box.mPosAgent - mPosAgent) + other_box.mMaxLocal;
|
||||
mMaxLocal.mV[VX] = llmax( other_max.mV[VX], mMaxLocal.mV[VX] );
|
||||
mMaxLocal.mV[VY] = llmax( other_max.mV[VY], mMaxLocal.mV[VY] );
|
||||
mMaxLocal.mV[VZ] = llmax( other_max.mV[VZ], mMaxLocal.mV[VZ] );
|
||||
}
|
||||
|
||||
|
||||
void LLBBox::expand( F32 delta )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -85,10 +85,6 @@ public:
|
|||
// Get the smallest possible axis aligned bbox that contains this bbox
|
||||
LLBBox getAxisAligned() const;
|
||||
|
||||
// Increases the size to contain other_box
|
||||
void join(const LLBBox& other_box);
|
||||
|
||||
|
||||
// friend LLBBox operator*(const LLBBox& a, const LLMatrix4& b);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ bool LLViewerObject::isReturnable()
|
|||
{
|
||||
LLViewerObject* child = *iter;
|
||||
LLBBox child_box(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f);
|
||||
bounding_box.join(child_box);
|
||||
bounding_box.addBBoxAgent(child_box);
|
||||
}
|
||||
|
||||
return !isAttachment()
|
||||
|
|
|
|||
Loading…
Reference in New Issue