From 2b25717c8c41d890c5f17a0dc0a3db7444a16513 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 9 Aug 2007 19:02:32 +0000 Subject: [PATCH] prim.Shape -> primshapes table --- .../MonoSqliteDataStore.cs | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs index 7de9232d26..f7a579f00b 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs @@ -271,9 +271,41 @@ namespace OpenSim.DataStore.MonoSqliteStorage row["RotationW"] = prim.RotationOffset.W; } - private void fillShapeRow(DataRow row, PrimitiveBaseShape shape) + private void fillShapeRow(DataRow row, SceneObjectPart prim) { - + PrimitiveBaseShape s = prim.Shape; + row["UUID"] = prim.UUID; + // shape is an enum + row["Shape"] = 0; + // vectors + row["ScaleX"] = s.Scale.X; + row["ScaleY"] = s.Scale.Y; + row["ScaleZ"] = s.Scale.Z; + // paths + row["PCode"] = s.PCode; + row["PathBegin"] = s.PathBegin; + row["PathEnd"] = s.PathEnd; + row["PathScaleX"] = s.PathScaleX; + row["PathScaleY"] = s.PathScaleY; + row["PathShearX"] = s.PathShearX; + row["PathShearY"] = s.PathShearY; + row["PathSkew"] = s.PathSkew; + row["PathCurve"] = s.PathCurve; + row["PathRadiusOffset"] = s.PathRadiusOffset; + row["PathRevolutions"] = s.PathRevolutions; + row["PathTaperX"] = s.PathTaperX; + row["PathTaperY"] = s.PathTaperY; + row["PathTwist"] = s.PathTwist; + row["PathTwistBegin"] = s.PathTwistBegin; + // profile + row["ProfileBegin"] = s.ProfileBegin; + row["ProfileEnd"] = s.ProfileEnd; + row["ProfileCurve"] = s.ProfileCurve; + row["ProfileHollow"] = s.ProfileHollow; + // text TODO: this isn't right] = but I'm not sure the right + // way to specify this as a blob atm + row["Texture"] = s.TextureEntry; + } private void addPrim(SceneObjectPart prim) @@ -293,7 +325,7 @@ namespace OpenSim.DataStore.MonoSqliteStorage DataRow shapeRow = shapes.Rows.Find(prim.UUID); if (shapeRow == null) { shapeRow = prims.NewRow(); - fillShapeRow(shapeRow, prim.Shape); + fillShapeRow(shapeRow, prim); prims.Rows.Add(shapeRow); } else { fillPrimRow(shapeRow, prim);