diff options
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 54 |
1 files changed, 48 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9b3f81e193..dcd208fea5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -240,6 +240,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mClickAction(0), mObjectCost(0.f), mLinksetCost(0.f), + mPhysicsCost(0.f), + mLinksetPhysicsCost(0.f), mCostStale(true), mAttachmentItemID(LLUUID::null) { @@ -2931,6 +2933,28 @@ void LLViewerObject::setLinksetCost(F32 cost) } } +void LLViewerObject::setPhysicsCost(F32 cost) +{ + mPhysicsCost = cost; + mCostStale = false; + + if (isSelected()) + { + gFloaterTools->dirty(); + } +} + +void LLViewerObject::setLinksetPhysicsCost(F32 cost) +{ + mLinksetPhysicsCost = cost; + mCostStale = false; + + if (isSelected()) + { + gFloaterTools->dirty(); + } +} + F32 LLViewerObject::getObjectCost() { @@ -2942,27 +2966,45 @@ F32 LLViewerObject::getObjectCost() return mObjectCost; } -F32 LLViewerObject::getStreamingCost() +F32 LLViewerObject::getLinksetCost() { - return 0.f; + if (mCostStale) + { + gObjectList.updateObjectCost(this); + } + + return mLinksetCost; } -U32 LLViewerObject::getTriangleCount() +F32 LLViewerObject::getPhysicsCost() { - return 0; + if (mCostStale) + { + gObjectList.updateObjectCost(this); + } + + return mPhysicsCost; } -F32 LLViewerObject::getLinksetCost() +F32 LLViewerObject::getLinksetPhysicsCost() { if (mCostStale) { gObjectList.updateObjectCost(this); } - return mLinksetCost; + return mLinksetPhysicsCost; } +F32 LLViewerObject::getStreamingCost() +{ + return 0.f; +} +U32 LLViewerObject::getTriangleCount() +{ + return 0; +} void LLViewerObject::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) { |