diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/General/PrimitiveBaseShape.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/General/PrimitiveBaseShape.cs')
-rw-r--r-- | OpenSim/Framework/General/PrimitiveBaseShape.cs | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/OpenSim/Framework/General/PrimitiveBaseShape.cs b/OpenSim/Framework/General/PrimitiveBaseShape.cs index 1799fb8..2123ecb 100644 --- a/OpenSim/Framework/General/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/PrimitiveBaseShape.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | using System.Xml.Serialization; | 29 | using System.Xml.Serialization; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using libsecondlife.Packets; | ||
32 | 31 | ||
33 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
34 | { | 33 | { |
@@ -93,47 +92,39 @@ namespace OpenSim.Framework | |||
93 | 92 | ||
94 | public ProfileShape ProfileShape | 93 | public ProfileShape ProfileShape |
95 | { | 94 | { |
96 | get | 95 | get { return (ProfileShape) (ProfileCurve & 0xf); } |
97 | { | ||
98 | return (ProfileShape)(ProfileCurve & 0xf); | ||
99 | } | ||
100 | set | 96 | set |
101 | { | 97 | { |
102 | byte oldValueMasked = (byte)(ProfileCurve & 0xf0); | 98 | byte oldValueMasked = (byte) (ProfileCurve & 0xf0); |
103 | ProfileCurve = (byte)(oldValueMasked | (byte)value); | 99 | ProfileCurve = (byte) (oldValueMasked | (byte) value); |
104 | } | 100 | } |
105 | } | 101 | } |
106 | 102 | ||
107 | [XmlIgnore] | 103 | [XmlIgnore] |
108 | public HollowShape HollowShape | 104 | public HollowShape HollowShape |
109 | { | 105 | { |
110 | get | 106 | get { return (HollowShape) (ProfileHollow & 0xf0); } |
111 | { | ||
112 | return (HollowShape)(ProfileHollow & 0xf0); | ||
113 | } | ||
114 | set | 107 | set |
115 | { | 108 | { |
116 | byte oldValueMasked = (byte)(ProfileHollow & 0xf0); | 109 | byte oldValueMasked = (byte) (ProfileHollow & 0xf0); |
117 | ProfileHollow = (byte)(oldValueMasked | (byte)value); | 110 | ProfileHollow = (byte) (oldValueMasked | (byte) value); |
118 | } | 111 | } |
119 | } | 112 | } |
120 | 113 | ||
121 | public LLVector3 PrimScale | 114 | public LLVector3 PrimScale |
122 | { | 115 | { |
123 | get | 116 | get { return Scale; } |
124 | { | ||
125 | return this.Scale; | ||
126 | } | ||
127 | } | 117 | } |
128 | 118 | ||
129 | static PrimitiveBaseShape() | 119 | static PrimitiveBaseShape() |
130 | { | 120 | { |
131 | m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); | 121 | m_defaultTextureEntry = |
122 | new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); | ||
132 | } | 123 | } |
133 | 124 | ||
134 | public PrimitiveBaseShape() | 125 | public PrimitiveBaseShape() |
135 | { | 126 | { |
136 | PCode = (byte)PCodeEnum.Primitive; | 127 | PCode = (byte) PCodeEnum.Primitive; |
137 | ExtraParams = new byte[1]; | 128 | ExtraParams = new byte[1]; |
138 | TextureEntry = m_defaultTextureEntry; | 129 | TextureEntry = m_defaultTextureEntry; |
139 | } | 130 | } |
@@ -141,12 +132,11 @@ namespace OpenSim.Framework | |||
141 | //void returns need to change of course | 132 | //void returns need to change of course |
142 | public virtual void GetMesh() | 133 | public virtual void GetMesh() |
143 | { | 134 | { |
144 | |||
145 | } | 135 | } |
146 | 136 | ||
147 | public PrimitiveBaseShape Copy() | 137 | public PrimitiveBaseShape Copy() |
148 | { | 138 | { |
149 | return (PrimitiveBaseShape)this.MemberwiseClone(); | 139 | return (PrimitiveBaseShape) MemberwiseClone(); |
150 | } | 140 | } |
151 | } | 141 | } |
152 | 142 | ||
@@ -155,7 +145,6 @@ namespace OpenSim.Framework | |||
155 | public GenericShape() | 145 | public GenericShape() |
156 | : base() | 146 | : base() |
157 | { | 147 | { |
158 | |||
159 | } | 148 | } |
160 | } | 149 | } |
161 | 150 | ||
@@ -164,7 +153,7 @@ namespace OpenSim.Framework | |||
164 | public BoxShape() | 153 | public BoxShape() |
165 | : base() | 154 | : base() |
166 | { | 155 | { |
167 | PathCurve = (byte)Extrusion.Straight; | 156 | PathCurve = (byte) Extrusion.Straight; |
168 | ProfileShape = ProfileShape.Square; | 157 | ProfileShape = ProfileShape.Square; |
169 | PathScaleX = 100; | 158 | PathScaleX = 100; |
170 | PathScaleY = 100; | 159 | PathScaleY = 100; |
@@ -193,12 +182,13 @@ namespace OpenSim.Framework | |||
193 | } | 182 | } |
194 | } | 183 | } |
195 | } | 184 | } |
185 | |||
196 | public class CylinderShape : PrimitiveBaseShape | 186 | public class CylinderShape : PrimitiveBaseShape |
197 | { | 187 | { |
198 | public CylinderShape() | 188 | public CylinderShape() |
199 | : base() | 189 | : base() |
200 | { | 190 | { |
201 | PathCurve = (byte)Extrusion.Straight; | 191 | PathCurve = (byte) Extrusion.Straight; |
202 | ProfileShape = ProfileShape.Circle; | 192 | ProfileShape = ProfileShape.Circle; |
203 | PathScaleX = 100; | 193 | PathScaleX = 100; |
204 | PathScaleY = 100; | 194 | PathScaleY = 100; |
@@ -218,7 +208,7 @@ namespace OpenSim.Framework | |||
218 | 208 | ||
219 | private void SetRadius(float radius) | 209 | private void SetRadius(float radius) |
220 | { | 210 | { |
221 | Scale.X = Scale.Y = radius * 2f; | 211 | Scale.X = Scale.Y = radius*2f; |
222 | } | 212 | } |
223 | } | 213 | } |
224 | } | 214 | } \ No newline at end of file |