aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/PhysXPlugin
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Physics/PhysXPlugin
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Region/Physics/PhysXPlugin')
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs2
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs124
2 files changed, 62 insertions, 64 deletions
diff --git a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
index 8e6d2a6..36cb952 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices;
55// You can specify all values by your own or you can build default build and revision 55// You can specify all values by your own or you can build default build and revision
56// numbers with the '*' character (the default): 56// numbers with the '*' character (the default):
57 57
58[assembly : AssemblyVersion("1.0.*")] 58[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index 8525e75..20bf358 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -128,17 +128,19 @@ namespace OpenSim.Region.Physics.PhysXPlugin
128 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 128 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
129 PhysicsVector size, Quaternion rotation) //To be removed 129 PhysicsVector size, Quaternion rotation) //To be removed
130 { 130 {
131 return this.AddPrimShape(primName, pbs, position, size, rotation, false); 131 return AddPrimShape(primName, pbs, position, size, rotation, false);
132 } 132 }
133
133 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 134 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
134 PhysicsVector size, Quaternion rotation, bool isPhysical) 135 PhysicsVector size, Quaternion rotation, bool isPhysical)
135 { 136 {
136 return AddPrim(position, size, rotation); 137 return AddPrim(position, size, rotation);
137 } 138 }
139
138 public override void AddPhysicsActorTaint(PhysicsActor prim) 140 public override void AddPhysicsActorTaint(PhysicsActor prim)
139 { 141 {
140
141 } 142 }
143
142 public override float Simulate(float timeStep) 144 public override float Simulate(float timeStep)
143 { 145 {
144 float fps = 0f; 146 float fps = 0f;
@@ -209,51 +211,61 @@ namespace OpenSim.Region.Physics.PhysXPlugin
209 _acceleration = new PhysicsVector(); 211 _acceleration = new PhysicsVector();
210 _character = character; 212 _character = character;
211 } 213 }
214
212 public override int PhysicsActorType 215 public override int PhysicsActorType
213 { 216 {
214 get { return (int)ActorTypes.Agent; } 217 get { return (int) ActorTypes.Agent; }
215 set { return; } 218 set { return; }
216 } 219 }
220
217 public override bool SetAlwaysRun 221 public override bool SetAlwaysRun
218 { 222 {
219 get { return false; } 223 get { return false; }
220 set { return; } 224 set { return; }
221 } 225 }
226
222 public override bool IsPhysical 227 public override bool IsPhysical
223 { 228 {
224 get { return false; } 229 get { return false; }
225 set { return; } 230 set { return; }
226 } 231 }
232
227 public override bool ThrottleUpdates 233 public override bool ThrottleUpdates
228 { 234 {
229 get { return false; } 235 get { return false; }
230 set { return; } 236 set { return; }
231 } 237 }
238
232 public override bool Flying 239 public override bool Flying
233 { 240 {
234 get { return flying; } 241 get { return flying; }
235 set { flying = value; } 242 set { flying = value; }
236 } 243 }
244
237 public override bool IsColliding 245 public override bool IsColliding
238 { 246 {
239 get { return iscolliding; } 247 get { return iscolliding; }
240 set { iscolliding = value; } 248 set { iscolliding = value; }
241 } 249 }
250
242 public override bool CollidingGround 251 public override bool CollidingGround
243 { 252 {
244 get { return false; } 253 get { return false; }
245 set { return; } 254 set { return; }
246 } 255 }
256
247 public override bool CollidingObj 257 public override bool CollidingObj
248 { 258 {
249 get { return false; } 259 get { return false; }
250 set { return; } 260 set { return; }
251 } 261 }
262
252 public override PhysicsVector RotationalVelocity 263 public override PhysicsVector RotationalVelocity
253 { 264 {
254 get { return m_rotationalVelocity; } 265 get { return m_rotationalVelocity; }
255 set { m_rotationalVelocity = value; } 266 set { m_rotationalVelocity = value; }
256 } 267 }
268
257 public override PhysicsVector Position 269 public override PhysicsVector Position
258 { 270 {
259 get { return _position; } 271 get { return _position; }
@@ -273,22 +285,27 @@ namespace OpenSim.Region.Physics.PhysXPlugin
273 get { return PhysicsVector.Zero; } 285 get { return PhysicsVector.Zero; }
274 set { } 286 set { }
275 } 287 }
288
276 public override float Mass 289 public override float Mass
277 { 290 {
278 get { return 0f; } 291 get { return 0f; }
279 } 292 }
293
280 public override PhysicsVector Force 294 public override PhysicsVector Force
281 { 295 {
282 get { return PhysicsVector.Zero; } 296 get { return PhysicsVector.Zero; }
283 } 297 }
298
284 public override PhysicsVector CenterOfMass 299 public override PhysicsVector CenterOfMass
285 { 300 {
286 get { return PhysicsVector.Zero; } 301 get { return PhysicsVector.Zero; }
287 } 302 }
303
288 public override PhysicsVector GeometricCenter 304 public override PhysicsVector GeometricCenter
289 { 305 {
290 get { return PhysicsVector.Zero; } 306 get { return PhysicsVector.Zero; }
291 } 307 }
308
292 public override PhysicsVector Velocity 309 public override PhysicsVector Velocity
293 { 310 {
294 get { return _velocity; } 311 get { return _velocity; }
@@ -345,23 +362,21 @@ namespace OpenSim.Region.Physics.PhysXPlugin
345 gravityAccel = 0; 362 gravityAccel = 0;
346 } 363 }
347 } 364 }
365
348 public override PrimitiveBaseShape Shape 366 public override PrimitiveBaseShape Shape
349 { 367 {
350 set 368 set { return; }
351 { 369 }
352 return; 370
353 } 371 public void UpdatePosition()
372 {
373 Vec3 vec = _character.Position;
374 _position.X = vec.X;
375 _position.Y = vec.Y;
376 _position.Z = vec.Z;
354 } 377 }
355 378 }
356 public void UpdatePosition() 379
357 {
358 Vec3 vec = this._character.Position;
359 this._position.X = vec.X;
360 this._position.Y = vec.Y;
361 this._position.Z = vec.Z;
362 }
363 }
364
365 380
366 public class PhysXPrim : PhysicsActor 381 public class PhysXPrim : PhysicsActor
367 { 382 {
@@ -376,55 +391,62 @@ namespace OpenSim.Region.Physics.PhysXPlugin
376 _acceleration = new PhysicsVector(); 391 _acceleration = new PhysicsVector();
377 _prim = prim; 392 _prim = prim;
378 } 393 }
394
379 public override int PhysicsActorType 395 public override int PhysicsActorType
380 { 396 {
381 get { return (int)ActorTypes.Prim; } 397 get { return (int) ActorTypes.Prim; }
382 set { return; } 398 set { return; }
383 } 399 }
400
384 public override bool IsPhysical 401 public override bool IsPhysical
385 { 402 {
386 get { return false; } 403 get { return false; }
387 set { return; } 404 set { return; }
388 } 405 }
406
389 public override bool SetAlwaysRun 407 public override bool SetAlwaysRun
390 { 408 {
391 get { return false; } 409 get { return false; }
392 set { return; } 410 set { return; }
393 } 411 }
412
394 public override bool ThrottleUpdates 413 public override bool ThrottleUpdates
395 { 414 {
396 get { return false; } 415 get { return false; }
397 set { return; } 416 set { return; }
398 } 417 }
418
399 public override PhysicsVector RotationalVelocity 419 public override PhysicsVector RotationalVelocity
400 { 420 {
401 get { return m_rotationalVelocity; } 421 get { return m_rotationalVelocity; }
402 set { m_rotationalVelocity = value; } 422 set { m_rotationalVelocity = value; }
403 } 423 }
424
404 public override bool Flying 425 public override bool Flying
405 { 426 {
406 get { return false; //no flying prims for you 427 get { return false; //no flying prims for you
407 } 428 }
408 set { } 429 set { }
409 } 430 }
431
410 public override bool IsColliding 432 public override bool IsColliding
411 { 433 {
412 get 434 get { return false; }
413 {
414 return false;
415 }
416 set { } 435 set { }
417 } 436 }
437
418 public override bool CollidingGround 438 public override bool CollidingGround
419 { 439 {
420 get { return false; } 440 get { return false; }
421 set { return; } 441 set { return; }
422 } 442 }
443
423 public override bool CollidingObj 444 public override bool CollidingObj
424 { 445 {
425 get { return false; } 446 get { return false; }
426 set { return; } 447 set { return; }
427 } 448 }
449
428 public override PhysicsVector Position 450 public override PhysicsVector Position
429 { 451 {
430 get 452 get
@@ -449,75 +471,52 @@ namespace OpenSim.Region.Physics.PhysXPlugin
449 471
450 public override PrimitiveBaseShape Shape 472 public override PrimitiveBaseShape Shape
451 { 473 {
452 set 474 set { return; }
453 {
454 return;
455 }
456 } 475 }
457 476
458 public override PhysicsVector Velocity 477 public override PhysicsVector Velocity
459 { 478 {
460 get 479 get { return _velocity; }
461 { 480 set { _velocity = value; }
462 return _velocity;
463 }
464 set
465 {
466 _velocity = value;
467 }
468 } 481 }
469 482
470 public override bool Kinematic 483 public override bool Kinematic
471 { 484 {
472 get 485 get { return _prim.Kinematic; }
473 { 486 set { _prim.Kinematic = value; }
474 return this._prim.Kinematic;
475 }
476 set
477 {
478 this._prim.Kinematic = value;
479 }
480 } 487 }
481 488
482 public override Quaternion Orientation 489 public override Quaternion Orientation
483 { 490 {
484 get 491 get
485 { 492 {
486 Quaternion res = new Quaternion(); 493 Quaternion res = new Quaternion();
487 PhysXWrapper.Quaternion quat = this._prim.GetOrientation(); 494 PhysXWrapper.Quaternion quat = _prim.GetOrientation();
488 res.w = quat.W; 495 res.w = quat.W;
489 res.x = quat.X; 496 res.x = quat.X;
490 res.y = quat.Y; 497 res.y = quat.Y;
491 res.z = quat.Z; 498 res.z = quat.Z;
492 return res; 499 return res;
493 } 500 }
494 set 501 set { }
495 {
496
497 }
498 } 502 }
499 503
500 public override PhysicsVector Acceleration 504 public override PhysicsVector Acceleration
501 { 505 {
502 get 506 get { return _acceleration; }
503 {
504 return _acceleration;
505 }
506
507 } 507 }
508 public void SetAcceleration (PhysicsVector accel) 508
509 public void SetAcceleration(PhysicsVector accel)
509 { 510 {
510 this._acceleration = accel; 511 _acceleration = accel;
511 } 512 }
512 513
513 public override void AddForce(PhysicsVector force) 514 public override void AddForce(PhysicsVector force)
514 { 515 {
515
516 } 516 }
517 517
518 public override void SetMomentum(PhysicsVector momentum) 518 public override void SetMomentum(PhysicsVector momentum)
519 { 519 {
520
521 } 520 }
522 521
523 public override PhysicsVector Size 522 public override PhysicsVector Size
@@ -545,6 +544,5 @@ namespace OpenSim.Region.Physics.PhysXPlugin
545 { 544 {
546 get { return PhysicsVector.Zero; } 545 get { return PhysicsVector.Zero; }
547 } 546 }
548
549 } 547 }
550} 548} \ No newline at end of file