aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-07-22 01:31:39 +0100
committerUbitUmarov2017-07-22 01:31:39 +0100
commitd71d13f72be9a342869406aae4139f38e01ef05f (patch)
tree2fff4283d477dc6eefbc142102df0cd9b1cbb26f /OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
parentubOde remove ols pseudo convex for sculpts (diff)
downloadopensim-SC_OLD-d71d13f72be9a342869406aae4139f38e01ef05f.zip
opensim-SC_OLD-d71d13f72be9a342869406aae4139f38e01ef05f.tar.gz
opensim-SC_OLD-d71d13f72be9a342869406aae4139f38e01ef05f.tar.bz2
opensim-SC_OLD-d71d13f72be9a342869406aae4139f38e01ef05f.tar.xz
ubOde: represent small objects as a box. A object is small is all scale dimensions are less or equal to option MinSizeToMeshmerize (in ODEPhysicsSettings) with default of 0.1. This is needed because this objects hit narrow phase with high overlaps alot more, and so have high cpu cost.
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
index 76ef88b..b191dbc 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEPrim.cs
@@ -1733,7 +1733,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1733 return true; 1733 return true;
1734 } 1734 }
1735 1735
1736 private void CreateGeom() 1736 private void CreateGeom(bool OverrideToBox)
1737 { 1737 {
1738 bool hasMesh = false; 1738 bool hasMesh = false;
1739 1739
@@ -1742,7 +1742,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1742 if ((m_meshState & MeshState.MeshNoColide) != 0) 1742 if ((m_meshState & MeshState.MeshNoColide) != 0)
1743 m_NoColide = true; 1743 m_NoColide = true;
1744 1744
1745 else if(m_mesh != null) 1745 else if(!OverrideToBox && m_mesh != null)
1746 { 1746 {
1747 if (GetMeshGeom()) 1747 if (GetMeshGeom())
1748 hasMesh = true; 1748 hasMesh = true;
@@ -1755,7 +1755,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1755 { 1755 {
1756 IntPtr geo = IntPtr.Zero; 1756 IntPtr geo = IntPtr.Zero;
1757 1757
1758 if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1 1758 if (!OverrideToBox && _pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1
1759 && _size.X == _size.Y && _size.Y == _size.Z) 1759 && _size.X == _size.Y && _size.Y == _size.Z)
1760 { // it's a sphere 1760 { // it's a sphere
1761 try 1761 try
@@ -3180,7 +3180,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3180 3180
3181 primVolume = repData.volume; 3181 primVolume = repData.volume;
3182 3182
3183 CreateGeom(); 3183 CreateGeom(repData.isTooSmall);
3184 3184
3185 if (prim_geom != IntPtr.Zero) 3185 if (prim_geom != IntPtr.Zero)
3186 { 3186 {
@@ -3256,7 +3256,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
3256 3256
3257 primVolume = repData.volume; 3257 primVolume = repData.volume;
3258 3258
3259 CreateGeom(); 3259 CreateGeom(repData.isTooSmall);
3260 3260
3261 if (prim_geom != IntPtr.Zero) 3261 if (prim_geom != IntPtr.Zero)
3262 { 3262 {