aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-23 11:42:55 +0000
committerTeravus Ovares2008-02-23 11:42:55 +0000
commit27508c1ad87786935dbf28aa217bcbe55a9aa645 (patch)
tree0ae701c00cb8e92ab6416fb6688afeb536960b6e /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
parent* Reduced size of 'startup complete message' by several thousand lines. (diff)
downloadopensim-SC_OLD-27508c1ad87786935dbf28aa217bcbe55a9aa645.zip
opensim-SC_OLD-27508c1ad87786935dbf28aa217bcbe55a9aa645.tar.gz
opensim-SC_OLD-27508c1ad87786935dbf28aa217bcbe55a9aa645.tar.bz2
opensim-SC_OLD-27508c1ad87786935dbf28aa217bcbe55a9aa645.tar.xz
* Added Support within the ODEPlugin for Selected. Which means that;
* When you select a physical prim, it stops while you've got it selected. * When you move or alter a prim in some manner, it doesn't become collidable until you de-select it * When you select a prim, it doesn't become temporarily 'phantom' until you make some change to it while it's selected. (this prevents accidental selections in prim floor from causing it to go phantom on you(but don't move it or you'll fall)) * There's one major difference, and that's a physical object won't stop if you don't have permission to edit it. This prevents people who don't have edit permissions on a prim from stopping it while it's moving.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index b3780fd..76bd3f2 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -78,6 +78,21 @@ namespace OpenSim.Region.Physics.OdePlugin
78 } 78 }
79 } 79 }
80 80
81 [Flags]
82 public enum CollisionCategories : int
83 {
84 Disabled = 0,
85 Geom = 0x00000001,
86 Body = 0x00000002,
87 Space = 0x00000004,
88 Character = 0x00000008,
89 Land = 0x00000010,
90 Water = 0x00000020,
91 Wind = 0x00000040,
92 Sensor = 0x00000080,
93 Selected = 0x00000100
94 }
95
81 public class OdeScene : PhysicsScene 96 public class OdeScene : PhysicsScene
82 { 97 {
83 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 98 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@@ -997,6 +1012,7 @@ namespace OpenSim.Region.Physics.OdePlugin
997 { 1012 {
998 // creating a new space for prim and inserting it into main space. 1013 // creating a new space for prim and inserting it into main space.
999 staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero); 1014 staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero);
1015 d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space);
1000 waitForSpaceUnlock(space); 1016 waitForSpaceUnlock(space);
1001 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); 1017 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
1002 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; 1018 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
@@ -1656,6 +1672,12 @@ namespace OpenSim.Region.Physics.OdePlugin
1656 offset, thickness, wrap); 1672 offset, thickness, wrap);
1657 d.GeomHeightfieldDataSetBounds(HeightmapData, m_regionWidth, m_regionHeight); 1673 d.GeomHeightfieldDataSetBounds(HeightmapData, m_regionWidth, m_regionHeight);
1658 LandGeom = d.CreateHeightfield(space, HeightmapData, 1); 1674 LandGeom = d.CreateHeightfield(space, HeightmapData, 1);
1675 if (LandGeom != (IntPtr)0)
1676 {
1677 d.GeomSetCategoryBits(LandGeom, (int)(CollisionCategories.Land));
1678 d.GeomSetCollideBits(LandGeom, (int)(CollisionCategories.Space));
1679
1680 }
1659 geom_name_map[LandGeom] = "Terrain"; 1681 geom_name_map[LandGeom] = "Terrain";
1660 1682
1661 d.Matrix3 R = new d.Matrix3(); 1683 d.Matrix3 R = new d.Matrix3();