/* Module Rotate2, d'après le module Rotate code éditeur dynamique par iri (http://www.irizone.net), février 2008 sous licence Scol */ typeof LAngularX2 = ObjText;; typeof LAngularY2 = ObjText;; typeof LAngularZ2 = ObjText;; typeof LFrame = ObjText;; typeof LBinit2 = ObjCheck;; typeof LBend2 = ObjCheck;; typeof LBnumber2 = ObjText;; typeof Number2 = ObjText;; typeof LBtotalangularX2 = ObjText;; typeof TotalAngularX2 = ObjText;; typeof LBtotalangularY2 = ObjText;; typeof TotalAngularY2 = ObjText;; typeof LBtotalangularZ2 = ObjText;; typeof TotalAngularZ2 = ObjText;; fun cbLBend2(obj, u, state)= if state then ( _ENtext Number2 0; _ENtext TotalAngularY2 0; _ENtext TotalAngularX2 0; _ENtext TotalAngularZ2 0; ) else ( _ENtext Number2 1; _ENtext TotalAngularX2 1; _ENtext TotalAngularY2 1; _ENtext TotalAngularZ2 1; );; fun getValueScol(v)= let 65536 / 360 -> x in itoa ((atoi v) * x);; fun getValueDegre(v)= let 65536 / 360 -> x in itoa ((atoi v) / x);; fun closeedit() = strbuild ("angularX"::(_GETtext LAngularX2)::nil):: ("angularY"::(_GETtext LAngularY2)::nil):: ("angularZ"::(_GETtext LAngularZ2)::nil):: ("framerate"::(_GETtext LFrame)::nil):: ("initon" :: (itoa _GETcheck LBinit2) :: nil) :: ("noend" :: (itoa _GETcheck LBend2) :: nil) :: ("number" :: (_GETtext Number2) :: nil) :: ("totalangularX" :: (getValueScol _GETtext TotalAngularX2) :: nil) :: ("totalangularY" :: (getValueScol _GETtext TotalAngularY2) :: nil) :: ("totalangularZ" :: (getValueScol _GETtext TotalAngularZ2) :: nil) :: nil;; fun dynamicedit(win,obj,mat,param)= let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in ( _CRtext _channel win 5 7 80 20 ET_ALIGN_LEFT _loc this "ROT_X" nil; set LAngularX2 = _CReditLine _channel win 85 5 35 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "angularX" -> string in if (nil == string) then "0" else string; _CRtext _channel win 5 32 80 20 ET_ALIGN_LEFT _loc this "ROT_Y" nil; set LAngularY2 = _CReditLine _channel win 85 30 35 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "angularY" -> string in if (nil == string) then "0" else string; _CRtext _channel win 5 57 80 20 ET_ALIGN_LEFT _loc this "ROT_Z" nil; set LAngularZ2 = _CReditLine _channel win 85 55 35 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "angularZ" -> string in if (nil == string) then "0" else string; _CRtext _channel win 5 82 80 20 ET_ALIGN_LEFT _loc this "ROT_V" nil; set LFrame = _CReditLine _channel win 85 80 35 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "framerate" -> string in if (nil == string) then "30" else string; set LBinit2 = _CRcheck _channel win 5 102 w-5 20 CH_LEFT "init on : "; let getInfo l "initon" -> string in _SETcheck LBinit2 if (nil == string) then 0 else atoi string; set LBend2 = _CRcheck _channel win 5 127 w-5 20 CH_LEFT "no end : "; _SETcheck LBend2 let getInfo l "noend" -> string in if (nil == string) then 1 else atoi string; set LBnumber2 = _CRtext _channel win 5 152 80 20 ET_ALIGN_LEFT "number : "; set Number2 = _CReditLine _channel win 85 155 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "number" -> string in if (nil == string) then "1" else string; set LBtotalangularX2 = _CRtext _channel win 5 177 80 20 ET_ALIGN_LEFT "total angular X : "; set TotalAngularX2 = _CReditLine _channel win 85 180 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "totalangularX" -> string in if (nil == string) then "90" else getValueDegre string; set LBtotalangularY2 = _CRtext _channel win 5 202 80 20 ET_ALIGN_LEFT "total angular Y : "; set TotalAngularY2 = _CReditLine _channel win 85 205 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "totalangularY" -> string in if (nil == string) then "90" else getValueDegre string; set LBtotalangularZ2 = _CRtext _channel win 5 227 80 20 ET_ALIGN_LEFT "total angular Z : "; set TotalAngularZ2 = _CReditLine _channel win 85 230 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "totalangularZ" -> string in if (nil == string) then "90" else getValueDegre string; _CBcheck LBend2 @cbLBend2 0; cbLBend2 LBend2 nil _GETcheck LBend2; _CRtext _channel win 5 250 w-10 120 ET_ALIGN_LEFT _loc this "ROT_EXPLICATION" nil ; ); @closeedit;;