diff options
author | Jeff Ames | 2008-06-25 13:32:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-25 13:32:27 +0000 |
commit | 80f5eb21ea1c51c53de7ec4485fcefd62a23ec47 (patch) | |
tree | 2163b3e00119933d7a07f596ff699976da4a7b8e /OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |
parent | Update svn properties. Add copyright notices. (diff) | |
download | opensim-SC-80f5eb21ea1c51c53de7ec4485fcefd62a23ec47.zip opensim-SC-80f5eb21ea1c51c53de7ec4485fcefd62a23ec47.tar.gz opensim-SC-80f5eb21ea1c51c53de7ec4485fcefd62a23ec47.tar.bz2 opensim-SC-80f5eb21ea1c51c53de7ec4485fcefd62a23ec47.tar.xz |
More svn properties. Minor cleanup in POS.
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSPlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 79 |
1 files changed, 47 insertions, 32 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index c14a80a..8d1fb0e 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |||
@@ -76,12 +76,12 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
76 | 76 | ||
77 | public override void Initialise(IMesher meshmerizer, IConfigSource config) | 77 | public override void Initialise(IMesher meshmerizer, IConfigSource config) |
78 | { | 78 | { |
79 | // Does nothing right now | ||
80 | } | 79 | } |
80 | |||
81 | public override void Dispose() | 81 | public override void Dispose() |
82 | { | 82 | { |
83 | |||
84 | } | 83 | } |
84 | |||
85 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) | 85 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) |
86 | { | 86 | { |
87 | POSCharacter act = new POSCharacter(); | 87 | POSCharacter act = new POSCharacter(); |
@@ -92,7 +92,6 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
92 | 92 | ||
93 | public override void SetWaterLevel(float baseheight) | 93 | public override void SetWaterLevel(float baseheight) |
94 | { | 94 | { |
95 | |||
96 | } | 95 | } |
97 | 96 | ||
98 | public override void RemovePrim(PhysicsActor prim) | 97 | public override void RemovePrim(PhysicsActor prim) |
@@ -145,20 +144,14 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
145 | " sizeX: " + p.Size.X * 0.5 + 0.5); | 144 | " sizeX: " + p.Size.X * 0.5 + 0.5); |
146 | */ | 145 | */ |
147 | 146 | ||
148 | Vector3 rotatedPos = p.Orientation.Inverse()* | 147 | Vector3 rotatedPos = p.Orientation.Inverse() * |
149 | new Vector3(c.Position.X - p.Position.X, c.Position.Y - p.Position.Y, | 148 | new Vector3(c.Position.X - p.Position.X, c.Position.Y - p.Position.Y, |
150 | c.Position.Z - p.Position.Z); | 149 | c.Position.Z - p.Position.Z); |
151 | Vector3 avatarSize = p.Orientation.Inverse()*new Vector3(c.Size.X, c.Size.Y, c.Size.Z); | 150 | Vector3 avatarSize = p.Orientation.Inverse()*new Vector3(c.Size.X, c.Size.Y, c.Size.Z); |
152 | 151 | ||
153 | if (Math.Abs(rotatedPos.x) >= (p.Size.X*0.5 + Math.Abs(avatarSize.x))) | 152 | if (Math.Abs(rotatedPos.x) >= (p.Size.X*0.5 + Math.Abs(avatarSize.x)) || |
154 | { | 153 | Math.Abs(rotatedPos.y) >= (p.Size.Y*0.5 + Math.Abs(avatarSize.y)) || |
155 | return false; | 154 | Math.Abs(rotatedPos.z) >= (p.Size.Z*0.5 + Math.Abs(avatarSize.z))) |
156 | } | ||
157 | if (Math.Abs(rotatedPos.y) >= (p.Size.Y*0.5 + Math.Abs(avatarSize.y))) | ||
158 | { | ||
159 | return false; | ||
160 | } | ||
161 | if (Math.Abs(rotatedPos.z) >= (p.Size.Z*0.5 + Math.Abs(avatarSize.z))) | ||
162 | { | 155 | { |
163 | return false; | 156 | return false; |
164 | } | 157 | } |
@@ -171,10 +164,8 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
171 | { | 164 | { |
172 | if (check_collision(c, _prims[i])) | 165 | if (check_collision(c, _prims[i])) |
173 | { | 166 | { |
174 | |||
175 | return true; | 167 | return true; |
176 | } | 168 | } |
177 | |||
178 | } | 169 | } |
179 | 170 | ||
180 | return false; | 171 | return false; |
@@ -249,12 +240,12 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
249 | character.Position.X = oldposX; | 240 | character.Position.X = oldposX; |
250 | character.Position.Y = oldposY; | 241 | character.Position.Y = oldposY; |
251 | character.Position.Z = oldposZ; | 242 | character.Position.Z = oldposZ; |
252 | character.Position.X = character.Position.X + (character._target_velocity.X*timeStep); | 243 | character.Position.X += character._target_velocity.X * timeStep; |
253 | if (check_all_prims(character)) | 244 | if (check_all_prims(character)) |
254 | { | 245 | { |
255 | character.Position.X = oldposX; | 246 | character.Position.X = oldposX; |
256 | } | 247 | } |
257 | character.Position.Y = character.Position.Y + (character._target_velocity.Y*timeStep); | 248 | character.Position.Y += character._target_velocity.Y * timeStep; |
258 | if (check_all_prims(character)) | 249 | if (check_all_prims(character)) |
259 | { | 250 | { |
260 | character.Position.Y = oldposY; | 251 | character.Position.Y = oldposY; |
@@ -314,8 +305,8 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
314 | 305 | ||
315 | public override bool IsThreaded | 306 | public override bool IsThreaded |
316 | { | 307 | { |
317 | get { return (false); // for now we won't be multithreaded | 308 | // for now we won't be multithreaded |
318 | } | 309 | get { return (false); } |
319 | } | 310 | } |
320 | 311 | ||
321 | public override void SetTerrain(float[] heightMap) | 312 | public override void SetTerrain(float[] heightMap) |
@@ -501,19 +492,17 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
501 | get { return true; } | 492 | get { return true; } |
502 | set { } | 493 | set { } |
503 | } | 494 | } |
495 | |||
504 | public override void link(PhysicsActor obj) | 496 | public override void link(PhysicsActor obj) |
505 | { | 497 | { |
506 | |||
507 | } | 498 | } |
508 | 499 | ||
509 | public override void delink() | 500 | public override void delink() |
510 | { | 501 | { |
511 | |||
512 | } | 502 | } |
513 | 503 | ||
514 | public override void LockAngularMotion(PhysicsVector axis) | 504 | public override void LockAngularMotion(PhysicsVector axis) |
515 | { | 505 | { |
516 | |||
517 | } | 506 | } |
518 | 507 | ||
519 | public void SetAcceleration(PhysicsVector accel) | 508 | public void SetAcceleration(PhysicsVector accel) |
@@ -528,21 +517,34 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
528 | public override void SetMomentum(PhysicsVector momentum) | 517 | public override void SetMomentum(PhysicsVector momentum) |
529 | { | 518 | { |
530 | } | 519 | } |
520 | |||
531 | public override void CrossingFailure() | 521 | public override void CrossingFailure() |
532 | { | 522 | { |
523 | } | ||
533 | 524 | ||
525 | public override PhysicsVector PIDTarget | ||
526 | { | ||
527 | set { return; } | ||
534 | } | 528 | } |
535 | public override PhysicsVector PIDTarget { set { return; } } | 529 | |
536 | public override bool PIDActive { set { return; } } | 530 | public override bool PIDActive |
537 | public override float PIDTau { set { return; } } | ||
538 | public override void SubscribeEvents(int ms) | ||
539 | { | 531 | { |
532 | set { return; } | ||
533 | } | ||
540 | 534 | ||
535 | public override float PIDTau | ||
536 | { | ||
537 | set { return; } | ||
541 | } | 538 | } |
542 | public override void UnSubscribeEvents() | 539 | |
540 | public override void SubscribeEvents(int ms) | ||
543 | { | 541 | { |
542 | } | ||
544 | 543 | ||
544 | public override void UnSubscribeEvents() | ||
545 | { | ||
545 | } | 546 | } |
547 | |||
546 | public override bool SubscribedEvents() | 548 | public override bool SubscribedEvents() |
547 | { | 549 | { |
548 | return false; | 550 | return false; |
@@ -746,17 +748,30 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
746 | public override void CrossingFailure() | 748 | public override void CrossingFailure() |
747 | { | 749 | { |
748 | } | 750 | } |
749 | public override PhysicsVector PIDTarget { set { return; } } | 751 | |
750 | public override bool PIDActive { set { return; } } | 752 | public override PhysicsVector PIDTarget |
751 | public override float PIDTau { set { return; } } | ||
752 | public override void SubscribeEvents(int ms) | ||
753 | { | 753 | { |
754 | set { return; } | ||
755 | } | ||
754 | 756 | ||
757 | public override bool PIDActive | ||
758 | { | ||
759 | set { return; } | ||
755 | } | 760 | } |
756 | public override void UnSubscribeEvents() | 761 | |
762 | public override float PIDTau | ||
763 | { | ||
764 | set { return; } | ||
765 | } | ||
766 | |||
767 | public override void SubscribeEvents(int ms) | ||
757 | { | 768 | { |
769 | } | ||
758 | 770 | ||
771 | public override void UnSubscribeEvents() | ||
772 | { | ||
759 | } | 773 | } |
774 | |||
760 | public override bool SubscribedEvents() | 775 | public override bool SubscribedEvents() |
761 | { | 776 | { |
762 | return false; | 777 | return false; |