aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/IMesher.cs7
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs80
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsJoint.cs2
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs32
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsSensor.cs7
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsVector.cs28
-rw-r--r--OpenSim/Region/Physics/Manager/ZeroMesher.cs8
7 files changed, 85 insertions, 79 deletions
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs
index 1a8c948..1181b8d 100644
--- a/OpenSim/Region/Physics/Manager/IMesher.cs
+++ b/OpenSim/Region/Physics/Manager/IMesher.cs
@@ -28,13 +28,14 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenMetaverse;
31 32
32namespace OpenSim.Region.Physics.Manager 33namespace OpenSim.Region.Physics.Manager
33{ 34{
34 public interface IMesher 35 public interface IMesher
35 { 36 {
36 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod); 37 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod);
37 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical); 38 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical);
38 } 39 }
39 40
40 public interface IVertex 41 public interface IVertex
@@ -43,7 +44,7 @@ namespace OpenSim.Region.Physics.Manager
43 44
44 public interface IMesh 45 public interface IMesh
45 { 46 {
46 List<PhysicsVector> getVertexList(); 47 List<Vector3> getVertexList();
47 int[] getIndexListAsInt(); 48 int[] getIndexListAsInt();
48 int[] getIndexListAsIntLocked(); 49 int[] getIndexListAsIntLocked();
49 float[] getVertexListAsFloatLocked(); 50 float[] getVertexListAsFloatLocked();
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 566746a..ea4db70 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -32,8 +32,8 @@ using OpenMetaverse;
32 32
33namespace OpenSim.Region.Physics.Manager 33namespace OpenSim.Region.Physics.Manager
34{ 34{
35 public delegate void PositionUpdate(PhysicsVector position); 35 public delegate void PositionUpdate(Vector3 position);
36 public delegate void VelocityUpdate(PhysicsVector velocity); 36 public delegate void VelocityUpdate(Vector3 velocity);
37 public delegate void OrientationUpdate(Quaternion orientation); 37 public delegate void OrientationUpdate(Quaternion orientation);
38 38
39 public enum ActorTypes : int 39 public enum ActorTypes : int
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Physics.Manager
106 { 106 {
107 public delegate void RequestTerseUpdate(); 107 public delegate void RequestTerseUpdate();
108 public delegate void CollisionUpdate(EventArgs e); 108 public delegate void CollisionUpdate(EventArgs e);
109 public delegate void OutOfBounds(PhysicsVector pos); 109 public delegate void OutOfBounds(Vector3 pos);
110 110
111// disable warning: public events 111// disable warning: public events
112#pragma warning disable 67 112#pragma warning disable 67
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Physics.Manager
125 125
126 public abstract bool Stopped { get; } 126 public abstract bool Stopped { get; }
127 127
128 public abstract PhysicsVector Size { get; set; } 128 public abstract Vector3 Size { get; set; }
129 129
130 public abstract PrimitiveBaseShape Shape { set; } 130 public abstract PrimitiveBaseShape Shape { set; }
131 131
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Physics.Manager
144 144
145 public abstract void delink(); 145 public abstract void delink();
146 146
147 public abstract void LockAngularMotion(PhysicsVector axis); 147 public abstract void LockAngularMotion(Vector3 axis);
148 148
149 public virtual void RequestPhysicsterseUpdate() 149 public virtual void RequestPhysicsterseUpdate()
150 { 150 {
@@ -159,7 +159,7 @@ namespace OpenSim.Region.Physics.Manager
159 } 159 }
160 } 160 }
161 161
162 public virtual void RaiseOutOfBounds(PhysicsVector pos) 162 public virtual void RaiseOutOfBounds(Vector3 pos)
163 { 163 {
164 // Make a temporary copy of the event to avoid possibility of 164 // Make a temporary copy of the event to avoid possibility of
165 // a race condition if the last subscriber unsubscribes 165 // a race condition if the last subscriber unsubscribes
@@ -187,23 +187,23 @@ namespace OpenSim.Region.Physics.Manager
187 187
188 } 188 }
189 189
190 public abstract PhysicsVector Position { get; set; } 190 public abstract Vector3 Position { get; set; }
191 public abstract float Mass { get; } 191 public abstract float Mass { get; }
192 public abstract PhysicsVector Force { get; set; } 192 public abstract Vector3 Force { get; set; }
193 193
194 public abstract int VehicleType { get; set; } 194 public abstract int VehicleType { get; set; }
195 public abstract void VehicleFloatParam(int param, float value); 195 public abstract void VehicleFloatParam(int param, float value);
196 public abstract void VehicleVectorParam(int param, PhysicsVector value); 196 public abstract void VehicleVectorParam(int param, Vector3 value);
197 public abstract void VehicleRotationParam(int param, Quaternion rotation); 197 public abstract void VehicleRotationParam(int param, Quaternion rotation);
198 198
199 public abstract void SetVolumeDetect(int param); // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more 199 public abstract void SetVolumeDetect(int param); // Allows the detection of collisions with inherently non-physical prims. see llVolumeDetect for more
200 200
201 public abstract PhysicsVector GeometricCenter { get; } 201 public abstract Vector3 GeometricCenter { get; }
202 public abstract PhysicsVector CenterOfMass { get; } 202 public abstract Vector3 CenterOfMass { get; }
203 public abstract PhysicsVector Velocity { get; set; } 203 public abstract Vector3 Velocity { get; set; }
204 public abstract PhysicsVector Torque { get; set; } 204 public abstract Vector3 Torque { get; set; }
205 public abstract float CollisionScore { get; set;} 205 public abstract float CollisionScore { get; set;}
206 public abstract PhysicsVector Acceleration { get; } 206 public abstract Vector3 Acceleration { get; }
207 public abstract Quaternion Orientation { get; set; } 207 public abstract Quaternion Orientation { get; set; }
208 public abstract int PhysicsActorType { get; set; } 208 public abstract int PhysicsActorType { get; set; }
209 public abstract bool IsPhysical { get; set; } 209 public abstract bool IsPhysical { get; set; }
@@ -214,12 +214,12 @@ namespace OpenSim.Region.Physics.Manager
214 public abstract bool CollidingGround { get; set; } 214 public abstract bool CollidingGround { get; set; }
215 public abstract bool CollidingObj { get; set; } 215 public abstract bool CollidingObj { get; set; }
216 public abstract bool FloatOnWater { set; } 216 public abstract bool FloatOnWater { set; }
217 public abstract PhysicsVector RotationalVelocity { get; set; } 217 public abstract Vector3 RotationalVelocity { get; set; }
218 public abstract bool Kinematic { get; set; } 218 public abstract bool Kinematic { get; set; }
219 public abstract float Buoyancy { get; set; } 219 public abstract float Buoyancy { get; set; }
220 220
221 // Used for MoveTo 221 // Used for MoveTo
222 public abstract PhysicsVector PIDTarget { set;} 222 public abstract Vector3 PIDTarget { set; }
223 public abstract bool PIDActive { set;} 223 public abstract bool PIDActive { set;}
224 public abstract float PIDTau { set; } 224 public abstract float PIDTau { set; }
225 225
@@ -251,9 +251,9 @@ namespace OpenSim.Region.Physics.Manager
251 get{ return false; } 251 get{ return false; }
252 } 252 }
253 253
254 public override PhysicsVector Position 254 public override Vector3 Position
255 { 255 {
256 get { return PhysicsVector.Zero; } 256 get { return Vector3.Zero; }
257 set { return; } 257 set { return; }
258 } 258 }
259 259
@@ -301,9 +301,9 @@ namespace OpenSim.Region.Physics.Manager
301 set { return; } 301 set { return; }
302 } 302 }
303 303
304 public override PhysicsVector Size 304 public override Vector3 Size
305 { 305 {
306 get { return PhysicsVector.Zero; } 306 get { return Vector3.Zero; }
307 set { return; } 307 set { return; }
308 } 308 }
309 309
@@ -312,9 +312,9 @@ namespace OpenSim.Region.Physics.Manager
312 get { return 0f; } 312 get { return 0f; }
313 } 313 }
314 314
315 public override PhysicsVector Force 315 public override Vector3 Force
316 { 316 {
317 get { return PhysicsVector.Zero; } 317 get { return Vector3.Zero; }
318 set { return; } 318 set { return; }
319 } 319 }
320 320
@@ -329,7 +329,7 @@ namespace OpenSim.Region.Physics.Manager
329 329
330 } 330 }
331 331
332 public override void VehicleVectorParam(int param, PhysicsVector value) 332 public override void VehicleVectorParam(int param, Vector3 value)
333 { 333 {
334 334
335 } 335 }
@@ -349,14 +349,14 @@ namespace OpenSim.Region.Physics.Manager
349 349
350 } 350 }
351 351
352 public override PhysicsVector CenterOfMass 352 public override Vector3 CenterOfMass
353 { 353 {
354 get { return PhysicsVector.Zero; } 354 get { return Vector3.Zero; }
355 } 355 }
356 356
357 public override PhysicsVector GeometricCenter 357 public override Vector3 GeometricCenter
358 { 358 {
359 get { return PhysicsVector.Zero; } 359 get { return Vector3.Zero; }
360 } 360 }
361 361
362 public override PrimitiveBaseShape Shape 362 public override PrimitiveBaseShape Shape
@@ -364,15 +364,15 @@ namespace OpenSim.Region.Physics.Manager
364 set { return; } 364 set { return; }
365 } 365 }
366 366
367 public override PhysicsVector Velocity 367 public override Vector3 Velocity
368 { 368 {
369 get { return PhysicsVector.Zero; } 369 get { return Vector3.Zero; }
370 set { return; } 370 set { return; }
371 } 371 }
372 372
373 public override PhysicsVector Torque 373 public override Vector3 Torque
374 { 374 {
375 get { return PhysicsVector.Zero; } 375 get { return Vector3.Zero; }
376 set { return; } 376 set { return; }
377 } 377 }
378 378
@@ -392,9 +392,9 @@ namespace OpenSim.Region.Physics.Manager
392 set { } 392 set { }
393 } 393 }
394 394
395 public override PhysicsVector Acceleration 395 public override Vector3 Acceleration
396 { 396 {
397 get { return PhysicsVector.Zero; } 397 get { return Vector3.Zero; }
398 } 398 }
399 399
400 public override bool IsPhysical 400 public override bool IsPhysical
@@ -441,26 +441,26 @@ namespace OpenSim.Region.Physics.Manager
441 { 441 {
442 } 442 }
443 443
444 public override void LockAngularMotion(PhysicsVector axis) 444 public override void LockAngularMotion(Vector3 axis)
445 { 445 {
446 } 446 }
447 447
448 public override void AddForce(PhysicsVector force, bool pushforce) 448 public override void AddForce(Vector3 force, bool pushforce)
449 { 449 {
450 } 450 }
451 451
452 public override void AddAngularForce(PhysicsVector force, bool pushforce) 452 public override void AddAngularForce(Vector3 force, bool pushforce)
453 { 453 {
454 454
455 } 455 }
456 456
457 public override PhysicsVector RotationalVelocity 457 public override Vector3 RotationalVelocity
458 { 458 {
459 get { return PhysicsVector.Zero; } 459 get { return Vector3.Zero; }
460 set { return; } 460 set { return; }
461 } 461 }
462 462
463 public override PhysicsVector PIDTarget { set { return; } } 463 public override Vector3 PIDTarget { set { return; } }
464 public override bool PIDActive { set { return; } } 464 public override bool PIDActive { set { return; } }
465 public override float PIDTau { set { return; } } 465 public override float PIDTau { set { return; } }
466 466
@@ -475,7 +475,7 @@ namespace OpenSim.Region.Physics.Manager
475 public override float APIDDamping { set { return; } } 475 public override float APIDDamping { set { return; } }
476 476
477 477
478 public override void SetMomentum(PhysicsVector momentum) 478 public override void SetMomentum(Vector3 momentum)
479 { 479 {
480 } 480 }
481 481
diff --git a/OpenSim/Region/Physics/Manager/PhysicsJoint.cs b/OpenSim/Region/Physics/Manager/PhysicsJoint.cs
index f463597..b685d04 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsJoint.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsJoint.cs
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Physics.Manager
44 public PhysicsJointType Type; 44 public PhysicsJointType Type;
45 public string RawParams; 45 public string RawParams;
46 public List<string> BodyNames = new List<string>(); 46 public List<string> BodyNames = new List<string>();
47 public PhysicsVector Position; // global coords 47 public Vector3 Position; // global coords
48 public Quaternion Rotation; // global coords 48 public Quaternion Rotation; // global coords
49 public string ObjectNameInScene; // proxy object in scene that represents the joint position/orientation 49 public string ObjectNameInScene; // proxy object in scene that represents the joint position/orientation
50 public string TrackedBodyName; // body name that this joint is attached to (ObjectNameInScene will follow TrackedBodyName) 50 public string TrackedBodyName; // body name that this joint is attached to (ObjectNameInScene will follow TrackedBodyName)
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 6dd26bb..bb0d18e 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -64,23 +64,23 @@ namespace OpenSim.Region.Physics.Manager
64 64
65 public abstract void Initialise(IMesher meshmerizer, IConfigSource config); 65 public abstract void Initialise(IMesher meshmerizer, IConfigSource config);
66 66
67 public abstract PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying); 67 public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying);
68 68
69 public abstract void RemoveAvatar(PhysicsActor actor); 69 public abstract void RemoveAvatar(PhysicsActor actor);
70 70
71 public abstract void RemovePrim(PhysicsActor prim); 71 public abstract void RemovePrim(PhysicsActor prim);
72 72
73 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 73 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
74 PhysicsVector size, Quaternion rotation); //To be removed 74 Vector3 size, Quaternion rotation); //To be removed
75 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 75 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
76 PhysicsVector size, Quaternion rotation, bool isPhysical); 76 Vector3 size, Quaternion rotation, bool isPhysical);
77 77
78 public virtual bool SupportsNINJAJoints 78 public virtual bool SupportsNINJAJoints
79 { 79 {
80 get { return false; } 80 get { return false; }
81 } 81 }
82 82
83 public virtual PhysicsJoint RequestJointCreation(string objectNameInScene, PhysicsJointType jointType, PhysicsVector position, 83 public virtual PhysicsJoint RequestJointCreation(string objectNameInScene, PhysicsJointType jointType, Vector3 position,
84 Quaternion rotation, string parms, List<string> bodyNames, string trackedBodyName, Quaternion localRotation) 84 Quaternion rotation, string parms, List<string> bodyNames, string trackedBodyName, Quaternion localRotation)
85 { return null; } 85 { return null; }
86 86
@@ -129,11 +129,11 @@ namespace OpenSim.Region.Physics.Manager
129 } 129 }
130 } 130 }
131 131
132 public virtual PhysicsVector GetJointAnchor(PhysicsJoint joint) 132 public virtual Vector3 GetJointAnchor(PhysicsJoint joint)
133 { return null; } 133 { return Vector3.Zero; }
134 134
135 public virtual PhysicsVector GetJointAxis(PhysicsJoint joint) 135 public virtual Vector3 GetJointAxis(PhysicsJoint joint)
136 { return null; } 136 { return Vector3.Zero; }
137 137
138 138
139 public abstract void AddPhysicsActorTaint(PhysicsActor prim); 139 public abstract void AddPhysicsActorTaint(PhysicsActor prim);
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Physics.Manager
212 // Does nothing right now 212 // Does nothing right now
213 } 213 }
214 214
215 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) 215 public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
216 { 216 {
217 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position); 217 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position);
218 return PhysicsActor.Null; 218 return PhysicsActor.Null;
@@ -231,21 +231,21 @@ namespace OpenSim.Region.Physics.Manager
231 } 231 }
232 232
233/* 233/*
234 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) 234 public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion rotation)
235 { 235 {
236 m_log.InfoFormat("NullPhysicsScene : AddPrim({0},{1})", position, size); 236 m_log.InfoFormat("NullPhysicsScene : AddPrim({0},{1})", position, size);
237 return PhysicsActor.Null; 237 return PhysicsActor.Null;
238 } 238 }
239*/ 239*/
240 240
241 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 241 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
242 PhysicsVector size, Quaternion rotation) //To be removed 242 Vector3 size, Quaternion rotation) //To be removed
243 { 243 {
244 return AddPrimShape(primName, pbs, position, size, rotation, false); 244 return AddPrimShape(primName, pbs, position, size, rotation, false);
245 } 245 }
246 246
247 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 247 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
248 PhysicsVector size, Quaternion rotation, bool isPhysical) 248 Vector3 size, Quaternion rotation, bool isPhysical)
249 { 249 {
250 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size); 250 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size);
251 return PhysicsActor.Null; 251 return PhysicsActor.Null;
diff --git a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs
index 090ad52..f480d71 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsSensor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsSensor.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Timers; 29using System.Timers;
30using OpenMetaverse;
30 31
31namespace OpenSim.Region.Physics.Manager 32namespace OpenSim.Region.Physics.Manager
32{ 33{
@@ -46,7 +47,7 @@ namespace OpenSim.Region.Physics.Manager
46 { 47 {
47 get { return new NullPhysicsSensor(); } 48 get { return new NullPhysicsSensor(); }
48 } 49 }
49 public abstract PhysicsVector Position {get; set;} 50 public abstract Vector3 Position { get; set; }
50 public abstract void TimerCallback (object obj, ElapsedEventArgs eea); 51 public abstract void TimerCallback (object obj, ElapsedEventArgs eea);
51 public abstract float radianarc {get; set;} 52 public abstract float radianarc {get; set;}
52 public abstract string targetname {get; set;} 53 public abstract string targetname {get; set;}
@@ -58,9 +59,9 @@ namespace OpenSim.Region.Physics.Manager
58 59
59 public class NullPhysicsSensor : PhysicsSensor 60 public class NullPhysicsSensor : PhysicsSensor
60 { 61 {
61 public override PhysicsVector Position 62 public override Vector3 Position
62 { 63 {
63 get { return PhysicsVector.Zero; } 64 get { return Vector3.Zero; }
64 set { return; } 65 set { return; }
65 } 66 }
66 public override void TimerCallback(object obj, ElapsedEventArgs eea) 67 public override void TimerCallback(object obj, ElapsedEventArgs eea)
diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
index d6f4d0d..f60a636 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
@@ -29,24 +29,24 @@ using System;
29 29
30namespace OpenSim.Region.Physics.Manager 30namespace OpenSim.Region.Physics.Manager
31{ 31{
32 public class PhysicsVector 32 /*public class PhysicsVector
33 { 33 {
34 public float X; 34 public float X;
35 public float Y; 35 public float Y;
36 public float Z; 36 public float Z;
37 37
38 public PhysicsVector() 38 public Vector3()
39 { 39 {
40 } 40 }
41 41
42 public PhysicsVector(float x, float y, float z) 42 public Vector3(float x, float y, float z)
43 { 43 {
44 X = x; 44 X = x;
45 Y = y; 45 Y = y;
46 Z = z; 46 Z = z;
47 } 47 }
48 48
49 public PhysicsVector(PhysicsVector pv) : this(pv.X, pv.Y, pv.Z) 49 public Vector3(Vector3 pv) : this(pv.X, pv.Y, pv.Z)
50 { 50 {
51 } 51 }
52 52
@@ -115,17 +115,17 @@ namespace OpenSim.Region.Physics.Manager
115 } 115 }
116 116
117 // Operations 117 // Operations
118 public static PhysicsVector operator +(PhysicsVector a, PhysicsVector b) 118 public static PhysicsVector operator +(Vector3 a, Vector3 b)
119 { 119 {
120 return new PhysicsVector(a.X + b.X, a.Y + b.Y, a.Z + b.Z); 120 return new PhysicsVector(a.X + b.X, a.Y + b.Y, a.Z + b.Z);
121 } 121 }
122 122
123 public static PhysicsVector operator -(PhysicsVector a, PhysicsVector b) 123 public static PhysicsVector operator -(Vector3 a, Vector3 b)
124 { 124 {
125 return new PhysicsVector(a.X - b.X, a.Y - b.Y, a.Z - b.Z); 125 return new PhysicsVector(a.X - b.X, a.Y - b.Y, a.Z - b.Z);
126 } 126 }
127 127
128 public static PhysicsVector cross(PhysicsVector a, PhysicsVector b) 128 public static PhysicsVector cross(Vector3 a, Vector3 b)
129 { 129 {
130 return new PhysicsVector(a.Y*b.Z - a.Z*b.Y, a.Z*b.X - a.X*b.Z, a.X*b.Y - a.Y*b.X); 130 return new PhysicsVector(a.Y*b.Z - a.Z*b.Y, a.Z*b.X - a.X*b.Z, a.X*b.Y - a.Y*b.X);
131 } 131 }
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Physics.Manager
135 return (float) Math.Sqrt(X*X + Y*Y + Z*Z); 135 return (float) Math.Sqrt(X*X + Y*Y + Z*Z);
136 } 136 }
137 137
138 public static float GetDistanceTo(PhysicsVector a, PhysicsVector b) 138 public static float GetDistanceTo(Vector3 a, Vector3 b)
139 { 139 {
140 float dx = a.X - b.X; 140 float dx = a.X - b.X;
141 float dy = a.Y - b.Y; 141 float dy = a.Y - b.Y;
@@ -143,22 +143,22 @@ namespace OpenSim.Region.Physics.Manager
143 return (float) Math.Sqrt(dx * dx + dy * dy + dz * dz); 143 return (float) Math.Sqrt(dx * dx + dy * dy + dz * dz);
144 } 144 }
145 145
146 public static PhysicsVector operator /(PhysicsVector v, float f) 146 public static PhysicsVector operator /(Vector3 v, float f)
147 { 147 {
148 return new PhysicsVector(v.X/f, v.Y/f, v.Z/f); 148 return new PhysicsVector(v.X/f, v.Y/f, v.Z/f);
149 } 149 }
150 150
151 public static PhysicsVector operator *(PhysicsVector v, float f) 151 public static PhysicsVector operator *(Vector3 v, float f)
152 { 152 {
153 return new PhysicsVector(v.X*f, v.Y*f, v.Z*f); 153 return new PhysicsVector(v.X*f, v.Y*f, v.Z*f);
154 } 154 }
155 155
156 public static PhysicsVector operator *(float f, PhysicsVector v) 156 public static PhysicsVector operator *(float f, Vector3 v)
157 { 157 {
158 return v*f; 158 return v*f;
159 } 159 }
160 160
161 public static bool isFinite(PhysicsVector v) 161 public static bool isFinite(Vector3 v)
162 { 162 {
163 if (v == null) 163 if (v == null)
164 return false; 164 return false;
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Physics.Manager
172 return true; 172 return true;
173 } 173 }
174 174
175 public virtual bool IsIdentical(PhysicsVector v, float tolerance) 175 public virtual bool IsIdentical(Vector3 v, float tolerance)
176 { 176 {
177 PhysicsVector diff = this - v; 177 PhysicsVector diff = this - v;
178 float d = diff.length(); 178 float d = diff.length();
@@ -182,5 +182,5 @@ namespace OpenSim.Region.Physics.Manager
182 return false; 182 return false;
183 } 183 }
184 184
185 } 185 }*/
186} 186}
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs
index f9d0f2a..e6e75f9 100644
--- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs
+++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using OpenMetaverse;
30 31
31/* 32/*
32 * This is the zero mesher. 33 * This is the zero mesher.
@@ -60,13 +61,16 @@ namespace OpenSim.Region.Physics.Manager
60 61
61 public class ZeroMesher : IMesher 62 public class ZeroMesher : IMesher
62 { 63 {
63 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod) 64 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod)
64 { 65 {
65 return CreateMesh(primName, primShape, size, lod, false); 66 return CreateMesh(primName, primShape, size, lod, false);
66 } 67 }
67 68
68 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical) 69 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
69 { 70 {
71 // Remove the reference to the encoded JPEG2000 data so it can be GCed
72 primShape.SculptData = OpenMetaverse.Utils.EmptyBytes;
73
70 return null; 74 return null;
71 } 75 }
72 } 76 }