diff options
author | Teravus Ovares | 2008-05-16 20:16:33 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-16 20:16:33 +0000 |
commit | 00a1f0bab0d764017677672c19d4509c1af3e622 (patch) | |
tree | 7faeea9a37a86ae2395f3d87625ca255a1c0bf25 /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |
parent | prime the wearables structure, which should fix the exception (diff) | |
download | opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.zip opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.tar.gz opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.tar.bz2 opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.tar.xz |
* This finishes the ODE options section of the OpenSim.ini.example. I've added 44 configurable options!
* This includes if you want to mesh sculpties and the Level of detail on the sculptie meshing for non physical and a separate LOD on physical sculpties.
* The options range from gravity.. to avatar movement speed, to friction management.. to object density.. to update throttling.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index c663fb0..70f0785 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -171,6 +171,25 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
171 | private float avMovementDivisorWalk = 1.3f; | 171 | private float avMovementDivisorWalk = 1.3f; |
172 | private float avMovementDivisorRun = 0.8f; | 172 | private float avMovementDivisorRun = 0.8f; |
173 | 173 | ||
174 | public bool meshSculptedPrim = true; | ||
175 | |||
176 | public float meshSculptLOD = 32; | ||
177 | public float MeshSculptphysicalLOD = 16; | ||
178 | |||
179 | public float geomDefaultDensity = 10.000006836f; | ||
180 | |||
181 | public int geomContactPointsStartthrottle = 3; | ||
182 | public int geomUpdatesPerThrottledUpdate = 15; | ||
183 | |||
184 | public float bodyPIDD = 35f; | ||
185 | public float bodyPIDG = 25; | ||
186 | |||
187 | public int geomCrossingFailuresBeforeOutofbounds = 5; | ||
188 | |||
189 | public float bodyMotorJointMaxforceTensor = 2; | ||
190 | |||
191 | public int bodyFramesAutoDisable = 20; | ||
192 | |||
174 | private float[] _heightmap; | 193 | private float[] _heightmap; |
175 | 194 | ||
176 | private float[] _watermap; | 195 | private float[] _watermap; |
@@ -320,17 +339,35 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
320 | avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); | 339 | avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); |
321 | avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); | 340 | avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); |
322 | 341 | ||
342 | geomContactPointsStartthrottle = physicsconfig.GetInt("geom_contactpoints_start_throttling", 3); | ||
343 | geomUpdatesPerThrottledUpdate = physicsconfig.GetInt("geom_updates_before_throttled_update", 15); | ||
344 | geomCrossingFailuresBeforeOutofbounds = physicsconfig.GetInt("geom_crossing_faiures_before_outofbounds", 5); | ||
345 | |||
346 | geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", 10.000006836f); | ||
347 | bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", 20); | ||
348 | |||
349 | bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f); | ||
350 | bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f); | ||
351 | |||
352 | meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true); | ||
353 | meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f); | ||
354 | MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f); | ||
355 | |||
356 | |||
323 | if (Environment.OSVersion.Platform == PlatformID.Unix) | 357 | if (Environment.OSVersion.Platform == PlatformID.Unix) |
324 | { | 358 | { |
325 | avPIDD = physicsconfig.GetFloat("av_pid_derivative_linux", 3200.0f); | 359 | avPIDD = physicsconfig.GetFloat("av_pid_derivative_linux", 3200.0f); |
326 | avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 1400.0f); | 360 | avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 1400.0f); |
327 | avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f); | 361 | avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f); |
362 | bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_linux", 2f); | ||
363 | |||
328 | } | 364 | } |
329 | else | 365 | else |
330 | { | 366 | { |
331 | avPIDD = physicsconfig.GetFloat("av_pid_derivative_win", 2200.0f); | 367 | avPIDD = physicsconfig.GetFloat("av_pid_derivative_win", 2200.0f); |
332 | avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f); | 368 | avPIDP = physicsconfig.GetFloat("av_pid_proportional_win", 900.0f); |
333 | avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f); | 369 | avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_win", 550000f); |
370 | bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_win", 5f); | ||
334 | } | 371 | } |
335 | } | 372 | } |
336 | } | 373 | } |
@@ -765,7 +802,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
765 | d.JointAttach(joint, b1, b2); | 802 | d.JointAttach(joint, b1, b2); |
766 | } | 803 | } |
767 | collision_accounting_events(p1, p2, max_collision_depth); | 804 | collision_accounting_events(p1, p2, max_collision_depth); |
768 | if (count > 3) | 805 | if (count > geomContactPointsStartthrottle) |
769 | { | 806 | { |
770 | // If there are more then 3 contact points, it's likely | 807 | // If there are more then 3 contact points, it's likely |
771 | // that we've got a pile of objects | 808 | // that we've got a pile of objects |
@@ -1117,7 +1154,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1117 | /// support simple box & hollow box now; later, more shapes | 1154 | /// support simple box & hollow box now; later, more shapes |
1118 | if (needsMeshing(pbs)) | 1155 | if (needsMeshing(pbs)) |
1119 | { | 1156 | { |
1120 | mesh = mesher.CreateMesh(primName, pbs, size); | 1157 | mesh = mesher.CreateMesh(primName, pbs, size, 32f); |
1121 | } | 1158 | } |
1122 | 1159 | ||
1123 | break; | 1160 | break; |
@@ -1474,6 +1511,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1474 | /// <returns></returns> | 1511 | /// <returns></returns> |
1475 | public bool needsMeshing(PrimitiveBaseShape pbs) | 1512 | public bool needsMeshing(PrimitiveBaseShape pbs) |
1476 | { | 1513 | { |
1514 | if (pbs.SculptEntry && !meshSculptedPrim) | ||
1515 | { | ||
1516 | return false; | ||
1517 | } | ||
1518 | |||
1477 | if (pbs.ProfileHollow != 0) | 1519 | if (pbs.ProfileHollow != 0) |
1478 | return true; | 1520 | return true; |
1479 | 1521 | ||
@@ -1495,7 +1537,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1495 | return true; | 1537 | return true; |
1496 | 1538 | ||
1497 | if (pbs.ProfileShape == ProfileShape.EquilateralTriangle) | 1539 | if (pbs.ProfileShape == ProfileShape.EquilateralTriangle) |
1498 | return true; | 1540 | return true; |
1541 | |||
1542 | |||
1499 | 1543 | ||
1500 | return false; | 1544 | return false; |
1501 | } | 1545 | } |