aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-03-21 01:46:41 +0000
committerUbitUmarov2012-03-21 01:46:41 +0000
commit11ed932263161d1dbea99d4a5699ba6d00894053 (patch)
tree85e26ea10f899ff4a52b7a0c9000daa808cf8282 /OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
parentadd convex state to mesh key, so a change is detected. (diff)
downloadopensim-SC_OLD-11ed932263161d1dbea99d4a5699ba6d00894053.zip
opensim-SC_OLD-11ed932263161d1dbea99d4a5699ba6d00894053.tar.gz
opensim-SC_OLD-11ed932263161d1dbea99d4a5699ba6d00894053.tar.bz2
opensim-SC_OLD-11ed932263161d1dbea99d4a5699ba6d00894053.tar.xz
Tell physics about physics shape when creating. Added some virtual methods to get/set density,gravmod, frition,bounce and shape type ( not in use ). UbitOde now should do convex type on creation or everytime the mesh is changed ( as in change size, shape, etc )
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index 612eafd..76d7746 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1141,7 +1141,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1141 OdePrim newPrim; 1141 OdePrim newPrim;
1142 lock (OdeLock) 1142 lock (OdeLock)
1143 { 1143 {
1144 newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical,false,localID); 1144 newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical,false,0,localID);
1145 1145
1146 lock (_prims) 1146 lock (_prims)
1147 _prims.Add(newPrim); 1147 _prims.Add(newPrim);
@@ -1159,7 +1159,25 @@ namespace OpenSim.Region.Physics.OdePlugin
1159 OdePrim newPrim; 1159 OdePrim newPrim;
1160 lock (OdeLock) 1160 lock (OdeLock)
1161 { 1161 {
1162 newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical,isPhantom,localID); 1162 newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical, isPhantom, 0, localID);
1163
1164 lock (_prims)
1165 _prims.Add(newPrim);
1166 }
1167 return newPrim;
1168 }
1169
1170 private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation,
1171 PrimitiveBaseShape pbs, bool isphysical, bool isPhantom, byte shapeType, uint localID)
1172 {
1173 Vector3 pos = position;
1174 Vector3 siz = size;
1175 Quaternion rot = rotation;
1176
1177 OdePrim newPrim;
1178 lock (OdeLock)
1179 {
1180 newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical, isPhantom, shapeType, localID);
1163 1181
1164 lock (_prims) 1182 lock (_prims)
1165 _prims.Add(newPrim); 1183 _prims.Add(newPrim);
@@ -1203,6 +1221,16 @@ namespace OpenSim.Region.Physics.OdePlugin
1203 return AddPrim(primName, position, size, rotation, pbs, isPhysical, localid); 1221 return AddPrim(primName, position, size, rotation, pbs, isPhysical, localid);
1204 } 1222 }
1205 1223
1224 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1225 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapeType, uint localid)
1226 {
1227#if SPAM
1228 m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
1229#endif
1230
1231 return AddPrim(primName, position, size, rotation, pbs, isPhysical,isPhantom, shapeType, localid);
1232 }
1233
1206 public override float TimeDilation 1234 public override float TimeDilation
1207 { 1235 {
1208 get { return m_timeDilation; } 1236 get { return m_timeDilation; }