diff options
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r-- | OpenSim/Region/Physics/Manager/IMesher.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 204 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 69 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/VehicleConstants.cs | 45 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/ZeroMesher.cs | 5 |
5 files changed, 234 insertions, 91 deletions
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 3a9ca1b..c32cf38 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs | |||
@@ -36,6 +36,7 @@ namespace OpenSim.Region.Physics.Manager | |||
36 | { | 36 | { |
37 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); | 37 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); |
38 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); | 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,bool convex); | ||
39 | } | 40 | } |
40 | 41 | ||
41 | // Values for level of detail to be passed to the mesher. | 42 | // Values for level of detail to be passed to the mesher. |
@@ -65,5 +66,6 @@ namespace OpenSim.Region.Physics.Manager | |||
65 | void releasePinned(); | 66 | void releasePinned(); |
66 | void Append(IMesh newMesh); | 67 | void Append(IMesh newMesh); |
67 | void TransformLinear(float[,] matrix, float[] offset); | 68 | void TransformLinear(float[,] matrix, float[] offset); |
69 | Vector3 GetCentroid(); | ||
68 | } | 70 | } |
69 | } | 71 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 0587054..a2c72c3 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -43,7 +43,8 @@ namespace OpenSim.Region.Physics.Manager | |||
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,30 @@ namespace OpenSim.Region.Physics.Manager | |||
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; | ||
62 | 64 | ||
63 | public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth) | 65 | public ContactPoint(Vector3 position, Vector3 surfaceNormal, float penetrationDepth) |
64 | { | 66 | { |
65 | Position = position; | 67 | Position = position; |
66 | SurfaceNormal = surfaceNormal; | 68 | SurfaceNormal = surfaceNormal; |
67 | PenetrationDepth = penetrationDepth; | 69 | PenetrationDepth = penetrationDepth; |
70 | RelativeSpeed = 0f; // for now let this one be set explicity | ||
68 | } | 71 | } |
69 | } | 72 | } |
70 | 73 | ||
74 | public struct ContactData | ||
75 | { | ||
76 | public float mu; | ||
77 | public float bounce; | ||
78 | public bool softcolide; | ||
79 | |||
80 | public ContactData(float _mu, float _bounce, bool _softcolide) | ||
81 | { | ||
82 | mu = _mu; | ||
83 | bounce = _bounce; | ||
84 | softcolide = _softcolide; | ||
85 | } | ||
86 | } | ||
71 | /// <summary> | 87 | /// <summary> |
72 | /// Used to pass collision information to OnCollisionUpdate listeners. | 88 | /// Used to pass collision information to OnCollisionUpdate listeners. |
73 | /// </summary> | 89 | /// </summary> |
@@ -99,7 +115,7 @@ namespace OpenSim.Region.Physics.Manager | |||
99 | m_objCollisionList.Add(localID, contact); | 115 | m_objCollisionList.Add(localID, contact); |
100 | } | 116 | } |
101 | else | 117 | else |
102 | { | 118 | { |
103 | if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth) | 119 | if (m_objCollisionList[localID].PenetrationDepth < contact.PenetrationDepth) |
104 | m_objCollisionList[localID] = contact; | 120 | m_objCollisionList[localID] = contact; |
105 | } | 121 | } |
@@ -135,6 +151,8 @@ namespace OpenSim.Region.Physics.Manager | |||
135 | /// </summary> | 151 | /// </summary> |
136 | public event CollisionUpdate OnCollisionUpdate; | 152 | public event CollisionUpdate OnCollisionUpdate; |
137 | 153 | ||
154 | public virtual void SetVehicle(object vdata) { } | ||
155 | |||
138 | public event OutOfBounds OnOutOfBounds; | 156 | public event OutOfBounds OnOutOfBounds; |
139 | #pragma warning restore 67 | 157 | #pragma warning restore 67 |
140 | 158 | ||
@@ -142,11 +160,29 @@ namespace OpenSim.Region.Physics.Manager | |||
142 | { | 160 | { |
143 | get { return new NullPhysicsActor(); } | 161 | get { return new NullPhysicsActor(); } |
144 | } | 162 | } |
163 | |||
164 | public virtual bool Building { get; set; } | ||
165 | |||
166 | public virtual void getContactData(ref ContactData cdata) | ||
167 | { | ||
168 | cdata.mu = 0; | ||
169 | cdata.bounce = 0; | ||
170 | } | ||
145 | 171 | ||
146 | public abstract bool Stopped { get; } | 172 | public abstract bool Stopped { get; } |
147 | 173 | ||
148 | public abstract Vector3 Size { get; set; } | 174 | public abstract Vector3 Size { get; set; } |
149 | 175 | ||
176 | public virtual bool Phantom { get; set; } | ||
177 | |||
178 | public virtual bool IsVolumeDtc | ||
179 | { | ||
180 | get { return false; } | ||
181 | set { return; } | ||
182 | } | ||
183 | |||
184 | public virtual byte PhysicsShapeType { get; set; } | ||
185 | |||
150 | public abstract PrimitiveBaseShape Shape { set; } | 186 | public abstract PrimitiveBaseShape Shape { set; } |
151 | 187 | ||
152 | uint m_baseLocalID; | 188 | uint m_baseLocalID; |
@@ -167,7 +203,7 @@ namespace OpenSim.Region.Physics.Manager | |||
167 | /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or | 203 | /// XXX: Bizarrely, this cannot be "Terrain" or "Water" right now unless it really is simulating terrain or |
168 | /// water. This is not a problem due to the formatting of names given by prims and avatars. | 204 | /// water. This is not a problem due to the formatting of names given by prims and avatars. |
169 | /// </remarks> | 205 | /// </remarks> |
170 | public string Name { get; protected set; } | 206 | public string Name { get; set; } |
171 | 207 | ||
172 | /// <summary> | 208 | /// <summary> |
173 | /// This is being used by ODE joint code. | 209 | /// This is being used by ODE joint code. |
@@ -218,9 +254,11 @@ namespace OpenSim.Region.Physics.Manager | |||
218 | handler(e); | 254 | handler(e); |
219 | } | 255 | } |
220 | 256 | ||
221 | public virtual void SetMaterial (int material) | 257 | public virtual void SetMaterial (int material) { } |
222 | { | 258 | public virtual float Density { get; set; } |
223 | } | 259 | public virtual float GravModifier { get; set; } |
260 | public virtual float Friction { get; set; } | ||
261 | public virtual float Bounce { get; set; } | ||
224 | 262 | ||
225 | /// <summary> | 263 | /// <summary> |
226 | /// Position of this actor. | 264 | /// Position of this actor. |
@@ -249,6 +287,34 @@ namespace OpenSim.Region.Physics.Manager | |||
249 | public abstract Vector3 GeometricCenter { get; } | 287 | public abstract Vector3 GeometricCenter { get; } |
250 | public abstract Vector3 CenterOfMass { get; } | 288 | public abstract Vector3 CenterOfMass { get; } |
251 | 289 | ||
290 | public virtual Vector3 OOBsize | ||
291 | { | ||
292 | get | ||
293 | { | ||
294 | Vector3 s=Size; | ||
295 | s.X *=0.5f; | ||
296 | s.Y *=0.5f; | ||
297 | s.Z *=0.5f; | ||
298 | return s; | ||
299 | } | ||
300 | } | ||
301 | |||
302 | public virtual Vector3 OOBoffset | ||
303 | { | ||
304 | get | ||
305 | { | ||
306 | return Vector3.Zero; | ||
307 | } | ||
308 | } | ||
309 | |||
310 | public virtual float OOBRadiusSQ | ||
311 | { | ||
312 | get | ||
313 | { | ||
314 | return Size.LengthSquared() * 0.25f; // ((0.5^2) | ||
315 | } | ||
316 | } | ||
317 | |||
252 | /// <summary> | 318 | /// <summary> |
253 | /// Velocity of this actor. | 319 | /// Velocity of this actor. |
254 | /// </summary> | 320 | /// </summary> |
@@ -300,13 +366,21 @@ namespace OpenSim.Region.Physics.Manager | |||
300 | public abstract void SubscribeEvents(int ms); | 366 | public abstract void SubscribeEvents(int ms); |
301 | public abstract void UnSubscribeEvents(); | 367 | public abstract void UnSubscribeEvents(); |
302 | public abstract bool SubscribedEvents(); | 368 | public abstract bool SubscribedEvents(); |
369 | |||
370 | public virtual void AddCollisionEvent(uint CollidedWith, ContactPoint contact) { } | ||
371 | |||
372 | // Warning in a parent part it returns itself, not null | ||
373 | public virtual PhysicsActor ParentActor { get { return this; } } | ||
374 | |||
303 | } | 375 | } |
304 | 376 | ||
305 | public class NullPhysicsActor : PhysicsActor | 377 | public class NullPhysicsActor : PhysicsActor |
306 | { | 378 | { |
379 | private ActorTypes m_actorType = ActorTypes.Unknown; | ||
380 | |||
307 | public override bool Stopped | 381 | public override bool Stopped |
308 | { | 382 | { |
309 | get{ return false; } | 383 | get{ return true; } |
310 | } | 384 | } |
311 | 385 | ||
312 | public override Vector3 Position | 386 | public override Vector3 Position |
@@ -323,6 +397,7 @@ namespace OpenSim.Region.Physics.Manager | |||
323 | 397 | ||
324 | public override uint LocalID | 398 | public override uint LocalID |
325 | { | 399 | { |
400 | get { return 0; } | ||
326 | set { return; } | 401 | set { return; } |
327 | } | 402 | } |
328 | 403 | ||
@@ -382,50 +457,17 @@ namespace OpenSim.Region.Physics.Manager | |||
382 | set { return; } | 457 | set { return; } |
383 | } | 458 | } |
384 | 459 | ||
385 | public override void VehicleFloatParam(int param, float value) | 460 | public override void VehicleFloatParam(int param, float value) {} |
386 | { | 461 | public override void VehicleVectorParam(int param, Vector3 value) { } |
387 | 462 | public override void VehicleRotationParam(int param, Quaternion rotation) { } | |
388 | } | 463 | public override void VehicleFlags(int param, bool remove) { } |
389 | 464 | public override void SetVolumeDetect(int param) {} | |
390 | public override void VehicleVectorParam(int param, Vector3 value) | 465 | public override void SetMaterial(int material) {} |
391 | { | 466 | public override Vector3 CenterOfMass { get { return Vector3.Zero; }} |
392 | |||
393 | } | ||
394 | |||
395 | public override void VehicleRotationParam(int param, Quaternion rotation) | ||
396 | { | ||
397 | |||
398 | } | ||
399 | |||
400 | public override void VehicleFlags(int param, bool remove) | ||
401 | { | ||
402 | |||
403 | } | ||
404 | |||
405 | public override void SetVolumeDetect(int param) | ||
406 | { | ||
407 | |||
408 | } | ||
409 | |||
410 | public override void SetMaterial(int material) | ||
411 | { | ||
412 | |||
413 | } | ||
414 | |||
415 | public override Vector3 CenterOfMass | ||
416 | { | ||
417 | get { return Vector3.Zero; } | ||
418 | } | ||
419 | 467 | ||
420 | public override Vector3 GeometricCenter | 468 | public override Vector3 GeometricCenter { get { return Vector3.Zero; }} |
421 | { | ||
422 | get { return Vector3.Zero; } | ||
423 | } | ||
424 | 469 | ||
425 | public override PrimitiveBaseShape Shape | 470 | public override PrimitiveBaseShape Shape { set { return; }} |
426 | { | ||
427 | set { return; } | ||
428 | } | ||
429 | 471 | ||
430 | public override Vector3 Velocity | 472 | public override Vector3 Velocity |
431 | { | 473 | { |
@@ -445,9 +487,7 @@ namespace OpenSim.Region.Physics.Manager | |||
445 | set { } | 487 | set { } |
446 | } | 488 | } |
447 | 489 | ||
448 | public override void CrossingFailure() | 490 | public override void CrossingFailure() {} |
449 | { | ||
450 | } | ||
451 | 491 | ||
452 | public override Quaternion Orientation | 492 | public override Quaternion Orientation |
453 | { | 493 | { |
@@ -487,8 +527,20 @@ namespace OpenSim.Region.Physics.Manager | |||
487 | 527 | ||
488 | public override int PhysicsActorType | 528 | public override int PhysicsActorType |
489 | { | 529 | { |
490 | get { return (int) ActorTypes.Unknown; } | 530 | get { return (int)m_actorType; } |
491 | set { return; } | 531 | set { |
532 | ActorTypes type = (ActorTypes)value; | ||
533 | switch (type) | ||
534 | { | ||
535 | case ActorTypes.Ground: | ||
536 | case ActorTypes.Water: | ||
537 | m_actorType = type; | ||
538 | break; | ||
539 | default: | ||
540 | m_actorType = ActorTypes.Unknown; | ||
541 | break; | ||
542 | } | ||
543 | } | ||
492 | } | 544 | } |
493 | 545 | ||
494 | public override bool Kinematic | 546 | public override bool Kinematic |
@@ -497,26 +549,11 @@ namespace OpenSim.Region.Physics.Manager | |||
497 | set { return; } | 549 | set { return; } |
498 | } | 550 | } |
499 | 551 | ||
500 | public override void link(PhysicsActor obj) | 552 | public override void link(PhysicsActor obj) { } |
501 | { | 553 | public override void delink() { } |
502 | } | 554 | public override void LockAngularMotion(Vector3 axis) { } |
503 | 555 | public override void AddForce(Vector3 force, bool pushforce) { } | |
504 | public override void delink() | 556 | public override void AddAngularForce(Vector3 force, bool pushforce) { } |
505 | { | ||
506 | } | ||
507 | |||
508 | public override void LockAngularMotion(Vector3 axis) | ||
509 | { | ||
510 | } | ||
511 | |||
512 | public override void AddForce(Vector3 force, bool pushforce) | ||
513 | { | ||
514 | } | ||
515 | |||
516 | public override void AddAngularForce(Vector3 force, bool pushforce) | ||
517 | { | ||
518 | |||
519 | } | ||
520 | 557 | ||
521 | public override Vector3 RotationalVelocity | 558 | public override Vector3 RotationalVelocity |
522 | { | 559 | { |
@@ -538,21 +575,10 @@ namespace OpenSim.Region.Physics.Manager | |||
538 | public override float APIDStrength { set { return; } } | 575 | public override float APIDStrength { set { return; } } |
539 | public override float APIDDamping { set { return; } } | 576 | public override float APIDDamping { set { return; } } |
540 | 577 | ||
541 | public override void SetMomentum(Vector3 momentum) | 578 | public override void SetMomentum(Vector3 momentum) { } |
542 | { | ||
543 | } | ||
544 | |||
545 | public override void SubscribeEvents(int ms) | ||
546 | { | ||
547 | 579 | ||
548 | } | 580 | public override void SubscribeEvents(int ms) { } |
549 | public override void UnSubscribeEvents() | 581 | public override void UnSubscribeEvents() { } |
550 | { | 582 | public override bool SubscribedEvents() { return false; } |
551 | |||
552 | } | ||
553 | public override bool SubscribedEvents() | ||
554 | { | ||
555 | return false; | ||
556 | } | ||
557 | } | 583 | } |
558 | } | 584 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index b32cd30..cfede55 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -43,6 +43,34 @@ namespace OpenSim.Region.Physics.Manager | |||
43 | public delegate void JointDeactivated(PhysicsJoint joint); | 43 | public delegate void JointDeactivated(PhysicsJoint joint); |
44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" | 44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" |
45 | 45 | ||
46 | public enum RayFilterFlags:ushort | ||
47 | { | ||
48 | // the flags | ||
49 | water = 0x01, | ||
50 | land = 0x02, | ||
51 | agent = 0x04, | ||
52 | nonphysical = 0x08, | ||
53 | physical = 0x10, | ||
54 | phantom = 0x20, | ||
55 | volumedtc = 0x40, | ||
56 | |||
57 | // ray cast colision control (may only work for meshs) | ||
58 | BackFaceCull = 0x4000, | ||
59 | ClosestHit = 0x8000, | ||
60 | |||
61 | // some combinations | ||
62 | LSLPhanton = phantom | volumedtc, | ||
63 | PrimsNonPhantom = nonphysical | physical, | ||
64 | PrimsNonPhantomAgents = nonphysical | physical | agent, | ||
65 | |||
66 | AllPrims = nonphysical | phantom | volumedtc | physical, | ||
67 | AllButLand = agent | nonphysical | physical | phantom | volumedtc, | ||
68 | |||
69 | ClosestAndBackCull = ClosestHit | BackFaceCull, | ||
70 | |||
71 | All = 0x3f | ||
72 | } | ||
73 | |||
46 | /// <summary> | 74 | /// <summary> |
47 | /// Contact result from a raycast. | 75 | /// Contact result from a raycast. |
48 | /// </summary> | 76 | /// </summary> |
@@ -54,6 +82,8 @@ namespace OpenSim.Region.Physics.Manager | |||
54 | public Vector3 Normal; | 82 | public Vector3 Normal; |
55 | } | 83 | } |
56 | 84 | ||
85 | |||
86 | |||
57 | public abstract class PhysicsScene | 87 | public abstract class PhysicsScene |
58 | { | 88 | { |
59 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 89 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -125,6 +155,25 @@ namespace OpenSim.Region.Physics.Manager | |||
125 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 155 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
126 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); | 156 | Vector3 size, Quaternion rotation, bool isPhysical, uint localid); |
127 | 157 | ||
158 | public virtual PhysicsActor AddPrimShape(string primName, PhysicsActor parent, PrimitiveBaseShape pbs, Vector3 position, | ||
159 | uint localid, byte[] sdata) | ||
160 | { | ||
161 | return null; | ||
162 | } | ||
163 | |||
164 | public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
165 | Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, uint localid) | ||
166 | { | ||
167 | return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); | ||
168 | } | ||
169 | |||
170 | |||
171 | public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
172 | Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid) | ||
173 | { | ||
174 | return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); | ||
175 | } | ||
176 | |||
128 | public virtual float TimeDilation | 177 | public virtual float TimeDilation |
129 | { | 178 | { |
130 | get { return 1.0f; } | 179 | get { return 1.0f; } |
@@ -236,7 +285,7 @@ namespace OpenSim.Region.Physics.Manager | |||
236 | } | 285 | } |
237 | 286 | ||
238 | public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {} | 287 | public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {} |
239 | 288 | public virtual void CombineTerrain(float[] heightMap, Vector3 pOffset) {} | |
240 | public virtual void UnCombine(PhysicsScene pScene) {} | 289 | public virtual void UnCombine(PhysicsScene pScene) {} |
241 | 290 | ||
242 | /// <summary> | 291 | /// <summary> |
@@ -274,5 +323,23 @@ namespace OpenSim.Region.Physics.Manager | |||
274 | { | 323 | { |
275 | return new List<ContactResult>(); | 324 | return new List<ContactResult>(); |
276 | } | 325 | } |
326 | |||
327 | public virtual object RaycastWorld(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter) | ||
328 | { | ||
329 | return null; | ||
330 | } | ||
331 | |||
332 | public virtual bool SuportsRaycastWorldFiltered() | ||
333 | { | ||
334 | return false; | ||
335 | } | ||
336 | |||
337 | public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, RaycastCallback retMethod){} | ||
338 | public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod) { } | ||
339 | public virtual List<ContactResult> RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count) | ||
340 | { | ||
341 | return new List<ContactResult>(); | ||
342 | } | ||
343 | |||
277 | } | 344 | } |
278 | } | 345 | } |
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 | } |
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs index ba19db6..8a3b50b 100644 --- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs +++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs | |||
@@ -67,6 +67,11 @@ namespace OpenSim.Region.Physics.Manager | |||
67 | return CreateMesh(primName, primShape, size, lod, false); | 67 | return CreateMesh(primName, primShape, size, lod, false); |
68 | } | 68 | } |
69 | 69 | ||
70 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) | ||
71 | { | ||
72 | return CreateMesh(primName, primShape, size, lod, false); | ||
73 | } | ||
74 | |||
70 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) | 75 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) |
71 | { | 76 | { |
72 | // Remove the reference to the encoded JPEG2000 data so it can be GCed | 77 | // Remove the reference to the encoded JPEG2000 data so it can be GCed |