aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/General/Types/PrimitiveBaseShape.cs')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index a6671d1..b9a8c90 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -1,4 +1,5 @@
1using libsecondlife; 1using libsecondlife;
2using libsecondlife.Packets;
2 3
3namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
4{ 5{
@@ -97,6 +98,34 @@ namespace OpenSim.Framework.Types
97 98
98 return primShape; 99 return primShape;
99 } 100 }
100 }
101 101
102 public static PrimitiveBaseShape FromAddPacket(ObjectAddPacket addPacket)
103 {
104 PrimitiveBaseShape pShape = new PrimitiveBaseShape();
105
106 pShape.PCode = addPacket.ObjectData.PCode;
107 pShape.PathBegin = addPacket.ObjectData.PathBegin;
108 pShape.PathEnd = addPacket.ObjectData.PathEnd;
109 pShape.PathScaleX = addPacket.ObjectData.PathScaleX;
110 pShape.PathScaleY = addPacket.ObjectData.PathScaleY;
111 pShape.PathShearX = addPacket.ObjectData.PathShearX;
112 pShape.PathShearY = addPacket.ObjectData.PathShearY;
113 pShape.PathSkew = addPacket.ObjectData.PathSkew;
114 pShape.ProfileBegin = addPacket.ObjectData.ProfileBegin;
115 pShape.ProfileEnd = addPacket.ObjectData.ProfileEnd;
116 pShape.Scale = addPacket.ObjectData.Scale;
117 pShape.PathCurve = addPacket.ObjectData.PathCurve;
118 pShape.ProfileCurve = addPacket.ObjectData.ProfileCurve;
119 pShape.ProfileHollow = addPacket.ObjectData.ProfileHollow;
120 pShape.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
121 pShape.PathRevolutions = addPacket.ObjectData.PathRevolutions;
122 pShape.PathTaperX = addPacket.ObjectData.PathTaperX;
123 pShape.PathTaperY = addPacket.ObjectData.PathTaperY;
124 pShape.PathTwist = addPacket.ObjectData.PathTwist;
125 pShape.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
126 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
127 pShape.TextureEntry = ntex.ToBytes();
128 return pShape;
129 }
130 }
102} 131}