* Moving conversion functions from Helpers to Utils (in OpenMetaverseTypes)

* Added GetLLSD() and FromLLSD() to Permissions
* Started on inventory persistence for Simian

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2267 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2008-10-06 22:34:38 +00:00
parent f8d777b6a6
commit 3e5fcb7fab
38 changed files with 987 additions and 841 deletions

View File

@@ -67,7 +67,7 @@ namespace OpenMetaverse.GUITestClient
for (int xp = 0; xp < 16; xp++)
{
float height = data[yp * 16 + xp];
int colorVal = Helpers.FloatToByte(height, 0.0f, 60.0f);
int colorVal = Utils.FloatToByte(height, 0.0f, 60.0f);
int lesserVal = (int)((float)colorVal * 0.75f);
Color color;

View File

@@ -151,16 +151,16 @@ namespace Heightmap
{
float maxVal = (float)Math.Log(Math.Abs(512+1-simulator.WaterHeight),2);
float lgHeight = (float)Math.Log(Math.Abs(height + 1 - simulator.WaterHeight), 2);
int colorVal1 = Helpers.FloatToByte(lgHeight, simulator.WaterHeight, maxVal);
int colorVal2 = Helpers.FloatToByte(height, simulator.WaterHeight, 25.0f);
int colorVal1 = Utils.FloatToByte(lgHeight, simulator.WaterHeight, maxVal);
int colorVal2 = Utils.FloatToByte(height, simulator.WaterHeight, 25.0f);
color = Color.FromArgb(255, colorVal2, colorVal1);
}
else
{
const float minVal = -5.0f;
float maxVal = simulator.WaterHeight;
int colorVal1 = Helpers.FloatToByte(height, -5.0f, minVal+(maxVal-minVal)*1.5f);
int colorVal2 = Helpers.FloatToByte(height, -5.0f, maxVal);
int colorVal1 = Utils.FloatToByte(height, -5.0f, minVal + (maxVal - minVal) * 1.5f);
int colorVal2 = Utils.FloatToByte(height, -5.0f, maxVal);
color = Color.FromArgb(colorVal1, colorVal2, 255);
}
patch.SetPixel(xp, yp, color); // 0, 0 is top left

View File

@@ -134,7 +134,7 @@ namespace OpenMetaverse.TestClient
if (distance > DISTANCE_BUFFER)
{
uint regionX, regionY;
Helpers.LongToUInts(Client.Network.Simulators[i].Handle, out regionX, out regionY);
Utils.LongToUInts(Client.Network.Simulators[i].Handle, out regionX, out regionY);
double xTarget = (double)targetAv.Position.X + (double)regionX;
double yTarget = (double)targetAv.Position.Y + (double)regionY;

View File

@@ -19,7 +19,7 @@ namespace OpenMetaverse.TestClient.Commands.Movement
return "Usage: moveto x y z";
uint regionX, regionY;
Helpers.LongToUInts(Client.Network.CurrentSim.Handle, out regionX, out regionY);
Utils.LongToUInts(Client.Network.CurrentSim.Handle, out regionX, out regionY);
double x, y, z;
if (!Double.TryParse(args[0], out x) ||

View File

@@ -20,7 +20,7 @@ namespace OpenMetaverse.TestClient
output.Append("UUID: ");
output.AppendLine(Client.Network.CurrentSim.ID.ToString());
uint x, y;
Helpers.LongToUInts(Client.Network.CurrentSim.Handle, out x, out y);
Utils.LongToUInts(Client.Network.CurrentSim.Handle, out x, out y);
output.AppendLine(String.Format("Handle: {0} (X: {1} Y: {2})", Client.Network.CurrentSim.Handle, x, y));
output.Append("Access: ");
output.AppendLine(Client.Network.CurrentSim.Access.ToString());