diff options
author | UbitUmarov | 2017-06-24 23:04:37 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-24 23:04:37 +0100 |
commit | cb8975e56729c6fd077a69df3a7fa06cba285f82 (patch) | |
tree | bbc1cbd582f9d4ac27eba3ffa7f5cc46c70e4b5f /OpenSim | |
parent | add dyn textures vectorrender comands ''ResetTransf;'', ''TransTransf x,y;'' ... (diff) | |
download | opensim-SC-cb8975e56729c6fd077a69df3a7fa06cba285f82.zip opensim-SC-cb8975e56729c6fd077a69df3a7fa06cba285f82.tar.gz opensim-SC-cb8975e56729c6fd077a69df3a7fa06cba285f82.tar.bz2 opensim-SC-cb8975e56729c6fd077a69df3a7fa06cba285f82.tar.xz |
add string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y), string osDrawRotationTransform(string drawList, LSL_Float x) and string osDrawResetTransform(string drawList) helper functions for the new vector renderer comands. Removed ThreadLevel check of similar funtions that had it None, and actually only set strings
Diffstat (limited to 'OpenSim')
3 files changed, 60 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 3a0884f..e93a7d7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1153,9 +1153,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | //Texture draw functions | 1155 | //Texture draw functions |
1156 | |||
1157 | public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) | ||
1158 | { | ||
1159 | CheckThreatLevel(); | ||
1160 | |||
1161 | m_host.AddScriptLPS(1); | ||
1162 | drawList += "TransTransf " + x + "," + y + ";"; | ||
1163 | return drawList; | ||
1164 | } | ||
1165 | |||
1166 | public string osDrawRotationTransform(string drawList, LSL_Float x) | ||
1167 | { | ||
1168 | CheckThreatLevel(); | ||
1169 | m_host.AddScriptLPS(1); | ||
1170 | drawList += "RotTransf " + x + ";"; | ||
1171 | return drawList; | ||
1172 | } | ||
1173 | |||
1174 | public string osDrawResetTransform(string drawList) | ||
1175 | { | ||
1176 | CheckThreatLevel(); | ||
1177 | m_host.AddScriptLPS(1); | ||
1178 | drawList += "ResetTransf;"; | ||
1179 | return drawList; | ||
1180 | } | ||
1181 | |||
1156 | public string osMovePen(string drawList, int x, int y) | 1182 | public string osMovePen(string drawList, int x, int y) |
1157 | { | 1183 | { |
1158 | CheckThreatLevel(ThreatLevel.None, "osMovePen"); | 1184 | CheckThreatLevel(); |
1159 | 1185 | ||
1160 | m_host.AddScriptLPS(1); | 1186 | m_host.AddScriptLPS(1); |
1161 | drawList += "MoveTo " + x + "," + y + ";"; | 1187 | drawList += "MoveTo " + x + "," + y + ";"; |
@@ -1164,7 +1190,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1164 | 1190 | ||
1165 | public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) | 1191 | public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) |
1166 | { | 1192 | { |
1167 | CheckThreatLevel(ThreatLevel.None, "osDrawLine"); | 1193 | CheckThreatLevel(); |
1168 | 1194 | ||
1169 | m_host.AddScriptLPS(1); | 1195 | m_host.AddScriptLPS(1); |
1170 | drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; | 1196 | drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; |
@@ -1173,7 +1199,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1173 | 1199 | ||
1174 | public string osDrawLine(string drawList, int endX, int endY) | 1200 | public string osDrawLine(string drawList, int endX, int endY) |
1175 | { | 1201 | { |
1176 | CheckThreatLevel(ThreatLevel.None, "osDrawLine"); | 1202 | CheckThreatLevel(); |
1177 | 1203 | ||
1178 | m_host.AddScriptLPS(1); | 1204 | m_host.AddScriptLPS(1); |
1179 | drawList += "LineTo " + endX + "," + endY + "; "; | 1205 | drawList += "LineTo " + endX + "," + endY + "; "; |
@@ -1191,7 +1217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1191 | 1217 | ||
1192 | public string osDrawEllipse(string drawList, int width, int height) | 1218 | public string osDrawEllipse(string drawList, int width, int height) |
1193 | { | 1219 | { |
1194 | CheckThreatLevel(ThreatLevel.None, "osDrawEllipse"); | 1220 | CheckThreatLevel(); |
1195 | 1221 | ||
1196 | m_host.AddScriptLPS(1); | 1222 | m_host.AddScriptLPS(1); |
1197 | drawList += "Ellipse " + width + "," + height + "; "; | 1223 | drawList += "Ellipse " + width + "," + height + "; "; |
@@ -1200,7 +1226,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1200 | 1226 | ||
1201 | public string osDrawFilledEllipse(string drawList, int width, int height) | 1227 | public string osDrawFilledEllipse(string drawList, int width, int height) |
1202 | { | 1228 | { |
1203 | CheckThreatLevel(ThreatLevel.None, "osDrawFilledEllipse"); | 1229 | CheckThreatLevel(); |
1204 | 1230 | ||
1205 | m_host.AddScriptLPS(1); | 1231 | m_host.AddScriptLPS(1); |
1206 | drawList += "FillEllipse " + width + "," + height + "; "; | 1232 | drawList += "FillEllipse " + width + "," + height + "; "; |
@@ -1209,7 +1235,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1209 | 1235 | ||
1210 | public string osDrawRectangle(string drawList, int width, int height) | 1236 | public string osDrawRectangle(string drawList, int width, int height) |
1211 | { | 1237 | { |
1212 | CheckThreatLevel(ThreatLevel.None, "osDrawRectangle"); | 1238 | CheckThreatLevel(); |
1213 | 1239 | ||
1214 | m_host.AddScriptLPS(1); | 1240 | m_host.AddScriptLPS(1); |
1215 | drawList += "Rectangle " + width + "," + height + "; "; | 1241 | drawList += "Rectangle " + width + "," + height + "; "; |
@@ -1218,7 +1244,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1218 | 1244 | ||
1219 | public string osDrawFilledRectangle(string drawList, int width, int height) | 1245 | public string osDrawFilledRectangle(string drawList, int width, int height) |
1220 | { | 1246 | { |
1221 | CheckThreatLevel(ThreatLevel.None, "osDrawFilledRectangle"); | 1247 | CheckThreatLevel(); |
1222 | 1248 | ||
1223 | m_host.AddScriptLPS(1); | 1249 | m_host.AddScriptLPS(1); |
1224 | drawList += "FillRectangle " + width + "," + height + "; "; | 1250 | drawList += "FillRectangle " + width + "," + height + "; "; |
@@ -1227,7 +1253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1227 | 1253 | ||
1228 | public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) | 1254 | public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) |
1229 | { | 1255 | { |
1230 | CheckThreatLevel(ThreatLevel.None, "osDrawFilledPolygon"); | 1256 | CheckThreatLevel(); |
1231 | 1257 | ||
1232 | m_host.AddScriptLPS(1); | 1258 | m_host.AddScriptLPS(1); |
1233 | 1259 | ||
@@ -1246,7 +1272,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1246 | 1272 | ||
1247 | public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) | 1273 | public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) |
1248 | { | 1274 | { |
1249 | CheckThreatLevel(ThreatLevel.None, "osDrawPolygon"); | 1275 | CheckThreatLevel(); |
1250 | 1276 | ||
1251 | m_host.AddScriptLPS(1); | 1277 | m_host.AddScriptLPS(1); |
1252 | 1278 | ||
@@ -1265,7 +1291,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1265 | 1291 | ||
1266 | public string osSetFontSize(string drawList, int fontSize) | 1292 | public string osSetFontSize(string drawList, int fontSize) |
1267 | { | 1293 | { |
1268 | CheckThreatLevel(ThreatLevel.None, "osSetFontSize"); | 1294 | CheckThreatLevel(); |
1269 | 1295 | ||
1270 | m_host.AddScriptLPS(1); | 1296 | m_host.AddScriptLPS(1); |
1271 | drawList += "FontSize "+ fontSize +"; "; | 1297 | drawList += "FontSize "+ fontSize +"; "; |
@@ -1274,7 +1300,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1274 | 1300 | ||
1275 | public string osSetFontName(string drawList, string fontName) | 1301 | public string osSetFontName(string drawList, string fontName) |
1276 | { | 1302 | { |
1277 | CheckThreatLevel(ThreatLevel.None, "osSetFontName"); | 1303 | CheckThreatLevel(); |
1278 | 1304 | ||
1279 | m_host.AddScriptLPS(1); | 1305 | m_host.AddScriptLPS(1); |
1280 | drawList += "FontName "+ fontName +"; "; | 1306 | drawList += "FontName "+ fontName +"; "; |
@@ -1283,7 +1309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1283 | 1309 | ||
1284 | public string osSetPenSize(string drawList, int penSize) | 1310 | public string osSetPenSize(string drawList, int penSize) |
1285 | { | 1311 | { |
1286 | CheckThreatLevel(ThreatLevel.None, "osSetPenSize"); | 1312 | CheckThreatLevel(); |
1287 | 1313 | ||
1288 | m_host.AddScriptLPS(1); | 1314 | m_host.AddScriptLPS(1); |
1289 | drawList += "PenSize " + penSize + "; "; | 1315 | drawList += "PenSize " + penSize + "; "; |
@@ -1292,7 +1318,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1292 | 1318 | ||
1293 | public string osSetPenColor(string drawList, string color) | 1319 | public string osSetPenColor(string drawList, string color) |
1294 | { | 1320 | { |
1295 | CheckThreatLevel(ThreatLevel.None, "osSetPenColor"); | 1321 | CheckThreatLevel(); |
1296 | 1322 | ||
1297 | m_host.AddScriptLPS(1); | 1323 | m_host.AddScriptLPS(1); |
1298 | drawList += "PenColor " + color + "; "; | 1324 | drawList += "PenColor " + color + "; "; |
@@ -1302,7 +1328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1302 | // Deprecated | 1328 | // Deprecated |
1303 | public string osSetPenColour(string drawList, string colour) | 1329 | public string osSetPenColour(string drawList, string colour) |
1304 | { | 1330 | { |
1305 | CheckThreatLevel(ThreatLevel.None, "osSetPenColour"); | 1331 | CheckThreatLevel(); |
1306 | OSSLDeprecated("osSetPenColour", "osSetPenColor"); | 1332 | OSSLDeprecated("osSetPenColour", "osSetPenColor"); |
1307 | 1333 | ||
1308 | m_host.AddScriptLPS(1); | 1334 | m_host.AddScriptLPS(1); |
@@ -1312,7 +1338,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1312 | 1338 | ||
1313 | public string osSetPenCap(string drawList, string direction, string type) | 1339 | public string osSetPenCap(string drawList, string direction, string type) |
1314 | { | 1340 | { |
1315 | CheckThreatLevel(ThreatLevel.None, "osSetPenCap"); | 1341 | CheckThreatLevel(); |
1316 | 1342 | ||
1317 | m_host.AddScriptLPS(1); | 1343 | m_host.AddScriptLPS(1); |
1318 | drawList += "PenCap " + direction + "," + type + "; "; | 1344 | drawList += "PenCap " + direction + "," + type + "; "; |
@@ -1321,7 +1347,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1321 | 1347 | ||
1322 | public string osDrawImage(string drawList, int width, int height, string imageUrl) | 1348 | public string osDrawImage(string drawList, int width, int height, string imageUrl) |
1323 | { | 1349 | { |
1324 | CheckThreatLevel(ThreatLevel.None, "osDrawImage"); | 1350 | CheckThreatLevel(); |
1325 | 1351 | ||
1326 | m_host.AddScriptLPS(1); | 1352 | m_host.AddScriptLPS(1); |
1327 | drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; | 1353 | drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index c12490c..19cfcc1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -228,6 +228,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
228 | string osDrawFilledRectangle(string drawList, int width, int height); | 228 | string osDrawFilledRectangle(string drawList, int width, int height); |
229 | string osDrawPolygon(string drawList, LSL_List x, LSL_List y); | 229 | string osDrawPolygon(string drawList, LSL_List x, LSL_List y); |
230 | string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y); | 230 | string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y); |
231 | string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y); | ||
232 | string osDrawRotationTransform(string drawList, LSL_Float x); | ||
233 | string osDrawResetTransform(string drawList); | ||
231 | string osSetFontName(string drawList, string fontName); | 234 | string osSetFontName(string drawList, string fontName); |
232 | string osSetFontSize(string drawList, int fontSize); | 235 | string osSetFontSize(string drawList, int fontSize); |
233 | string osSetPenSize(string drawList, int penSize); | 236 | string osSetPenSize(string drawList, int penSize); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 9bc3159..4b1f6d3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -386,6 +386,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
386 | return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y); | 386 | return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y); |
387 | } | 387 | } |
388 | 388 | ||
389 | public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) | ||
390 | { | ||
391 | return m_OSSL_Functions.osDrawTranslationTransform(drawList, x, y); | ||
392 | } | ||
393 | |||
394 | public string osDrawRotationTransform(string drawList, LSL_Float x) | ||
395 | { | ||
396 | return m_OSSL_Functions.osDrawRotationTransform(drawList, x); | ||
397 | } | ||
398 | |||
399 | public string osDrawResetTransform(string drawList) | ||
400 | { | ||
401 | return m_OSSL_Functions.osDrawResetTransform(drawList); | ||
402 | } | ||
403 | |||
389 | public string osSetFontSize(string drawList, int fontSize) | 404 | public string osSetFontSize(string drawList, int fontSize) |
390 | { | 405 | { |
391 | return m_OSSL_Functions.osSetFontSize(drawList, fontSize); | 406 | return m_OSSL_Functions.osSetFontSize(drawList, fontSize); |