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/Framework/PrimitiveBaseShape.cs | |
parent | * Fixed the matching logic error on the LLQuat to axiom quat :P (diff) | |
download | opensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.zip opensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.tar.gz opensim-SC_OLD-87e2a694e200f5774f71d38041247912b5ccf98d.tar.bz2 opensim-SC_OLD-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 '')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index b06a885..98e583e 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | using System.Xml.Serialization; | 29 | using System.Xml.Serialization; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using System; | ||
31 | 32 | ||
32 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
33 | { | 34 | { |
@@ -63,9 +64,10 @@ namespace OpenSim.Framework | |||
63 | Flexible = 128 | 64 | Flexible = 128 |
64 | } | 65 | } |
65 | 66 | ||
67 | [Serializable] | ||
66 | public class PrimitiveBaseShape | 68 | public class PrimitiveBaseShape |
67 | { | 69 | { |
68 | private static readonly byte[] m_defaultTextureEntry; | 70 | private static readonly LLObject.TextureEntry m_defaultTexture; |
69 | 71 | ||
70 | public byte State; | 72 | public byte State; |
71 | public byte PCode; | 73 | public byte PCode; |
@@ -88,7 +90,35 @@ namespace OpenSim.Framework | |||
88 | public sbyte PathTaperY; | 90 | public sbyte PathTaperY; |
89 | public sbyte PathTwist; | 91 | public sbyte PathTwist; |
90 | public sbyte PathTwistBegin; | 92 | public sbyte PathTwistBegin; |
91 | public byte[] TextureEntry; // a LL textureEntry in byte[] format | 93 | |
94 | [XmlIgnore] | ||
95 | public LLObject.TextureEntry Textures | ||
96 | { | ||
97 | get | ||
98 | { | ||
99 | return new LLObject.TextureEntry(m_textureEntry, 0, m_textureEntry.Length); | ||
100 | } | ||
101 | |||
102 | set | ||
103 | { | ||
104 | m_textureEntry = value.ToBytes(); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | private byte[] m_textureEntry; | ||
109 | public byte[] TextureEntry | ||
110 | { | ||
111 | get | ||
112 | { | ||
113 | return m_textureEntry; | ||
114 | } | ||
115 | |||
116 | set | ||
117 | { | ||
118 | m_textureEntry = value; | ||
119 | } | ||
120 | } | ||
121 | |||
92 | public byte[] ExtraParams; | 122 | public byte[] ExtraParams; |
93 | 123 | ||
94 | public ProfileShape ProfileShape | 124 | public ProfileShape ProfileShape |
@@ -117,17 +147,19 @@ namespace OpenSim.Framework | |||
117 | get { return Scale; } | 147 | get { return Scale; } |
118 | } | 148 | } |
119 | 149 | ||
150 | |||
151 | |||
120 | static PrimitiveBaseShape() | 152 | static PrimitiveBaseShape() |
121 | { | 153 | { |
122 | m_defaultTextureEntry = | 154 | m_defaultTexture = |
123 | new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); | 155 | new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); |
124 | } | 156 | } |
125 | 157 | ||
126 | public PrimitiveBaseShape() | 158 | public PrimitiveBaseShape() |
127 | { | 159 | { |
128 | PCode = (byte) PCodeEnum.Primitive; | 160 | PCode = (byte) PCodeEnum.Primitive; |
129 | ExtraParams = new byte[1]; | 161 | ExtraParams = new byte[1]; |
130 | TextureEntry = m_defaultTextureEntry; | 162 | Textures = m_defaultTexture; |
131 | } | 163 | } |
132 | 164 | ||
133 | public static PrimitiveBaseShape Create() | 165 | public static PrimitiveBaseShape Create() |