aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
authordahlia2010-02-22 01:15:12 -0800
committerdahlia2010-02-22 01:15:12 -0800
commit03706e3f0889e01bb933abeab0b44e41fc58ac41 (patch)
tree89ed74e36ff736dd53f57e9e85146bbad2bf321d /OpenSim/Framework/PrimitiveBaseShape.cs
parentMinor formatting cleanup. (diff)
downloadopensim-SC_OLD-03706e3f0889e01bb933abeab0b44e41fc58ac41.zip
opensim-SC_OLD-03706e3f0889e01bb933abeab0b44e41fc58ac41.tar.gz
opensim-SC_OLD-03706e3f0889e01bb933abeab0b44e41fc58ac41.tar.bz2
opensim-SC_OLD-03706e3f0889e01bb933abeab0b44e41fc58ac41.tar.xz
add a constructor for PrimitiveBaseShape from a OpenMetaverse Primitive
Diffstat (limited to 'OpenSim/Framework/PrimitiveBaseShape.cs')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index fe8f020..e17c47c 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -186,6 +186,41 @@ namespace OpenSim.Framework
186 PCode = (byte)PCodeEnum.Primitive; 186 PCode = (byte)PCodeEnum.Primitive;
187 ExtraParams = new byte[1]; 187 ExtraParams = new byte[1];
188 m_textureEntry = DEFAULT_TEXTURE; 188 m_textureEntry = DEFAULT_TEXTURE;
189 }
190
191 public PrimitiveBaseShape(Primitive prim)
192 {
193
194 PCode = (byte)prim.PrimData.PCode;
195 ExtraParams = new byte[1];
196
197 State = prim.PrimData.State;
198 PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
199 PathEnd = Primitive.PackEndCut(prim.PrimData.PathEnd);
200 PathScaleX = Primitive.PackPathScale(prim.PrimData.PathScaleX);
201 PathScaleY = Primitive.PackPathScale(prim.PrimData.PathScaleY);
202 PathShearX = (byte)Primitive.PackPathShear(prim.PrimData.PathShearX);
203 PathShearY = (byte)Primitive.PackPathShear(prim.PrimData.PathShearY);
204 PathSkew = Primitive.PackPathTwist(prim.PrimData.PathSkew);
205 ProfileBegin = Primitive.PackBeginCut(prim.PrimData.ProfileBegin);
206 ProfileEnd = Primitive.PackEndCut(prim.PrimData.ProfileEnd);
207 Scale = prim.Scale;
208 PathCurve = (byte)prim.PrimData.PathCurve;
209 ProfileCurve = (byte)prim.PrimData.ProfileCurve;
210 ProfileHollow = Primitive.PackProfileHollow(prim.PrimData.ProfileHollow);
211 PathRadiusOffset = Primitive.PackPathTwist(prim.PrimData.PathRadiusOffset);
212 PathRevolutions = Primitive.PackPathRevolutions(prim.PrimData.PathRevolutions);
213 PathTaperX = Primitive.PackPathTaper(prim.PrimData.PathTaperX);
214 PathTaperY = Primitive.PackPathTaper(prim.PrimData.PathTaperY);
215 PathTwist = Primitive.PackPathTwist(prim.PrimData.PathTwist);
216 PathTwistBegin = Primitive.PackPathTwist(prim.PrimData.PathTwistBegin);
217
218 m_textureEntry = prim.Textures.GetBytes();
219
220 SculptEntry = (prim.Sculpt.Type != OpenMetaverse.SculptType.None);
221 SculptData = prim.Sculpt.GetBytes();
222 SculptTexture = prim.Sculpt.SculptTexture;
223 SculptType = (byte)prim.Sculpt.Type;
189 } 224 }
190 225
191 [XmlIgnore] 226 [XmlIgnore]