aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.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/ODEPrim.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 '')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 39b89d3..fd2f88f 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Physics.OdePlugin
163 public IntPtr collide_geom; // for objects: geom if single prim space it linkset 163 public IntPtr collide_geom; // for objects: geom if single prim space it linkset
164 164
165 private float m_density = 10.000006836f; // Aluminum g/cm3; 165 private float m_density = 10.000006836f; // Aluminum g/cm3;
166 166 private byte m_shapetype;
167 public bool _zeroFlag; 167 public bool _zeroFlag;
168 private bool m_lastUpdateSent; 168 private bool m_lastUpdateSent;
169 169
@@ -846,7 +846,7 @@ namespace OpenSim.Region.Physics.OdePlugin
846 846
847 847
848 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, 848 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size,
849 Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical,bool pisPhantom,uint plocalID) 849 Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical,bool pisPhantom,byte _shapeType,uint plocalID)
850 { 850 {
851 Name = primName; 851 Name = primName;
852 LocalID = plocalID; 852 LocalID = plocalID;
@@ -920,6 +920,8 @@ namespace OpenSim.Region.Physics.OdePlugin
920 hasOOBoffsetFromMesh = false; 920 hasOOBoffsetFromMesh = false;
921 _triMeshData = IntPtr.Zero; 921 _triMeshData = IntPtr.Zero;
922 922
923 m_shapetype = _shapeType;
924
923 m_lastdoneSelected = false; 925 m_lastdoneSelected = false;
924 m_isSelected = false; 926 m_isSelected = false;
925 m_delaySelect = false; 927 m_delaySelect = false;
@@ -1050,7 +1052,13 @@ namespace OpenSim.Region.Physics.OdePlugin
1050 } 1052 }
1051 } 1053 }
1052 1054
1053 IMesh mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, (int)LevelOfDetail.High, true); 1055 bool convex;
1056 if (m_shapetype == 0)
1057 convex = false;
1058 else
1059 convex = true;
1060
1061 IMesh mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, (int)LevelOfDetail.High, true,convex);
1054 if (mesh == null) 1062 if (mesh == null)
1055 { 1063 {
1056 m_log.WarnFormat("[PHYSICS]: CreateMesh Failed on prim {0} at <{1},{2},{3}>.", Name, _position.X, _position.Y, _position.Z); 1064 m_log.WarnFormat("[PHYSICS]: CreateMesh Failed on prim {0} at <{1},{2},{3}>.", Name, _position.X, _position.Y, _position.Z);