diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-03-27 19:27:05 +0100 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-03-27 19:27:05 +0100 |
| commit | af30a35dc2f4542ceba0eb33c232a77bf3598b69 (patch) | |
| tree | 4c763f23dc3da3e43d0b7caf9f9d0bf7ab43c605 /indra/newview/llvovolume.cpp | |
| parent | a3fd0801c3030ff9a5a6761c9618f381aa965983 (diff) | |
SL-897 - added animated object streaming cost to DebugAnimatedObjects display.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rw-r--r-- | indra/newview/llvovolume.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 3b5129d994..094b0b77dd 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3918,9 +3918,26 @@ F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_v { F32 radius = getScale().length()*0.5f; + // AXON make sure this is consistent with the final simulator-side values. + const F32 ANIMATED_OBJECT_BASE_COST = 10.0f; // placeholder + const F32 ANIMATED_OBJECT_COST_PER_KTRI = 1.0f; //placeholder + + F32 linkset_base_cost = 0.f; + if (isAnimatedObject() && isRootEdit()) + { + // Root object of an animated object has this to account for skeleton overhead. + linkset_base_cost = ANIMATED_OBJECT_BASE_COST; + } if (isMesh()) { - return gMeshRepo.getStreamingCost(getVolume()->getParams().getSculptID(), radius, bytes, visible_bytes, mLOD, unscaled_value); + if (isAnimatedObject() && isRiggedMesh()) + { + return linkset_base_cost + ANIMATED_OBJECT_COST_PER_KTRI * 0.001 * getEstTrianglesStreamingCost(); + } + else + { + return linkset_base_cost + gMeshRepo.getStreamingCost(getVolume()->getParams().getSculptID(), radius, bytes, visible_bytes, mLOD, unscaled_value); + } } else { @@ -3934,7 +3951,7 @@ F32 LLVOVolume::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_v header["medium_lod"]["size"] = counts[2] * 10; header["high_lod"]["size"] = counts[3] * 10; - return LLMeshRepository::getStreamingCost(header, radius, NULL, NULL, -1, unscaled_value); + return linkset_base_cost + LLMeshRepository::getStreamingCost(header, radius, NULL, NULL, -1, unscaled_value); } } |
