diff options
author | lbsa71 | 2007-12-27 14:00:30 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 14:00:30 +0000 |
commit | 87e2a694e200f5774f71d38041247912b5ccf98d (patch) | |
tree | e5669eb91e90e378442353242821ba3dad0f1ab2 /OpenSim/Region | |
parent | * Fixed the matching logic error on the LLQuat to axiom quat :P (diff) | |
download | opensim-SC-87e2a694e200f5774f71d38041247912b5ccf98d.zip opensim-SC-87e2a694e200f5774f71d38041247912b5ccf98d.tar.gz opensim-SC-87e2a694e200f5774f71d38041247912b5ccf98d.tar.bz2 opensim-SC-87e2a694e200f5774f71d38041247912b5ccf98d.tar.xz |
* AssetServerBase: _ProcessRequest is now called GetAsset
* PrimitiveBaseShape: The textures are now exposed as a 'TextureEntry Textures'; all serialization still using the 'byte[] TextureEntry' for backwards compatibility.
* Scene: Re-added AddTree, since the Tree type isn't gone from libsl, merely relocated.
Diffstat (limited to 'OpenSim/Region')
7 files changed, 34 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 45806ff..f29d2f9 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -3474,7 +3474,7 @@ namespace OpenSim.Region.ClientStack | |||
3474 | shape.PathTwist = addPacket.ObjectData.PathTwist; | 3474 | shape.PathTwist = addPacket.ObjectData.PathTwist; |
3475 | shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; | 3475 | shape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; |
3476 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | 3476 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); |
3477 | shape.TextureEntry = ntex.ToBytes(); | 3477 | shape.Textures = ntex; |
3478 | return shape; | 3478 | return shape; |
3479 | } | 3479 | } |
3480 | 3480 | ||
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs index 2668812..6a0af45 100644 --- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs | |||
@@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules | |||
182 | LastAssetID = asset.FullID; | 182 | LastAssetID = asset.FullID; |
183 | 183 | ||
184 | SceneObjectPart part = scene.GetSceneObjectPart(PrimID); | 184 | SceneObjectPart part = scene.GetSceneObjectPart(PrimID); |
185 | part.Shape.TextureEntry = new LLObject.TextureEntry(asset.FullID).ToBytes(); | 185 | part.Shape.Textures = new LLObject.TextureEntry(asset.FullID); |
186 | part.ScheduleFullUpdate(); | 186 | part.ScheduleFullUpdate(); |
187 | } | 187 | } |
188 | } | 188 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2a25316..0144c4c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1006,19 +1006,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1006 | } | 1006 | } |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | /* Tree has been removed from libSL | ||
1010 | public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, | 1009 | public void AddTree(LLVector3 scale, LLQuaternion rotation, LLVector3 position, |
1011 | libsecondlife.ObjectManager.Tree treeType, bool newTree) | 1010 | Tree treeType, bool newTree) |
1012 | { | 1011 | { |
1013 | PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); | 1012 | PrimitiveBaseShape treeShape = new PrimitiveBaseShape(); |
1014 | treeShape.PathCurve = 16; | 1013 | treeShape.PathCurve = 16; |
1015 | treeShape.PathEnd = 49900; | 1014 | treeShape.PathEnd = 49900; |
1016 | treeShape.PCode = newTree ? (byte)libsecondlife.ObjectManager.PCode.NewTree : (byte)libsecondlife.ObjectManager.PCode.Tree; | 1015 | treeShape.PCode = newTree ? (byte)PCode.NewTree : (byte)PCode.Tree; |
1017 | treeShape.Scale = scale; | 1016 | treeShape.Scale = scale; |
1018 | treeShape.State = (byte)treeType; | 1017 | treeShape.State = (byte)treeType; |
1019 | AddNewPrim(LLUUID.Random(), position, rotation, treeShape); | 1018 | AddNewPrim(LLUUID.Random(), position, rotation, treeShape); |
1020 | } | 1019 | } |
1021 | */ | 1020 | |
1022 | public void RemovePrim(uint localID, LLUUID avatar_deleter) | 1021 | public void RemovePrim(uint localID, LLUUID avatar_deleter) |
1023 | { | 1022 | { |
1024 | m_innerScene.RemovePrim(localID, avatar_deleter); | 1023 | m_innerScene.RemovePrim(localID, avatar_deleter); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index e8ff007..29a163b 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1323,7 +1323,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1323 | /// <param name="textureEntry"></param> | 1323 | /// <param name="textureEntry"></param> |
1324 | public void UpdateTextureEntry(byte[] textureEntry) | 1324 | public void UpdateTextureEntry(byte[] textureEntry) |
1325 | { | 1325 | { |
1326 | m_shape.TextureEntry = textureEntry; | 1326 | m_shape.Textures = new LLObject.TextureEntry( textureEntry, 0, textureEntry.Length ); |
1327 | ScheduleFullUpdate(); | 1327 | ScheduleFullUpdate(); |
1328 | } | 1328 | } |
1329 | 1329 | ||
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 63b4773..bc47241 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -459,7 +459,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
459 | 459 | ||
460 | public void llSetColor(LSL_Types.Vector3 color, int face) | 460 | public void llSetColor(LSL_Types.Vector3 color, int face) |
461 | { | 461 | { |
462 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 462 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
463 | LLColor texcolor; | 463 | LLColor texcolor; |
464 | if (face > -1) | 464 | if (face > -1) |
465 | { | 465 | { |
@@ -498,7 +498,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
498 | 498 | ||
499 | public double llGetAlpha(int face) | 499 | public double llGetAlpha(int face) |
500 | { | 500 | { |
501 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 501 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
502 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color | 502 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color |
503 | { | 503 | { |
504 | return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); | 504 | return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); |
@@ -512,7 +512,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
512 | 512 | ||
513 | public void llSetAlpha(double alpha, int face) | 513 | public void llSetAlpha(double alpha, int face) |
514 | { | 514 | { |
515 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 515 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
516 | LLColor texcolor; | 516 | LLColor texcolor; |
517 | if (face > -1) | 517 | if (face > -1) |
518 | { | 518 | { |
@@ -545,7 +545,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
545 | 545 | ||
546 | public LSL_Types.Vector3 llGetColor(int face) | 546 | public LSL_Types.Vector3 llGetColor(int face) |
547 | { | 547 | { |
548 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 548 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
549 | LLColor texcolor; | 549 | LLColor texcolor; |
550 | LSL_Types.Vector3 rgb; | 550 | LSL_Types.Vector3 rgb; |
551 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color | 551 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color |
@@ -570,7 +570,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
570 | 570 | ||
571 | public void llSetTexture(string texture, int face) | 571 | public void llSetTexture(string texture, int face) |
572 | { | 572 | { |
573 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 573 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
574 | |||
574 | if (face > -1) | 575 | if (face > -1) |
575 | { | 576 | { |
576 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 577 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); |
@@ -598,7 +599,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
598 | 599 | ||
599 | public void llScaleTexture(double u, double v, int face) | 600 | public void llScaleTexture(double u, double v, int face) |
600 | { | 601 | { |
601 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 602 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
602 | if (face > -1) | 603 | if (face > -1) |
603 | { | 604 | { |
604 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 605 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); |
@@ -629,7 +630,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
629 | 630 | ||
630 | public void llOffsetTexture(double u, double v, int face) | 631 | public void llOffsetTexture(double u, double v, int face) |
631 | { | 632 | { |
632 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 633 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
633 | if (face > -1) | 634 | if (face > -1) |
634 | { | 635 | { |
635 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 636 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); |
@@ -660,7 +661,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
660 | 661 | ||
661 | public void llRotateTexture(double rotation, int face) | 662 | public void llRotateTexture(double rotation, int face) |
662 | { | 663 | { |
663 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 664 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
664 | if (face > -1) | 665 | if (face > -1) |
665 | { | 666 | { |
666 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); | 667 | LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); |
@@ -688,7 +689,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
688 | 689 | ||
689 | public string llGetTexture(int face) | 690 | public string llGetTexture(int face) |
690 | { | 691 | { |
691 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 692 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
692 | if (face == -1) | 693 | if (face == -1) |
693 | { | 694 | { |
694 | face = 0; | 695 | face = 0; |
@@ -1172,7 +1173,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1172 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 1173 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
1173 | if (linknumber > -1) | 1174 | if (linknumber > -1) |
1174 | { | 1175 | { |
1175 | LLObject.TextureEntry tex = new LLObject.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length); | 1176 | LLObject.TextureEntry tex = part.Shape.Textures; |
1176 | LLColor texcolor; | 1177 | LLColor texcolor; |
1177 | if (face > -1) | 1178 | if (face > -1) |
1178 | { | 1179 | { |
@@ -1219,7 +1220,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1219 | { | 1220 | { |
1220 | linknumber = w; | 1221 | linknumber = w; |
1221 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 1222 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
1222 | LLObject.TextureEntry tex = new LLObject.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length); | 1223 | LLObject.TextureEntry tex = part.Shape.Textures; |
1223 | LLColor texcolor; | 1224 | LLColor texcolor; |
1224 | if (face > -1) | 1225 | if (face > -1) |
1225 | { | 1226 | { |
@@ -1467,7 +1468,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1467 | 1468 | ||
1468 | public LSL_Types.Vector3 llGetTextureOffset(int face) | 1469 | public LSL_Types.Vector3 llGetTextureOffset(int face) |
1469 | { | 1470 | { |
1470 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 1471 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
1471 | LSL_Types.Vector3 offset; | 1472 | LSL_Types.Vector3 offset; |
1472 | if (face == -1) | 1473 | if (face == -1) |
1473 | { | 1474 | { |
@@ -1481,7 +1482,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1481 | 1482 | ||
1482 | public LSL_Types.Vector3 llGetTextureScale(int side) | 1483 | public LSL_Types.Vector3 llGetTextureScale(int side) |
1483 | { | 1484 | { |
1484 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 1485 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
1485 | LSL_Types.Vector3 scale; | 1486 | LSL_Types.Vector3 scale; |
1486 | if (side == -1) | 1487 | if (side == -1) |
1487 | { | 1488 | { |
@@ -1495,7 +1496,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
1495 | 1496 | ||
1496 | public double llGetTextureRot(int face) | 1497 | public double llGetTextureRot(int face) |
1497 | { | 1498 | { |
1498 | LLObject.TextureEntry tex = new LLObject.TextureEntry(m_host.Shape.TextureEntry, 0, m_host.Shape.TextureEntry.Length); | 1499 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
1499 | if (face == -1) | 1500 | if (face == -1) |
1500 | { | 1501 | { |
1501 | face = 0; | 1502 | face = 0; |
@@ -2413,7 +2414,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
2413 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 2414 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
2414 | if (linknumber > -1) | 2415 | if (linknumber > -1) |
2415 | { | 2416 | { |
2416 | LLObject.TextureEntry tex = new LLObject.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length); | 2417 | LLObject.TextureEntry tex = part.Shape.Textures; |
2417 | LLColor texcolor; | 2418 | LLColor texcolor; |
2418 | if (face > -1) | 2419 | if (face > -1) |
2419 | { | 2420 | { |
@@ -2452,7 +2453,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
2452 | { | 2453 | { |
2453 | linknumber = w; | 2454 | linknumber = w; |
2454 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 2455 | part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
2455 | LLObject.TextureEntry tex = new LLObject.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length); | 2456 | LLObject.TextureEntry tex = part.Shape.Textures; |
2456 | LLColor texcolor; | 2457 | LLColor texcolor; |
2457 | if (face > -1) | 2458 | if (face > -1) |
2458 | { | 2459 | { |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index 91edf5e..0a48126 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | |||
@@ -634,9 +634,13 @@ namespace OpenSim.DataStore.MSSQL | |||
634 | s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); | 634 | s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); |
635 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); | 635 | s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); |
636 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); | 636 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); |
637 | |||
637 | // text TODO: this isn't right] = but I'm not sure the right | 638 | // text TODO: this isn't right] = but I'm not sure the right |
638 | // way to specify this as a blob atm | 639 | // way to specify this as a blob atm |
639 | s.TextureEntry = (byte[])row["Texture"]; | 640 | byte[] textureEntry = (byte[])row["Texture"]; |
641 | s.TextureEntry = textureEntry; | ||
642 | |||
643 | |||
640 | s.ExtraParams = (byte[])row["ExtraParams"]; | 644 | s.ExtraParams = (byte[])row["ExtraParams"]; |
641 | // System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); | 645 | // System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); |
642 | // string texture = encoding.GetString((Byte[])row["Texture"]); | 646 | // string texture = encoding.GetString((Byte[])row["Texture"]); |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 5bf4551..9118082 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs | |||
@@ -1014,7 +1014,11 @@ namespace OpenSim.DataStore.MonoSqlite | |||
1014 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); | 1014 | s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); |
1015 | // text TODO: this isn't right] = but I'm not sure the right | 1015 | // text TODO: this isn't right] = but I'm not sure the right |
1016 | // way to specify this as a blob atm | 1016 | // way to specify this as a blob atm |
1017 | s.TextureEntry = (byte[]) row["Texture"]; | 1017 | |
1018 | byte[] textureEntry = (byte[])row["Texture"]; | ||
1019 | s.TextureEntry = textureEntry; | ||
1020 | |||
1021 | |||
1018 | s.ExtraParams = (byte[]) row["ExtraParams"]; | 1022 | s.ExtraParams = (byte[]) row["ExtraParams"]; |
1019 | // System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); | 1023 | // System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); |
1020 | // string texture = encoding.GetString((Byte[])row["Texture"]); | 1024 | // string texture = encoding.GetString((Byte[])row["Texture"]); |