diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data/OpenSimDataReader.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data/OpenSimDataReader.cs b/OpenSim/Framework/Data/OpenSimDataReader.cs new file mode 100644 index 0000000..225df60 --- /dev/null +++ b/OpenSim/Framework/Data/OpenSimDataReader.cs | |||
@@ -0,0 +1,39 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Data; | ||
4 | using System.Text; | ||
5 | using libsecondlife; | ||
6 | using TribalMedia.Framework.Data; | ||
7 | |||
8 | namespace OpenSim.Framework.Data | ||
9 | { | ||
10 | public class OpenSimDataReader : DataReader | ||
11 | { | ||
12 | public OpenSimDataReader(IDataReader source) : base(source) | ||
13 | { | ||
14 | } | ||
15 | |||
16 | public LLVector3 GetVector(string s) | ||
17 | { | ||
18 | float x = GetFloat(s + "X"); | ||
19 | float y = GetFloat(s + "Y"); | ||
20 | float z = GetFloat(s + "Z"); | ||
21 | |||
22 | LLVector3 vector = new LLVector3(x, y, z); | ||
23 | |||
24 | return vector; | ||
25 | } | ||
26 | |||
27 | public LLQuaternion GetQuaternion(string s) | ||
28 | { | ||
29 | float x = GetFloat(s + "X"); | ||
30 | float y = GetFloat(s + "Y"); | ||
31 | float z = GetFloat(s + "Z"); | ||
32 | float w = GetFloat(s + "W"); | ||
33 | |||
34 | LLQuaternion quaternion = new LLQuaternion(x, y, z, w); | ||
35 | |||
36 | return quaternion; | ||
37 | } | ||
38 | } | ||
39 | } | ||