diff options
author | Melanie | 2012-02-19 20:08:01 +0100 |
---|---|---|
committer | Melanie | 2012-02-19 20:08:01 +0100 |
commit | 96409cc2eeb4555609f72c8bc61fbdf4ac3e9933 (patch) | |
tree | 394a7a07ff913c8efa390399c190d5c65bf8f95b /OpenSim/Region/Physics/Manager | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
parent | moved vehicle from SOG to SOP (diff) | |
download | opensim-SC-96409cc2eeb4555609f72c8bc61fbdf4ac3e9933.zip opensim-SC-96409cc2eeb4555609f72c8bc61fbdf4ac3e9933.tar.gz opensim-SC-96409cc2eeb4555609f72c8bc61fbdf4ac3e9933.tar.bz2 opensim-SC-96409cc2eeb4555609f72c8bc61fbdf4ac3e9933.tar.xz |
Merge branch 'ubitwork'
Conflicts:
OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
OpenSim/Region/Physics/ChOdePlugin/OdePlugin.cs
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r-- | OpenSim/Region/Physics/Manager/IMesher.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/VehicleConstants.cs | 45 |
4 files changed, 86 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 3a9ca1b..cc92484 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs | |||
@@ -65,5 +65,6 @@ namespace OpenSim.Region.Physics.Manager | |||
65 | void releasePinned(); | 65 | void releasePinned(); |
66 | void Append(IMesh newMesh); | 66 | void Append(IMesh newMesh); |
67 | void TransformLinear(float[,] matrix, float[] offset); | 67 | void TransformLinear(float[,] matrix, float[] offset); |
68 | Vector3 GetCentroid(); | ||
68 | } | 69 | } |
69 | } | 70 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 0587054..f525e9e 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -68,6 +68,17 @@ namespace OpenSim.Region.Physics.Manager | |||
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | public struct ContactData | ||
72 | { | ||
73 | public float mu; | ||
74 | public float bounce; | ||
75 | |||
76 | public ContactData(float _mu, float _bounce) | ||
77 | { | ||
78 | mu = _mu; | ||
79 | bounce = _bounce; | ||
80 | } | ||
81 | } | ||
71 | /// <summary> | 82 | /// <summary> |
72 | /// Used to pass collision information to OnCollisionUpdate listeners. | 83 | /// Used to pass collision information to OnCollisionUpdate listeners. |
73 | /// </summary> | 84 | /// </summary> |
@@ -135,6 +146,8 @@ namespace OpenSim.Region.Physics.Manager | |||
135 | /// </summary> | 146 | /// </summary> |
136 | public event CollisionUpdate OnCollisionUpdate; | 147 | public event CollisionUpdate OnCollisionUpdate; |
137 | 148 | ||
149 | public virtual void SetVehicle(object vdata) { } | ||
150 | |||
138 | public event OutOfBounds OnOutOfBounds; | 151 | public event OutOfBounds OnOutOfBounds; |
139 | #pragma warning restore 67 | 152 | #pragma warning restore 67 |
140 | 153 | ||
@@ -142,6 +155,13 @@ namespace OpenSim.Region.Physics.Manager | |||
142 | { | 155 | { |
143 | get { return new NullPhysicsActor(); } | 156 | get { return new NullPhysicsActor(); } |
144 | } | 157 | } |
158 | |||
159 | public virtual bool Building { get; set; } | ||
160 | |||
161 | public virtual ContactData ContactData | ||
162 | { | ||
163 | get { return new ContactData(0, 0); } | ||
164 | } | ||
145 | 165 | ||
146 | public abstract bool Stopped { get; } | 166 | public abstract bool Stopped { get; } |
147 | 167 | ||
@@ -195,6 +215,11 @@ namespace OpenSim.Region.Physics.Manager | |||
195 | } | 215 | } |
196 | } | 216 | } |
197 | 217 | ||
218 | public virtual byte[] Serialize(bool PhysIsRunning) | ||
219 | { | ||
220 | return new byte[0]; | ||
221 | } | ||
222 | |||
198 | public virtual void RaiseOutOfBounds(Vector3 pos) | 223 | public virtual void RaiseOutOfBounds(Vector3 pos) |
199 | { | 224 | { |
200 | // Make a temporary copy of the event to avoid possibility of | 225 | // Make a temporary copy of the event to avoid possibility of |
@@ -554,5 +579,6 @@ namespace OpenSim.Region.Physics.Manager | |||
554 | { | 579 | { |
555 | return false; | 580 | return false; |
556 | } | 581 | } |
582 | |||
557 | } | 583 | } |
558 | } | 584 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 514d9ad..0346d4e 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -128,6 +128,12 @@ namespace OpenSim.Region.Physics.Manager | |||
128 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 128 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
129 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); | 129 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); |
130 | 130 | ||
131 | public virtual PhysicsActor AddPrimShape(string primName, PhysicsActor parent, PrimitiveBaseShape pbs, Vector3 position, | ||
132 | uint localid, byte[] sdata) | ||
133 | { | ||
134 | return null; | ||
135 | } | ||
136 | |||
131 | public virtual float TimeDilation | 137 | public virtual float TimeDilation |
132 | { | 138 | { |
133 | get { return 1.0f; } | 139 | get { return 1.0f; } |
@@ -225,7 +231,7 @@ namespace OpenSim.Region.Physics.Manager | |||
225 | } | 231 | } |
226 | 232 | ||
227 | public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {} | 233 | public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {} |
228 | 234 | public virtual void CombineTerrain(float[] heightMap, Vector3 pOffset) {} | |
229 | public virtual void UnCombine(PhysicsScene pScene) {} | 235 | public virtual void UnCombine(PhysicsScene pScene) {} |
230 | 236 | ||
231 | /// <summary> | 237 | /// <summary> |
@@ -263,5 +269,13 @@ namespace OpenSim.Region.Physics.Manager | |||
263 | { | 269 | { |
264 | return new List<ContactResult>(); | 270 | return new List<ContactResult>(); |
265 | } | 271 | } |
272 | |||
273 | public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, RaycastCallback retMethod){} | ||
274 | public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod) { } | ||
275 | public virtual List<ContactResult> RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count) | ||
276 | { | ||
277 | return new List<ContactResult>(); | ||
278 | } | ||
279 | |||
266 | } | 280 | } |
267 | } | 281 | } |
diff --git a/OpenSim/Region/Physics/Manager/VehicleConstants.cs b/OpenSim/Region/Physics/Manager/VehicleConstants.cs index f0775c1..8e24b4c 100644 --- a/OpenSim/Region/Physics/Manager/VehicleConstants.cs +++ b/OpenSim/Region/Physics/Manager/VehicleConstants.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | ||
29 | 30 | ||
30 | namespace OpenSim.Region.Physics.Manager | 31 | namespace OpenSim.Region.Physics.Manager |
31 | { | 32 | { |
@@ -117,5 +118,47 @@ namespace OpenSim.Region.Physics.Manager | |||
117 | NO_DEFLECTION = 16392, | 118 | NO_DEFLECTION = 16392, |
118 | LOCK_ROTATION = 32784 | 119 | LOCK_ROTATION = 32784 |
119 | } | 120 | } |
120 | 121 | ||
122 | public struct VehicleData | ||
123 | { | ||
124 | public Vehicle m_type; | ||
125 | public VehicleFlag m_flags; | ||
126 | |||
127 | // Linear properties | ||
128 | public Vector3 m_linearMotorDirection; | ||
129 | public Vector3 m_linearFrictionTimescale; | ||
130 | public float m_linearMotorDecayTimescale; | ||
131 | public float m_linearMotorTimescale; | ||
132 | public Vector3 m_linearMotorOffset; | ||
133 | |||
134 | //Angular properties | ||
135 | public Vector3 m_angularMotorDirection; | ||
136 | public float m_angularMotorTimescale; | ||
137 | public float m_angularMotorDecayTimescale; | ||
138 | public Vector3 m_angularFrictionTimescale; | ||
139 | |||
140 | //Deflection properties | ||
141 | public float m_angularDeflectionEfficiency; | ||
142 | public float m_angularDeflectionTimescale; | ||
143 | public float m_linearDeflectionEfficiency; | ||
144 | public float m_linearDeflectionTimescale; | ||
145 | |||
146 | //Banking properties | ||
147 | public float m_bankingEfficiency; | ||
148 | public float m_bankingMix; | ||
149 | public float m_bankingTimescale; | ||
150 | |||
151 | //Hover and Buoyancy properties | ||
152 | public float m_VhoverHeight; | ||
153 | public float m_VhoverEfficiency; | ||
154 | public float m_VhoverTimescale; | ||
155 | public float m_VehicleBuoyancy; | ||
156 | |||
157 | //Attractor properties | ||
158 | public float m_verticalAttractionEfficiency; | ||
159 | public float m_verticalAttractionTimescale; | ||
160 | |||
161 | // Axis | ||
162 | public Quaternion m_referenceFrame; | ||
163 | } | ||
121 | } | 164 | } |