aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
authorJeff Ames2008-03-18 14:51:42 +0000
committerJeff Ames2008-03-18 14:51:42 +0000
commitbf8b5844f24d294c459f54147bd511e7112288bf (patch)
tree1b6a1ba4e9888d43694a8a33c21beb6913ce2d3a /OpenSim/Region/Physics/Manager
parent* Applied Grumly57 patch for #781; Thanks, Grumly! (diff)
downloadopensim-SC_OLD-bf8b5844f24d294c459f54147bd511e7112288bf.zip
opensim-SC_OLD-bf8b5844f24d294c459f54147bd511e7112288bf.tar.gz
opensim-SC_OLD-bf8b5844f24d294c459f54147bd511e7112288bf.tar.bz2
opensim-SC_OLD-bf8b5844f24d294c459f54147bd511e7112288bf.tar.xz
Formatting cleanup. Minor refactoring.
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs45
1 files changed, 6 insertions, 39 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 1119db5..c63e1f7 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -33,9 +33,7 @@ using OpenSim.Framework;
33namespace OpenSim.Region.Physics.Manager 33namespace OpenSim.Region.Physics.Manager
34{ 34{
35 public delegate void PositionUpdate(PhysicsVector position); 35 public delegate void PositionUpdate(PhysicsVector position);
36
37 public delegate void VelocityUpdate(PhysicsVector velocity); 36 public delegate void VelocityUpdate(PhysicsVector velocity);
38
39 public delegate void OrientationUpdate(Quaternion orientation); 37 public delegate void OrientationUpdate(Quaternion orientation);
40 38
41 public enum ActorTypes : int 39 public enum ActorTypes : int
@@ -50,7 +48,6 @@ namespace OpenSim.Region.Physics.Manager
50 { 48 {
51 // Raising the event on the object, so don't need to provide location.. further up the tree knows that info. 49 // Raising the event on the object, so don't need to provide location.. further up the tree knows that info.
52 50
53
54 public int m_colliderType; 51 public int m_colliderType;
55 public int m_GenericStartEnd; 52 public int m_GenericStartEnd;
56 //public uint m_LocalID; 53 //public uint m_LocalID;
@@ -88,13 +85,10 @@ namespace OpenSim.Region.Physics.Manager
88 } 85 }
89 } 86 }
90 87
91
92 public abstract class PhysicsActor 88 public abstract class PhysicsActor
93 { 89 {
94 public delegate void RequestTerseUpdate(); 90 public delegate void RequestTerseUpdate();
95
96 public delegate void CollisionUpdate(EventArgs e); 91 public delegate void CollisionUpdate(EventArgs e);
97
98 public delegate void OutOfBounds(PhysicsVector pos); 92 public delegate void OutOfBounds(PhysicsVector pos);
99 93
100#pragma warning disable 67 94#pragma warning disable 67
@@ -138,9 +132,7 @@ namespace OpenSim.Region.Physics.Manager
138 132
139 if (handler != null) 133 if (handler != null)
140 { 134 {
141 135 handler();
142 handler();
143
144 } 136 }
145 } 137 }
146 138
@@ -150,9 +142,10 @@ namespace OpenSim.Region.Physics.Manager
150 // a race condition if the last subscriber unsubscribes 142 // a race condition if the last subscriber unsubscribes
151 // immediately after the null check and before the event is raised. 143 // immediately after the null check and before the event is raised.
152 OutOfBounds handler = OnOutOfBounds; 144 OutOfBounds handler = OnOutOfBounds;
145
153 if (handler != null) 146 if (handler != null)
154 { 147 {
155 handler(pos); 148 handler(pos);
156 } 149 }
157 } 150 }
158 151
@@ -162,54 +155,34 @@ namespace OpenSim.Region.Physics.Manager
162 155
163 if (handler != null) 156 if (handler != null)
164 { 157 {
165 handler(e); 158 handler(e);
166 } 159 }
167
168 } 160 }
169 161
170
171 public abstract PhysicsVector Position { get; set; } 162 public abstract PhysicsVector Position { get; set; }
172
173 public abstract float Mass { get; } 163 public abstract float Mass { get; }
174
175 public abstract PhysicsVector Force { get; } 164 public abstract PhysicsVector Force { get; }
176
177 public abstract PhysicsVector GeometricCenter { get; } 165 public abstract PhysicsVector GeometricCenter { get; }
178
179 public abstract PhysicsVector CenterOfMass { get; } 166 public abstract PhysicsVector CenterOfMass { get; }
180
181 public abstract PhysicsVector Velocity { get; set; } 167 public abstract PhysicsVector Velocity { get; set; }
182
183 public abstract float CollisionScore { get;} 168 public abstract float CollisionScore { get;}
184
185 public abstract PhysicsVector Acceleration { get; } 169 public abstract PhysicsVector Acceleration { get; }
186
187 public abstract Quaternion Orientation { get; set; } 170 public abstract Quaternion Orientation { get; set; }
188 public abstract int PhysicsActorType { get; set; } 171 public abstract int PhysicsActorType { get; set; }
189
190 public abstract bool IsPhysical { get; set; } 172 public abstract bool IsPhysical { get; set; }
191
192 public abstract bool Flying { get; set; } 173 public abstract bool Flying { get; set; }
193 public abstract bool SetAlwaysRun { get; set; } 174 public abstract bool SetAlwaysRun { get; set; }
194 public abstract bool ThrottleUpdates { get; set; } 175 public abstract bool ThrottleUpdates { get; set; }
195
196 public abstract bool IsColliding { get; set; } 176 public abstract bool IsColliding { get; set; }
197 public abstract bool CollidingGround { get; set; } 177 public abstract bool CollidingGround { get; set; }
198 public abstract bool CollidingObj { get; set; } 178 public abstract bool CollidingObj { get; set; }
199
200 public abstract bool FloatOnWater { set; } 179 public abstract bool FloatOnWater { set; }
201
202 public abstract PhysicsVector RotationalVelocity { get; set; } 180 public abstract PhysicsVector RotationalVelocity { get; set; }
203
204 public abstract bool Kinematic { get; set; } 181 public abstract bool Kinematic { get; set; }
205
206 public abstract float Buoyancy { get; set; } 182 public abstract float Buoyancy { get; set; }
207 183
208 public abstract void AddForce(PhysicsVector force); 184 public abstract void AddForce(PhysicsVector force);
209
210 public abstract void SetMomentum(PhysicsVector momentum); 185 public abstract void SetMomentum(PhysicsVector momentum);
211
212
213 } 186 }
214 187
215 public class NullPhysicsActor : PhysicsActor 188 public class NullPhysicsActor : PhysicsActor
@@ -246,7 +219,8 @@ namespace OpenSim.Region.Physics.Manager
246 set { return; } 219 set { return; }
247 } 220 }
248 221
249 public override float Buoyancy { 222 public override float Buoyancy
223 {
250 get { return 0f; } 224 get { return 0f; }
251 set { return; } 225 set { return; }
252 } 226 }
@@ -256,7 +230,6 @@ namespace OpenSim.Region.Physics.Manager
256 set { return; } 230 set { return; }
257 } 231 }
258 232
259
260 public override bool CollidingGround 233 public override bool CollidingGround
261 { 234 {
262 get { return false; } 235 get { return false; }
@@ -313,10 +286,8 @@ namespace OpenSim.Region.Physics.Manager
313 286
314 public override void CrossingFailure() 287 public override void CrossingFailure()
315 { 288 {
316
317 } 289 }
318 290
319
320 public override Quaternion Orientation 291 public override Quaternion Orientation
321 { 292 {
322 get { return Quaternion.Identity; } 293 get { return Quaternion.Identity; }
@@ -366,17 +337,14 @@ namespace OpenSim.Region.Physics.Manager
366 337
367 public override void link(PhysicsActor obj) 338 public override void link(PhysicsActor obj)
368 { 339 {
369
370 } 340 }
371 341
372 public override void delink() 342 public override void delink()
373 { 343 {
374
375 } 344 }
376 345
377 public override void AddForce(PhysicsVector force) 346 public override void AddForce(PhysicsVector force)
378 { 347 {
379 return;
380 } 348 }
381 349
382 public override PhysicsVector RotationalVelocity 350 public override PhysicsVector RotationalVelocity
@@ -387,7 +355,6 @@ namespace OpenSim.Region.Physics.Manager
387 355
388 public override void SetMomentum(PhysicsVector momentum) 356 public override void SetMomentum(PhysicsVector momentum)
389 { 357 {
390 return;
391 } 358 }
392 } 359 }
393} 360}