diff options
author | Adam Frisby | 2009-04-04 23:23:24 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-04 23:23:24 +0000 |
commit | 746729b6cefce7093d346e21909b35440dd88569 (patch) | |
tree | a4782a6b9db82e6562c354b79eba480e477818de /OpenSim/Region/OptionalModules | |
parent | * Implements IObjectPhysics, this collects Physics attributes into one interf... (diff) | |
download | opensim-SC_OLD-746729b6cefce7093d346e21909b35440dd88569.zip opensim-SC_OLD-746729b6cefce7093d346e21909b35440dd88569.tar.gz opensim-SC_OLD-746729b6cefce7093d346e21909b35440dd88569.tar.bz2 opensim-SC_OLD-746729b6cefce7093d346e21909b35440dd88569.tar.xz |
* Implements IObjectPhysics on SOPObject partially.
* Eg, IObject.Physics.* is now valid syntax and compiles (but will throw NotSupported at runtime)
Diffstat (limited to '')
3 files changed, 116 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs index 0b8fc37..36d016e 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Drawing; | 29 | using System.Drawing; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; | ||
31 | 32 | ||
32 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 33 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
33 | { | 34 | { |
@@ -140,7 +141,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
140 | /// </summary> | 141 | /// </summary> |
141 | String Text { get; set; } | 142 | String Text { get; set; } |
142 | 143 | ||
143 | bool IsPhysical { get; set; } // SetStatus(PHYSICS) | ||
144 | bool IsPhantom { get; set; } // SetStatus(PHANTOM) | 144 | bool IsPhantom { get; set; } // SetStatus(PHANTOM) |
145 | bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X) | 145 | bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X) |
146 | bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y) | 146 | bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y) |
@@ -162,6 +162,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
162 | 162 | ||
163 | PhysicsMaterial PhysicsMaterial { get; set; } | 163 | PhysicsMaterial PhysicsMaterial { get; set; } |
164 | 164 | ||
165 | IObjectPhysics Physics { get; } | ||
166 | |||
167 | |||
165 | /// <summary> | 168 | /// <summary> |
166 | /// Causes the object to speak to its surroundings, | 169 | /// Causes the object to speak to its surroundings, |
167 | /// equivilent to LSL/OSSL llSay | 170 | /// equivilent to LSL/OSSL llSay |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs index aaa95e5..9035db9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs | |||
@@ -5,25 +5,27 @@ using OpenMetaverse; | |||
5 | 5 | ||
6 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object | 6 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object |
7 | { | 7 | { |
8 | interface IObjectPhysics | 8 | public interface IObjectPhysics |
9 | { | 9 | { |
10 | bool Enabled { get; set; } | 10 | bool Enabled { get; set; } |
11 | |||
11 | bool Phantom { get; set; } | 12 | bool Phantom { get; set; } |
12 | bool PhantomCollisions { get; set; } | 13 | bool PhantomCollisions { get; set; } |
13 | 14 | ||
14 | double Density { get; set; } | 15 | double Density { get; set; } |
15 | double Mass { get; set; } | 16 | double Mass { get; set; } |
16 | |||
17 | double Buoyancy { get; set; } | 17 | double Buoyancy { get; set; } |
18 | 18 | ||
19 | Vector3 GeometricCenter { get; } | 19 | Vector3 GeometricCenter { get; } |
20 | Vector3 CenterOfMass { get; } | 20 | Vector3 CenterOfMass { get; } |
21 | |||
22 | Vector3 RotationalVelocity { get; set; } | ||
21 | Vector3 Velocity { get; set; } | 23 | Vector3 Velocity { get; set; } |
22 | Vector3 Torque { get; set; } | 24 | Vector3 Torque { get; set; } |
23 | |||
24 | Vector3 Acceleration { get; } | 25 | Vector3 Acceleration { get; } |
25 | Quaternion Orientation { get; set; } | 26 | Vector3 Force { get; set; } |
26 | Vector3 RotationalVelocity { get; set; } | 27 | |
28 | bool FloatOnWater { set; } | ||
27 | 29 | ||
28 | void AddForce(Vector3 force, bool pushforce); | 30 | void AddForce(Vector3 force, bool pushforce); |
29 | void AddAngularForce(Vector3 force, bool pushforce); | 31 | void AddAngularForce(Vector3 force, bool pushforce); |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index c0a838b..2e93673 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | |||
@@ -30,10 +30,11 @@ using System.Collections.Generic; | |||
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Region.Framework.Scenes; | 32 | using OpenSim.Region.Framework.Scenes; |
33 | using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; | ||
33 | 34 | ||
34 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 35 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
35 | { | 36 | { |
36 | class SOPObject : MarshalByRefObject, IObject | 37 | class SOPObject : MarshalByRefObject, IObject, IObjectPhysics |
37 | { | 38 | { |
38 | private readonly Scene m_rootScene; | 39 | private readonly Scene m_rootScene; |
39 | private readonly uint m_localID; | 40 | private readonly uint m_localID; |
@@ -254,6 +255,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
254 | set { throw new System.NotImplementedException(); } | 255 | set { throw new System.NotImplementedException(); } |
255 | } | 256 | } |
256 | 257 | ||
258 | public IObjectPhysics Physics | ||
259 | { | ||
260 | get { return this; } | ||
261 | } | ||
262 | |||
257 | #region Public Functions | 263 | #region Public Functions |
258 | 264 | ||
259 | public void Say(string msg) | 265 | public void Say(string msg) |
@@ -386,5 +392,103 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
386 | 392 | ||
387 | #endregion | 393 | #endregion |
388 | 394 | ||
395 | #region IObjectPhysics | ||
396 | |||
397 | public bool Enabled | ||
398 | { | ||
399 | get { throw new System.NotImplementedException(); } | ||
400 | set { throw new System.NotImplementedException(); } | ||
401 | } | ||
402 | |||
403 | public bool Phantom | ||
404 | { | ||
405 | get { throw new System.NotImplementedException(); } | ||
406 | set { throw new System.NotImplementedException(); } | ||
407 | } | ||
408 | |||
409 | public bool PhantomCollisions | ||
410 | { | ||
411 | get { throw new System.NotImplementedException(); } | ||
412 | set { throw new System.NotImplementedException(); } | ||
413 | } | ||
414 | |||
415 | public double Density | ||
416 | { | ||
417 | get { throw new System.NotImplementedException(); } | ||
418 | set { throw new System.NotImplementedException(); } | ||
419 | } | ||
420 | |||
421 | public double Mass | ||
422 | { | ||
423 | get { throw new System.NotImplementedException(); } | ||
424 | set { throw new System.NotImplementedException(); } | ||
425 | } | ||
426 | |||
427 | public double Buoyancy | ||
428 | { | ||
429 | get { throw new System.NotImplementedException(); } | ||
430 | set { throw new System.NotImplementedException(); } | ||
431 | } | ||
432 | |||
433 | public Vector3 GeometricCenter | ||
434 | { | ||
435 | get { throw new System.NotImplementedException(); } | ||
436 | } | ||
437 | |||
438 | public Vector3 CenterOfMass | ||
439 | { | ||
440 | get { throw new System.NotImplementedException(); } | ||
441 | } | ||
442 | |||
443 | public Vector3 RotationalVelocity | ||
444 | { | ||
445 | get { throw new System.NotImplementedException(); } | ||
446 | set { throw new System.NotImplementedException(); } | ||
447 | } | ||
448 | |||
449 | public Vector3 Velocity | ||
450 | { | ||
451 | get { throw new System.NotImplementedException(); } | ||
452 | set { throw new System.NotImplementedException(); } | ||
453 | } | ||
454 | |||
455 | public Vector3 Torque | ||
456 | { | ||
457 | get { throw new System.NotImplementedException(); } | ||
458 | set { throw new System.NotImplementedException(); } | ||
459 | } | ||
460 | |||
461 | public Vector3 Acceleration | ||
462 | { | ||
463 | get { throw new System.NotImplementedException(); } | ||
464 | } | ||
465 | |||
466 | public Vector3 Force | ||
467 | { | ||
468 | get { throw new System.NotImplementedException(); } | ||
469 | set { throw new System.NotImplementedException(); } | ||
470 | } | ||
471 | |||
472 | public bool FloatOnWater | ||
473 | { | ||
474 | set { throw new System.NotImplementedException(); } | ||
475 | } | ||
476 | |||
477 | public void AddForce(Vector3 force, bool pushforce) | ||
478 | { | ||
479 | throw new System.NotImplementedException(); | ||
480 | } | ||
481 | |||
482 | public void AddAngularForce(Vector3 force, bool pushforce) | ||
483 | { | ||
484 | throw new System.NotImplementedException(); | ||
485 | } | ||
486 | |||
487 | public void SetMomentum(Vector3 momentum) | ||
488 | { | ||
489 | throw new System.NotImplementedException(); | ||
490 | } | ||
491 | |||
492 | #endregion | ||
389 | } | 493 | } |
390 | } | 494 | } |