aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs83
1 files changed, 62 insertions, 21 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
index 2e93673..e62f795 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs
@@ -31,6 +31,7 @@ using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Framework.Scenes; 32using OpenSim.Region.Framework.Scenes;
33using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; 33using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object;
34using OpenSim.Region.Physics.Manager;
34 35
35namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 36namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
36{ 37{
@@ -414,79 +415,119 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
414 415
415 public double Density 416 public double Density
416 { 417 {
417 get { throw new System.NotImplementedException(); } 418 get { return (GetSOP().PhysActor.Mass/Scale.X*Scale.Y/Scale.Z); }
418 set { throw new System.NotImplementedException(); } 419 set { throw new NotImplementedException(); }
419 } 420 }
420 421
421 public double Mass 422 public double Mass
422 { 423 {
423 get { throw new System.NotImplementedException(); } 424 get { return GetSOP().PhysActor.Mass; }
424 set { throw new System.NotImplementedException(); } 425 set { throw new NotImplementedException(); }
425 } 426 }
426 427
427 public double Buoyancy 428 public double Buoyancy
428 { 429 {
429 get { throw new System.NotImplementedException(); } 430 get { return GetSOP().PhysActor.Buoyancy; }
430 set { throw new System.NotImplementedException(); } 431 set { GetSOP().PhysActor.Buoyancy = (float)value; }
431 } 432 }
432 433
433 public Vector3 GeometricCenter 434 public Vector3 GeometricCenter
434 { 435 {
435 get { throw new System.NotImplementedException(); } 436 get
437 {
438 PhysicsVector tmp = GetSOP().PhysActor.GeometricCenter;
439 return new Vector3(tmp.X, tmp.Y, tmp.Z);
440 }
436 } 441 }
437 442
438 public Vector3 CenterOfMass 443 public Vector3 CenterOfMass
439 { 444 {
440 get { throw new System.NotImplementedException(); } 445 get
446 {
447 PhysicsVector tmp = GetSOP().PhysActor.CenterOfMass;
448 return new Vector3(tmp.X, tmp.Y, tmp.Z);
449 }
441 } 450 }
442 451
443 public Vector3 RotationalVelocity 452 public Vector3 RotationalVelocity
444 { 453 {
445 get { throw new System.NotImplementedException(); } 454 get
446 set { throw new System.NotImplementedException(); } 455 {
456 PhysicsVector tmp = GetSOP().PhysActor.RotationalVelocity;
457 return new Vector3(tmp.X, tmp.Y, tmp.Z);
458 }
459 set
460 {
461 GetSOP().PhysActor.RotationalVelocity = new PhysicsVector(value.X, value.Y, value.Z);
462 }
447 } 463 }
448 464
449 public Vector3 Velocity 465 public Vector3 Velocity
450 { 466 {
451 get { throw new System.NotImplementedException(); } 467 get
452 set { throw new System.NotImplementedException(); } 468 {
469 PhysicsVector tmp = GetSOP().PhysActor.Velocity;
470 return new Vector3(tmp.X, tmp.Y, tmp.Z);
471 }
472 set
473 {
474 GetSOP().PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z);
475 }
453 } 476 }
454 477
455 public Vector3 Torque 478 public Vector3 Torque
456 { 479 {
457 get { throw new System.NotImplementedException(); } 480 get
458 set { throw new System.NotImplementedException(); } 481 {
482 PhysicsVector tmp = GetSOP().PhysActor.Torque;
483 return new Vector3(tmp.X, tmp.Y, tmp.Z);
484 }
485 set
486 {
487 GetSOP().PhysActor.Torque = new PhysicsVector(value.X, value.Y, value.Z);
488 }
459 } 489 }
460 490
461 public Vector3 Acceleration 491 public Vector3 Acceleration
462 { 492 {
463 get { throw new System.NotImplementedException(); } 493 get
494 {
495 PhysicsVector tmp = GetSOP().PhysActor.Acceleration;
496 return new Vector3(tmp.X, tmp.Y, tmp.Z);
497 }
464 } 498 }
465 499
466 public Vector3 Force 500 public Vector3 Force
467 { 501 {
468 get { throw new System.NotImplementedException(); } 502 get
469 set { throw new System.NotImplementedException(); } 503 {
504 PhysicsVector tmp = GetSOP().PhysActor.Force;
505 return new Vector3(tmp.X, tmp.Y, tmp.Z);
506 }
507 set
508 {
509 GetSOP().PhysActor.Force = new PhysicsVector(value.X, value.Y, value.Z);
510 }
470 } 511 }
471 512
472 public bool FloatOnWater 513 public bool FloatOnWater
473 { 514 {
474 set { throw new System.NotImplementedException(); } 515 set { GetSOP().PhysActor.FloatOnWater = value; }
475 } 516 }
476 517
477 public void AddForce(Vector3 force, bool pushforce) 518 public void AddForce(Vector3 force, bool pushforce)
478 { 519 {
479 throw new System.NotImplementedException(); 520 GetSOP().PhysActor.AddForce(new PhysicsVector(force.X, force.Y, force.Z), pushforce);
480 } 521 }
481 522
482 public void AddAngularForce(Vector3 force, bool pushforce) 523 public void AddAngularForce(Vector3 force, bool pushforce)
483 { 524 {
484 throw new System.NotImplementedException(); 525 GetSOP().PhysActor.AddAngularForce(new PhysicsVector(force.X, force.Y, force.Z), pushforce);
485 } 526 }
486 527
487 public void SetMomentum(Vector3 momentum) 528 public void SetMomentum(Vector3 momentum)
488 { 529 {
489 throw new System.NotImplementedException(); 530 GetSOP().PhysActor.SetMomentum(new PhysicsVector(momentum.X, momentum.Y, momentum.Z));
490 } 531 }
491 532
492 #endregion 533 #endregion