From d326e84d5a2c6b4d5833546fa8ee88c67de48bae Mon Sep 17 00:00:00 2001 From: morphw Date: Tue, 15 May 2007 14:43:35 +0000 Subject: provide ready-to-eat attributes parsed from byte array --- OpenSim.Framework/Types/AssetLandmark.cs | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 OpenSim.Framework/Types/AssetLandmark.cs (limited to 'OpenSim.Framework') diff --git a/OpenSim.Framework/Types/AssetLandmark.cs b/OpenSim.Framework/Types/AssetLandmark.cs new file mode 100644 index 0000000..9d1a326 --- /dev/null +++ b/OpenSim.Framework/Types/AssetLandmark.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; + +namespace OpenSim.Framework.Types +{ + public class AssetLandmark : AssetBase + { + public int Version; + public LLVector3 Position; + public LLUUID RegionID; + + public AssetLandmark(AssetBase a) + { + this.Data = a.Data; + this.FullID = a.FullID; + this.Type = a.Type; + this.InvType = a.InvType; + this.Name = a.Name; + this.Description = a.Description; + InternData(); + } + + private void InternData() + { + string temp = System.Text.Encoding.UTF8.GetString(Data).Trim(); + string[] parts = temp.Split('\n'); + int.TryParse(parts[0].Substring(17, 1), out Version); + LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); + LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); + } + } +} -- cgit v1.1