diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs index 21efc6d175..d3eeffb6d2 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs @@ -33,14 +33,35 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { public interface IObject { + /// + /// Returns whether or not this object is still in the world. + /// Eg, if you store an IObject reference, however the object + /// is deleted before you use it, it will throw a NullReference + /// exception. 'Exists' allows you to check the object is still + /// in play before utilizing it. + /// bool Exists { get; } + + /// + /// The local region-unique ID for this object. + /// uint LocalID { get; } + + /// + /// The global 'world-unique' ID for this object. + /// (Note, may not actually be world unique) + /// UUID GlobalID { get; } + /// + /// The name of this Object. + /// String Name { get; set; } - String Description { get; set; } - + /// + /// The description assigned to this object. + /// + String Description { get; set; } /// /// Returns the root object of a linkset. If this object is the root, it will return itself. @@ -67,19 +88,35 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// /// The rotation of the object relative to the Scene /// - Quaternion Rotation { get; set; } + Quaternion WorldRotation { get; set; } + + /// + /// The rotation of the object relative to a parent object + /// If root, works the same as WorldRotation + /// + Quaternion OffsetRotation { get; set; } /// /// The position of the object relative to the Scene /// - Vector3 Position { get; set; } + Vector3 WorldPosition { get; set; } + /// + /// The position of the object relative to a parent object + /// If root, works the same as WorldPosition + /// + Vector3 OffsetPosition { get; set; } Vector3 SitTarget { get; set; } String SitTargetText { get; set; } String TouchText { get; set; } + /// + /// Text to be associated with this object, in the + /// Second Life(r) viewer, this is shown above the + /// object. + /// String Text { get; set; } bool IsPhysical { get; set; } // SetStatus(PHYSICS) diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 12d996af7d..f53a7df520 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -103,13 +103,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule set { GetSOP().Scale = value; } } - public Quaternion Rotation + public Quaternion WorldRotation { get { throw new System.NotImplementedException(); } set { throw new System.NotImplementedException(); } } - public Vector3 Position + public Quaternion OffsetRotation + { + get { throw new System.NotImplementedException(); } + set { throw new System.NotImplementedException(); } + } + + public Vector3 WorldPosition { get { return GetSOP().AbsolutePosition; } set @@ -119,6 +125,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule } } + public Vector3 OffsetPosition + { + get { return GetSOP().OffsetPosition; } + set { GetSOP().OffsetPosition = value; } + } + public Vector3 SitTarget { get { throw new System.NotImplementedException(); }