aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
index fb22694..eb1ab45 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.ClientStack.Linden
51{ 51{
52 public struct ModelPrimLimits 52 public struct ModelPrimLimits
53 { 53 {
54 54
55 } 55 }
56 56
57 public class ModelCost 57 public class ModelCost
@@ -82,9 +82,9 @@ namespace OpenSim.Region.ClientStack.Linden
82 const float lowestSizeWth = 2f; // 3x 82 const float lowestSizeWth = 2f; // 3x
83 // favor potencially physical optimized meshs versus automatic decomposition 83 // favor potencially physical optimized meshs versus automatic decomposition
84 const float physMeshSizeWth = 6f; // counts 7x 84 const float physMeshSizeWth = 6f; // counts 7x
85 const float physHullSizeWth = 8f; // counts 9x 85 const float physHullSizeWth = 8f; // counts 9x
86 86
87 // stream cost area factors 87 // stream cost area factors
88 // more or less like SL 88 // more or less like SL
89 const float highLodFactor = 17.36f; 89 const float highLodFactor = 17.36f;
90 const float midLodFactor = 277.78f; 90 const float midLodFactor = 277.78f;
@@ -108,7 +108,7 @@ namespace OpenSim.Region.ClientStack.Linden
108 PrimScaleMin = scene.m_minNonphys; 108 PrimScaleMin = scene.m_minNonphys;
109 NonPhysicalPrimScaleMax = scene.m_maxNonphys; 109 NonPhysicalPrimScaleMax = scene.m_maxNonphys;
110 PhysicalPrimScaleMax = scene.m_maxPhys; 110 PhysicalPrimScaleMax = scene.m_maxPhys;
111 ObjectLinkedPartsMax = scene.m_linksetCapacity; 111 ObjectLinkedPartsMax = scene.m_linksetCapacity;
112 } 112 }
113 113
114 public void Econfig(IConfig EconomyConfig) 114 public void Econfig(IConfig EconomyConfig)
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack.Linden
121 bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost); 121 bytecost = EconomyConfig.GetFloat("ModelMeshByteCost", bytecost);
122 } 122 }
123 123
124 // storage for a single mesh asset cost parameters 124 // storage for a single mesh asset cost parameters
125 private class ameshCostParam 125 private class ameshCostParam
126 { 126 {
127 // LOD sizes for size dependent streaming cost 127 // LOD sizes for size dependent streaming cost
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.Linden
140 // resources input LLSD request 140 // resources input LLSD request
141 // basicCost input region assets upload cost 141 // basicCost input region assets upload cost
142 // totalcost returns model total upload fee 142 // totalcost returns model total upload fee
143 // meshcostdata returns detailed costs for viewer 143 // meshcostdata returns detailed costs for viewer
144 // avatarSkeleton if mesh includes a avatar skeleton 144 // avatarSkeleton if mesh includes a avatar skeleton
145 // useAvatarCollider if we should use physics mesh for avatar 145 // useAvatarCollider if we should use physics mesh for avatar
146 public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost, 146 public bool MeshModelCost(LLSDAssetResource resources, int basicCost, out int totalcost,
@@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden
150 error = string.Empty; 150 error = string.Empty;
151 151
152 bool avatarSkeleton = false; 152 bool avatarSkeleton = false;
153 153
154 if (resources == null || 154 if (resources == null ||
155 resources.instance_list == null || 155 resources.instance_list == null ||
156 resources.instance_list.Array.Count == 0) 156 resources.instance_list.Array.Count == 0)
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack.Linden
203 if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0) 203 if (resources.mesh_list != null && resources.mesh_list.Array.Count > 0)
204 { 204 {
205 numberMeshs = resources.mesh_list.Array.Count; 205 numberMeshs = resources.mesh_list.Array.Count;
206 206
207 for (int i = 0; i < numberMeshs; i++) 207 for (int i = 0; i < numberMeshs; i++)
208 { 208 {
209 ameshCostParam curCost = new ameshCostParam(); 209 ameshCostParam curCost = new ameshCostParam();
@@ -230,7 +230,7 @@ namespace OpenSim.Region.ClientStack.Linden
230 } 230 }
231 231
232 // instances (prims) cost 232 // instances (prims) cost
233 233
234 234
235 int mesh; 235 int mesh;
236 int skipedSmall = 0; 236 int skipedSmall = 0;
@@ -331,7 +331,7 @@ namespace OpenSim.Region.ClientStack.Linden
331 331
332 // breakdown prices 332 // breakdown prices
333 // don't seem to be in use so removed code for now 333 // don't seem to be in use so removed code for now
334 334
335 return true; 335 return true;
336 } 336 }
337 337
@@ -404,7 +404,7 @@ namespace OpenSim.Region.ClientStack.Linden
404 int sksize = tmpmap["size"].AsInteger(); 404 int sksize = tmpmap["size"].AsInteger();
405 if(sksize > 0) 405 if(sksize > 0)
406 skeleton = true; 406 skeleton = true;
407 } 407 }
408 } 408 }
409 409
410 if (map.ContainsKey("physics_convex")) 410 if (map.ContainsKey("physics_convex"))
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.Linden
429 } 429 }
430 430
431 submesh_offset = -1; 431 submesh_offset = -1;
432 432
433 // only look for LOD meshs sizes 433 // only look for LOD meshs sizes
434 434
435 if (map.ContainsKey("high_lod")) 435 if (map.ContainsKey("high_lod"))
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ClientStack.Linden
518 cost.physicsCost = 0.04f * phys_hullsvertices; 518 cost.physicsCost = 0.04f * phys_hullsvertices;
519 519
520 float sfee; 520 float sfee;
521 521
522 sfee = data.Length; // start with total compressed data size 522 sfee = data.Length; // start with total compressed data size
523 523
524 // penalize lod meshs that should be more builder optimized 524 // penalize lod meshs that should be more builder optimized
@@ -535,7 +535,7 @@ namespace OpenSim.Region.ClientStack.Linden
535 535
536 // bytes to money 536 // bytes to money
537 sfee *= bytecost; 537 sfee *= bytecost;
538 538
539 cost.costFee = sfee; 539 cost.costFee = sfee;
540 return true; 540 return true;
541 } 541 }
@@ -675,7 +675,7 @@ namespace OpenSim.Region.ClientStack.Linden
675 return true; 675 return true;
676 } 676 }
677 677
678 // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length 678 // returns streaming cost from on mesh LODs sizes in curCost and square of prim size length
679 private float streamingCost(ameshCostParam curCost, float sqdiam) 679 private float streamingCost(ameshCostParam curCost, float sqdiam)
680 { 680 {
681 // compute efective areas 681 // compute efective areas