aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/SharedBase
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/PhysicsModules/SharedBase')
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs29
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs227
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs66
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs45
4 files changed, 277 insertions, 90 deletions
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
index 5c75307..88169bb 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Runtime.InteropServices;
30using OpenSim.Framework; 31using OpenSim.Framework;
31using OpenMetaverse; 32using OpenMetaverse;
32 33
@@ -36,7 +37,12 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
36 { 37 {
37 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); 38 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod);
38 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); 39 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical);
39 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool shouldCache); 40 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde);
41 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool shouldCache, bool convex, bool forOde);
42 IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex);
43 void ReleaseMesh(IMesh mesh);
44 void ExpireReleaseMeshs();
45 void ExpireFileCache();
40 } 46 }
41 47
42 // Values for level of detail to be passed to the mesher. 48 // Values for level of detail to be passed to the mesher.
@@ -54,6 +60,25 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
54 { 60 {
55 } 61 }
56 62
63 [Serializable()]
64 [StructLayout(LayoutKind.Explicit)]
65 public struct AMeshKey
66 {
67 [FieldOffset(0)]
68 public UUID uuid;
69 [FieldOffset(0)]
70 public ulong hashA;
71 [FieldOffset(8)]
72 public ulong hashB;
73 [FieldOffset(16)]
74 public ulong hashC;
75
76 public override string ToString()
77 {
78 return uuid.ToString() + "-" + hashC.ToString("x") ;
79 }
80 }
81
57 public interface IMesh 82 public interface IMesh
58 { 83 {
59 List<Vector3> getVertexList(); 84 List<Vector3> getVertexList();
@@ -67,5 +92,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
67 void releasePinned(); 92 void releasePinned();
68 void Append(IMesh newMesh); 93 void Append(IMesh newMesh);
69 void TransformLinear(float[,] matrix, float[] offset); 94 void TransformLinear(float[,] matrix, float[] offset);
95 Vector3 GetCentroid();
96 Vector3 GetOBB();
70 } 97 }
71} 98}
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
index c04ff58..edc41e4 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs
@@ -43,7 +43,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
43 Unknown = 0, 43 Unknown = 0,
44 Agent = 1, 44 Agent = 1,
45 Prim = 2, 45 Prim = 2,
46 Ground = 3 46 Ground = 3,
47 Water = 4
47 } 48 }
48 49
49 public enum PIDHoverType 50 public enum PIDHoverType
@@ -59,15 +60,41 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
59 public Vector3 Position; 60 public Vector3 Position;
60 public Vector3 SurfaceNormal; 61 public Vector3 SurfaceNormal;
61 public float PenetrationDepth; 62 public float PenetrationDepth;
63 public float RelativeSpeed;
64 public bool CharacterFeet;
62 65
63 public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth) 66 public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth)
64 { 67 {
65 Position = position; 68 Position = position;
66 SurfaceNormal = surfaceNormal; 69 SurfaceNormal = surfaceNormal;
67 PenetrationDepth = penetrationDepth; 70 PenetrationDepth = penetrationDepth;
71 RelativeSpeed = 0f; // for now let this one be set explicity
72 CharacterFeet = true; // keep other plugins work as before
73 }
74
75 public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth, bool feet)
76 {
77 Position = position;
78 SurfaceNormal = surfaceNormal;
79 PenetrationDepth = penetrationDepth;
80 RelativeSpeed = 0f; // for now let this one be set explicity
81 CharacterFeet = feet; // keep other plugins work as before
68 } 82 }
69 } 83 }
70 84
85 public struct ContactData
86 {
87 public float mu;
88 public float bounce;
89 public bool softcolide;
90
91 public ContactData(float _mu, float _bounce, bool _softcolide)
92 {
93 mu = _mu;
94 bounce = _bounce;
95 softcolide = _softcolide;
96 }
97 }
71 /// <summary> 98 /// <summary>
72 /// Used to pass collision information to OnCollisionUpdate listeners. 99 /// Used to pass collision information to OnCollisionUpdate listeners.
73 /// </summary> 100 /// </summary>
@@ -99,7 +126,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
99 m_objCollisionList.Add(localID, contact); 126 m_objCollisionList.Add(localID, contact);
100 } 127 }
101 else 128 else
102 { 129 {
103 if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth) 130 if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth)
104 m_objCollisionList[localID] = contact; 131 m_objCollisionList[localID] = contact;
105 } 132 }
@@ -135,6 +162,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
135 /// </summary> 162 /// </summary>
136 public event CollisionUpdate OnCollisionUpdate; 163 public event CollisionUpdate OnCollisionUpdate;
137 164
165 public virtual void SetVehicle(object vdata) { }
166
138 public event OutOfBounds OnOutOfBounds; 167 public event OutOfBounds OnOutOfBounds;
139#pragma warning restore 67 168#pragma warning restore 67
140 169
@@ -142,11 +171,32 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
142 { 171 {
143 get { return new NullPhysicsActor(); } 172 get { return new NullPhysicsActor(); }
144 } 173 }
174
175 public virtual bool Building { get; set; }
176
177 public virtual void getContactData(ref ContactData cdata)
178 {
179 cdata.mu = 0;
180 cdata.bounce = 0;
181 }
145 182
146 public abstract bool Stopped { get; } 183 public abstract bool Stopped { get; }
147 184
148 public abstract Vector3 Size { get; set; } 185 public abstract Vector3 Size { get; set; }
149 186
187 public virtual void setAvatarSize(Vector3 size, float feetOffset)
188 {
189 Size = size;
190 }
191
192 public virtual bool Phantom { get; set; }
193
194 public virtual bool IsVolumeDtc
195 {
196 get { return false; }
197 set { return; }
198 }
199
150 public virtual byte PhysicsShapeType { get; set; } 200 public virtual byte PhysicsShapeType { get; set; }
151 201
152 public abstract PrimitiveBaseShape Shape { set; } 202 public abstract PrimitiveBaseShape Shape { set; }
@@ -169,7 +219,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
169 /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or 219 /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or
170 /// water. This is not a problem due to the formatting of names given by prims and avatars. 220 /// water. This is not a problem due to the formatting of names given by prims and avatars.
171 /// </remarks> 221 /// </remarks>
172 public string Name { get; protected set; } 222 public string Name { get; set; }
173 223
174 /// <summary> 224 /// <summary>
175 /// This is being used by ODE joint code. 225 /// This is being used by ODE joint code.
@@ -253,6 +303,51 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
253 public abstract Vector3 GeometricCenter { get; } 303 public abstract Vector3 GeometricCenter { get; }
254 public abstract Vector3 CenterOfMass { get; } 304 public abstract Vector3 CenterOfMass { get; }
255 305
306 public virtual Vector3 OOBsize
307 {
308 get
309 {
310 Vector3 s=Size;
311 s.X *=0.5f;
312 s.Y *=0.5f;
313 s.Z *=0.5f;
314 return s;
315 }
316 }
317
318 public virtual Vector3 OOBoffset
319 {
320 get
321 {
322 return Vector3.Zero;
323 }
324 }
325
326 public virtual float OOBRadiusSQ
327 {
328 get
329 {
330 return Size.LengthSquared() * 0.25f; // ((0.5^2)
331 }
332 }
333
334
335 public virtual float PhysicsCost
336 {
337 get
338 {
339 return 0.1f;
340 }
341 }
342
343 public virtual float StreamCost
344 {
345 get
346 {
347 return 1.0f;
348 }
349 }
350
256 /// <summary> 351 /// <summary>
257 /// The desired velocity of this actor. 352 /// The desired velocity of this actor.
258 /// </summary> 353 /// </summary>
@@ -314,6 +409,12 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
314 public abstract void UnSubscribeEvents(); 409 public abstract void UnSubscribeEvents();
315 public abstract bool SubscribedEvents(); 410 public abstract bool SubscribedEvents();
316 411
412 public virtual void AddCollisionEvent(uint CollidedWith, ContactPoint contact) { }
413
414 // Warning in a parent part it returns itself, not null
415 public virtual PhysicsActor ParentActor { get { return this; } }
416
417
317 // Extendable interface for new, physics engine specific operations 418 // Extendable interface for new, physics engine specific operations
318 public virtual object Extension(string pFunct, params object[] pParams) 419 public virtual object Extension(string pFunct, params object[] pParams)
319 { 420 {
@@ -324,9 +425,11 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
324 425
325 public class NullPhysicsActor : PhysicsActor 426 public class NullPhysicsActor : PhysicsActor
326 { 427 {
428 private ActorTypes m_actorType = ActorTypes.Unknown;
429
327 public override bool Stopped 430 public override bool Stopped
328 { 431 {
329 get{ return false; } 432 get{ return true; }
330 } 433 }
331 434
332 public override Vector3 Position 435 public override Vector3 Position
@@ -343,6 +446,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
343 446
344 public override uint LocalID 447 public override uint LocalID
345 { 448 {
449 get { return 0; }
346 set { return; } 450 set { return; }
347 } 451 }
348 452
@@ -402,50 +506,17 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
402 set { return; } 506 set { return; }
403 } 507 }
404 508
405 public override void VehicleFloatParam(int param, float value) 509 public override void VehicleFloatParam(int param, float value) {}
406 { 510 public override void VehicleVectorParam(int param, Vector3 value) { }
511 public override void VehicleRotationParam(int param, Quaternion rotation) { }
512 public override void VehicleFlags(int param, bool remove) { }
513 public override void SetVolumeDetect(int param) {}
514 public override void SetMaterial(int material) {}
515 public override Vector3 CenterOfMass { get { return Vector3.Zero; }}
407 516
408 } 517 public override Vector3 GeometricCenter { get { return Vector3.Zero; }}
409 518
410 public override void VehicleVectorParam(int param, Vector3 value) 519 public override PrimitiveBaseShape Shape { set { return; }}
411 {
412
413 }
414
415 public override void VehicleRotationParam(int param, Quaternion rotation)
416 {
417
418 }
419
420 public override void VehicleFlags(int param, bool remove)
421 {
422
423 }
424
425 public override void SetVolumeDetect(int param)
426 {
427
428 }
429
430 public override void SetMaterial(int material)
431 {
432
433 }
434
435 public override Vector3 CenterOfMass
436 {
437 get { return Vector3.Zero; }
438 }
439
440 public override Vector3 GeometricCenter
441 {
442 get { return Vector3.Zero; }
443 }
444
445 public override PrimitiveBaseShape Shape
446 {
447 set { return; }
448 }
449 520
450 public override Vector3 Velocity 521 public override Vector3 Velocity
451 { 522 {
@@ -465,9 +536,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
465 set { } 536 set { }
466 } 537 }
467 538
468 public override void CrossingFailure() 539 public override void CrossingFailure() {}
469 {
470 }
471 540
472 public override Quaternion Orientation 541 public override Quaternion Orientation
473 { 542 {
@@ -507,8 +576,20 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
507 576
508 public override int PhysicsActorType 577 public override int PhysicsActorType
509 { 578 {
510 get { return (int) ActorTypes.Unknown; } 579 get { return (int)m_actorType; }
511 set { return; } 580 set {
581 ActorTypes type = (ActorTypes)value;
582 switch (type)
583 {
584 case ActorTypes.Ground:
585 case ActorTypes.Water:
586 m_actorType = type;
587 break;
588 default:
589 m_actorType = ActorTypes.Unknown;
590 break;
591 }
592 }
512 } 593 }
513 594
514 public override bool Kinematic 595 public override bool Kinematic
@@ -517,26 +598,11 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
517 set { return; } 598 set { return; }
518 } 599 }
519 600
520 public override void link(PhysicsActor obj) 601 public override void link(PhysicsActor obj) { }
521 { 602 public override void delink() { }
522 } 603 public override void LockAngularMotion(Vector3 axis) { }
523 604 public override void AddForce(Vector3 force, bool pushforce) { }
524 public override void delink() 605 public override void AddAngularForce(Vector3 force, bool pushforce) { }
525 {
526 }
527
528 public override void LockAngularMotion(Vector3 axis)
529 {
530 }
531
532 public override void AddForce(Vector3 force, bool pushforce)
533 {
534 }
535
536 public override void AddAngularForce(Vector3 force, bool pushforce)
537 {
538
539 }
540 606
541 public override Vector3 RotationalVelocity 607 public override Vector3 RotationalVelocity
542 { 608 {
@@ -564,21 +630,10 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
564 public override float APIDStrength { set { return; } } 630 public override float APIDStrength { set { return; } }
565 public override float APIDDamping { set { return; } } 631 public override float APIDDamping { set { return; } }
566 632
567 public override void SetMomentum(Vector3 momentum) 633 public override void SetMomentum(Vector3 momentum) { }
568 {
569 }
570
571 public override void SubscribeEvents(int ms)
572 {
573
574 }
575 public override void UnSubscribeEvents()
576 {
577 634
578 } 635 public override void SubscribeEvents(int ms) { }
579 public override bool SubscribedEvents() 636 public override void UnSubscribeEvents() { }
580 { 637 public override bool SubscribedEvents() { return false; }
581 return false;
582 }
583 } 638 }
584} 639}
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
index 32691fc..1c0ad20 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
@@ -41,6 +41,10 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
41 41
42 public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal); 42 public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal);
43 public delegate void RayCallback(List<ContactResult> list); 43 public delegate void RayCallback(List<ContactResult> list);
44 public delegate void ProbeBoxCallback(List<ContactResult> list);
45 public delegate void ProbeSphereCallback(List<ContactResult> list);
46 public delegate void ProbePlaneCallback(List<ContactResult> list);
47 public delegate void SitAvatarCallback(int status, uint partID, Vector3 offset, Quaternion Orientation);
44 48
45 public delegate void JointMoved(PhysicsJoint joint); 49 public delegate void JointMoved(PhysicsJoint joint);
46 public delegate void JointDeactivated(PhysicsJoint joint); 50 public delegate void JointDeactivated(PhysicsJoint joint);
@@ -89,6 +93,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
89 public Vector3 Normal; 93 public Vector3 Normal;
90 } 94 }
91 95
96
97
92 public abstract class PhysicsScene 98 public abstract class PhysicsScene
93 { 99 {
94// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 100// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -143,6 +149,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
143 /// <param name="size"></param> 149 /// <param name="size"></param>
144 /// <param name="isFlying"></param> 150 /// <param name="isFlying"></param>
145 /// <returns></returns> 151 /// <returns></returns>
152
146 public abstract PhysicsActor AddAvatar( 153 public abstract PhysicsActor AddAvatar(
147 string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying); 154 string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying);
148 155
@@ -161,12 +168,26 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
161 { 168 {
162 PhysicsActor ret = AddAvatar(avName, position, velocity, size, isFlying); 169 PhysicsActor ret = AddAvatar(avName, position, velocity, size, isFlying);
163 170
164 if (ret != null) 171 if (ret != null)
165 ret.LocalID = localID; 172 ret.LocalID = localID;
166 173
167 return ret; 174 return ret;
168 } 175 }
169 176
177 public virtual PhysicsActor AddAvatar(
178 uint localID, string avName, Vector3 position, Vector3 size, bool isFlying)
179 {
180 PhysicsActor ret = AddAvatar(localID, avName, position, Vector3.Zero, size, isFlying);
181 return ret;
182 }
183
184 public virtual PhysicsActor AddAvatar(
185 uint localID, string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
186 {
187 PhysicsActor ret = AddAvatar(localID, avName, position, Vector3.Zero, size, isFlying);
188 return ret;
189 }
190
170 /// <summary> 191 /// <summary>
171 /// Remove an avatar. 192 /// Remove an avatar.
172 /// </summary> 193 /// </summary>
@@ -182,6 +203,19 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
182 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 203 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
183 Vector3 size, Quaternion rotation, bool isPhysical, uint localid); 204 Vector3 size, Quaternion rotation, bool isPhysical, uint localid);
184 205
206 public virtual PhysicsActor AddPrimShape(string primName, PhysicsActor parent, PrimitiveBaseShape pbs, Vector3 position,
207 uint localid, byte[] sdata)
208 {
209 return null;
210 }
211
212 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
213 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, uint localid)
214 {
215 return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid);
216 }
217
218
185 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 219 public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
186 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid) 220 Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid)
187 { 221 {
@@ -255,6 +289,9 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
255 289
256 public abstract void AddPhysicsActorTaint(PhysicsActor prim); 290 public abstract void AddPhysicsActorTaint(PhysicsActor prim);
257 291
292
293 public virtual void PrepareSimulation() { }
294
258 /// <summary> 295 /// <summary>
259 /// Perform a simulation of the current physics scene over the given timestep. 296 /// Perform a simulation of the current physics scene over the given timestep.
260 /// </summary> 297 /// </summary>
@@ -299,7 +336,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
299 } 336 }
300 337
301 public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {} 338 public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {}
302 339 public virtual void CombineTerrain(float[] heightMap, Vector3 pOffset) {}
303 public virtual void UnCombine(PhysicsScene pScene) {} 340 public virtual void UnCombine(PhysicsScene pScene) {}
304 341
305 /// <summary> 342 /// <summary>
@@ -348,6 +385,31 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
348 return false; 385 return false;
349 } 386 }
350 387
388 public virtual List<ContactResult> RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags flags)
389 {
390 return new List<ContactResult>();
391 }
392
393 public virtual List<ContactResult> BoxProbe(Vector3 position, Vector3 size, Quaternion orientation, int Count, RayFilterFlags flags)
394 {
395 return new List<ContactResult>();
396 }
397
398 public virtual List<ContactResult> SphereProbe(Vector3 position, float radius, int Count, RayFilterFlags flags)
399 {
400 return new List<ContactResult>();
401 }
402
403 public virtual List<ContactResult> PlaneProbe(PhysicsActor actor, Vector4 plane, int Count, RayFilterFlags flags)
404 {
405 return new List<ContactResult>();
406 }
407
408 public virtual int SitAvatar(PhysicsActor actor, Vector3 AbsolutePosition, Vector3 CameraPosition, Vector3 offset, Vector3 AvatarSize, SitAvatarCallback PhysicsSitResponse)
409 {
410 return 0;
411 }
412
351 // Extendable interface for new, physics engine specific operations 413 // Extendable interface for new, physics engine specific operations
352 public virtual object Extension(string pFunct, params object[] pParams) 414 public virtual object Extension(string pFunct, params object[] pParams)
353 { 415 {
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
index 63a8cb8..e850b11 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using OpenMetaverse;
29 30
30namespace OpenSim.Region.PhysicsModules.SharedBase 31namespace OpenSim.Region.PhysicsModules.SharedBase
31{ 32{
@@ -117,5 +118,47 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
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}