aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-25 23:16:12 -0700
committerJohn Hurliman2009-10-26 18:23:43 -0700
commitd199767e6991d6f368661fce9c5a072e564b8a4b (patch)
treed9347b8a424c0164e208f908613aa8fe1511444b /OpenSim/Region/Physics/Manager
parent* Double the priority on avatar bake texture requests to get avatars rezzing ... (diff)
downloadopensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.zip
opensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.tar.gz
opensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.tar.bz2
opensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.tar.xz
Experimental change of PhysicsVector to Vector3. Untested
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/IMesher.cs7
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs86
-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.cs5
7 files changed, 85 insertions, 82 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 7603131..6bfdff2 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
@@ -231,9 +231,9 @@ namespace OpenSim.Region.Physics.Manager
231 public abstract float PIDHoverTau { set;} 231 public abstract float PIDHoverTau { set;}
232 232
233 233
234 public abstract void AddForce(PhysicsVector force, bool pushforce); 234 public abstract void AddForce(Vector3 force, bool pushforce);
235 public abstract void AddAngularForce(PhysicsVector force, bool pushforce); 235 public abstract void AddAngularForce(Vector3 force, bool pushforce);
236 public abstract void SetMomentum(PhysicsVector momentum); 236 public abstract void SetMomentum(Vector3 momentum);
237 public abstract void SubscribeEvents(int ms); 237 public abstract void SubscribeEvents(int ms);
238 public abstract void UnSubscribeEvents(); 238 public abstract void UnSubscribeEvents();
239 public abstract bool SubscribedEvents(); 239 public abstract bool SubscribedEvents();
@@ -246,9 +246,9 @@ namespace OpenSim.Region.Physics.Manager
246 get{ return false; } 246 get{ return false; }
247 } 247 }
248 248
249 public override PhysicsVector Position 249 public override Vector3 Position
250 { 250 {
251 get { return PhysicsVector.Zero; } 251 get { return Vector3.Zero; }
252 set { return; } 252 set { return; }
253 } 253 }
254 254
@@ -296,9 +296,9 @@ namespace OpenSim.Region.Physics.Manager
296 set { return; } 296 set { return; }
297 } 297 }
298 298
299 public override PhysicsVector Size 299 public override Vector3 Size
300 { 300 {
301 get { return PhysicsVector.Zero; } 301 get { return Vector3.Zero; }
302 set { return; } 302 set { return; }
303 } 303 }
304 304
@@ -307,9 +307,9 @@ namespace OpenSim.Region.Physics.Manager
307 get { return 0f; } 307 get { return 0f; }
308 } 308 }
309 309
310 public override PhysicsVector Force 310 public override Vector3 Force
311 { 311 {
312 get { return PhysicsVector.Zero; } 312 get { return Vector3.Zero; }
313 set { return; } 313 set { return; }
314 } 314 }
315 315
@@ -324,7 +324,7 @@ namespace OpenSim.Region.Physics.Manager
324 324
325 } 325 }
326 326
327 public override void VehicleVectorParam(int param, PhysicsVector value) 327 public override void VehicleVectorParam(int param, Vector3 value)
328 { 328 {
329 329
330 } 330 }
@@ -344,14 +344,14 @@ namespace OpenSim.Region.Physics.Manager
344 344
345 } 345 }
346 346
347 public override PhysicsVector CenterOfMass 347 public override Vector3 CenterOfMass
348 { 348 {
349 get { return PhysicsVector.Zero; } 349 get { return Vector3.Zero; }
350 } 350 }
351 351
352 public override PhysicsVector GeometricCenter 352 public override Vector3 GeometricCenter
353 { 353 {
354 get { return PhysicsVector.Zero; } 354 get { return Vector3.Zero; }
355 } 355 }
356 356
357 public override PrimitiveBaseShape Shape 357 public override PrimitiveBaseShape Shape
@@ -359,15 +359,15 @@ namespace OpenSim.Region.Physics.Manager
359 set { return; } 359 set { return; }
360 } 360 }
361 361
362 public override PhysicsVector Velocity 362 public override Vector3 Velocity
363 { 363 {
364 get { return PhysicsVector.Zero; } 364 get { return Vector3.Zero; }
365 set { return; } 365 set { return; }
366 } 366 }
367 367
368 public override PhysicsVector Torque 368 public override Vector3 Torque
369 { 369 {
370 get { return PhysicsVector.Zero; } 370 get { return Vector3.Zero; }
371 set { return; } 371 set { return; }
372 } 372 }
373 373
@@ -387,9 +387,9 @@ namespace OpenSim.Region.Physics.Manager
387 set { } 387 set { }
388 } 388 }
389 389
390 public override PhysicsVector Acceleration 390 public override Vector3 Acceleration
391 { 391 {
392 get { return PhysicsVector.Zero; } 392 get { return Vector3.Zero; }
393 } 393 }
394 394
395 public override bool IsPhysical 395 public override bool IsPhysical
@@ -436,26 +436,26 @@ namespace OpenSim.Region.Physics.Manager
436 { 436 {
437 } 437 }
438 438
439 public override void LockAngularMotion(PhysicsVector axis) 439 public override void LockAngularMotion(Vector3 axis)
440 { 440 {
441 } 441 }
442 442
443 public override void AddForce(PhysicsVector force, bool pushforce) 443 public override void AddForce(Vector3 force, bool pushforce)
444 { 444 {
445 } 445 }
446 446
447 public override void AddAngularForce(PhysicsVector force, bool pushforce) 447 public override void AddAngularForce(Vector3 force, bool pushforce)
448 { 448 {
449 449
450 } 450 }
451 451
452 public override PhysicsVector RotationalVelocity 452 public override Vector3 RotationalVelocity
453 { 453 {
454 get { return PhysicsVector.Zero; } 454 get { return Vector3.Zero; }
455 set { return; } 455 set { return; }
456 } 456 }
457 457
458 public override PhysicsVector PIDTarget { set { return; } } 458 public override Vector3 PIDTarget { set { return; } }
459 public override bool PIDActive { set { return; } } 459 public override bool PIDActive { set { return; } }
460 public override float PIDTau { set { return; } } 460 public override float PIDTau { set { return; } }
461 461
@@ -464,7 +464,7 @@ namespace OpenSim.Region.Physics.Manager
464 public override PIDHoverType PIDHoverType { set { return; } } 464 public override PIDHoverType PIDHoverType { set { return; } }
465 public override float PIDHoverTau { set { return; } } 465 public override float PIDHoverTau { set { return; } }
466 466
467 public override void SetMomentum(PhysicsVector momentum) 467 public override void SetMomentum(Vector3 momentum)
468 { 468 {
469 } 469 }
470 470
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 81eeed2..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,12 +61,12 @@ 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 {
70 // Remove the reference to the encoded JPEG2000 data so it can be GCed 71 // Remove the reference to the encoded JPEG2000 data so it can be GCed
71 primShape.SculptData = OpenMetaverse.Utils.EmptyBytes; 72 primShape.SculptData = OpenMetaverse.Utils.EmptyBytes;