diff options
author | dahlia | 2009-11-13 01:18:52 -0800 |
---|---|---|
committer | dahlia | 2009-11-13 01:18:52 -0800 |
commit | 89a63c9a8bc97b3be6dcc2576af2e7aa9c3c7543 (patch) | |
tree | fdfb7f6840ae5a7e12b30b85aac98f1648034cca /OpenSim/Framework/PrimitiveBaseShape.cs | |
parent | Apply patch http://opensimulator.org/mantis/view.php?id=4369 (diff) | |
download | opensim-SC_OLD-89a63c9a8bc97b3be6dcc2576af2e7aa9c3c7543.zip opensim-SC_OLD-89a63c9a8bc97b3be6dcc2576af2e7aa9c3c7543.tar.gz opensim-SC_OLD-89a63c9a8bc97b3be6dcc2576af2e7aa9c3c7543.tar.bz2 opensim-SC_OLD-89a63c9a8bc97b3be6dcc2576af2e7aa9c3c7543.tar.xz |
Some corrections to PrimitiveBaseShape.ToOmvPrimitive()
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index f8dac06..97231ff 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -1089,6 +1089,7 @@ namespace OpenSim.Framework | |||
1089 | public Primitive ToOmvPrimitive(Vector3 position, Quaternion rotation) | 1089 | public Primitive ToOmvPrimitive(Vector3 position, Quaternion rotation) |
1090 | { | 1090 | { |
1091 | OpenMetaverse.Primitive prim = new OpenMetaverse.Primitive(); | 1091 | OpenMetaverse.Primitive prim = new OpenMetaverse.Primitive(); |
1092 | |||
1092 | prim.Scale = this.Scale; | 1093 | prim.Scale = this.Scale; |
1093 | prim.Position = position; | 1094 | prim.Position = position; |
1094 | prim.Rotation = rotation; | 1095 | prim.Rotation = rotation; |
@@ -1106,8 +1107,15 @@ namespace OpenSim.Framework | |||
1106 | prim.PrimData.PathShearY = this.PathShearY < 128 ? (float)this.PathShearY * 0.01f : (float)(this.PathShearY - 256) * 0.01f; | 1107 | prim.PrimData.PathShearY = this.PathShearY < 128 ? (float)this.PathShearY * 0.01f : (float)(this.PathShearY - 256) * 0.01f; |
1107 | prim.PrimData.PathBegin = (float)this.PathBegin * 2.0e-5f; | 1108 | prim.PrimData.PathBegin = (float)this.PathBegin * 2.0e-5f; |
1108 | prim.PrimData.PathEnd = 1.0f - (float)this.PathEnd * 2.0e-5f; | 1109 | prim.PrimData.PathEnd = 1.0f - (float)this.PathEnd * 2.0e-5f; |
1109 | prim.PrimData.PathScaleX = (float)(this.PathScaleX - 100) * 0.01f; | 1110 | |
1110 | prim.PrimData.PathScaleY = (float)(this.PathScaleY - 100) * 0.01f; | 1111 | prim.PrimData.PathScaleX = (200 - this.PathScaleX) * 0.01f; |
1112 | prim.PrimData.PathScaleY = (200 - this.PathScaleY) * 0.01f; | ||
1113 | |||
1114 | prim.PrimData.PathTaperX = this.PathTaperX * 0.01f; | ||
1115 | prim.PrimData.PathTaperY = this.PathTaperY * 0.01f; | ||
1116 | |||
1117 | prim.PrimData.PathTwistBegin = this.PathTwistBegin * 0.01f; | ||
1118 | prim.PrimData.PathTwist = this.PathTwist * 0.01f; | ||
1111 | 1119 | ||
1112 | prim.PrimData.ProfileBegin = (float)this.ProfileBegin * 2.0e-5f; | 1120 | prim.PrimData.ProfileBegin = (float)this.ProfileBegin * 2.0e-5f; |
1113 | prim.PrimData.ProfileEnd = 1.0f - (float)this.ProfileEnd * 2.0e-5f; | 1121 | prim.PrimData.ProfileEnd = 1.0f - (float)this.ProfileEnd * 2.0e-5f; |
@@ -1116,11 +1124,13 @@ namespace OpenSim.Framework | |||
1116 | prim.PrimData.profileCurve = this.ProfileCurve; | 1124 | prim.PrimData.profileCurve = this.ProfileCurve; |
1117 | prim.PrimData.ProfileHole = (HoleType)this.HollowShape; | 1125 | prim.PrimData.ProfileHole = (HoleType)this.HollowShape; |
1118 | 1126 | ||
1119 | prim.PrimData.PathTwistBegin = this.PathTwistBegin * 18 / 10; | 1127 | prim.PrimData.PathCurve = (PathCurve)this.PathCurve; |
1120 | prim.PrimData.PathTwist = this.PathTwist * 18 / 10; | 1128 | prim.PrimData.PathRadiusOffset = 0.01f * this.PathRadiusOffset; |
1129 | prim.PrimData.PathRevolutions = 1.0f + 0.015f * this.PathRevolutions; | ||
1130 | prim.PrimData.PathSkew = 0.01f * this.PathSkew; | ||
1121 | 1131 | ||
1122 | prim.PrimData.PathTaperX = this.PathTaperX * 0.01f; | 1132 | prim.PrimData.PCode = OpenMetaverse.PCode.Prim; |
1123 | prim.PrimData.PathTaperY = this.PathTaperY * 0.01f; | 1133 | prim.PrimData.State = 0; |
1124 | 1134 | ||
1125 | if (this.FlexiEntry) | 1135 | if (this.FlexiEntry) |
1126 | { | 1136 | { |
@@ -1145,6 +1155,16 @@ namespace OpenSim.Framework | |||
1145 | 1155 | ||
1146 | prim.Textures = new Primitive.TextureEntry(this.TextureEntry, 0, this.TextureEntry.Length); | 1156 | prim.Textures = new Primitive.TextureEntry(this.TextureEntry, 0, this.TextureEntry.Length); |
1147 | 1157 | ||
1158 | prim.Properties = new Primitive.ObjectProperties(); | ||
1159 | prim.Properties.Name = "Primitive"; | ||
1160 | prim.Properties.Description = ""; | ||
1161 | prim.Properties.CreatorID = UUID.Zero; | ||
1162 | prim.Properties.GroupID = UUID.Zero; | ||
1163 | prim.Properties.OwnerID = UUID.Zero; | ||
1164 | prim.Properties.Permissions = new Permissions(); | ||
1165 | prim.Properties.SalePrice = 10; | ||
1166 | prim.Properties.SaleType = new SaleType(); | ||
1167 | |||
1148 | return prim; | 1168 | return prim; |
1149 | } | 1169 | } |
1150 | } | 1170 | } |