aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs43
1 files changed, 18 insertions, 25 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 9451ad9..1abedf5 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -184,6 +184,7 @@ namespace OpenSim.Region.Physics.OdePlugin
184 private float minimumGroundFlightOffset = 3f; 184 private float minimumGroundFlightOffset = 3f;
185 185
186 public bool meshSculptedPrim = true; 186 public bool meshSculptedPrim = true;
187 public bool forceSimplePrimMeshing = false;
187 188
188 public float meshSculptLOD = 32; 189 public float meshSculptLOD = 32;
189 public float MeshSculptphysicalLOD = 16; 190 public float MeshSculptphysicalLOD = 16;
@@ -408,6 +409,7 @@ namespace OpenSim.Region.Physics.OdePlugin
408 bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f); 409 bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f);
409 bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f); 410 bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f);
410 411
412 forceSimplePrimMeshing = physicsconfig.GetBoolean("force_simple_prim_meshing", forceSimplePrimMeshing);
411 meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true); 413 meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true);
412 meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f); 414 meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f);
413 MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f); 415 MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f);
@@ -1429,18 +1431,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1429 PhysicsActor result; 1431 PhysicsActor result;
1430 IMesh mesh = null; 1432 IMesh mesh = null;
1431 1433
1432 //switch (pbs.ProfileShape)
1433 //{
1434 // case ProfileShape.Square:
1435 // //support simple box & hollow box now; later, more shapes
1436 // if (needsMeshing(pbs))
1437 // {
1438 // mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1439 // }
1440
1441 // break;
1442 //}
1443
1444 if (needsMeshing(pbs)) 1434 if (needsMeshing(pbs))
1445 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); 1435 mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical);
1446 1436
@@ -2152,23 +2142,26 @@ namespace OpenSim.Region.Physics.OdePlugin
2152 } 2142 }
2153 2143
2154 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim 2144 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
2155 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) 2145 if (!forceSimplePrimMeshing)
2156 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1 2146 {
2157 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z)) 2147 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
2158 { 2148 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
2159 2149 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z))
2160 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
2161 && pbs.ProfileHollow == 0
2162 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
2163 && pbs.PathBegin == 0 && pbs.PathEnd == 0
2164 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
2165 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
2166 && pbs.PathShearX == 0 && pbs.PathShearY == 0)
2167 { 2150 {
2151
2152 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
2153 && pbs.ProfileHollow == 0
2154 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
2155 && pbs.PathBegin == 0 && pbs.PathEnd == 0
2156 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
2157 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
2158 && pbs.PathShearX == 0 && pbs.PathShearY == 0)
2159 {
2168#if SPAM 2160#if SPAM
2169 m_log.Warn("NonMesh"); 2161 m_log.Warn("NonMesh");
2170#endif 2162#endif
2171 return false; 2163 return false;
2164 }
2172 } 2165 }
2173 } 2166 }
2174 2167