From 1a25969096834e104d1ea69a26cab9c5b0a061eb Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 1 Apr 2009 11:03:42 +0000 Subject: * MRM Adjustments * Renamed 'Material' to PhysicsMaterial (Wood, Glass, Metal, etc.). May want to place in subclass with other physics specific properties. (We however need to support these features in ODE/etc first.) * Renamed Faces to Materials. IObjectFace to IObjectMaterial - this is for clarity for those coming from a 3D Programming background (it also makes more sense if/when we support Meshes in core). Properties and members remain identical. * Added XMLDoc comments to IObject to assist people writing MRMs in XMLDoc aware editors. --- .../Scripting/Minimodule/IObject.cs | 34 ++++++++++++++++++---- .../OptionalModules/Scripting/Minimodule/IWorld.cs | 4 --- .../Scripting/Minimodule/SOPObject.cs | 6 ++-- .../OptionalModules/Scripting/Minimodule/World.cs | 2 +- 4 files changed, 32 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Scripting') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs index c7f9569..da8fce5 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs @@ -40,19 +40,41 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule String Name { get; set; } String Description { get; set; } - IObject[] Children { get; } + /// - /// Equals 'this' if we have no parent. Ergo, Root.Children.Count will always return the total number of items in the linkset. + /// Returns the root object of a linkset. If this object is the root, it will return itself. /// IObject Root { get; } - IObjectFace[] Faces { get; } + /// + /// Returns a collection of objects which are linked to the current object. Does not include the root object. + /// + IObject[] Children { get; } + + /// + /// Returns a list of materials attached to this object. Each may contain unique texture + /// and other visual information. For primitive based objects, this correlates with + /// Object Faces. For mesh based objects, this correlates with Materials. + /// + IObjectMaterial[] Materials { get; } + /// + /// The bounding box of the object. Primitive and Mesh objects alike are scaled to fit within these bounds. + /// Vector3 Scale { get; set; } + + /// + /// The rotation of the object relative to the Scene + /// Quaternion Rotation { get; set; } + + /// + /// The position of the object relative to the Scene + /// Vector3 Position { get; set; } + Vector3 SitTarget { get; set; } String SitTargetText { get; set; } @@ -80,10 +102,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule // Taper[A+B], Shear[A+B], Revolutions, // RadiusOffset, Skew - Material Material { get; set; } + PhysicsMaterial PhysicsMaterial { get; set; } } - public enum Material + public enum PhysicsMaterial { Default, Glass, @@ -114,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule Planar } - public interface IObjectFace + public interface IObjectMaterial { Color Color { get; set; } UUID Texture { get; set; } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs index 1b1ce92..f06f57a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IWorld.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { public interface IWorld diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 538a496..8b7b470 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -80,12 +80,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule get { return new SOPObject(m_rootScene, GetSOP().ParentGroup.RootPart.LocalId); } } - public IObjectFace[] Faces + public IObjectMaterial[] Materials { get { SceneObjectPart sop = GetSOP(); - IObjectFace[] rets = new IObjectFace[getNumberOfSides(sop)]; + IObjectMaterial[] rets = new IObjectMaterial[getNumberOfSides(sop)]; for (int i = 0; i < rets.Length;i++ ) { @@ -208,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule set { throw new System.NotImplementedException(); } } - public Material Material + public PhysicsMaterial PhysicsMaterial { get { throw new System.NotImplementedException(); } set { throw new System.NotImplementedException(); } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs index 987868a..c798cc8 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule private readonly Scene m_internalScene; private readonly Heightmap m_heights; - private ObjectAccessor m_objs; + private readonly ObjectAccessor m_objs; public World(Scene internalScene) { -- cgit v1.1