diff --git a/OpenMetaverse.Rendering.GPL/Face.cs b/OpenMetaverse.Rendering.GPL/Face.cs index a4eec4aa..52531bb8 100644 --- a/OpenMetaverse.Rendering.GPL/Face.cs +++ b/OpenMetaverse.Rendering.GPL/Face.cs @@ -395,9 +395,9 @@ namespace OpenMetaverse.Rendering if (((face.Mask & FaceMask.Inner) != 0) && ((face.Mask & FaceMask.Flat) != 0) && face.NumS > 2 && s > 0) { vertex.Position = primVertices[i].Position; - //vertex.TexCoord = new LLVector2(ss, tt); - //vertex.Normal = LLVector3.Zero; - //vertex.Binormal = LLVector3.Zero; + //vertex.TexCoord = new Vector2(ss, tt); + //vertex.Normal = Vector3.Zero; + //vertex.Binormal = Vector3.Zero; face.Vertices.Add(vertex); ++curVertex; diff --git a/OpenMetaverse.Rendering.Simple/SimpleRenderer.cs b/OpenMetaverse.Rendering.Simple/SimpleRenderer.cs index 9c33b0b9..5e98e5c4 100644 --- a/OpenMetaverse.Rendering.Simple/SimpleRenderer.cs +++ b/OpenMetaverse.Rendering.Simple/SimpleRenderer.cs @@ -30,7 +30,7 @@ using System.Collections.Generic; namespace OpenMetaverse.Rendering { [RendererName("Simple Cube Renderer")] - public partial class SimpleRenderer : IRendering + public class SimpleRenderer : IRendering { public SimpleMesh GenerateSimpleMesh(Primitive prim, DetailLevel lod) { diff --git a/OpenMetaverse.Tests/TypeTests.cs b/OpenMetaverse.Tests/TypeTests.cs index 9e9d89d1..a5cba558 100644 --- a/OpenMetaverse.Tests/TypeTests.cs +++ b/OpenMetaverse.Tests/TypeTests.cs @@ -38,7 +38,7 @@ namespace OpenMetaverse.Tests public class TypeTests : Assert { [Test] - public void LLUUIDs() + public void UUIDs() { // Creation UUID a = new UUID(); @@ -52,7 +52,7 @@ namespace OpenMetaverse.Tests UUID b = new UUID(new byte[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F }, 0); - Assert.IsTrue(a == b, "LLUUID comparison operator failed, " + a.ToString() + " should equal " + + Assert.IsTrue(a == b, "UUID comparison operator failed, " + a.ToString() + " should equal " + b.ToString()); // From string @@ -61,7 +61,7 @@ namespace OpenMetaverse.Tests string zeroonetwo = "00010203-0405-0607-0809-0a0b0c0d0e0f"; b = new UUID(zeroonetwo); - Assert.IsTrue(a == b, "LLUUID hyphenated string constructor failed, should have " + a.ToString() + + Assert.IsTrue(a == b, "UUID hyphenated string constructor failed, should have " + a.ToString() + " but we got " + b.ToString()); // ToString() @@ -82,7 +82,7 @@ namespace OpenMetaverse.Tests Quaternion a = new Quaternion(1, 0, 0, 0); Quaternion b = new Quaternion(1, 0, 0, 0); - Assert.IsTrue(a == b, "LLQuaternion comparison operator failed"); + Assert.IsTrue(a == b, "Quaternion comparison operator failed"); Quaternion expected = new Quaternion(0, 0, 0, -1); Quaternion result = a * b; @@ -111,9 +111,9 @@ namespace OpenMetaverse.Tests //public void VectorQuaternionMath() //{ // // Convert a vector to a quaternion and back - // LLVector3 a = new LLVector3(1f, 0.5f, 0.75f); - // LLQuaternion b = a.ToQuaternion(); - // LLVector3 c; + // Vector3 a = new Vector3(1f, 0.5f, 0.75f); + // Quaternion b = a.ToQuaternion(); + // Vector3 c; // b.GetEulerAngles(out c.X, out c.Y, out c.Z); // Assert.IsTrue(a == c, c.ToString() + " does not equal " + a.ToString()); diff --git a/OpenMetaverse.Utilities/RegistrationApi.cs b/OpenMetaverse.Utilities/RegistrationApi.cs index c81e7b71..b2ddaf35 100644 --- a/OpenMetaverse.Utilities/RegistrationApi.cs +++ b/OpenMetaverse.Utilities/RegistrationApi.cs @@ -328,7 +328,7 @@ namespace OpenMetaverse { // everything is okay // FIXME: - //return new LLUUID(((Dictionary)response)["agent_id"].ToString()); + //return new UUID(((Dictionary)response)["agent_id"].ToString()); } else { diff --git a/OpenMetaverse/AgentManager.cs b/OpenMetaverse/AgentManager.cs index ef6b011a..e0a5345a 100644 --- a/OpenMetaverse/AgentManager.cs +++ b/OpenMetaverse/AgentManager.cs @@ -682,9 +682,10 @@ namespace OpenMetaverse Scripted = 8, } - #endregion + #endregion Enums #region Callbacks + /// /// Triggered on incoming chat messages /// @@ -854,7 +855,7 @@ namespace OpenMetaverse /// /// Fired when camera tries to view beyond its view limits /// - /// Vector4 representing plane where constraints were hit + /// representing plane where constraints were hit public delegate void CameraConstraintCallback(Vector4 collidePlane); /// @@ -871,8 +872,9 @@ namespace OpenMetaverse /// Objects Type /// representing the velocity of object /// TODO: this should probably be a struct, and there should be an enum added for type - public delegate void ScriptSensorReplyCallback(UUID requestorID, UUID groupID, string name, UUID objectID, - UUID ownerID, Vector3 position, float range, Quaternion rotation, ScriptSensorTypeFlags type, Vector3 velocity); + public delegate void ScriptSensorReplyCallback(UUID requestorID, UUID groupID, string name, + UUID objectID, UUID ownerID, Vector3 position, float range, Quaternion rotation, + ScriptSensorTypeFlags type, Vector3 velocity); /// /// Fired in response to a RequestSit() @@ -884,8 +886,8 @@ namespace OpenMetaverse /// true of sitting on this object will force mouselook /// position avatar will be in when seated /// rotation avatar will be in when seated - public delegate void AvatarSitResponseCallback(UUID objectID, bool autoPilot, Vector3 cameraAtOffset, Vector3 cameraEyeOffset, - bool forceMouselook, Vector3 sitPosition, Quaternion sitRotation); + public delegate void AvatarSitResponseCallback(UUID objectID, bool autoPilot, Vector3 cameraAtOffset, + Vector3 cameraEyeOffset, bool forceMouselook, Vector3 sitPosition, Quaternion sitRotation); /// /// @@ -894,8 +896,10 @@ namespace OpenMetaverse /// /// /// - public delegate void AgentMovementCallback(Vector3 agentPosition, ulong regionHandle, Vector3 agentLookAt, string simVersion); - #endregion + public delegate void AgentMovementCallback(Vector3 agentPosition, ulong regionHandle, + Vector3 agentLookAt, string simVersion); + + #endregion Callbacks #region Events @@ -946,7 +950,8 @@ namespace OpenMetaverse public event ScriptSensorReplyCallback OnScriptSensorReply; /// Fired in response to a sit request public event AvatarSitResponseCallback OnAvatarSitResponse; - #endregion + + #endregion Events /// Reference to the GridClient object public readonly GridClient Client; diff --git a/OpenMetaverse/AppearanceManager.cs b/OpenMetaverse/AppearanceManager.cs index c776b316..741e0728 100644 --- a/OpenMetaverse/AppearanceManager.cs +++ b/OpenMetaverse/AppearanceManager.cs @@ -229,7 +229,7 @@ namespace OpenMetaverse /// Returns the assetID for a given WearableType /// /// the of the asset - /// The of the WearableType + /// The of the WearableType public UUID GetWearableAsset(WearableType type) { WearableData wearable; @@ -538,8 +538,8 @@ namespace OpenMetaverse /// /// Attach an item to an avatar specifying attachment details /// - /// The of the item to attach - /// The attachments owner + /// The of the item to attach + /// The attachments owner /// The name of the attachment /// The description of the attahment /// The to apply when attached @@ -580,7 +580,7 @@ namespace OpenMetaverse } /// - /// Detach an Item from avatar by items + /// Detach an Item from avatar by items /// /// The items ID to detach public void Detach(UUID itemID) @@ -650,7 +650,7 @@ namespace OpenMetaverse if (face == null) { - // If the texture is LLUUID.Zero the face should be null + // If the texture is UUID.Zero the face should be null if (AgentTextures[i] != UUID.Zero) { match = false; diff --git a/OpenMetaverse/AssetManager.cs b/OpenMetaverse/AssetManager.cs index 3d8d8172..cc215fce 100644 --- a/OpenMetaverse/AssetManager.cs +++ b/OpenMetaverse/AssetManager.cs @@ -451,7 +451,7 @@ namespace OpenMetaverse XferDownload transfer = new XferDownload(); transfer.XferID = id; - transfer.ID = new UUID(id); // Our dictionary tracks transfers with LLUUIDs, so convert the ulong back + transfer.ID = new UUID(id); // Our dictionary tracks transfers with UUIDs, so convert the ulong back transfer.Filename = filename; transfer.VFileID = vFileID; transfer.AssetType = vFileType; @@ -477,10 +477,10 @@ namespace OpenMetaverse /// /// /// - /// Use LLUUID.Zero if you do not have the + /// Use UUID.Zero if you do not have the /// asset ID but have all the necessary permissions /// The item ID of this asset in the inventory - /// Use LLUUID.Zero if you are not requesting an + /// Use UUID.Zero if you are not requesting an /// asset from an object inventory /// The owner of this asset /// Asset type @@ -1146,7 +1146,7 @@ namespace OpenMetaverse { SendXferPacketPacket xfer = (SendXferPacketPacket)packet; - // Lame ulong to LLUUID conversion, please go away Xfer system + // Lame ulong to UUID conversion, please go away Xfer system UUID transferID = new UUID(xfer.XferID.ID); Transfer transfer; XferDownload download = null; @@ -1447,7 +1447,7 @@ namespace OpenMetaverse /// /// Return bytes read from the local image cache, null if it does not exist /// - /// LLUUID of the image we want to get + /// UUID of the image we want to get /// Raw bytes of the image, or null on failure public byte[] GetCachedImageBytes(UUID imageID) { @@ -1468,7 +1468,7 @@ namespace OpenMetaverse /// Returns ImageDownload object of the /// image from the local image cache, null if it does not exist /// - /// LLUUID of the image we want to get + /// UUID of the image we want to get /// ImageDownload object containing the image, or null on failure public ImageDownload GetCachedImage(UUID imageID) { @@ -1492,7 +1492,7 @@ namespace OpenMetaverse /// /// Constructs a file name of the cached image /// - /// LLUUID of the image + /// UUID of the image /// String with the file name of the cahced image private string FileName(UUID imageID) { @@ -1502,7 +1502,7 @@ namespace OpenMetaverse /// /// Saves an image to the local cache /// - /// LLUUID of the image + /// UUID of the image /// Raw bytes the image consists of /// Weather the operation was successfull public bool SaveImageToCache(UUID imageID, byte[] imageData) @@ -1530,7 +1530,7 @@ namespace OpenMetaverse /// /// Get the file name of the asset stored with gived UUID /// - /// LLUUID of the image + /// UUID of the image /// Null if we don't have that UUID cached on disk, file name if found in the cache folder public string ImageFileName(UUID imageID) { @@ -1550,7 +1550,7 @@ namespace OpenMetaverse /// /// Checks if the image exists in the local cache /// - /// LLUUID of the image + /// UUID of the image /// True is the image is stored in the cache, otherwise false public bool HasImage(UUID imageID) { diff --git a/OpenMetaverse/AvatarManager.cs b/OpenMetaverse/AvatarManager.cs index 0cf36c74..35b64488 100644 --- a/OpenMetaverse/AvatarManager.cs +++ b/OpenMetaverse/AvatarManager.cs @@ -510,16 +510,16 @@ namespace OpenMetaverse { EffectType type = (EffectType)block.Type; - //LLColor color; + //Color4 color; //if (block.Color.Length == 4) //{ - // color = new LLColor(block.Color, 0); + // color = new Color4(block.Color, 0); //} //else //{ // Client.Log("Received a ViewerEffect.EffectBlock.Color array with " + block.Color.Length + // " bytes", Helpers.LogLevel.Warning); - // color = LLColor.Black; + // color = Color4.Black; //} // Each ViewerEffect type uses it's own custom binary format for additional data. Fun eh? diff --git a/OpenMetaverse/DirectoryManager.cs b/OpenMetaverse/DirectoryManager.cs index 75c6dbe8..b83bacb0 100644 --- a/OpenMetaverse/DirectoryManager.cs +++ b/OpenMetaverse/DirectoryManager.cs @@ -210,7 +210,7 @@ namespace OpenMetaverse public string FirstName; /// Agents last name public string LastName; - /// Agents + /// Agents public UUID AgentID; } /// @@ -607,7 +607,7 @@ namespace OpenMetaverse /// For example "0" = Today, "1" = tomorrow, "2" = following day, "-1" = yesterday, etc. /// Page # to show, 0 for First Page /// EventCategory event is listed under. - /// a LLUUID that can be used to track queries with results. + /// a UUID that can be used to track queries with results. /// UUID of query to correlate results in callback. public UUID StartEventsSearch(string searchText, bool showMature, string eventDay, uint queryStart, EventCategories category, UUID queryID) { diff --git a/OpenMetaverse/FriendsManager.cs b/OpenMetaverse/FriendsManager.cs index 1fda1ab8..1145a999 100644 --- a/OpenMetaverse/FriendsManager.cs +++ b/OpenMetaverse/FriendsManager.cs @@ -298,7 +298,7 @@ namespace OpenMetaverse /// /// A dictionary of key/value pairs containing known friends of this avatar. /// - /// The Key is the of the friend, the value is a + /// The Key is the of the friend, the value is a /// object that contains detailed information including permissions you have and have given to the friend /// public InternalDictionary FriendList = new InternalDictionary(); @@ -306,8 +306,8 @@ namespace OpenMetaverse /// /// A Dictionary of key/value pairs containing current pending frienship offers. /// - /// The key is the of the avatar making the request, - /// the value is the of the request which is used to accept + /// The key is the of the avatar making the request, + /// the value is the of the request which is used to accept /// or decline the friendship offer /// public InternalDictionary FriendRequests = new InternalDictionary(); @@ -449,7 +449,7 @@ namespace OpenMetaverse /// /// Change the rights of a friend avatar. /// - /// the of the friend + /// the of the friend /// the new rights to give the friend /// This method will implicitly set the rights to those passed in the rights parameter. public void GrantRights(UUID friendID, FriendRights rights) diff --git a/OpenMetaverse/Helpers.cs b/OpenMetaverse/Helpers.cs index 4c317472..c15dedda 100644 --- a/OpenMetaverse/Helpers.cs +++ b/OpenMetaverse/Helpers.cs @@ -1033,7 +1033,7 @@ namespace OpenMetaverse CRC += ownerID.CRC(); // OwnerID CRC += groupID.CRC(); // GroupID - // CRC += another 4 words which always seem to be zero -- unclear if this is a LLUUID or what + // CRC += another 4 words which always seem to be zero -- unclear if this is a UUID or what CRC += ownerMask; CRC += nextOwnerMask; CRC += everyoneMask; diff --git a/OpenMetaverse/Imaging/ManagedImage.cs b/OpenMetaverse/Imaging/ManagedImage.cs index d6fa7a6f..a6211b14 100644 --- a/OpenMetaverse/Imaging/ManagedImage.cs +++ b/OpenMetaverse/Imaging/ManagedImage.cs @@ -284,46 +284,67 @@ namespace OpenMetaverse.Imaging Bump = bump; } + /// + /// Create a byte array containing 32-bit RGBA data with a bottom-left + /// origin, suitable for feeding directly into OpenGL + /// + /// A byte array containing raw texture data public byte[] ExportRaw() { - int n = Width * Height; - int di = 0; - byte[] raw = new byte[n * 4]; + byte[] raw = new byte[Width * Height * 4]; if ((Channels & ImageChannels.Alpha) != 0) { if ((Channels & ImageChannels.Color) != 0) { // RGBA - for (int i = 0; i < n; i++) + for (int h = 0; h < Height; h++) { - raw[di++] = Red[i]; - raw[di++] = Green[i]; - raw[di++] = Blue[i]; - raw[di++] = Alpha[i]; + for (int w = 0; w < Width; w++) + { + int pos = (Height - 1 - h) * Width + w; + int srcPos = h * Width + w; + + raw[pos * 4 + 0] = Red[srcPos]; + raw[pos * 4 + 1] = Green[srcPos]; + raw[pos * 4 + 2] = Blue[srcPos]; + raw[pos * 4 + 3] = Alpha[srcPos]; + } } } else { // Alpha only - for (int i = 0; i < n; i++) + for (int h = 0; h < Height; h++) { - raw[di++] = Alpha[i]; - raw[di++] = Alpha[i]; - raw[di++] = Alpha[i]; - raw[di++] = Byte.MaxValue; + for (int w = 0; w < Width; w++) + { + int pos = (Height - 1 - h) * Width + w; + int srcPos = h * Width + w; + + raw[pos * 4 + 0] = Alpha[srcPos]; + raw[pos * 4 + 1] = Alpha[srcPos]; + raw[pos * 4 + 2] = Alpha[srcPos]; + raw[pos * 4 + 3] = Byte.MaxValue; + } } } } else { // RGB - for (int i = 0; i < n; i++) + for (int h = 0; h < Height; h++) { - raw[di++] = Red[i]; - raw[di++] = Green[i]; - raw[di++] = Blue[i]; - raw[di++] = Byte.MaxValue; + for (int w = 0; w < Width; w++) + { + int pos = (Height - 1 - h) * Width + w; + int srcPos = h * Width + w; + + raw[pos * 4 + 0] = Red[srcPos]; + raw[pos * 4 + 1] = Green[srcPos]; + raw[pos * 4 + 2] = Blue[srcPos]; + raw[pos * 4 + 3] = Byte.MaxValue; + } } } diff --git a/OpenMetaverse/InternalDictionary.cs b/OpenMetaverse/InternalDictionary.cs index cc54b2f8..037d7283 100644 --- a/OpenMetaverse/InternalDictionary.cs +++ b/OpenMetaverse/InternalDictionary.cs @@ -75,12 +75,12 @@ namespace OpenMetaverse /// // populates with copied values from example KeyNameCache Dictionary. /// /// // create source dictionary - /// Dictionary<LLUUID, string> KeyNameCache = new Dictionary<LLUUID, string>(); + /// Dictionary<UUID, string> KeyNameCache = new Dictionary<UUID, string>(); /// KeyNameCache.Add("8300f94a-7970-7810-cf2c-fc9aa6cdda24", "Jack Avatar"); /// KeyNameCache.Add("27ba1e40-13f7-0708-3e98-5819d780bd62", "Jill Avatar"); /// /// // Initialize new dictionary. - /// public InternalDictionary<LLUUID, string> testAvName = new InternalDictionary<LLUUID, string>(KeyNameCache); + /// public InternalDictionary<UUID, string> testAvName = new InternalDictionary<UUID, string>(KeyNameCache); /// /// public InternalDictionary(IDictionary dictionary) @@ -161,8 +161,8 @@ namespace OpenMetaverse /// int radius = 20; /// List<Primitive> prims = Client.Network.CurrentSim.ObjectsPrimitives.FindAll( /// delegate(Primitive prim) { - /// LLVector3 pos = prim.Position; - /// return ((prim.ParentID == 0) && (pos != LLVector3.Zero) && (LLVector3.Dist(pos, location) < radius)); + /// Vector3 pos = prim.Position; + /// return ((prim.ParentID == 0) && (pos != Vector3.Zero) && (Vector3.Dist(pos, location) < radius)); /// } /// ); /// diff --git a/OpenMetaverse/Inventory.cs b/OpenMetaverse/Inventory.cs index 74c9bfb4..4d18b2b6 100644 --- a/OpenMetaverse/Inventory.cs +++ b/OpenMetaverse/Inventory.cs @@ -296,7 +296,7 @@ namespace OpenMetaverse /// Used to find out if Inventory contains the InventoryObject /// specified by uuid. /// - /// The LLUUID to check. + /// The UUID to check. /// true if inventory contains uuid, false otherwise public bool Contains(UUID uuid) { diff --git a/OpenMetaverse/InventoryManager.cs b/OpenMetaverse/InventoryManager.cs index 7f2416c8..c15ee052 100644 --- a/OpenMetaverse/InventoryManager.cs +++ b/OpenMetaverse/InventoryManager.cs @@ -139,23 +139,23 @@ namespace OpenMetaverse /// public abstract class InventoryBase { - /// of item/folder + /// of item/folder public readonly UUID UUID; - /// of parent folder + /// of parent folder public UUID ParentUUID; /// Name of item/folder public string Name; - /// Item/Folder Owners + /// Item/Folder Owners public UUID OwnerID; /// /// Constructor, takes an itemID as a parameter /// - /// The of the item + /// The of the item public InventoryBase(UUID itemID) { if (itemID == UUID.Zero) - Logger.Log("Initializing an InventoryBase with LLUUID.Zero", Helpers.LogLevel.Warning); + Logger.Log("Initializing an InventoryBase with UUID.Zero", Helpers.LogLevel.Warning); UUID = itemID; } @@ -199,7 +199,7 @@ namespace OpenMetaverse /// public class InventoryItem : InventoryBase { - /// The of this item + /// The of this item public UUID AssetUUID; /// The combined of this item public Permissions Permissions; @@ -207,11 +207,11 @@ namespace OpenMetaverse public AssetType AssetType; /// The type of item from the enum public InventoryType InventoryType; - /// The of the creator of this item + /// The of the creator of this item public UUID CreatorID; /// A Description of this item public string Description; - /// The s this item is set to or owned by + /// The s this item is set to or owned by public UUID GroupID; /// If true, item is owned by a group public bool GroupOwned; @@ -228,7 +228,7 @@ namespace OpenMetaverse /// /// Construct a new InventoryItem object /// - /// The of the item + /// The of the item public InventoryItem(UUID itemID) : base(itemID) { } @@ -236,7 +236,7 @@ namespace OpenMetaverse /// Construct a new InventoryItem object of a specific Type /// /// The type of item from - /// of the item + /// of the item public InventoryItem(InventoryType type, UUID itemID) : base(itemID) { InventoryType = type; } /// @@ -305,7 +305,7 @@ namespace OpenMetaverse /// /// Construct an InventoryTexture object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryTexture(UUID itemID) : base(itemID) { @@ -321,7 +321,7 @@ namespace OpenMetaverse /// /// Construct an InventorySound object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventorySound(UUID itemID) : base(itemID) { @@ -337,7 +337,7 @@ namespace OpenMetaverse /// /// Construct an InventoryCallingCard object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryCallingCard(UUID itemID) : base(itemID) { @@ -353,7 +353,7 @@ namespace OpenMetaverse /// /// Construct an InventoryLandmark object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryLandmark(UUID itemID) : base(itemID) { @@ -378,7 +378,7 @@ namespace OpenMetaverse /// /// Construct an InventoryObject object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryObject(UUID itemID) : base(itemID) { @@ -406,7 +406,7 @@ namespace OpenMetaverse /// /// Construct an InventoryNotecard object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryNotecard(UUID itemID) : base(itemID) { @@ -423,7 +423,7 @@ namespace OpenMetaverse /// /// Construct an InventoryCategory object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryCategory(UUID itemID) : base(itemID) { @@ -439,7 +439,7 @@ namespace OpenMetaverse /// /// Construct an InventoryLSL object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryLSL(UUID itemID) : base(itemID) { @@ -455,7 +455,7 @@ namespace OpenMetaverse /// /// Construct an InventorySnapshot object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventorySnapshot(UUID itemID) : base(itemID) { @@ -471,7 +471,7 @@ namespace OpenMetaverse /// /// Construct an InventoryAttachment object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryAttachment(UUID itemID) : base(itemID) { @@ -496,7 +496,7 @@ namespace OpenMetaverse /// /// Construct an InventoryWearable object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryWearable(UUID itemID) : base(itemID) { InventoryType = InventoryType.Wearable; } @@ -518,7 +518,7 @@ namespace OpenMetaverse /// /// Construct an InventoryAnimation object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryAnimation(UUID itemID) : base(itemID) { @@ -534,7 +534,7 @@ namespace OpenMetaverse /// /// Construct an InventoryGesture object /// - /// A which becomes the + /// A which becomes the /// objects AssetUUID public InventoryGesture(UUID itemID) : base(itemID) { @@ -558,7 +558,7 @@ namespace OpenMetaverse /// /// Constructor /// - /// LLUUID of the folder + /// UUID of the folder public InventoryFolder(UUID itemID) : base(itemID) { } @@ -904,8 +904,8 @@ namespace OpenMetaverse /// /// Fetch an inventory item from the dataserver /// - /// The items - /// The item Owners + /// The items + /// The item Owners /// a integer representing the number of milliseconds to wait for results /// An object on success, or null if no item was found /// Items will also be sent to the event @@ -936,8 +936,8 @@ namespace OpenMetaverse /// /// Request A single inventory item /// - /// The items - /// The item Owners + /// The items + /// The item Owners /// public void RequestFetchInventory(UUID itemID, UUID ownerID) { @@ -984,8 +984,8 @@ namespace OpenMetaverse /// /// Get contents of a folder /// - /// The of the folder to search - /// The of the folders owner + /// The of the folder to search + /// The of the folders owner /// true to retrieve folders /// true to retrieve items /// sort order to return results in @@ -1034,7 +1034,7 @@ namespace OpenMetaverse /// Request the contents of an inventory folder /// /// The folder to search - /// The folder owners + /// The folder owners /// true to return s contained in folder /// true to return s containd in folder /// the sort order to return items in @@ -1067,7 +1067,7 @@ namespace OpenMetaverse /// This will return the root folder if one does not exist /// /// The UUID of the desired folder if found, the UUID of the RootFolder - /// if not found, or LLUUID.Zero on failure + /// if not found, or UUID.Zero on failure public UUID FindFolderForType(AssetType type) { if (_Store == null) @@ -1103,10 +1103,10 @@ namespace OpenMetaverse /// Find an object in inventory using a specific path to search /// /// The folder to begin the search in - /// The object owners + /// The object owners /// A string path to search /// milliseconds to wait for a reply - /// Found items or if + /// Found items or if /// timeout occurs or item is not found public UUID FindObjectByPath(UUID baseFolder, UUID inventoryOwner, string path, int timeoutMS) { @@ -1137,7 +1137,7 @@ namespace OpenMetaverse /// Find inventory items by path /// /// The folder to begin the search in - /// The object owners + /// The object owners /// A string path to search, folders/objects separated by a '/' /// Results are sent to the event public void RequestFindObjectByPath(UUID baseFolder, UUID inventoryOwner, string path) @@ -1222,8 +1222,8 @@ namespace OpenMetaverse /// /// Move and rename a folder /// - /// The source folders - /// The destination folders + /// The source folders + /// The destination folders /// The name to change the folder to public void MoveFolder(UUID folderID, UUID newparentID, string newName) { @@ -1253,8 +1253,8 @@ namespace OpenMetaverse /// /// Move a folder /// - /// The source folders - /// The destination folders + /// The source folders + /// The destination folders public void MoveFolder(UUID folderID, UUID newParentID) { lock (Store) @@ -1285,11 +1285,11 @@ namespace OpenMetaverse /// to a new parents, the value of that folder's key. /// /// A Dictionary containing the - /// of the source as the key, and the - /// of the destination as the value + /// of the source as the key, and the + /// of the destination as the value public void MoveFolders(Dictionary foldersNewParents) { - // FIXME: Use two List to stay consistent + // FIXME: Use two List to stay consistent lock (Store) { @@ -1328,8 +1328,8 @@ namespace OpenMetaverse /// /// Move an inventory item to a new folder /// - /// The of the source item to move - /// The of the destination folder + /// The of the source item to move + /// The of the destination folder public void MoveItem(UUID itemID, UUID folderID) { MoveItem(itemID, folderID, String.Empty); @@ -1338,8 +1338,8 @@ namespace OpenMetaverse /// /// Move and rename an inventory item /// - /// The of the source item to move - /// The of the destination folder + /// The of the source item to move + /// The of the destination folder /// The name to change the folder to public void MoveItem(UUID itemID, UUID folderID, string newName) { @@ -1371,8 +1371,8 @@ namespace OpenMetaverse /// Move multiple inventory items to new locations /// /// A Dictionary containing the - /// of the source item as the key, and the - /// of the destination folder as the value + /// of the source item as the key, and the + /// of the destination folder as the value public void MoveItems(Dictionary itemsNewParents) { lock (_Store) @@ -1415,7 +1415,7 @@ namespace OpenMetaverse /// /// Remove descendants of a folder /// - /// The of the folder + /// The of the folder public void RemoveDescendants(UUID folder) { PurgeInventoryDescendentsPacket purge = new PurgeInventoryDescendentsPacket(); @@ -1441,7 +1441,7 @@ namespace OpenMetaverse /// /// Remove a single item from inventory /// - /// The of the inventory item to remove + /// The of the inventory item to remove public void RemoveItem(UUID item) { List items = new List(1); @@ -1453,7 +1453,7 @@ namespace OpenMetaverse /// /// Remove a folder from inventory /// - /// The of the folder to remove + /// The of the folder to remove public void RemoveFolder(UUID folder) { List folders = new List(1); @@ -1465,8 +1465,8 @@ namespace OpenMetaverse /// /// Remove multiple items or folders from inventory /// - /// A List containing the s of items to remove - /// A List containing the s of the folders to remove + /// A List containing the s of items to remove + /// A List containing the s of the folders to remove public void Remove(List items, List folders) { if ((items == null || items.Count == 0) && (folders == null || folders.Count == 0)) @@ -1941,7 +1941,7 @@ namespace OpenMetaverse /// Rotation of the object when rezzed /// Vector of where to place object /// InventoryObject object containing item details - /// LLUUID of group to own the object + /// UUID of group to own the object public UUID RequestRezFromInventory(Simulator simulator, Quaternion rotation, Vector3 position, InventoryObject item, UUID groupOwner) { @@ -1955,7 +1955,7 @@ namespace OpenMetaverse /// Rotation of the object when rezzed /// Vector of where to place object /// InventoryObject object containing item details - /// LLUUID of group to own the object + /// UUID of group to own the object /// User defined queryID to correlate replies /// if set to true the simulator /// will automatically send object detail packet(s) back to the client @@ -2022,8 +2022,8 @@ namespace OpenMetaverse /// /// The simulator Local ID of the object /// The type of destination from the enum - /// The destination inventory folders -or- - /// if DeRezzing object to a tasks Inventory, the Tasks + /// The destination inventory folders -or- + /// if DeRezzing object to a tasks Inventory, the Tasks /// The transaction ID for this request which /// can be used to correlate this request with other packets public void RequestDeRezToInventory(uint objectLocalID, DeRezDestination destType, UUID destFolder, UUID transactionID) @@ -2051,10 +2051,10 @@ namespace OpenMetaverse /// /// Give an inventory item to another avatar /// - /// The of the item to give + /// The of the item to give /// The name of the item /// The type of the item from the enum - /// The of the recipient + /// The of the recipient /// true to generate a beameffect during transfer public void GiveItem(UUID itemID, string itemName, AssetType assetType, UUID recipient, bool doEffect) @@ -2087,10 +2087,10 @@ namespace OpenMetaverse /// /// Give an inventory Folder with contents to another avatar /// - /// The of the Folder to give + /// The of the Folder to give /// The name of the folder /// The type of the item from the enum - /// The of the recipient + /// The of the recipient /// true to generate a beameffect during transfer public void GiveFolder(UUID folderID, string folderName, AssetType assetType, UUID recipient, bool doEffect) @@ -2185,7 +2185,7 @@ namespace OpenMetaverse /// /// Get the inventory of a Task (Primitive) /// - /// The tasks + /// The tasks /// The tasks simulator local ID /// milliseconds to wait for reply from simulator /// A List containing the inventory items inside the task @@ -2310,7 +2310,7 @@ namespace OpenMetaverse /// Remove an item from an objects (Prim) Inventory /// /// LocalID of the object in the simulator - /// LLUUID of the task item to remove + /// UUID of the task item to remove /// Simulator Object public void RemoveTaskInventory(uint objectLocalID, UUID taskItemID, Simulator simulator) { @@ -2451,7 +2451,7 @@ namespace OpenMetaverse CRC += iitem.OwnerID.CRC(); // OwnerID CRC += iitem.GroupID.CRC(); // GroupID - // CRC += another 4 words which always seem to be zero -- unclear if this is a LLUUID or what + // CRC += another 4 words which always seem to be zero -- unclear if this is a UUID or what CRC += (uint)iitem.Permissions.OwnerMask; //owner_mask; // Either owner_mask or next_owner_mask may need to be CRC += (uint)iitem.Permissions.NextOwnerMask; //next_owner_mask; // switched with base_mask -- 2 values go here and in my CRC += (uint)iitem.Permissions.EveryoneMask; //everyone_mask; // study item, the three were identical. @@ -2472,7 +2472,7 @@ namespace OpenMetaverse /// Wrapper for creating a new object /// /// The type of item from the enum - /// The of the newly created object + /// The of the newly created object /// An object with the type and id passed public static InventoryItem CreateInventoryItem(InventoryType type, UUID id) { diff --git a/OpenMetaverse/LLObject.cs b/OpenMetaverse/LLObject.cs index bf36df53..9f9f680d 100644 --- a/OpenMetaverse/LLObject.cs +++ b/OpenMetaverse/LLObject.cs @@ -427,7 +427,7 @@ namespace OpenMetaverse //public bool IsOwnedBy(GridClient client) //{ - // if (GroupID != LLUUID.Zero) + // if (GroupID != UUID.Zero) // { // // Group owned, iterate through all of this clients groups // // and see if it is a member diff --git a/OpenMetaverse/Login.cs b/OpenMetaverse/Login.cs index 3619e25c..98dd0195 100644 --- a/OpenMetaverse/Login.cs +++ b/OpenMetaverse/Login.cs @@ -136,7 +136,7 @@ namespace OpenMetaverse LastName = ParseString("last_name", reply).Trim('"'); StartLocation = ParseString("start_location", reply); AgentAccess = ParseString("agent_access", reply); - LookAt = ParseLLVector3("look_at", reply); + LookAt = ParseVector3("look_at", reply); } catch (LLSDException e) { @@ -163,8 +163,8 @@ namespace OpenMetaverse HomeRegion = 0; } - HomePosition = ParseLLVector3("position", home); - HomeLookAt = ParseLLVector3("look_at", home); + HomePosition = ParseVector3("position", home); + HomeLookAt = ParseVector3("look_at", home); } else { @@ -238,7 +238,7 @@ namespace OpenMetaverse return String.Empty; } - public static Vector3 ParseLLVector3(string key, LLSDMap reply) + public static Vector3 ParseVector3(string key, LLSDMap reply) { LLSD llsd; if (reply.TryGetValue(key, out llsd)) diff --git a/OpenMetaverse/ObjectManager.cs b/OpenMetaverse/ObjectManager.cs index 00a9a58e..517912c4 100644 --- a/OpenMetaverse/ObjectManager.cs +++ b/OpenMetaverse/ObjectManager.cs @@ -588,7 +588,7 @@ namespace OpenMetaverse /// /// /// BuyObject(Client.Network.CurrentSim, 500, SaleType.Copy, - /// 100, LLUUID.Zero, Client.Self.InventoryRootFolderUUID); + /// 100, UUID.Zero, Client.Self.InventoryRootFolderUUID); /// /// public void BuyObject(Simulator simulator, uint localID, SaleType saleType, int price, UUID groupID, @@ -728,7 +728,7 @@ namespace OpenMetaverse /// /// A reference to the object to place the object in /// Data describing the prim object to rez - /// Group ID that this prim will be set to, or LLUUID.Zero if you + /// Group ID that this prim will be set to, or UUID.Zero if you /// do not want the object to be associated with a specific group /// An approximation of the position at which to rez the prim /// Scale vector to size this prim @@ -793,8 +793,8 @@ namespace OpenMetaverse /// The rotation of the tree /// The position of the tree /// The Type of tree - /// The of the group to set the tree to, - /// or LLUUID.Zero if no group is to be set + /// The of the group to set the tree to, + /// or UUID.Zero if no group is to be set /// true to use the "new" Linden trees, false to use the old public void AddTree(Simulator simulator, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, UUID groupOwner, bool newTree) @@ -826,8 +826,8 @@ namespace OpenMetaverse /// The rotation of the grass /// The position of the grass /// The type of grass from the enum - /// The of the group to set the tree to, - /// or LLUUID.Zero if no group is to be set + /// The of the group to set the tree to, + /// or UUID.Zero if no group is to be set public void AddGrass(Simulator simulator, Vector3 scale, Quaternion rotation, Vector3 position, Grass grassType, UUID groupOwner) { @@ -1271,7 +1271,7 @@ namespace OpenMetaverse /// /// A reference to the object where the object resides /// The objects ID which is local to the simulator the object is in - /// The of the group to deed the object to + /// The of the group to deed the object to public void DeedObject(Simulator simulator, uint localID, UUID groupOwner) { ObjectOwnerPacket objDeedPacket = new ObjectOwnerPacket(); @@ -1297,7 +1297,7 @@ namespace OpenMetaverse /// /// A reference to the object where the object resides /// An array which contains the IDs of the objects to deed - /// The of the group to deed the object to + /// The of the group to deed the object to public void DeedObjects(Simulator simulator, List localIDs, UUID groupOwner) { ObjectOwnerPacket packet = new ObjectOwnerPacket(); @@ -1755,32 +1755,32 @@ namespace OpenMetaverse // TODO: Handle ParticleSystem ObjectUpdate blocks // float bounce_b - // LLVector4 scale_range - // LLVector4 alpha_range - // LLVector3 vel_offset + // Vector4 scale_range + // Vector4 alpha_range + // Vector3 vel_offset // float dist_begin_fadeout // float dist_end_fadeout - // LLUUID image_uuid + // UUID image_uuid // long flags // byte createme - // LLVector3 diff_eq_alpha - // LLVector3 diff_eq_scale + // Vector3 diff_eq_alpha + // Vector3 diff_eq_scale // byte max_particles // byte initial_particles // float kill_plane_z - // LLVector3 kill_plane_normal + // Vector3 kill_plane_normal // float bounce_plane_z - // LLVector3 bounce_plane_normal + // Vector3 bounce_plane_normal // float spawn_range // float spawn_frequency // float spawn_frequency_range - // LLVector3 spawn_direction + // Vector3 spawn_direction // float spawn_direction_range // float spawn_velocity // float spawn_velocity_range // float speed_limit // float wind_weight - // LLVector3 current_gravity + // Vector3 current_gravity // float gravity_weight // float global_lifetime // float individual_lifetime @@ -1789,7 +1789,7 @@ namespace OpenMetaverse // float scale_decay // float distance_death // float damp_motion_factor - // LLVector3 wind_diffusion_factor + // Vector3 wind_diffusion_factor } /// diff --git a/OpenMetaverse/ParcelManager.cs b/OpenMetaverse/ParcelManager.cs index 4f615167..8843da98 100644 --- a/OpenMetaverse/ParcelManager.cs +++ b/OpenMetaverse/ParcelManager.cs @@ -62,7 +62,7 @@ namespace OpenMetaverse public float GlobalZ; /// Name of simulator parcel is located in public string SimName; - /// Texture of parcels display picture + /// Texture of parcels display picture public UUID SnapshotID; /// Float representing calculated traffic based on time spent on parcel by avatars public float Dwell; @@ -627,7 +627,7 @@ namespace OpenMetaverse /// public struct ParcelAccessEntry { - /// Agents + /// Agents public UUID AgentID; /// public DateTime Time; @@ -640,7 +640,7 @@ namespace OpenMetaverse /// public struct ParcelPrimOwners { - /// Prim Owners + /// Prim Owners public UUID OwnerID; /// True of owner is group public bool IsGroupOwned; @@ -868,7 +868,7 @@ namespace OpenMetaverse /// Simulator to request parcels from (must be connected) public void RequestAllSimParcels(Simulator simulator) { - RequestAllSimParcels(simulator, false); + RequestAllSimParcels(simulator, false, 200); } /// @@ -877,7 +877,8 @@ namespace OpenMetaverse /// /// Simulator to request parcels from (must be connected) /// If TRUE, will force a full refresh - public void RequestAllSimParcels(Simulator simulator, bool refresh) + /// Number of milliseconds to pause in between each request + public void RequestAllSimParcels(Simulator simulator, bool refresh, int msDelay) { if (refresh) { @@ -899,8 +900,8 @@ namespace OpenMetaverse Client.Parcels.PropertiesRequest(simulator, (y + 1) * 4.0f, (x + 1) * 4.0f, y * 4.0f, x * 4.0f, 0, false); - // Pause for 50 ms after every request to avoid flooding the sim - System.Threading.Thread.Sleep(200); + // Pause after every request to avoid flooding the sim + System.Threading.Thread.Sleep(msDelay); } } } @@ -931,7 +932,7 @@ namespace OpenMetaverse /// The Simulator the parcel is located in /// The parcels region specific local ID /// true if this parcel is being purchased by a group - /// The groups + /// The groups /// true to remove tier contribution if purchase is successful /// The parcels size /// The purchase price of the parcel @@ -977,7 +978,7 @@ namespace OpenMetaverse /// /// The simulator the parcel is in /// The parcels region specific local ID - /// The groups + /// The groups public void DeedToGroup(Simulator simulator, int localID, UUID groupID) { ParcelDeedToGroupPacket request = new ParcelDeedToGroupPacket(); @@ -1012,7 +1013,7 @@ namespace OpenMetaverse /// Simulator parcel is in /// The parcels region specific local ID /// the type of objects to return, - /// A list containing object owners s to return + /// A list containing object owners s to return public void ReturnObjects(Simulator simulator, int localID, ObjectReturnType type, List ownerIDs) { ParcelReturnObjectsPacket request = new ParcelReturnObjectsPacket(); diff --git a/OpenMetaverse/ParticleSystem.cs b/OpenMetaverse/ParticleSystem.cs index cc046764..43b2aa29 100644 --- a/OpenMetaverse/ParticleSystem.cs +++ b/OpenMetaverse/ParticleSystem.cs @@ -138,21 +138,21 @@ namespace OpenMetaverse public float BurstSpeedMax; /// A representing the maximum number of particles emitted per burst public byte BurstPartCount; - /// A which represents the velocity (speed) from the source which particles are emitted + /// A which represents the velocity (speed) from the source which particles are emitted public Vector3 AngularVelocity; - /// A which represents the Acceleration from the source which particles are emitted + /// A which represents the Acceleration from the source which particles are emitted public Vector3 PartAcceleration; - /// The Key of the texture displayed on the particle + /// The Key of the texture displayed on the particle public UUID Texture; - /// The Key of the specified target object or avatar particles will follow + /// The Key of the specified target object or avatar particles will follow public UUID Target; /// Flags of particle from public ParticleDataFlags PartDataFlags; /// Max Age particle system will emit particles for public float PartMaxAge; - /// The the particle has at the beginning of its lifecycle + /// The the particle has at the beginning of its lifecycle public Color4 PartStartColor; - /// The the particle has at the ending of its lifecycle + /// The the particle has at the ending of its lifecycle public Color4 PartEndColor; /// A that represents the starting X size of the particle /// Minimum value is 0, maximum value is 4 diff --git a/OpenMetaverse/ProtocolManager.cs b/OpenMetaverse/ProtocolManager.cs index 577d5806..0d052dd4 100644 --- a/OpenMetaverse/ProtocolManager.cs +++ b/OpenMetaverse/ProtocolManager.cs @@ -67,17 +67,17 @@ namespace OpenMetaverse /// F64, /// - LLUUID, + UUID, /// BOOL, /// - LLVector3, + Vector3, /// - LLVector3d, + Vector3d, /// - LLVector4, + Vector4, /// - LLQuaternion, + Quaternion, /// IPADDR, /// @@ -236,12 +236,12 @@ namespace OpenMetaverse TypeSizes.Add(FieldType.S32, 4); TypeSizes.Add(FieldType.F32, 4); TypeSizes.Add(FieldType.F64, 8); - TypeSizes.Add(FieldType.LLUUID, 16); + TypeSizes.Add(FieldType.UUID, 16); TypeSizes.Add(FieldType.BOOL, 1); - TypeSizes.Add(FieldType.LLVector3, 12); - TypeSizes.Add(FieldType.LLVector3d, 24); - TypeSizes.Add(FieldType.LLVector4, 16); - TypeSizes.Add(FieldType.LLQuaternion, 16); + TypeSizes.Add(FieldType.Vector3, 12); + TypeSizes.Add(FieldType.Vector3d, 24); + TypeSizes.Add(FieldType.Vector4, 16); + TypeSizes.Add(FieldType.Quaternion, 16); TypeSizes.Add(FieldType.IPADDR, 4); TypeSizes.Add(FieldType.IPPORT, 2); TypeSizes.Add(FieldType.Variable, -1); diff --git a/OpenMetaverse/Rendering/Rendering.cs b/OpenMetaverse/Rendering/Rendering.cs index 6d98eb4e..b5c8fbcd 100644 --- a/OpenMetaverse/Rendering/Rendering.cs +++ b/OpenMetaverse/Rendering/Rendering.cs @@ -82,6 +82,11 @@ namespace OpenMetaverse.Rendering public Vector3 Normal; public Vector3 Binormal; public Vector2 TexCoord; + + public override string ToString() + { + return String.Format("P: {0} N: {1} B: {2} T: {3}", Position, Normal, Binormal, TexCoord); + } } public struct ProfileFace diff --git a/OpenMetaverse/Types.cs b/OpenMetaverse/Types.cs index 590c4e25..8bedb8ee 100644 --- a/OpenMetaverse/Types.cs +++ b/OpenMetaverse/Types.cs @@ -2035,8 +2035,11 @@ namespace OpenMetaverse #endregion Operators - /// An Color4 with zero RGB values and full alpha + /// A Color4 with zero RGB values and full alpha (1.0) public readonly static Color4 Black = new Color4(0f, 0f, 0f, 1f); + + /// A Color4 with full RGB values (1.0) and full alpha (1.0) + public readonly static Color4 White = new Color4(1f, 1f, 1f, 1f); } /// diff --git a/Programs/examples/TestClient/Commands/Friends/FriendsCommand.cs b/Programs/examples/TestClient/Commands/Friends/FriendsCommand.cs index ed7832d3..9b2b857c 100644 --- a/Programs/examples/TestClient/Commands/Friends/FriendsCommand.cs +++ b/Programs/examples/TestClient/Commands/Friends/FriendsCommand.cs @@ -30,7 +30,7 @@ namespace OpenMetaverse.TestClient /// Get a list of current friends /// /// optional testClient command arguments - /// The + /// The /// of the agent making the request /// public override string Execute(string[] args, UUID fromAgentID) diff --git a/Programs/examples/TestClient/Commands/Inventory/ImportOutfitCommand.cs b/Programs/examples/TestClient/Commands/Inventory/ImportOutfitCommand.cs index 829a6545..5cbe9507 100644 --- a/Programs/examples/TestClient/Commands/Inventory/ImportOutfitCommand.cs +++ b/Programs/examples/TestClient/Commands/Inventory/ImportOutfitCommand.cs @@ -40,7 +40,7 @@ namespace OpenMetaverse.TestClient // // HACK: Weak hack to calculate size // float AV_Height_Range = 2.025506f - 1.50856f; // float AV_Height = 1.50856f + (((float)appearance.VisualParam[25].ParamValue / 255.0f) * AV_Height_Range); - // set.AgentData.Size = new LLVector3(0.45f, 0.6f, AV_Height); + // set.AgentData.Size = new Vector3(0.45f, 0.6f, AV_Height); // set.ObjectData.TextureEntry = appearance.ObjectData.TextureEntry; // set.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[appearance.VisualParam.Length];