diff options
author | lbsa71 | 2007-08-15 16:57:47 +0000 |
---|---|---|
committer | lbsa71 | 2007-08-15 16:57:47 +0000 |
commit | c47bca94d23420b164e5f32aa5c781009496e0d3 (patch) | |
tree | 1334b22e0580c1584a7ef7dfb537339992f2b0ef /OpenSim/Framework | |
parent | * Applying ckrinke's LSL baseclass changes (Thanks!) (diff) | |
download | opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.zip opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.tar.gz opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.tar.bz2 opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.tar.xz |
* Exploring Group/Part from an app perspective.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index 045569b..577c8a2 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -110,10 +110,11 @@ namespace OpenSim.Framework.Types | |||
110 | 110 | ||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | public class BoxShape : PrimitiveBaseShape | 114 | public class BoxShape : PrimitiveBaseShape |
115 | { | 115 | { |
116 | public BoxShape() : base() | 116 | public BoxShape() |
117 | : base() | ||
117 | { | 118 | { |
118 | PathCurve = 16; | 119 | PathCurve = 16; |
119 | ProfileShape = ProfileShape.Square; | 120 | ProfileShape = ProfileShape.Square; |
@@ -121,10 +122,16 @@ namespace OpenSim.Framework.Types | |||
121 | PathScaleX = 100; | 122 | PathScaleX = 100; |
122 | PathScaleY = 100; | 123 | PathScaleY = 100; |
123 | } | 124 | } |
124 | 125 | ||
125 | public void SetSide( float side ) | 126 | public BoxShape(float side) |
127 | : base() | ||
128 | { | ||
129 | SetSide(side); | ||
130 | } | ||
131 | |||
132 | public void SetSide(float side) | ||
126 | { | 133 | { |
127 | Scale = new LLVector3( side, side, side ); | 134 | Scale = new LLVector3(side, side, side); |
128 | } | 135 | } |
129 | 136 | ||
130 | public static BoxShape Default | 137 | public static BoxShape Default |
@@ -139,4 +146,33 @@ namespace OpenSim.Framework.Types | |||
139 | } | 146 | } |
140 | } | 147 | } |
141 | } | 148 | } |
149 | public class CylinderShape : PrimitiveBaseShape | ||
150 | { | ||
151 | public CylinderShape() | ||
152 | : base() | ||
153 | { | ||
154 | PathCurve = 16; | ||
155 | ProfileShape = ProfileShape.Circle; | ||
156 | PCode = 9; | ||
157 | PathScaleX = 100; | ||
158 | PathScaleY = 100; | ||
159 | } | ||
160 | |||
161 | public CylinderShape(float radius, float heigth) | ||
162 | : base() | ||
163 | { | ||
164 | SetRadius(radius); | ||
165 | SetHeigth(heigth); | ||
166 | } | ||
167 | |||
168 | private void SetHeigth(float heigth) | ||
169 | { | ||
170 | Scale.Y = heigth; | ||
171 | } | ||
172 | |||
173 | private void SetRadius(float radius) | ||
174 | { | ||
175 | Scale.X = Scale.Y = radius*2f; | ||
176 | } | ||
177 | } | ||
142 | } | 178 | } |