aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarAppearance.cs
diff options
context:
space:
mode:
authorSean Dague2008-05-15 15:10:13 +0000
committerSean Dague2008-05-15 15:10:13 +0000
commit0c509ecdde73c7216d717da4fc4d32cb3b9d35c8 (patch)
tree01f6d58284dc69a5111f3651938c5068d71e538e /OpenSim/Framework/AvatarAppearance.cs
parentrefactoring to move AvatarAppearance into Framework and (diff)
downloadopensim-SC_OLD-0c509ecdde73c7216d717da4fc4d32cb3b9d35c8.zip
opensim-SC_OLD-0c509ecdde73c7216d717da4fc4d32cb3b9d35c8.tar.gz
opensim-SC_OLD-0c509ecdde73c7216d717da4fc4d32cb3b9d35c8.tar.bz2
opensim-SC_OLD-0c509ecdde73c7216d717da4fc4d32cb3b9d35c8.tar.xz
minor refactor of some properties for readability
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs70
1 files changed, 35 insertions, 35 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 50afa75..64d8c0d 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -68,27 +68,27 @@ namespace OpenSim.Framework
68 68
69 public readonly static int VISUALPARAM_COUNT = 218; 69 public readonly static int VISUALPARAM_COUNT = 218;
70 70
71 protected LLUUID m_scenePresenceID; 71 protected LLUUID m_owner;
72 72
73 public LLUUID ScenePresenceID 73 public LLUUID Owner
74 { 74 {
75 get { return m_scenePresenceID; } 75 get { return m_owner; }
76 set { m_scenePresenceID = value; } 76 set { m_owner = value; }
77 } 77 }
78 protected int m_wearablesSerial = 1; 78 protected int m_serial = 1;
79 79
80 public int WearablesSerial 80 public int Serial
81 { 81 {
82 get { return m_wearablesSerial; } 82 get { return m_serial; }
83 set { m_wearablesSerial = value; } 83 set { m_serial = value; }
84 } 84 }
85 85
86 protected byte[] m_visualParams; 86 protected byte[] m_visualparams;
87 87
88 public byte[] VisualParams 88 public byte[] VisualParams
89 { 89 {
90 get { return m_visualParams; } 90 get { return m_visualparams; }
91 set { m_visualParams = value; } 91 set { m_visualparams = value; }
92 } 92 }
93 93
94 protected AvatarWearable[] m_wearables; 94 protected AvatarWearable[] m_wearables;
@@ -99,12 +99,12 @@ namespace OpenSim.Framework
99 set { m_wearables = value; } 99 set { m_wearables = value; }
100 } 100 }
101 101
102 protected LLObject.TextureEntry m_textureEntry; 102 protected LLObject.TextureEntry m_texture;
103 103
104 public LLObject.TextureEntry TextureEntry 104 public LLObject.TextureEntry Texture
105 { 105 {
106 get { return m_textureEntry; } 106 get { return m_texture; }
107 set { m_textureEntry = value; } 107 set { m_texture = value; }
108 } 108 }
109 109
110 protected float m_avatarHeight = 0; 110 protected float m_avatarHeight = 0;
@@ -123,18 +123,18 @@ namespace OpenSim.Framework
123 // this makes them all null 123 // this makes them all null
124 m_wearables[i] = new AvatarWearable(); 124 m_wearables[i] = new AvatarWearable();
125 } 125 }
126 m_wearablesSerial = 0; 126 m_serial = 0;
127 m_scenePresenceID = LLUUID.Zero; 127 m_owner = LLUUID.Zero;
128 m_visualParams = new byte[VISUALPARAM_COUNT]; 128 m_visualparams = new byte[VISUALPARAM_COUNT];
129 } 129 }
130 130
131 public AvatarAppearance(LLUUID avatarID, AvatarWearable[] wearables, byte[] visualParams) 131 public AvatarAppearance(LLUUID avatarID, AvatarWearable[] wearables, byte[] visualParams)
132 { 132 {
133 m_scenePresenceID = avatarID; 133 m_owner = avatarID;
134 m_wearablesSerial = 1; 134 m_serial = 1;
135 m_wearables = wearables; 135 m_wearables = wearables;
136 m_visualParams = visualParams; 136 m_visualparams = visualParams;
137 m_textureEntry = GetDefaultTextureEntry(); 137 m_texture = GetDefaultTexture();
138 } 138 }
139 139
140 /// <summary> 140 /// <summary>
@@ -145,15 +145,15 @@ namespace OpenSim.Framework
145 public void SetAppearance(byte[] texture, List<byte> visualParam) 145 public void SetAppearance(byte[] texture, List<byte> visualParam)
146 { 146 {
147 LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length); 147 LLObject.TextureEntry textureEnt = new LLObject.TextureEntry(texture, 0, texture.Length);
148 m_textureEntry = textureEnt; 148 m_texture = textureEnt;
149 149
150 m_visualParams = visualParam.ToArray(); 150 m_visualparams = visualParam.ToArray();
151 151
152 // Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters. 152 // Teravus : Nifty AV Height Getting Maaaaagical formula. Oh how we love turning 0-255 into meters.
153 // (float)m_visualParams[25] = Height 153 // (float)m_visualParams[25] = Height
154 // (float)m_visualParams[125] = LegLength 154 // (float)m_visualParams[125] = LegLength
155 m_avatarHeight = (1.50856f + (((float) m_visualParams[25]/255.0f)*(2.525506f - 1.50856f))) 155 m_avatarHeight = (1.50856f + (((float) m_visualparams[25]/255.0f)*(2.525506f - 1.50856f)))
156 + (((float) m_visualParams[125]/255.0f)/1.5f); 156 + (((float) m_visualparams[125]/255.0f)/1.5f);
157 } 157 }
158 158
159 public void SetWearable(int wearableId, AvatarWearable wearable) 159 public void SetWearable(int wearableId, AvatarWearable wearable)
@@ -161,7 +161,7 @@ namespace OpenSim.Framework
161 m_wearables[wearableId] = wearable; 161 m_wearables[wearableId] = wearable;
162 } 162 }
163 163
164 public static LLObject.TextureEntry GetDefaultTextureEntry() 164 public static LLObject.TextureEntry GetDefaultTexture()
165 { 165 {
166 LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); 166 LLObject.TextureEntry textu = new LLObject.TextureEntry(new LLUUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97"));
167 textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012"); 167 textu.CreateFace(0).TextureID = new LLUUID("00000000-0000-1111-9999-000000000012");
@@ -183,13 +183,13 @@ namespace OpenSim.Framework
183 throw new ArgumentNullException("info"); 183 throw new ArgumentNullException("info");
184 } 184 }
185 185
186 m_scenePresenceID = new LLUUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid))); 186 m_owner = new LLUUID((Guid)info.GetValue("m_scenePresenceID", typeof(Guid)));
187 m_wearablesSerial = (int)info.GetValue("m_wearablesSerial", typeof(int)); 187 m_serial = (int)info.GetValue("m_wearablesSerial", typeof(int));
188 m_visualParams = (byte[])info.GetValue("m_visualParams", typeof(byte[])); 188 m_visualparams = (byte[])info.GetValue("m_visualParams", typeof(byte[]));
189 m_wearables = (AvatarWearable[])info.GetValue("m_wearables", typeof(AvatarWearable[])); 189 m_wearables = (AvatarWearable[])info.GetValue("m_wearables", typeof(AvatarWearable[]));
190 190
191 byte[] m_textureEntry_work = (byte[])info.GetValue("m_textureEntry", typeof(byte[])); 191 byte[] m_textureEntry_work = (byte[])info.GetValue("m_textureEntry", typeof(byte[]));
192 m_textureEntry = new LLObject.TextureEntry(m_textureEntry_work, 0, m_textureEntry_work.Length); 192 m_texture = new LLObject.TextureEntry(m_textureEntry_work, 0, m_textureEntry_work.Length);
193 193
194 m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float)); 194 m_avatarHeight = (float)info.GetValue("m_avatarHeight", typeof(float));
195 195
@@ -206,11 +206,11 @@ namespace OpenSim.Framework
206 throw new ArgumentNullException("info"); 206 throw new ArgumentNullException("info");
207 } 207 }
208 208
209 info.AddValue("m_scenePresenceID", m_scenePresenceID.UUID); 209 info.AddValue("m_scenePresenceID", m_owner.UUID);
210 info.AddValue("m_wearablesSerial", m_wearablesSerial); 210 info.AddValue("m_wearablesSerial", m_serial);
211 info.AddValue("m_visualParams", m_visualParams); 211 info.AddValue("m_visualParams", m_visualparams);
212 info.AddValue("m_wearables", m_wearables); 212 info.AddValue("m_wearables", m_wearables);
213 info.AddValue("m_textureEntry", m_textureEntry.ToBytes()); 213 info.AddValue("m_textureEntry", m_texture.ToBytes());
214 info.AddValue("m_avatarHeight", m_avatarHeight); 214 info.AddValue("m_avatarHeight", m_avatarHeight);
215 } 215 }
216 } 216 }