diff options
author | Justin Clark-Casey (justincc) | 2009-09-24 17:35:03 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-09-24 17:35:03 +0100 |
commit | ad753d784cfefacd8fb745a1431bf98feac9bbd6 (patch) | |
tree | 795ec1ba25eada570c342746f07654849a7199f4 /OpenSim/Framework | |
parent | minor: make rest (not comm) modules less noisy if they are disabled (diff) | |
parent | Changed name of the hyperlink XMLRPC method to linkk-region, so that it doesn... (diff) | |
download | opensim-SC_OLD-ad753d784cfefacd8fb745a1431bf98feac9bbd6.zip opensim-SC_OLD-ad753d784cfefacd8fb745a1431bf98feac9bbd6.tar.gz opensim-SC_OLD-ad753d784cfefacd8fb745a1431bf98feac9bbd6.tar.bz2 opensim-SC_OLD-ad753d784cfefacd8fb745a1431bf98feac9bbd6.tar.xz |
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 33 |
2 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index afd50a9..cee1d4b 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -64,6 +64,13 @@ namespace OpenSim.Framework | |||
64 | } | 64 | } |
65 | protected string m_serverURI; | 65 | protected string m_serverURI; |
66 | 66 | ||
67 | public string RegionName | ||
68 | { | ||
69 | get { return m_regionName; } | ||
70 | set { m_regionName = value; } | ||
71 | } | ||
72 | protected string m_regionName = String.Empty; | ||
73 | |||
67 | protected bool Allow_Alternate_Ports; | 74 | protected bool Allow_Alternate_Ports; |
68 | public bool m_allow_alternate_ports; | 75 | public bool m_allow_alternate_ports; |
69 | protected string m_externalHostName; | 76 | protected string m_externalHostName; |
@@ -101,6 +108,7 @@ namespace OpenSim.Framework | |||
101 | 108 | ||
102 | public SimpleRegionInfo(RegionInfo ConvertFrom) | 109 | public SimpleRegionInfo(RegionInfo ConvertFrom) |
103 | { | 110 | { |
111 | m_regionName = ConvertFrom.RegionName; | ||
104 | m_regionLocX = ConvertFrom.RegionLocX; | 112 | m_regionLocX = ConvertFrom.RegionLocX; |
105 | m_regionLocY = ConvertFrom.RegionLocY; | 113 | m_regionLocY = ConvertFrom.RegionLocY; |
106 | m_internalEndPoint = ConvertFrom.InternalEndPoint; | 114 | m_internalEndPoint = ConvertFrom.InternalEndPoint; |
@@ -284,7 +292,6 @@ namespace OpenSim.Framework | |||
284 | public UUID originRegionID = UUID.Zero; | 292 | public UUID originRegionID = UUID.Zero; |
285 | public string proxyUrl = ""; | 293 | public string proxyUrl = ""; |
286 | public int ProxyOffset = 0; | 294 | public int ProxyOffset = 0; |
287 | public string RegionName = String.Empty; | ||
288 | public string regionSecret = UUID.Random().ToString(); | 295 | public string regionSecret = UUID.Random().ToString(); |
289 | 296 | ||
290 | public string osSecret; | 297 | public string osSecret; |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 58344f3..45b5a10 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -70,6 +70,39 @@ namespace OpenSim.Framework | |||
70 | public static readonly Regex UUIDPattern | 70 | public static readonly Regex UUIDPattern |
71 | = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); | 71 | = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); |
72 | 72 | ||
73 | /// <summary> | ||
74 | /// Linear interpolates B<->C using percent A | ||
75 | /// </summary> | ||
76 | /// <param name="a"></param> | ||
77 | /// <param name="b"></param> | ||
78 | /// <param name="c"></param> | ||
79 | /// <returns></returns> | ||
80 | public static double lerp(double a, double b, double c) | ||
81 | { | ||
82 | return (b*a) + (c*(1 - a)); | ||
83 | } | ||
84 | |||
85 | /// <summary> | ||
86 | /// Bilinear Interpolate, see Lerp but for 2D using 'percents' X & Y. | ||
87 | /// Layout: | ||
88 | /// A B | ||
89 | /// C D | ||
90 | /// A<->C = Y | ||
91 | /// C<->D = X | ||
92 | /// </summary> | ||
93 | /// <param name="x"></param> | ||
94 | /// <param name="y"></param> | ||
95 | /// <param name="a"></param> | ||
96 | /// <param name="b"></param> | ||
97 | /// <param name="c"></param> | ||
98 | /// <param name="d"></param> | ||
99 | /// <returns></returns> | ||
100 | public static double lerp2D(double x, double y, double a, double b, double c, double d) | ||
101 | { | ||
102 | return lerp(y, lerp(x, a, b), lerp(x, c, d)); | ||
103 | } | ||
104 | |||
105 | |||
73 | /// <value> | 106 | /// <value> |
74 | /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) | 107 | /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) |
75 | /// </value> | 108 | /// </value> |