diff options
author | UbitUmarov | 2012-03-11 06:32:06 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-11 06:32:06 +0000 |
commit | 21a76a619f62e76f366d8bfa1f37f776cfb92fa3 (patch) | |
tree | e8ec6257f3ec47232ac6d25c87202ce5745e55ee /OpenSim/Region/Physics/UbitOdePlugin | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
download | opensim-SC-21a76a619f62e76f366d8bfa1f37f776cfb92fa3.zip opensim-SC-21a76a619f62e76f366d8bfa1f37f776cfb92fa3.tar.gz opensim-SC-21a76a619f62e76f366d8bfa1f37f776cfb92fa3.tar.bz2 opensim-SC-21a76a619f62e76f366d8bfa1f37f776cfb92fa3.tar.xz |
initial steps to support physical phantoms
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 28 |
2 files changed, 31 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index 563d527..63b29ba 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | |||
@@ -65,6 +65,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
65 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 65 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
66 | 66 | ||
67 | private bool m_isphysical; | 67 | private bool m_isphysical; |
68 | private bool m_isPhantom; | ||
68 | private bool m_fakeisphysical; | 69 | private bool m_fakeisphysical; |
69 | 70 | ||
70 | protected bool m_building; | 71 | protected bool m_building; |
@@ -831,9 +832,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
831 | 832 | ||
832 | 833 | ||
833 | public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, | 834 | public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, |
834 | Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical) | 835 | Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical,bool pisPhantom,uint plocalID) |
835 | { | 836 | { |
836 | Name = primName; | 837 | Name = primName; |
838 | LocalID = plocalID; | ||
837 | 839 | ||
838 | m_vehicle = null; | 840 | m_vehicle = null; |
839 | 841 | ||
@@ -908,6 +910,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
908 | m_isSelected = false; | 910 | m_isSelected = false; |
909 | m_delaySelect = false; | 911 | m_delaySelect = false; |
910 | 912 | ||
913 | m_isPhantom = pisPhantom; | ||
914 | |||
911 | mu = parent_scene.m_materialContactsData[(int)Material.Wood].mu; | 915 | mu = parent_scene.m_materialContactsData[(int)Material.Wood].mu; |
912 | bounce = parent_scene.m_materialContactsData[(int)Material.Wood].bounce; | 916 | bounce = parent_scene.m_materialContactsData[(int)Material.Wood].bounce; |
913 | 917 | ||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index 14516f9..b111172 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | |||
@@ -1140,12 +1140,29 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1140 | OdePrim newPrim; | 1140 | OdePrim newPrim; |
1141 | lock (OdeLock) | 1141 | lock (OdeLock) |
1142 | { | 1142 | { |
1143 | newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical); | 1143 | newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical,false,localID); |
1144 | |||
1145 | lock (_prims) | ||
1146 | _prims.Add(newPrim); | ||
1147 | } | ||
1148 | return newPrim; | ||
1149 | } | ||
1150 | |||
1151 | private PhysicsActor AddPrim(String name, Vector3 position, Vector3 size, Quaternion rotation, | ||
1152 | PrimitiveBaseShape pbs, bool isphysical, bool isPhantom, uint localID) | ||
1153 | { | ||
1154 | Vector3 pos = position; | ||
1155 | Vector3 siz = size; | ||
1156 | Quaternion rot = rotation; | ||
1157 | |||
1158 | OdePrim newPrim; | ||
1159 | lock (OdeLock) | ||
1160 | { | ||
1161 | newPrim = new OdePrim(name, this, pos, siz, rot, pbs, isphysical,isPhantom,localID); | ||
1144 | 1162 | ||
1145 | lock (_prims) | 1163 | lock (_prims) |
1146 | _prims.Add(newPrim); | 1164 | _prims.Add(newPrim); |
1147 | } | 1165 | } |
1148 | newPrim.LocalID = localID; | ||
1149 | return newPrim; | 1166 | return newPrim; |
1150 | } | 1167 | } |
1151 | 1168 | ||
@@ -1169,6 +1186,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1169 | } | 1186 | } |
1170 | 1187 | ||
1171 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 1188 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
1189 | Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, uint localid) | ||
1190 | { | ||
1191 | return AddPrim(primName, position, size, rotation, pbs, isPhysical, isPhantom, localid); | ||
1192 | } | ||
1193 | |||
1194 | |||
1195 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
1172 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) | 1196 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid) |
1173 | { | 1197 | { |
1174 | #if SPAM | 1198 | #if SPAM |