|
|
Модератор форума: Slon |
Форум » РЕДАКТОР - ArmA 2 Operation Arrowhead » Скрипты » Построение прямых линий |
Построение прямых линий |
› Понедельник
› 23.03.2015
› 17:44
› Сообщение #
Построение прямых линий алгоритмом Брезенхэма.
func_line_algorithm Код _pos = _this select 0; _step = _this select 1; if (!isnil {_this select 2}) then {_dir =_this select 2;}else{_dir =0;}; if (!isnil {_this select 3}) then {_name =_this select 3;}else{_name ="markername";}; if (!isnil {_this select 4}) then {_color =_this select 4;}else{_color ="Colorblue";}; if (!isnil {_this select 5}) then {_icon =_this select 5;}else{_icon ="ICON";}; if (!isnil {_this select 6}) then {_type =_this select 6;}else{_type ="group_11";}; if (!isnil {_this select 7}) then {_local =_this select 7;}else{_local =false;}; примеры Код arr = []; mark = [markerpos "m2",markerpos "m3",markerpos "m3_1",markerpos "m3_2",markerpos "m3_3",markerpos "m3_4" ,markerpos "m2"]; arr = [mark,10,0,nil ,nil,nil,nil,nil] call func_line_algorithm; Код arr = []; mark = [markerpos "m2",markerpos "m3",markerpos "m3_1",markerpos "m3_2",markerpos "m3_3",markerpos "m3_4" ]; arr = [mark,10,0,nil ,nil,nil,nil,nil] call func_line_algorithm; |
| |||
| |||
Чат сайта |