AngelScriptAPI.h 300 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907
  1. // Script API header intended to be 'force included' in IDE for AngelScript content assist / code completion
  2. #define int8 signed char
  3. #define int16 signed short
  4. #define int64 long
  5. #define uint8 unsigned char
  6. #define uint16 unsigned short
  7. #define uint64 unsigned long
  8. #define null 0
  9. // Classes
  10. class Animatable
  11. {
  12. // Methods:
  13. void ApplyAttributes();
  14. Variant GetAttribute(const String&) const;
  15. ValueAnimation GetAttributeAnimation(const String&) const;
  16. float GetAttributeAnimationSpeed(const String&) const;
  17. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  18. Variant GetAttributeDefault(const String&) const;
  19. bool Load(File, bool = false);
  20. bool Load(VectorBuffer&, bool = false);
  21. bool LoadXML(const XMLElement&, bool = false);
  22. void MarkNetworkUpdate() const;
  23. void RemoveInstanceDefault();
  24. void ResetToDefault();
  25. bool Save(File) const;
  26. bool Save(VectorBuffer&) const;
  27. bool SaveXML(XMLElement&) const;
  28. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  29. bool SetAttribute(const String&, const Variant&);
  30. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  31. void SetAttributeAnimationSpeed(const String&, float);
  32. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  33. // Properties:
  34. bool animationEnabled;
  35. /* readonly */
  36. Array<Variant> attributeDefaults;
  37. /* readonly */
  38. Array<AttributeInfo> attributeInfos;
  39. Array<Variant> attributes;
  40. /* readonly */
  41. StringHash baseType;
  42. /* readonly */
  43. String category;
  44. /* readonly */
  45. uint numAttributes;
  46. ObjectAnimation objectAnimation;
  47. /* readonly */
  48. int refs;
  49. bool temporary;
  50. /* readonly */
  51. StringHash type;
  52. /* readonly */
  53. String typeName;
  54. /* readonly */
  55. int weakRefs;
  56. };
  57. class AnimatedModel
  58. {
  59. // Methods:
  60. AnimationState AddAnimationState(Animation);
  61. void ApplyAttributes();
  62. void ApplyMaterialList(const String& = String ( ));
  63. void DrawDebugGeometry(DebugRenderer, bool);
  64. AnimationState GetAnimationState(Animation) const;
  65. AnimationState GetAnimationState(uint) const;
  66. Variant GetAttribute(const String&) const;
  67. ValueAnimation GetAttributeAnimation(const String&) const;
  68. float GetAttributeAnimationSpeed(const String&) const;
  69. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  70. Variant GetAttributeDefault(const String&) const;
  71. float GetMorphWeight(uint) const;
  72. bool IsInView(Camera) const;
  73. bool Load(File, bool = false);
  74. bool Load(VectorBuffer&, bool = false);
  75. bool LoadXML(const XMLElement&, bool = false);
  76. void MarkNetworkUpdate() const;
  77. void Remove();
  78. void RemoveAllAnimationStates();
  79. void RemoveAnimationState(Animation);
  80. void RemoveAnimationState(AnimationState);
  81. void RemoveAnimationState(const String&);
  82. void RemoveAnimationState(uint);
  83. void RemoveInstanceDefault();
  84. void ResetMorphWeights();
  85. void ResetToDefault();
  86. bool Save(File) const;
  87. bool Save(VectorBuffer&) const;
  88. bool SaveXML(XMLElement&) const;
  89. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  90. bool SetAttribute(const String&, const Variant&);
  91. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  92. void SetAttributeAnimationSpeed(const String&, float);
  93. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  94. void SetMorphWeight(uint, float);
  95. // Properties:
  96. bool animationEnabled;
  97. float animationLodBias;
  98. /* readonly */
  99. Array<AnimationState> animationStates;
  100. /* readonly */
  101. Array<Variant> attributeDefaults;
  102. /* readonly */
  103. Array<AttributeInfo> attributeInfos;
  104. Array<Variant> attributes;
  105. /* readonly */
  106. StringHash baseType;
  107. /* readonly */
  108. BoundingBox boundingBox;
  109. bool castShadows;
  110. /* readonly */
  111. String category;
  112. float drawDistance;
  113. bool enabled;
  114. /* readonly */
  115. bool enabledEffective;
  116. /* readonly */
  117. uint id;
  118. /* readonly */
  119. bool inView;
  120. uint lightMask;
  121. float lodBias;
  122. /* writeonly */
  123. Material material;
  124. Array<Material> materials;
  125. uint maxLights;
  126. Model model;
  127. /* readonly */
  128. Array<String> morphNames;
  129. Array<float> morphWeights;
  130. /* readonly */
  131. Node node;
  132. /* readonly */
  133. uint numAnimationStates;
  134. /* readonly */
  135. uint numAttributes;
  136. /* readonly */
  137. uint numGeometries;
  138. /* readonly */
  139. uint numMorphs;
  140. ObjectAnimation objectAnimation;
  141. bool occludee;
  142. bool occluder;
  143. /* readonly */
  144. int refs;
  145. float shadowDistance;
  146. uint shadowMask;
  147. /* readonly */
  148. Skeleton skeleton;
  149. bool temporary;
  150. /* readonly */
  151. StringHash type;
  152. /* readonly */
  153. String typeName;
  154. bool updateInvisible;
  155. uint viewMask;
  156. /* readonly */
  157. int weakRefs;
  158. /* readonly */
  159. BoundingBox worldBoundingBox;
  160. /* readonly */
  161. Zone zone;
  162. uint zoneMask;
  163. };
  164. class AnimatedSprite2D
  165. {
  166. // Methods:
  167. void ApplyAttributes();
  168. void DrawDebugGeometry(DebugRenderer, bool);
  169. Variant GetAttribute(const String&) const;
  170. ValueAnimation GetAttributeAnimation(const String&) const;
  171. float GetAttributeAnimationSpeed(const String&) const;
  172. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  173. Variant GetAttributeDefault(const String&) const;
  174. bool IsInView(Camera) const;
  175. bool Load(File, bool = false);
  176. bool Load(VectorBuffer&, bool = false);
  177. bool LoadXML(const XMLElement&, bool = false);
  178. void MarkNetworkUpdate() const;
  179. void Remove();
  180. void RemoveInstanceDefault();
  181. void ResetToDefault();
  182. bool Save(File) const;
  183. bool Save(VectorBuffer&) const;
  184. bool SaveXML(XMLElement&) const;
  185. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  186. void SetAnimation(AnimationSet2D, const String&, LoopMode2D = LM_DEFAULT);
  187. void SetAnimation(const String&, LoopMode2D = LM_DEFAULT);
  188. bool SetAttribute(const String&, const Variant&);
  189. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  190. void SetAttributeAnimationSpeed(const String&, float);
  191. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  192. void SetFlip(bool, bool);
  193. // Properties:
  194. String animation;
  195. bool animationEnabled;
  196. AnimationSet2D animationSet;
  197. /* readonly */
  198. Array<Variant> attributeDefaults;
  199. /* readonly */
  200. Array<AttributeInfo> attributeInfos;
  201. Array<Variant> attributes;
  202. /* readonly */
  203. StringHash baseType;
  204. BlendMode blendMode;
  205. /* readonly */
  206. BoundingBox boundingBox;
  207. bool castShadows;
  208. /* readonly */
  209. String category;
  210. Color color;
  211. float drawDistance;
  212. bool enabled;
  213. /* readonly */
  214. bool enabledEffective;
  215. bool flipX;
  216. bool flipY;
  217. /* readonly */
  218. uint id;
  219. /* readonly */
  220. bool inView;
  221. int layer;
  222. uint lightMask;
  223. float lodBias;
  224. LoopMode2D loopMode;
  225. uint maxLights;
  226. /* readonly */
  227. Node node;
  228. /* readonly */
  229. uint numAttributes;
  230. ObjectAnimation objectAnimation;
  231. bool occludee;
  232. bool occluder;
  233. int orderInLayer;
  234. /* readonly */
  235. int refs;
  236. float shadowDistance;
  237. uint shadowMask;
  238. float speed;
  239. Sprite2D sprite;
  240. bool temporary;
  241. Texture2D texture;
  242. /* readonly */
  243. StringHash type;
  244. /* readonly */
  245. String typeName;
  246. uint viewMask;
  247. /* readonly */
  248. int weakRefs;
  249. /* readonly */
  250. BoundingBox worldBoundingBox;
  251. uint zoneMask;
  252. };
  253. class Animation
  254. {
  255. // Methods:
  256. void AddTrigger(float, bool, const Variant&);
  257. bool Load(File);
  258. bool Load(VectorBuffer&);
  259. void RemoveAllTriggers();
  260. void RemoveTrigger(uint);
  261. bool Save(File) const;
  262. bool Save(VectorBuffer&) const;
  263. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  264. // Properties:
  265. /* readonly */
  266. String animationName;
  267. /* readonly */
  268. StringHash baseType;
  269. /* readonly */
  270. String category;
  271. /* readonly */
  272. float length;
  273. /* readonly */
  274. uint memoryUse;
  275. String name;
  276. /* readonly */
  277. uint numTracks;
  278. uint numTriggers;
  279. /* readonly */
  280. int refs;
  281. /* readonly */
  282. Array<AnimationTriggerPoint> triggers;
  283. /* readonly */
  284. StringHash type;
  285. /* readonly */
  286. String typeName;
  287. /* readonly */
  288. uint useTimer;
  289. /* readonly */
  290. int weakRefs;
  291. };
  292. class Animation2D
  293. {
  294. // Properties:
  295. /* readonly */
  296. float length;
  297. /* readonly */
  298. bool looped;
  299. /* readonly */
  300. String name;
  301. /* readonly */
  302. int refs;
  303. /* readonly */
  304. int weakRefs;
  305. };
  306. class AnimationController
  307. {
  308. // Methods:
  309. void ApplyAttributes();
  310. void DrawDebugGeometry(DebugRenderer, bool);
  311. bool Fade(const String&, float, float);
  312. bool FadeOthers(const String&, float, float);
  313. AnimationState GetAnimationState(StringHash) const;
  314. AnimationState GetAnimationState(const String&) const;
  315. Variant GetAttribute(const String&) const;
  316. ValueAnimation GetAttributeAnimation(const String&) const;
  317. float GetAttributeAnimationSpeed(const String&) const;
  318. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  319. Variant GetAttributeDefault(const String&) const;
  320. float GetAutoFade(const String&) const;
  321. float GetFadeTarget(const String&) const;
  322. uint8 GetLayer(const String&) const;
  323. float GetLength(const String&) const;
  324. bool GetLooped(const String&) const;
  325. float GetSpeed(const String&) const;
  326. float GetTime(const String&) const;
  327. float GetWeight(const String&) const;
  328. bool IsFadingIn(const String&) const;
  329. bool IsFadingOut(const String&) const;
  330. bool IsPlaying(const String&) const;
  331. bool Load(File, bool = false);
  332. bool Load(VectorBuffer&, bool = false);
  333. bool LoadXML(const XMLElement&, bool = false);
  334. void MarkNetworkUpdate() const;
  335. bool Play(const String&, uint8, bool, float = 0.0f);
  336. bool PlayExclusive(const String&, uint8, bool, float = 0.0f);
  337. void Remove();
  338. void RemoveInstanceDefault();
  339. void ResetToDefault();
  340. bool Save(File) const;
  341. bool Save(VectorBuffer&) const;
  342. bool SaveXML(XMLElement&) const;
  343. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  344. bool SetAttribute(const String&, const Variant&);
  345. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  346. void SetAttributeAnimationSpeed(const String&, float);
  347. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  348. bool SetAutoFade(const String&, float);
  349. bool SetLayer(const String&, uint8);
  350. bool SetLooped(const String&, bool);
  351. bool SetSpeed(const String&, float);
  352. bool SetStartBone(const String&, const String&);
  353. bool SetTime(const String&, float);
  354. bool SetWeight(const String&, float);
  355. void Stop(const String&, float = 0.0f);
  356. void StopAll(float = 0.0f);
  357. void StopLayer(uint8, float = 0.0f);
  358. const String& GetStartBone(const String&) const;
  359. // Properties:
  360. bool animationEnabled;
  361. /* readonly */
  362. Array<Variant> attributeDefaults;
  363. /* readonly */
  364. Array<AttributeInfo> attributeInfos;
  365. Array<Variant> attributes;
  366. /* readonly */
  367. StringHash baseType;
  368. /* readonly */
  369. String category;
  370. bool enabled;
  371. /* readonly */
  372. bool enabledEffective;
  373. /* readonly */
  374. uint id;
  375. /* readonly */
  376. Node node;
  377. /* readonly */
  378. uint numAttributes;
  379. ObjectAnimation objectAnimation;
  380. /* readonly */
  381. int refs;
  382. bool temporary;
  383. /* readonly */
  384. StringHash type;
  385. /* readonly */
  386. String typeName;
  387. /* readonly */
  388. int weakRefs;
  389. };
  390. class AnimationSet2D
  391. {
  392. // Methods:
  393. Animation2D GetAnimation(const String&) const;
  394. Animation2D GetAnimation(uint) const;
  395. bool Load(File);
  396. bool Load(VectorBuffer&);
  397. bool Save(File) const;
  398. bool Save(VectorBuffer&) const;
  399. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  400. // Properties:
  401. /* readonly */
  402. StringHash baseType;
  403. /* readonly */
  404. String category;
  405. /* readonly */
  406. uint memoryUse;
  407. String name;
  408. /* readonly */
  409. uint numAnimations;
  410. /* readonly */
  411. int refs;
  412. /* readonly */
  413. StringHash type;
  414. /* readonly */
  415. String typeName;
  416. /* readonly */
  417. uint useTimer;
  418. /* readonly */
  419. int weakRefs;
  420. };
  421. class AnimationState
  422. {
  423. // Methods:
  424. void AddTime(float);
  425. void AddWeight(float);
  426. void Apply();
  427. float GetBoneWeight(StringHash) const;
  428. float GetBoneWeight(uint) const;
  429. uint GetTrackIndex(StringHash) const;
  430. uint GetTrackIndex(const String&) const;
  431. void SetBoneWeight(StringHash, float, bool = false);
  432. void SetBoneWeight(const String&, float, bool = false);
  433. void SetBoneWeight(uint, float, bool = false);
  434. // Properties:
  435. /* readonly */
  436. Animation animation;
  437. Array<float> boneWeights;
  438. /* readonly */
  439. bool enabled;
  440. uint8 layer;
  441. /* readonly */
  442. float length;
  443. bool looped;
  444. /* readonly */
  445. AnimatedModel model;
  446. /* readonly */
  447. Node node;
  448. /* readonly */
  449. int refs;
  450. Bone startBone;
  451. float time;
  452. /* readonly */
  453. int weakRefs;
  454. float weight;
  455. };
  456. class AnimationTriggerPoint
  457. {
  458. // Properties:
  459. Variant data;
  460. float time;
  461. };
  462. template <class T> class Array
  463. {
  464. // Methods:
  465. void Clear();
  466. void Erase(uint);
  467. int Find(const T&) const;
  468. int Find(uint, const T&) const;
  469. int FindByRef(const T&) const;
  470. int FindByRef(uint, const T&) const;
  471. void Insert(uint, const T&);
  472. void Pop();
  473. void Push(const T&);
  474. void Reserve(uint);
  475. void Resize(uint);
  476. void Reverse();
  477. void Sort();
  478. void Sort(uint, uint);
  479. void SortReverse();
  480. void SortReverse(uint, uint);
  481. // Properties:
  482. /* readonly */
  483. bool empty;
  484. uint length;
  485. };
  486. class AttributeInfo
  487. {
  488. // Properties:
  489. Variant defaultValue;
  490. /* readonly */
  491. Array<String> enumNames;
  492. uint mode;
  493. String name;
  494. VariantType type;
  495. };
  496. class Audio
  497. {
  498. // Methods:
  499. bool HasMasterGain(const String&) const;
  500. bool Play();
  501. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  502. void SetMode(int, int, bool, bool = true);
  503. void Stop();
  504. // Properties:
  505. /* readonly */
  506. StringHash baseType;
  507. /* readonly */
  508. String category;
  509. /* readonly */
  510. bool initialized;
  511. /* readonly */
  512. bool interpolation;
  513. SoundListener listener;
  514. Array<float> masterGain;
  515. /* readonly */
  516. int mixRate;
  517. /* readonly */
  518. bool playing;
  519. /* readonly */
  520. int refs;
  521. /* readonly */
  522. uint sampleSize;
  523. /* readonly */
  524. bool stereo;
  525. /* readonly */
  526. StringHash type;
  527. /* readonly */
  528. String typeName;
  529. /* readonly */
  530. int weakRefs;
  531. };
  532. class BiasParameters
  533. {
  534. // Properties:
  535. float constantBias;
  536. float slopeScaledBias;
  537. };
  538. class Billboard
  539. {
  540. // Properties:
  541. Color color;
  542. bool enabled;
  543. Vector3 position;
  544. float rotation;
  545. Vector2 size;
  546. Rect uv;
  547. };
  548. class BillboardSet
  549. {
  550. // Methods:
  551. void ApplyAttributes();
  552. void Commit();
  553. void DrawDebugGeometry(DebugRenderer, bool);
  554. Variant GetAttribute(const String&) const;
  555. ValueAnimation GetAttributeAnimation(const String&) const;
  556. float GetAttributeAnimationSpeed(const String&) const;
  557. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  558. Variant GetAttributeDefault(const String&) const;
  559. bool IsInView(Camera) const;
  560. bool Load(File, bool = false);
  561. bool Load(VectorBuffer&, bool = false);
  562. bool LoadXML(const XMLElement&, bool = false);
  563. void MarkNetworkUpdate() const;
  564. void Remove();
  565. void RemoveInstanceDefault();
  566. void ResetToDefault();
  567. bool Save(File) const;
  568. bool Save(VectorBuffer&) const;
  569. bool SaveXML(XMLElement&) const;
  570. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  571. bool SetAttribute(const String&, const Variant&);
  572. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  573. void SetAttributeAnimationSpeed(const String&, float);
  574. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  575. // Properties:
  576. bool animationEnabled;
  577. float animationLodBias;
  578. /* readonly */
  579. Array<Variant> attributeDefaults;
  580. /* readonly */
  581. Array<AttributeInfo> attributeInfos;
  582. Array<Variant> attributes;
  583. /* readonly */
  584. StringHash baseType;
  585. /* readonly */
  586. Array<Billboard> billboards;
  587. /* readonly */
  588. BoundingBox boundingBox;
  589. bool castShadows;
  590. /* readonly */
  591. String category;
  592. float drawDistance;
  593. bool enabled;
  594. /* readonly */
  595. bool enabledEffective;
  596. FaceCameraMode faceCameraMode;
  597. /* readonly */
  598. uint id;
  599. /* readonly */
  600. bool inView;
  601. uint lightMask;
  602. float lodBias;
  603. Material material;
  604. uint maxLights;
  605. /* readonly */
  606. Node node;
  607. /* readonly */
  608. uint numAttributes;
  609. uint numBillboards;
  610. ObjectAnimation objectAnimation;
  611. bool occludee;
  612. bool occluder;
  613. /* readonly */
  614. int refs;
  615. bool relative;
  616. bool scaled;
  617. float shadowDistance;
  618. uint shadowMask;
  619. bool sorted;
  620. bool temporary;
  621. /* readonly */
  622. StringHash type;
  623. /* readonly */
  624. String typeName;
  625. uint viewMask;
  626. /* readonly */
  627. int weakRefs;
  628. /* readonly */
  629. BoundingBox worldBoundingBox;
  630. /* readonly */
  631. Zone zone;
  632. uint zoneMask;
  633. };
  634. class Bone
  635. {
  636. // Properties:
  637. bool animated;
  638. BoundingBox boundingBox;
  639. Vector3 initialPosition;
  640. Quaternion initialRotation;
  641. Vector3 initialScale;
  642. String name;
  643. Node node;
  644. float radius;
  645. };
  646. class BorderImage
  647. {
  648. // Methods:
  649. void AddChild(UIElement);
  650. void ApplyAttributes();
  651. void BringToFront();
  652. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  653. void DisableLayoutUpdate();
  654. IntVector2 ElementToScreen(const IntVector2&);
  655. void EnableLayoutUpdate();
  656. uint FindChild(UIElement) const;
  657. Variant GetAttribute(const String&) const;
  658. ValueAnimation GetAttributeAnimation(const String&) const;
  659. float GetAttributeAnimationSpeed(const String&) const;
  660. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  661. Variant GetAttributeDefault(const String&) const;
  662. UIElement GetChild(const String&, bool = false) const;
  663. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  664. Array<UIElement> GetChildren(bool = false) const;
  665. UIElement GetElementEventSender() const;
  666. uint GetNumChildren(bool) const;
  667. void InsertChild(uint, UIElement);
  668. bool IsInside(IntVector2, bool);
  669. bool IsInsideCombined(IntVector2, bool);
  670. bool Load(File, bool = false);
  671. bool Load(VectorBuffer&, bool = false);
  672. bool LoadChildXML(XMLFile, XMLFile = null);
  673. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  674. bool LoadXML(File);
  675. bool LoadXML(VectorBuffer&);
  676. bool LoadXML(XMLFile, XMLFile);
  677. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  678. bool LoadXML(const XMLElement&, bool = false);
  679. void MarkNetworkUpdate() const;
  680. void Remove();
  681. void RemoveAllChildren();
  682. void RemoveChild(UIElement, uint = 0);
  683. void RemoveChild(uint);
  684. void RemoveInstanceDefault();
  685. void ResetDeepEnabled();
  686. void ResetToDefault();
  687. bool Save(File) const;
  688. bool Save(VectorBuffer&) const;
  689. bool SaveXML(File);
  690. bool SaveXML(VectorBuffer&);
  691. bool SaveXML(XMLElement&) const;
  692. IntVector2 ScreenToElement(const IntVector2&);
  693. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  694. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  695. bool SetAttribute(const String&, const Variant&);
  696. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  697. void SetAttributeAnimationSpeed(const String&, float);
  698. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  699. void SetDeepEnabled(bool);
  700. void SetEnabledRecursive(bool);
  701. void SetFixedHeight(int);
  702. void SetFixedSize(int, int);
  703. void SetFixedWidth(int);
  704. void SetFullImageRect();
  705. void SetHoverOffset(int, int);
  706. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  707. void SetMaxSize(int, int);
  708. void SetMinSize(int, int);
  709. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  710. void SetPosition(int, int);
  711. void SetSize(int, int);
  712. bool SetStyle(const String&, XMLFile = null);
  713. bool SetStyle(const XMLElement&);
  714. bool SetStyleAuto(XMLFile = null);
  715. void UpdateLayout();
  716. const Variant& GetVar(const StringHash&);
  717. // Properties:
  718. bool animationEnabled;
  719. /* readonly */
  720. Array<Variant> attributeDefaults;
  721. /* readonly */
  722. Array<AttributeInfo> attributeInfos;
  723. Array<Variant> attributes;
  724. /* readonly */
  725. StringHash baseType;
  726. BlendMode blendMode;
  727. IntRect border;
  728. bool bringToBack;
  729. bool bringToFront;
  730. /* readonly */
  731. String category;
  732. /* readonly */
  733. IntVector2 childOffset;
  734. /* readonly */
  735. Array<UIElement> children;
  736. IntRect clipBorder;
  737. bool clipChildren;
  738. /* writeonly */
  739. Color color;
  740. /* readonly */
  741. bool colorGradient;
  742. Array<Color> colors;
  743. /* readonly */
  744. IntRect combinedScreenRect;
  745. XMLFile defaultStyle;
  746. /* readonly */
  747. float derivedOpacity;
  748. /* readonly */
  749. uint dragButtonCombo;
  750. /* readonly */
  751. int dragButtonCount;
  752. uint dragDropMode;
  753. bool editable;
  754. bool elementEventSender;
  755. bool enabled;
  756. /* readonly */
  757. bool enabledSelf;
  758. /* readonly */
  759. bool fixedHeight;
  760. /* readonly */
  761. bool fixedSize;
  762. /* readonly */
  763. bool fixedWidth;
  764. bool focus;
  765. FocusMode focusMode;
  766. int height;
  767. HorizontalAlignment horizontalAlignment;
  768. IntVector2 hoverOffset;
  769. /* readonly */
  770. bool hovering;
  771. IntRect imageBorder;
  772. IntRect imageRect;
  773. int indent;
  774. int indentSpacing;
  775. /* readonly */
  776. int indentWidth;
  777. bool internal;
  778. IntRect layoutBorder;
  779. Vector2 layoutFlexScale;
  780. LayoutMode layoutMode;
  781. int layoutSpacing;
  782. int maxHeight;
  783. IntVector2 maxSize;
  784. int maxWidth;
  785. int minHeight;
  786. IntVector2 minSize;
  787. int minWidth;
  788. String name;
  789. /* readonly */
  790. uint numAllChildren;
  791. /* readonly */
  792. uint numAttributes;
  793. /* readonly */
  794. uint numChildren;
  795. ObjectAnimation objectAnimation;
  796. float opacity;
  797. UIElement parent;
  798. IntVector2 position;
  799. int priority;
  800. /* readonly */
  801. int refs;
  802. /* readonly */
  803. UIElement root;
  804. /* readonly */
  805. IntVector2 screenPosition;
  806. bool selected;
  807. IntVector2 size;
  808. bool sortChildren;
  809. String style;
  810. bool temporary;
  811. Texture texture;
  812. bool tiled;
  813. TraversalMode traversalMode;
  814. /* readonly */
  815. StringHash type;
  816. /* readonly */
  817. String typeName;
  818. bool useDerivedOpacity;
  819. /* readonly */
  820. VariantMap vars;
  821. VerticalAlignment verticalAlignment;
  822. bool visible;
  823. /* readonly */
  824. int weakRefs;
  825. int width;
  826. };
  827. class BoundingBox
  828. {
  829. // Methods:
  830. void Clear();
  831. void Clip(const BoundingBox&);
  832. void Define(const BoundingBox&);
  833. void Define(const Frustum&);
  834. void Define(const Polyhedron&);
  835. void Define(const Sphere&);
  836. void Define(const Vector3&);
  837. void Define(const Vector3&, const Vector3&);
  838. void Define(float, float);
  839. Intersection IsInside(const BoundingBox&) const;
  840. Intersection IsInside(const Sphere&) const;
  841. Intersection IsInside(const Vector3&) const;
  842. void Merge(const BoundingBox&);
  843. void Merge(const Frustum&);
  844. void Merge(const Polyhedron&);
  845. void Merge(const Sphere&);
  846. void Merge(const Vector3&);
  847. Rect Projected(const Matrix4&) const;
  848. String ToString() const;
  849. void Transform(const Matrix3&);
  850. void Transform(const Matrix3x4&);
  851. BoundingBox Transformed(const Matrix3&) const;
  852. BoundingBox Transformed(const Matrix3x4&) const;
  853. // Properties:
  854. /* readonly */
  855. Vector3 center;
  856. bool defined;
  857. /* readonly */
  858. Vector3 halfSize;
  859. Vector3 max;
  860. Vector3 min;
  861. /* readonly */
  862. Vector3 size;
  863. };
  864. class Button
  865. {
  866. // Methods:
  867. void AddChild(UIElement);
  868. void ApplyAttributes();
  869. void BringToFront();
  870. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  871. void DisableLayoutUpdate();
  872. IntVector2 ElementToScreen(const IntVector2&);
  873. void EnableLayoutUpdate();
  874. uint FindChild(UIElement) const;
  875. Variant GetAttribute(const String&) const;
  876. ValueAnimation GetAttributeAnimation(const String&) const;
  877. float GetAttributeAnimationSpeed(const String&) const;
  878. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  879. Variant GetAttributeDefault(const String&) const;
  880. UIElement GetChild(const String&, bool = false) const;
  881. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  882. Array<UIElement> GetChildren(bool = false) const;
  883. UIElement GetElementEventSender() const;
  884. uint GetNumChildren(bool) const;
  885. void InsertChild(uint, UIElement);
  886. bool IsInside(IntVector2, bool);
  887. bool IsInsideCombined(IntVector2, bool);
  888. bool Load(File, bool = false);
  889. bool Load(VectorBuffer&, bool = false);
  890. bool LoadChildXML(XMLFile, XMLFile = null);
  891. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  892. bool LoadXML(File);
  893. bool LoadXML(VectorBuffer&);
  894. bool LoadXML(XMLFile, XMLFile);
  895. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  896. bool LoadXML(const XMLElement&, bool = false);
  897. void MarkNetworkUpdate() const;
  898. void Remove();
  899. void RemoveAllChildren();
  900. void RemoveChild(UIElement, uint = 0);
  901. void RemoveChild(uint);
  902. void RemoveInstanceDefault();
  903. void ResetDeepEnabled();
  904. void ResetToDefault();
  905. bool Save(File) const;
  906. bool Save(VectorBuffer&) const;
  907. bool SaveXML(File);
  908. bool SaveXML(VectorBuffer&);
  909. bool SaveXML(XMLElement&) const;
  910. IntVector2 ScreenToElement(const IntVector2&);
  911. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  912. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  913. bool SetAttribute(const String&, const Variant&);
  914. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  915. void SetAttributeAnimationSpeed(const String&, float);
  916. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  917. void SetDeepEnabled(bool);
  918. void SetEnabledRecursive(bool);
  919. void SetFixedHeight(int);
  920. void SetFixedSize(int, int);
  921. void SetFixedWidth(int);
  922. void SetFullImageRect();
  923. void SetHoverOffset(int, int);
  924. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  925. void SetMaxSize(int, int);
  926. void SetMinSize(int, int);
  927. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  928. void SetPosition(int, int);
  929. void SetPressedChildOffset(int, int);
  930. void SetPressedOffset(int, int);
  931. void SetRepeat(float, float);
  932. void SetSize(int, int);
  933. bool SetStyle(const String&, XMLFile = null);
  934. bool SetStyle(const XMLElement&);
  935. bool SetStyleAuto(XMLFile = null);
  936. void UpdateLayout();
  937. const Variant& GetVar(const StringHash&);
  938. // Properties:
  939. bool animationEnabled;
  940. /* readonly */
  941. Array<Variant> attributeDefaults;
  942. /* readonly */
  943. Array<AttributeInfo> attributeInfos;
  944. Array<Variant> attributes;
  945. /* readonly */
  946. StringHash baseType;
  947. BlendMode blendMode;
  948. IntRect border;
  949. bool bringToBack;
  950. bool bringToFront;
  951. /* readonly */
  952. String category;
  953. /* readonly */
  954. IntVector2 childOffset;
  955. /* readonly */
  956. Array<UIElement> children;
  957. IntRect clipBorder;
  958. bool clipChildren;
  959. /* writeonly */
  960. Color color;
  961. /* readonly */
  962. bool colorGradient;
  963. Array<Color> colors;
  964. /* readonly */
  965. IntRect combinedScreenRect;
  966. XMLFile defaultStyle;
  967. /* readonly */
  968. float derivedOpacity;
  969. /* readonly */
  970. uint dragButtonCombo;
  971. /* readonly */
  972. int dragButtonCount;
  973. uint dragDropMode;
  974. bool editable;
  975. bool elementEventSender;
  976. bool enabled;
  977. /* readonly */
  978. bool enabledSelf;
  979. /* readonly */
  980. bool fixedHeight;
  981. /* readonly */
  982. bool fixedSize;
  983. /* readonly */
  984. bool fixedWidth;
  985. bool focus;
  986. FocusMode focusMode;
  987. int height;
  988. HorizontalAlignment horizontalAlignment;
  989. IntVector2 hoverOffset;
  990. /* readonly */
  991. bool hovering;
  992. IntRect imageBorder;
  993. IntRect imageRect;
  994. int indent;
  995. int indentSpacing;
  996. /* readonly */
  997. int indentWidth;
  998. bool internal;
  999. IntRect layoutBorder;
  1000. Vector2 layoutFlexScale;
  1001. LayoutMode layoutMode;
  1002. int layoutSpacing;
  1003. int maxHeight;
  1004. IntVector2 maxSize;
  1005. int maxWidth;
  1006. int minHeight;
  1007. IntVector2 minSize;
  1008. int minWidth;
  1009. String name;
  1010. /* readonly */
  1011. uint numAllChildren;
  1012. /* readonly */
  1013. uint numAttributes;
  1014. /* readonly */
  1015. uint numChildren;
  1016. ObjectAnimation objectAnimation;
  1017. float opacity;
  1018. UIElement parent;
  1019. IntVector2 position;
  1020. /* readonly */
  1021. bool pressed;
  1022. IntVector2 pressedChildOffset;
  1023. IntVector2 pressedOffset;
  1024. int priority;
  1025. /* readonly */
  1026. int refs;
  1027. float repeatDelay;
  1028. float repeatRate;
  1029. /* readonly */
  1030. UIElement root;
  1031. /* readonly */
  1032. IntVector2 screenPosition;
  1033. bool selected;
  1034. IntVector2 size;
  1035. bool sortChildren;
  1036. String style;
  1037. bool temporary;
  1038. Texture texture;
  1039. bool tiled;
  1040. TraversalMode traversalMode;
  1041. /* readonly */
  1042. StringHash type;
  1043. /* readonly */
  1044. String typeName;
  1045. bool useDerivedOpacity;
  1046. /* readonly */
  1047. VariantMap vars;
  1048. VerticalAlignment verticalAlignment;
  1049. bool visible;
  1050. /* readonly */
  1051. int weakRefs;
  1052. int width;
  1053. };
  1054. class Camera
  1055. {
  1056. // Methods:
  1057. void ApplyAttributes();
  1058. void DrawDebugGeometry(DebugRenderer, bool);
  1059. Variant GetAttribute(const String&) const;
  1060. ValueAnimation GetAttributeAnimation(const String&) const;
  1061. float GetAttributeAnimationSpeed(const String&) const;
  1062. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1063. Variant GetAttributeDefault(const String&) const;
  1064. float GetDistance(const Vector3&) const;
  1065. float GetDistanceSquared(const Vector3&) const;
  1066. Ray GetScreenRay(float, float) const;
  1067. Frustum GetSplitFrustum(float, float) const;
  1068. bool Load(File, bool = false);
  1069. bool Load(VectorBuffer&, bool = false);
  1070. bool LoadXML(const XMLElement&, bool = false);
  1071. void MarkNetworkUpdate() const;
  1072. void Remove();
  1073. void RemoveInstanceDefault();
  1074. void ResetToDefault();
  1075. bool Save(File) const;
  1076. bool Save(VectorBuffer&) const;
  1077. bool SaveXML(XMLElement&) const;
  1078. Vector3 ScreenToWorldPoint(const Vector3&) const;
  1079. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1080. bool SetAttribute(const String&, const Variant&);
  1081. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1082. void SetAttributeAnimationSpeed(const String&, float);
  1083. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1084. void SetOrthoSize(const Vector2&);
  1085. Vector2 WorldToScreenPoint(const Vector3&) const;
  1086. // Properties:
  1087. bool animationEnabled;
  1088. float aspectRatio;
  1089. /* readonly */
  1090. Array<Variant> attributeDefaults;
  1091. /* readonly */
  1092. Array<AttributeInfo> attributeInfos;
  1093. Array<Variant> attributes;
  1094. bool autoAspectRatio;
  1095. /* readonly */
  1096. StringHash baseType;
  1097. /* readonly */
  1098. String category;
  1099. Plane clipPlane;
  1100. /* readonly */
  1101. Matrix3x4 effectiveWorldTransform;
  1102. bool enabled;
  1103. /* readonly */
  1104. bool enabledEffective;
  1105. float farClip;
  1106. FillMode fillMode;
  1107. float fov;
  1108. /* readonly */
  1109. Frustum frustum;
  1110. /* readonly */
  1111. float halfViewSize;
  1112. /* readonly */
  1113. uint id;
  1114. float lodBias;
  1115. float nearClip;
  1116. /* readonly */
  1117. Node node;
  1118. /* readonly */
  1119. uint numAttributes;
  1120. ObjectAnimation objectAnimation;
  1121. float orthoSize;
  1122. bool orthographic;
  1123. /* readonly */
  1124. Matrix4 projection;
  1125. Vector2 projectionOffset;
  1126. Plane reflectionPlane;
  1127. /* readonly */
  1128. int refs;
  1129. bool temporary;
  1130. /* readonly */
  1131. StringHash type;
  1132. /* readonly */
  1133. String typeName;
  1134. bool useClipping;
  1135. bool useReflection;
  1136. /* readonly */
  1137. Matrix3x4 view;
  1138. uint viewMask;
  1139. uint viewOverrideFlags;
  1140. /* readonly */
  1141. Frustum viewSpaceFrustum;
  1142. /* readonly */
  1143. int weakRefs;
  1144. float zoom;
  1145. };
  1146. class CascadeParameters
  1147. {
  1148. // Properties:
  1149. float biasAutoAdjust;
  1150. float fadeStart;
  1151. float split1;
  1152. float split2;
  1153. float split3;
  1154. float split4;
  1155. };
  1156. class CheckBox
  1157. {
  1158. // Methods:
  1159. void AddChild(UIElement);
  1160. void ApplyAttributes();
  1161. void BringToFront();
  1162. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  1163. void DisableLayoutUpdate();
  1164. IntVector2 ElementToScreen(const IntVector2&);
  1165. void EnableLayoutUpdate();
  1166. uint FindChild(UIElement) const;
  1167. Variant GetAttribute(const String&) const;
  1168. ValueAnimation GetAttributeAnimation(const String&) const;
  1169. float GetAttributeAnimationSpeed(const String&) const;
  1170. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1171. Variant GetAttributeDefault(const String&) const;
  1172. UIElement GetChild(const String&, bool = false) const;
  1173. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  1174. Array<UIElement> GetChildren(bool = false) const;
  1175. UIElement GetElementEventSender() const;
  1176. uint GetNumChildren(bool) const;
  1177. void InsertChild(uint, UIElement);
  1178. bool IsInside(IntVector2, bool);
  1179. bool IsInsideCombined(IntVector2, bool);
  1180. bool Load(File, bool = false);
  1181. bool Load(VectorBuffer&, bool = false);
  1182. bool LoadChildXML(XMLFile, XMLFile = null);
  1183. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  1184. bool LoadXML(File);
  1185. bool LoadXML(VectorBuffer&);
  1186. bool LoadXML(XMLFile, XMLFile);
  1187. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  1188. bool LoadXML(const XMLElement&, bool = false);
  1189. void MarkNetworkUpdate() const;
  1190. void Remove();
  1191. void RemoveAllChildren();
  1192. void RemoveChild(UIElement, uint = 0);
  1193. void RemoveChild(uint);
  1194. void RemoveInstanceDefault();
  1195. void ResetDeepEnabled();
  1196. void ResetToDefault();
  1197. bool Save(File) const;
  1198. bool Save(VectorBuffer&) const;
  1199. bool SaveXML(File);
  1200. bool SaveXML(VectorBuffer&);
  1201. bool SaveXML(XMLElement&) const;
  1202. IntVector2 ScreenToElement(const IntVector2&);
  1203. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1204. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  1205. bool SetAttribute(const String&, const Variant&);
  1206. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1207. void SetAttributeAnimationSpeed(const String&, float);
  1208. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1209. void SetCheckedOffset(int, int);
  1210. void SetDeepEnabled(bool);
  1211. void SetEnabledRecursive(bool);
  1212. void SetFixedHeight(int);
  1213. void SetFixedSize(int, int);
  1214. void SetFixedWidth(int);
  1215. void SetFullImageRect();
  1216. void SetHoverOffset(int, int);
  1217. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  1218. void SetMaxSize(int, int);
  1219. void SetMinSize(int, int);
  1220. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  1221. void SetPosition(int, int);
  1222. void SetSize(int, int);
  1223. bool SetStyle(const String&, XMLFile = null);
  1224. bool SetStyle(const XMLElement&);
  1225. bool SetStyleAuto(XMLFile = null);
  1226. void UpdateLayout();
  1227. const Variant& GetVar(const StringHash&);
  1228. // Properties:
  1229. bool animationEnabled;
  1230. /* readonly */
  1231. Array<Variant> attributeDefaults;
  1232. /* readonly */
  1233. Array<AttributeInfo> attributeInfos;
  1234. Array<Variant> attributes;
  1235. /* readonly */
  1236. StringHash baseType;
  1237. BlendMode blendMode;
  1238. IntRect border;
  1239. bool bringToBack;
  1240. bool bringToFront;
  1241. /* readonly */
  1242. String category;
  1243. bool checked;
  1244. IntVector2 checkedOffset;
  1245. /* readonly */
  1246. IntVector2 childOffset;
  1247. /* readonly */
  1248. Array<UIElement> children;
  1249. IntRect clipBorder;
  1250. bool clipChildren;
  1251. /* writeonly */
  1252. Color color;
  1253. /* readonly */
  1254. bool colorGradient;
  1255. Array<Color> colors;
  1256. /* readonly */
  1257. IntRect combinedScreenRect;
  1258. XMLFile defaultStyle;
  1259. /* readonly */
  1260. float derivedOpacity;
  1261. /* readonly */
  1262. uint dragButtonCombo;
  1263. /* readonly */
  1264. int dragButtonCount;
  1265. uint dragDropMode;
  1266. bool editable;
  1267. bool elementEventSender;
  1268. bool enabled;
  1269. /* readonly */
  1270. bool enabledSelf;
  1271. /* readonly */
  1272. bool fixedHeight;
  1273. /* readonly */
  1274. bool fixedSize;
  1275. /* readonly */
  1276. bool fixedWidth;
  1277. bool focus;
  1278. FocusMode focusMode;
  1279. int height;
  1280. HorizontalAlignment horizontalAlignment;
  1281. IntVector2 hoverOffset;
  1282. /* readonly */
  1283. bool hovering;
  1284. IntRect imageBorder;
  1285. IntRect imageRect;
  1286. int indent;
  1287. int indentSpacing;
  1288. /* readonly */
  1289. int indentWidth;
  1290. bool internal;
  1291. IntRect layoutBorder;
  1292. Vector2 layoutFlexScale;
  1293. LayoutMode layoutMode;
  1294. int layoutSpacing;
  1295. int maxHeight;
  1296. IntVector2 maxSize;
  1297. int maxWidth;
  1298. int minHeight;
  1299. IntVector2 minSize;
  1300. int minWidth;
  1301. String name;
  1302. /* readonly */
  1303. uint numAllChildren;
  1304. /* readonly */
  1305. uint numAttributes;
  1306. /* readonly */
  1307. uint numChildren;
  1308. ObjectAnimation objectAnimation;
  1309. float opacity;
  1310. UIElement parent;
  1311. IntVector2 position;
  1312. int priority;
  1313. /* readonly */
  1314. int refs;
  1315. /* readonly */
  1316. UIElement root;
  1317. /* readonly */
  1318. IntVector2 screenPosition;
  1319. bool selected;
  1320. IntVector2 size;
  1321. bool sortChildren;
  1322. String style;
  1323. bool temporary;
  1324. Texture texture;
  1325. bool tiled;
  1326. TraversalMode traversalMode;
  1327. /* readonly */
  1328. StringHash type;
  1329. /* readonly */
  1330. String typeName;
  1331. bool useDerivedOpacity;
  1332. /* readonly */
  1333. VariantMap vars;
  1334. VerticalAlignment verticalAlignment;
  1335. bool visible;
  1336. /* readonly */
  1337. int weakRefs;
  1338. int width;
  1339. };
  1340. class CollisionBox2D
  1341. {
  1342. // Methods:
  1343. void ApplyAttributes();
  1344. void DrawDebugGeometry(DebugRenderer, bool);
  1345. Variant GetAttribute(const String&) const;
  1346. ValueAnimation GetAttributeAnimation(const String&) const;
  1347. float GetAttributeAnimationSpeed(const String&) const;
  1348. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1349. Variant GetAttributeDefault(const String&) const;
  1350. bool Load(File, bool = false);
  1351. bool Load(VectorBuffer&, bool = false);
  1352. bool LoadXML(const XMLElement&, bool = false);
  1353. void MarkNetworkUpdate() const;
  1354. void Remove();
  1355. void RemoveInstanceDefault();
  1356. void ResetToDefault();
  1357. bool Save(File) const;
  1358. bool Save(VectorBuffer&) const;
  1359. bool SaveXML(XMLElement&) const;
  1360. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1361. bool SetAttribute(const String&, const Variant&);
  1362. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1363. void SetAttributeAnimationSpeed(const String&, float);
  1364. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1365. void SetCenter(float, float);
  1366. void SetSize(float, float);
  1367. // Properties:
  1368. float angle;
  1369. bool animationEnabled;
  1370. /* readonly */
  1371. Array<Variant> attributeDefaults;
  1372. /* readonly */
  1373. Array<AttributeInfo> attributeInfos;
  1374. Array<Variant> attributes;
  1375. /* readonly */
  1376. StringHash baseType;
  1377. /* readonly */
  1378. String category;
  1379. int categoryBits;
  1380. Vector2 center;
  1381. float density;
  1382. bool enabled;
  1383. /* readonly */
  1384. bool enabledEffective;
  1385. float friction;
  1386. int groupIndex;
  1387. /* readonly */
  1388. uint id;
  1389. /* readonly */
  1390. float inertia;
  1391. int maskBits;
  1392. /* readonly */
  1393. float mass;
  1394. /* readonly */
  1395. Vector2 massCenter;
  1396. /* readonly */
  1397. Node node;
  1398. /* readonly */
  1399. uint numAttributes;
  1400. ObjectAnimation objectAnimation;
  1401. /* readonly */
  1402. int refs;
  1403. float restitution;
  1404. Vector2 size;
  1405. bool temporary;
  1406. bool trigger;
  1407. /* readonly */
  1408. StringHash type;
  1409. /* readonly */
  1410. String typeName;
  1411. /* readonly */
  1412. int weakRefs;
  1413. };
  1414. class CollisionChain2D
  1415. {
  1416. // Methods:
  1417. void ApplyAttributes();
  1418. void DrawDebugGeometry(DebugRenderer, bool);
  1419. Variant GetAttribute(const String&) const;
  1420. ValueAnimation GetAttributeAnimation(const String&) const;
  1421. float GetAttributeAnimationSpeed(const String&) const;
  1422. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1423. Variant GetAttributeDefault(const String&) const;
  1424. Array<Vector2> GetVertices() const;
  1425. bool Load(File, bool = false);
  1426. bool Load(VectorBuffer&, bool = false);
  1427. bool LoadXML(const XMLElement&, bool = false);
  1428. void MarkNetworkUpdate() const;
  1429. void Remove();
  1430. void RemoveInstanceDefault();
  1431. void ResetToDefault();
  1432. bool Save(File) const;
  1433. bool Save(VectorBuffer&) const;
  1434. bool SaveXML(XMLElement&) const;
  1435. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1436. bool SetAttribute(const String&, const Variant&);
  1437. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1438. void SetAttributeAnimationSpeed(const String&, float);
  1439. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1440. void SetVertex(uint, const Vector2&);
  1441. void SetVertices(Array<Vector2>);
  1442. const Vector2& GetVertex(uint) const;
  1443. // Properties:
  1444. bool animationEnabled;
  1445. /* readonly */
  1446. Array<Variant> attributeDefaults;
  1447. /* readonly */
  1448. Array<AttributeInfo> attributeInfos;
  1449. Array<Variant> attributes;
  1450. /* readonly */
  1451. StringHash baseType;
  1452. /* readonly */
  1453. String category;
  1454. int categoryBits;
  1455. float density;
  1456. bool enabled;
  1457. /* readonly */
  1458. bool enabledEffective;
  1459. float friction;
  1460. int groupIndex;
  1461. /* readonly */
  1462. uint id;
  1463. /* readonly */
  1464. float inertia;
  1465. bool loop;
  1466. int maskBits;
  1467. /* readonly */
  1468. float mass;
  1469. /* readonly */
  1470. Vector2 massCenter;
  1471. /* readonly */
  1472. Node node;
  1473. /* readonly */
  1474. uint numAttributes;
  1475. ObjectAnimation objectAnimation;
  1476. /* readonly */
  1477. int refs;
  1478. float restitution;
  1479. bool temporary;
  1480. bool trigger;
  1481. /* readonly */
  1482. StringHash type;
  1483. /* readonly */
  1484. String typeName;
  1485. uint vertexCount;
  1486. /* readonly */
  1487. int weakRefs;
  1488. };
  1489. class CollisionCircle2D
  1490. {
  1491. // Methods:
  1492. void ApplyAttributes();
  1493. void DrawDebugGeometry(DebugRenderer, bool);
  1494. Variant GetAttribute(const String&) const;
  1495. ValueAnimation GetAttributeAnimation(const String&) const;
  1496. float GetAttributeAnimationSpeed(const String&) const;
  1497. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1498. Variant GetAttributeDefault(const String&) const;
  1499. bool Load(File, bool = false);
  1500. bool Load(VectorBuffer&, bool = false);
  1501. bool LoadXML(const XMLElement&, bool = false);
  1502. void MarkNetworkUpdate() const;
  1503. void Remove();
  1504. void RemoveInstanceDefault();
  1505. void ResetToDefault();
  1506. bool Save(File) const;
  1507. bool Save(VectorBuffer&) const;
  1508. bool SaveXML(XMLElement&) const;
  1509. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1510. bool SetAttribute(const String&, const Variant&);
  1511. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1512. void SetAttributeAnimationSpeed(const String&, float);
  1513. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1514. void SetCenter(float, float);
  1515. // Properties:
  1516. bool animationEnabled;
  1517. /* readonly */
  1518. Array<Variant> attributeDefaults;
  1519. /* readonly */
  1520. Array<AttributeInfo> attributeInfos;
  1521. Array<Variant> attributes;
  1522. /* readonly */
  1523. StringHash baseType;
  1524. /* readonly */
  1525. String category;
  1526. int categoryBits;
  1527. Vector2 center;
  1528. float density;
  1529. bool enabled;
  1530. /* readonly */
  1531. bool enabledEffective;
  1532. float friction;
  1533. int groupIndex;
  1534. /* readonly */
  1535. uint id;
  1536. /* readonly */
  1537. float inertia;
  1538. int maskBits;
  1539. /* readonly */
  1540. float mass;
  1541. /* readonly */
  1542. Vector2 massCenter;
  1543. /* readonly */
  1544. Node node;
  1545. /* readonly */
  1546. uint numAttributes;
  1547. ObjectAnimation objectAnimation;
  1548. float radius;
  1549. /* readonly */
  1550. int refs;
  1551. float restitution;
  1552. bool temporary;
  1553. bool trigger;
  1554. /* readonly */
  1555. StringHash type;
  1556. /* readonly */
  1557. String typeName;
  1558. /* readonly */
  1559. int weakRefs;
  1560. };
  1561. class CollisionEdge2D
  1562. {
  1563. // Methods:
  1564. void ApplyAttributes();
  1565. void DrawDebugGeometry(DebugRenderer, bool);
  1566. Variant GetAttribute(const String&) const;
  1567. ValueAnimation GetAttributeAnimation(const String&) const;
  1568. float GetAttributeAnimationSpeed(const String&) const;
  1569. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1570. Variant GetAttributeDefault(const String&) const;
  1571. bool Load(File, bool = false);
  1572. bool Load(VectorBuffer&, bool = false);
  1573. bool LoadXML(const XMLElement&, bool = false);
  1574. void MarkNetworkUpdate() const;
  1575. void Remove();
  1576. void RemoveInstanceDefault();
  1577. void ResetToDefault();
  1578. bool Save(File) const;
  1579. bool Save(VectorBuffer&) const;
  1580. bool SaveXML(XMLElement&) const;
  1581. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1582. bool SetAttribute(const String&, const Variant&);
  1583. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1584. void SetAttributeAnimationSpeed(const String&, float);
  1585. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1586. void SetVertices(const Vector2&, const Vector2&);
  1587. // Properties:
  1588. bool animationEnabled;
  1589. /* readonly */
  1590. Array<Variant> attributeDefaults;
  1591. /* readonly */
  1592. Array<AttributeInfo> attributeInfos;
  1593. Array<Variant> attributes;
  1594. /* readonly */
  1595. StringHash baseType;
  1596. /* readonly */
  1597. String category;
  1598. int categoryBits;
  1599. float density;
  1600. bool enabled;
  1601. /* readonly */
  1602. bool enabledEffective;
  1603. float friction;
  1604. int groupIndex;
  1605. /* readonly */
  1606. uint id;
  1607. /* readonly */
  1608. float inertia;
  1609. int maskBits;
  1610. /* readonly */
  1611. float mass;
  1612. /* readonly */
  1613. Vector2 massCenter;
  1614. /* readonly */
  1615. Node node;
  1616. /* readonly */
  1617. uint numAttributes;
  1618. ObjectAnimation objectAnimation;
  1619. /* readonly */
  1620. int refs;
  1621. float restitution;
  1622. bool temporary;
  1623. bool trigger;
  1624. /* readonly */
  1625. StringHash type;
  1626. /* readonly */
  1627. String typeName;
  1628. Vector2 vertex1;
  1629. Vector2 vertex2;
  1630. /* readonly */
  1631. int weakRefs;
  1632. };
  1633. class CollisionPolygon2D
  1634. {
  1635. // Methods:
  1636. void ApplyAttributes();
  1637. void DrawDebugGeometry(DebugRenderer, bool);
  1638. Variant GetAttribute(const String&) const;
  1639. ValueAnimation GetAttributeAnimation(const String&) const;
  1640. float GetAttributeAnimationSpeed(const String&) const;
  1641. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1642. Variant GetAttributeDefault(const String&) const;
  1643. Array<Vector2> GetVertices() const;
  1644. bool Load(File, bool = false);
  1645. bool Load(VectorBuffer&, bool = false);
  1646. bool LoadXML(const XMLElement&, bool = false);
  1647. void MarkNetworkUpdate() const;
  1648. void Remove();
  1649. void RemoveInstanceDefault();
  1650. void ResetToDefault();
  1651. bool Save(File) const;
  1652. bool Save(VectorBuffer&) const;
  1653. bool SaveXML(XMLElement&) const;
  1654. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1655. bool SetAttribute(const String&, const Variant&);
  1656. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1657. void SetAttributeAnimationSpeed(const String&, float);
  1658. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1659. void SetVertex(uint, const Vector2&);
  1660. void SetVertices(Array<Vector2>);
  1661. const Vector2& GetVertex(uint) const;
  1662. // Properties:
  1663. bool animationEnabled;
  1664. /* readonly */
  1665. Array<Variant> attributeDefaults;
  1666. /* readonly */
  1667. Array<AttributeInfo> attributeInfos;
  1668. Array<Variant> attributes;
  1669. /* readonly */
  1670. StringHash baseType;
  1671. /* readonly */
  1672. String category;
  1673. int categoryBits;
  1674. float density;
  1675. bool enabled;
  1676. /* readonly */
  1677. bool enabledEffective;
  1678. float friction;
  1679. int groupIndex;
  1680. /* readonly */
  1681. uint id;
  1682. /* readonly */
  1683. float inertia;
  1684. int maskBits;
  1685. /* readonly */
  1686. float mass;
  1687. /* readonly */
  1688. Vector2 massCenter;
  1689. /* readonly */
  1690. Node node;
  1691. /* readonly */
  1692. uint numAttributes;
  1693. ObjectAnimation objectAnimation;
  1694. /* readonly */
  1695. int refs;
  1696. float restitution;
  1697. bool temporary;
  1698. bool trigger;
  1699. /* readonly */
  1700. StringHash type;
  1701. /* readonly */
  1702. String typeName;
  1703. uint vertexCount;
  1704. /* readonly */
  1705. int weakRefs;
  1706. };
  1707. class CollisionShape
  1708. {
  1709. // Methods:
  1710. void ApplyAttributes();
  1711. void DrawDebugGeometry(DebugRenderer, bool);
  1712. Variant GetAttribute(const String&) const;
  1713. ValueAnimation GetAttributeAnimation(const String&) const;
  1714. float GetAttributeAnimationSpeed(const String&) const;
  1715. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1716. Variant GetAttributeDefault(const String&) const;
  1717. bool Load(File, bool = false);
  1718. bool Load(VectorBuffer&, bool = false);
  1719. bool LoadXML(const XMLElement&, bool = false);
  1720. void MarkNetworkUpdate() const;
  1721. void Remove();
  1722. void RemoveInstanceDefault();
  1723. void ResetToDefault();
  1724. bool Save(File) const;
  1725. bool Save(VectorBuffer&) const;
  1726. bool SaveXML(XMLElement&) const;
  1727. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1728. bool SetAttribute(const String&, const Variant&);
  1729. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1730. void SetAttributeAnimationSpeed(const String&, float);
  1731. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1732. void SetBox(const Vector3&, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1733. void SetCapsule(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1734. void SetCone(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1735. void SetConvexHull(Model, uint = 0, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1736. void SetCustomConvexHull(CustomGeometry, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1737. void SetCustomTriangleMesh(CustomGeometry, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1738. void SetCylinder(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1739. void SetSphere(float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1740. void SetStaticPlane(const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1741. void SetTerrain();
  1742. void SetTransform(const Vector3&, const Quaternion&);
  1743. void SetTriangleMesh(Model, uint = 0, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  1744. // Properties:
  1745. bool animationEnabled;
  1746. /* readonly */
  1747. Array<Variant> attributeDefaults;
  1748. /* readonly */
  1749. Array<AttributeInfo> attributeInfos;
  1750. Array<Variant> attributes;
  1751. /* readonly */
  1752. StringHash baseType;
  1753. /* readonly */
  1754. String category;
  1755. bool enabled;
  1756. /* readonly */
  1757. bool enabledEffective;
  1758. /* readonly */
  1759. uint id;
  1760. uint lodLevel;
  1761. float margin;
  1762. Model model;
  1763. /* readonly */
  1764. Node node;
  1765. /* readonly */
  1766. uint numAttributes;
  1767. ObjectAnimation objectAnimation;
  1768. Vector3 position;
  1769. /* readonly */
  1770. int refs;
  1771. Quaternion rotation;
  1772. ShapeType shapeType;
  1773. Vector3 size;
  1774. bool temporary;
  1775. /* readonly */
  1776. StringHash type;
  1777. /* readonly */
  1778. String typeName;
  1779. /* readonly */
  1780. int weakRefs;
  1781. /* readonly */
  1782. BoundingBox worldBoundingBox;
  1783. };
  1784. class CollisionShape2D
  1785. {
  1786. // Methods:
  1787. void ApplyAttributes();
  1788. void DrawDebugGeometry(DebugRenderer, bool);
  1789. Variant GetAttribute(const String&) const;
  1790. ValueAnimation GetAttributeAnimation(const String&) const;
  1791. float GetAttributeAnimationSpeed(const String&) const;
  1792. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1793. Variant GetAttributeDefault(const String&) const;
  1794. bool Load(File, bool = false);
  1795. bool Load(VectorBuffer&, bool = false);
  1796. bool LoadXML(const XMLElement&, bool = false);
  1797. void MarkNetworkUpdate() const;
  1798. void Remove();
  1799. void RemoveInstanceDefault();
  1800. void ResetToDefault();
  1801. bool Save(File) const;
  1802. bool Save(VectorBuffer&) const;
  1803. bool SaveXML(XMLElement&) const;
  1804. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1805. bool SetAttribute(const String&, const Variant&);
  1806. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1807. void SetAttributeAnimationSpeed(const String&, float);
  1808. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1809. // Properties:
  1810. bool animationEnabled;
  1811. /* readonly */
  1812. Array<Variant> attributeDefaults;
  1813. /* readonly */
  1814. Array<AttributeInfo> attributeInfos;
  1815. Array<Variant> attributes;
  1816. /* readonly */
  1817. StringHash baseType;
  1818. /* readonly */
  1819. String category;
  1820. int categoryBits;
  1821. float density;
  1822. bool enabled;
  1823. /* readonly */
  1824. bool enabledEffective;
  1825. float friction;
  1826. int groupIndex;
  1827. /* readonly */
  1828. uint id;
  1829. /* readonly */
  1830. float inertia;
  1831. int maskBits;
  1832. /* readonly */
  1833. float mass;
  1834. /* readonly */
  1835. Vector2 massCenter;
  1836. /* readonly */
  1837. Node node;
  1838. /* readonly */
  1839. uint numAttributes;
  1840. ObjectAnimation objectAnimation;
  1841. /* readonly */
  1842. int refs;
  1843. float restitution;
  1844. bool temporary;
  1845. bool trigger;
  1846. /* readonly */
  1847. StringHash type;
  1848. /* readonly */
  1849. String typeName;
  1850. /* readonly */
  1851. int weakRefs;
  1852. };
  1853. class Color
  1854. {
  1855. // Methods:
  1856. Color Abs() const;
  1857. float Average() const;
  1858. float Chroma() const;
  1859. void Clip(bool);
  1860. bool Equals() const;
  1861. void FromHSL(float, float, float, float);
  1862. void FromHSV(float, float, float, float);
  1863. float Hue() const;
  1864. void Invert(bool);
  1865. Color Lerp(const Color&, float) const;
  1866. float Lightness() const;
  1867. float Luma() const;
  1868. float MaxRGB() const;
  1869. float MinRGB() const;
  1870. float Range() const;
  1871. float SaturationHSL() const;
  1872. float SaturationHSV() const;
  1873. float SumRGB() const;
  1874. Vector3 ToHSL() const;
  1875. Vector3 ToHSV() const;
  1876. String ToString() const;
  1877. uint ToUInt() const;
  1878. float Value() const;
  1879. // Properties:
  1880. float a;
  1881. float b;
  1882. /* readonly */
  1883. Array<float> data;
  1884. float g;
  1885. float r;
  1886. /* readonly */
  1887. Vector3 rgb;
  1888. /* readonly */
  1889. Vector4 rgba;
  1890. };
  1891. class ColorFrame
  1892. {
  1893. // Properties:
  1894. Color color;
  1895. float time;
  1896. };
  1897. class Component
  1898. {
  1899. // Methods:
  1900. void ApplyAttributes();
  1901. void DrawDebugGeometry(DebugRenderer, bool);
  1902. Variant GetAttribute(const String&) const;
  1903. ValueAnimation GetAttributeAnimation(const String&) const;
  1904. float GetAttributeAnimationSpeed(const String&) const;
  1905. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1906. Variant GetAttributeDefault(const String&) const;
  1907. bool Load(File, bool = false);
  1908. bool Load(VectorBuffer&, bool = false);
  1909. bool LoadXML(const XMLElement&, bool = false);
  1910. void MarkNetworkUpdate() const;
  1911. void Remove();
  1912. void RemoveInstanceDefault();
  1913. void ResetToDefault();
  1914. bool Save(File) const;
  1915. bool Save(VectorBuffer&) const;
  1916. bool SaveXML(XMLElement&) const;
  1917. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1918. bool SetAttribute(const String&, const Variant&);
  1919. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1920. void SetAttributeAnimationSpeed(const String&, float);
  1921. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1922. // Properties:
  1923. bool animationEnabled;
  1924. /* readonly */
  1925. Array<Variant> attributeDefaults;
  1926. /* readonly */
  1927. Array<AttributeInfo> attributeInfos;
  1928. Array<Variant> attributes;
  1929. /* readonly */
  1930. StringHash baseType;
  1931. /* readonly */
  1932. String category;
  1933. bool enabled;
  1934. /* readonly */
  1935. bool enabledEffective;
  1936. /* readonly */
  1937. uint id;
  1938. /* readonly */
  1939. Node node;
  1940. /* readonly */
  1941. uint numAttributes;
  1942. ObjectAnimation objectAnimation;
  1943. /* readonly */
  1944. int refs;
  1945. bool temporary;
  1946. /* readonly */
  1947. StringHash type;
  1948. /* readonly */
  1949. String typeName;
  1950. /* readonly */
  1951. int weakRefs;
  1952. };
  1953. class Connection
  1954. {
  1955. // Methods:
  1956. void Disconnect(int = 0);
  1957. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1958. void SendMessage(int, bool, bool, const VectorBuffer&, uint = 0);
  1959. void SendPackageToClient(PackageFile);
  1960. void SendRemoteEvent(Node, const String&, bool, const VariantMap& = VariantMap ( ));
  1961. void SendRemoteEvent(const String&, bool, const VariantMap& = VariantMap ( ));
  1962. String ToString() const;
  1963. // Properties:
  1964. /* readonly */
  1965. String address;
  1966. /* readonly */
  1967. StringHash baseType;
  1968. /* readonly */
  1969. String category;
  1970. /* readonly */
  1971. bool client;
  1972. /* readonly */
  1973. bool connectPending;
  1974. /* readonly */
  1975. bool connected;
  1976. Controls controls;
  1977. /* readonly */
  1978. String downloadName;
  1979. /* readonly */
  1980. float downloadProgress;
  1981. VariantMap identity;
  1982. bool logStatistics;
  1983. /* readonly */
  1984. uint numDownloads;
  1985. /* readonly */
  1986. uint16 port;
  1987. Vector3 position;
  1988. /* readonly */
  1989. int refs;
  1990. Quaternion rotation;
  1991. Scene scene;
  1992. /* readonly */
  1993. bool sceneLoaded;
  1994. /* readonly */
  1995. StringHash type;
  1996. /* readonly */
  1997. String typeName;
  1998. /* readonly */
  1999. int weakRefs;
  2000. };
  2001. class Console
  2002. {
  2003. // Methods:
  2004. void CopySelectedRows() const;
  2005. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2006. void Toggle();
  2007. void UpdateElements();
  2008. // Properties:
  2009. bool autoVisibleOnError;
  2010. /* readonly */
  2011. BorderImage background;
  2012. /* readonly */
  2013. StringHash baseType;
  2014. /* readonly */
  2015. String category;
  2016. /* readonly */
  2017. Button closeButton;
  2018. String commandInterpreter;
  2019. XMLFile defaultStyle;
  2020. bool focusOnShow;
  2021. /* readonly */
  2022. uint historyPosition;
  2023. /* readonly */
  2024. Array<String> historyRow;
  2025. /* readonly */
  2026. LineEdit lineEdit;
  2027. uint numBufferedRows;
  2028. uint numHistoryRows;
  2029. uint numRows;
  2030. /* readonly */
  2031. int refs;
  2032. /* readonly */
  2033. StringHash type;
  2034. /* readonly */
  2035. String typeName;
  2036. bool visible;
  2037. /* readonly */
  2038. int weakRefs;
  2039. };
  2040. class Constraint
  2041. {
  2042. // Methods:
  2043. void ApplyAttributes();
  2044. void DrawDebugGeometry(DebugRenderer, bool);
  2045. Variant GetAttribute(const String&) const;
  2046. ValueAnimation GetAttributeAnimation(const String&) const;
  2047. float GetAttributeAnimationSpeed(const String&) const;
  2048. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2049. Variant GetAttributeDefault(const String&) const;
  2050. bool Load(File, bool = false);
  2051. bool Load(VectorBuffer&, bool = false);
  2052. bool LoadXML(const XMLElement&, bool = false);
  2053. void MarkNetworkUpdate() const;
  2054. void Remove();
  2055. void RemoveInstanceDefault();
  2056. void ResetToDefault();
  2057. bool Save(File) const;
  2058. bool Save(VectorBuffer&) const;
  2059. bool SaveXML(XMLElement&) const;
  2060. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2061. bool SetAttribute(const String&, const Variant&);
  2062. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2063. void SetAttributeAnimationSpeed(const String&, float);
  2064. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2065. // Properties:
  2066. bool animationEnabled;
  2067. /* readonly */
  2068. Array<Variant> attributeDefaults;
  2069. /* readonly */
  2070. Array<AttributeInfo> attributeInfos;
  2071. Array<Variant> attributes;
  2072. /* writeonly */
  2073. Vector3 axis;
  2074. /* readonly */
  2075. StringHash baseType;
  2076. /* readonly */
  2077. String category;
  2078. float cfm;
  2079. ConstraintType constraintType;
  2080. bool disableCollision;
  2081. bool enabled;
  2082. /* readonly */
  2083. bool enabledEffective;
  2084. float erp;
  2085. Vector2 highLimit;
  2086. /* readonly */
  2087. uint id;
  2088. Vector2 lowLimit;
  2089. /* readonly */
  2090. Node node;
  2091. /* readonly */
  2092. uint numAttributes;
  2093. ObjectAnimation objectAnimation;
  2094. /* writeonly */
  2095. Vector3 otherAxis;
  2096. RigidBody otherBody;
  2097. Vector3 otherPosition;
  2098. Quaternion otherRotation;
  2099. /* readonly */
  2100. RigidBody ownBody;
  2101. Vector3 position;
  2102. /* readonly */
  2103. int refs;
  2104. Quaternion rotation;
  2105. bool temporary;
  2106. /* readonly */
  2107. StringHash type;
  2108. /* readonly */
  2109. String typeName;
  2110. /* readonly */
  2111. int weakRefs;
  2112. Vector3 worldPosition;
  2113. };
  2114. class Constraint2D
  2115. {
  2116. // Methods:
  2117. void ApplyAttributes();
  2118. void DrawDebugGeometry(DebugRenderer, bool);
  2119. Variant GetAttribute(const String&) const;
  2120. ValueAnimation GetAttributeAnimation(const String&) const;
  2121. float GetAttributeAnimationSpeed(const String&) const;
  2122. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2123. Variant GetAttributeDefault(const String&) const;
  2124. bool Load(File, bool = false);
  2125. bool Load(VectorBuffer&, bool = false);
  2126. bool LoadXML(const XMLElement&, bool = false);
  2127. void MarkNetworkUpdate() const;
  2128. void Remove();
  2129. void RemoveInstanceDefault();
  2130. void ResetToDefault();
  2131. bool Save(File) const;
  2132. bool Save(VectorBuffer&) const;
  2133. bool SaveXML(XMLElement&) const;
  2134. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2135. bool SetAttribute(const String&, const Variant&);
  2136. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2137. void SetAttributeAnimationSpeed(const String&, float);
  2138. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2139. // Properties:
  2140. bool animationEnabled;
  2141. /* readonly */
  2142. Array<Variant> attributeDefaults;
  2143. /* readonly */
  2144. Array<AttributeInfo> attributeInfos;
  2145. Array<Variant> attributes;
  2146. /* readonly */
  2147. StringHash baseType;
  2148. /* readonly */
  2149. String category;
  2150. bool collideConnected;
  2151. bool enabled;
  2152. /* readonly */
  2153. bool enabledEffective;
  2154. /* readonly */
  2155. uint id;
  2156. /* readonly */
  2157. Node node;
  2158. /* readonly */
  2159. uint numAttributes;
  2160. ObjectAnimation objectAnimation;
  2161. RigidBody2D otherBody;
  2162. /* readonly */
  2163. RigidBody2D ownerBody;
  2164. /* readonly */
  2165. int refs;
  2166. bool temporary;
  2167. /* readonly */
  2168. StringHash type;
  2169. /* readonly */
  2170. String typeName;
  2171. /* readonly */
  2172. int weakRefs;
  2173. };
  2174. class ConstraintDistance2D
  2175. {
  2176. // Methods:
  2177. void ApplyAttributes();
  2178. void DrawDebugGeometry(DebugRenderer, bool);
  2179. Variant GetAttribute(const String&) const;
  2180. ValueAnimation GetAttributeAnimation(const String&) const;
  2181. float GetAttributeAnimationSpeed(const String&) const;
  2182. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2183. Variant GetAttributeDefault(const String&) const;
  2184. bool Load(File, bool = false);
  2185. bool Load(VectorBuffer&, bool = false);
  2186. bool LoadXML(const XMLElement&, bool = false);
  2187. void MarkNetworkUpdate() const;
  2188. void Remove();
  2189. void RemoveInstanceDefault();
  2190. void ResetToDefault();
  2191. bool Save(File) const;
  2192. bool Save(VectorBuffer&) const;
  2193. bool SaveXML(XMLElement&) const;
  2194. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2195. bool SetAttribute(const String&, const Variant&);
  2196. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2197. void SetAttributeAnimationSpeed(const String&, float);
  2198. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2199. // Properties:
  2200. bool animationEnabled;
  2201. /* readonly */
  2202. Array<Variant> attributeDefaults;
  2203. /* readonly */
  2204. Array<AttributeInfo> attributeInfos;
  2205. Array<Variant> attributes;
  2206. /* readonly */
  2207. StringHash baseType;
  2208. /* readonly */
  2209. String category;
  2210. bool collideConnected;
  2211. float dampingRatio;
  2212. bool enabled;
  2213. /* readonly */
  2214. bool enabledEffective;
  2215. float frequencyHz;
  2216. /* readonly */
  2217. uint id;
  2218. /* readonly */
  2219. Node node;
  2220. /* readonly */
  2221. uint numAttributes;
  2222. ObjectAnimation objectAnimation;
  2223. RigidBody2D otherBody;
  2224. Vector2 otherBodyAnchor;
  2225. /* readonly */
  2226. RigidBody2D ownerBody;
  2227. Vector2 ownerBodyAnchor;
  2228. /* readonly */
  2229. int refs;
  2230. bool temporary;
  2231. /* readonly */
  2232. StringHash type;
  2233. /* readonly */
  2234. String typeName;
  2235. /* readonly */
  2236. int weakRefs;
  2237. };
  2238. class ConstraintFriction2D
  2239. {
  2240. // Methods:
  2241. void ApplyAttributes();
  2242. void DrawDebugGeometry(DebugRenderer, bool);
  2243. Variant GetAttribute(const String&) const;
  2244. ValueAnimation GetAttributeAnimation(const String&) const;
  2245. float GetAttributeAnimationSpeed(const String&) const;
  2246. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2247. Variant GetAttributeDefault(const String&) const;
  2248. bool Load(File, bool = false);
  2249. bool Load(VectorBuffer&, bool = false);
  2250. bool LoadXML(const XMLElement&, bool = false);
  2251. void MarkNetworkUpdate() const;
  2252. void Remove();
  2253. void RemoveInstanceDefault();
  2254. void ResetToDefault();
  2255. bool Save(File) const;
  2256. bool Save(VectorBuffer&) const;
  2257. bool SaveXML(XMLElement&) const;
  2258. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2259. bool SetAttribute(const String&, const Variant&);
  2260. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2261. void SetAttributeAnimationSpeed(const String&, float);
  2262. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2263. // Properties:
  2264. Vector2 anchor;
  2265. bool animationEnabled;
  2266. /* readonly */
  2267. Array<Variant> attributeDefaults;
  2268. /* readonly */
  2269. Array<AttributeInfo> attributeInfos;
  2270. Array<Variant> attributes;
  2271. /* readonly */
  2272. StringHash baseType;
  2273. /* readonly */
  2274. String category;
  2275. bool collideConnected;
  2276. bool enabled;
  2277. /* readonly */
  2278. bool enabledEffective;
  2279. /* readonly */
  2280. uint id;
  2281. float maxForce;
  2282. float maxTorque;
  2283. /* readonly */
  2284. Node node;
  2285. /* readonly */
  2286. uint numAttributes;
  2287. ObjectAnimation objectAnimation;
  2288. RigidBody2D otherBody;
  2289. /* readonly */
  2290. RigidBody2D ownerBody;
  2291. /* readonly */
  2292. int refs;
  2293. bool temporary;
  2294. /* readonly */
  2295. StringHash type;
  2296. /* readonly */
  2297. String typeName;
  2298. /* readonly */
  2299. int weakRefs;
  2300. };
  2301. class ConstraintGear2D
  2302. {
  2303. // Methods:
  2304. void ApplyAttributes();
  2305. void DrawDebugGeometry(DebugRenderer, bool);
  2306. Variant GetAttribute(const String&) const;
  2307. ValueAnimation GetAttributeAnimation(const String&) const;
  2308. float GetAttributeAnimationSpeed(const String&) const;
  2309. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2310. Variant GetAttributeDefault(const String&) const;
  2311. bool Load(File, bool = false);
  2312. bool Load(VectorBuffer&, bool = false);
  2313. bool LoadXML(const XMLElement&, bool = false);
  2314. void MarkNetworkUpdate() const;
  2315. void Remove();
  2316. void RemoveInstanceDefault();
  2317. void ResetToDefault();
  2318. bool Save(File) const;
  2319. bool Save(VectorBuffer&) const;
  2320. bool SaveXML(XMLElement&) const;
  2321. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2322. bool SetAttribute(const String&, const Variant&);
  2323. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2324. void SetAttributeAnimationSpeed(const String&, float);
  2325. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2326. // Properties:
  2327. bool animationEnabled;
  2328. /* readonly */
  2329. Array<Variant> attributeDefaults;
  2330. /* readonly */
  2331. Array<AttributeInfo> attributeInfos;
  2332. Array<Variant> attributes;
  2333. /* readonly */
  2334. StringHash baseType;
  2335. /* readonly */
  2336. String category;
  2337. bool collideConnected;
  2338. bool enabled;
  2339. /* readonly */
  2340. bool enabledEffective;
  2341. /* readonly */
  2342. uint id;
  2343. /* readonly */
  2344. Node node;
  2345. /* readonly */
  2346. uint numAttributes;
  2347. ObjectAnimation objectAnimation;
  2348. RigidBody2D otherBody;
  2349. Constraint2D otherConstraint;
  2350. /* readonly */
  2351. RigidBody2D ownerBody;
  2352. Constraint2D ownerConstraint;
  2353. float ratio;
  2354. /* readonly */
  2355. int refs;
  2356. bool temporary;
  2357. /* readonly */
  2358. StringHash type;
  2359. /* readonly */
  2360. String typeName;
  2361. /* readonly */
  2362. int weakRefs;
  2363. };
  2364. class ConstraintMotor2D
  2365. {
  2366. // Methods:
  2367. void ApplyAttributes();
  2368. void DrawDebugGeometry(DebugRenderer, bool);
  2369. Variant GetAttribute(const String&) const;
  2370. ValueAnimation GetAttributeAnimation(const String&) const;
  2371. float GetAttributeAnimationSpeed(const String&) const;
  2372. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2373. Variant GetAttributeDefault(const String&) const;
  2374. bool Load(File, bool = false);
  2375. bool Load(VectorBuffer&, bool = false);
  2376. bool LoadXML(const XMLElement&, bool = false);
  2377. void MarkNetworkUpdate() const;
  2378. void Remove();
  2379. void RemoveInstanceDefault();
  2380. void ResetToDefault();
  2381. bool Save(File) const;
  2382. bool Save(VectorBuffer&) const;
  2383. bool SaveXML(XMLElement&) const;
  2384. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2385. bool SetAttribute(const String&, const Variant&);
  2386. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2387. void SetAttributeAnimationSpeed(const String&, float);
  2388. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2389. // Properties:
  2390. float angularOffset;
  2391. bool animationEnabled;
  2392. /* readonly */
  2393. Array<Variant> attributeDefaults;
  2394. /* readonly */
  2395. Array<AttributeInfo> attributeInfos;
  2396. Array<Variant> attributes;
  2397. /* readonly */
  2398. StringHash baseType;
  2399. /* readonly */
  2400. String category;
  2401. bool collideConnected;
  2402. float correctionFactor;
  2403. bool enabled;
  2404. /* readonly */
  2405. bool enabledEffective;
  2406. /* readonly */
  2407. uint id;
  2408. Vector2 linearOffset;
  2409. float maxForce;
  2410. float maxTorque;
  2411. /* readonly */
  2412. Node node;
  2413. /* readonly */
  2414. uint numAttributes;
  2415. ObjectAnimation objectAnimation;
  2416. RigidBody2D otherBody;
  2417. /* readonly */
  2418. RigidBody2D ownerBody;
  2419. /* readonly */
  2420. int refs;
  2421. bool temporary;
  2422. /* readonly */
  2423. StringHash type;
  2424. /* readonly */
  2425. String typeName;
  2426. /* readonly */
  2427. int weakRefs;
  2428. };
  2429. class ConstraintMouse2D
  2430. {
  2431. // Methods:
  2432. void ApplyAttributes();
  2433. void DrawDebugGeometry(DebugRenderer, bool);
  2434. Variant GetAttribute(const String&) const;
  2435. ValueAnimation GetAttributeAnimation(const String&) const;
  2436. float GetAttributeAnimationSpeed(const String&) const;
  2437. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2438. Variant GetAttributeDefault(const String&) const;
  2439. bool Load(File, bool = false);
  2440. bool Load(VectorBuffer&, bool = false);
  2441. bool LoadXML(const XMLElement&, bool = false);
  2442. void MarkNetworkUpdate() const;
  2443. void Remove();
  2444. void RemoveInstanceDefault();
  2445. void ResetToDefault();
  2446. bool Save(File) const;
  2447. bool Save(VectorBuffer&) const;
  2448. bool SaveXML(XMLElement&) const;
  2449. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2450. bool SetAttribute(const String&, const Variant&);
  2451. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2452. void SetAttributeAnimationSpeed(const String&, float);
  2453. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2454. // Properties:
  2455. bool animationEnabled;
  2456. /* readonly */
  2457. Array<Variant> attributeDefaults;
  2458. /* readonly */
  2459. Array<AttributeInfo> attributeInfos;
  2460. Array<Variant> attributes;
  2461. /* readonly */
  2462. StringHash baseType;
  2463. /* readonly */
  2464. String category;
  2465. bool collideConnected;
  2466. float dampingRatio;
  2467. bool enabled;
  2468. /* readonly */
  2469. bool enabledEffective;
  2470. float frequencyHz;
  2471. /* readonly */
  2472. uint id;
  2473. float maxForce;
  2474. /* readonly */
  2475. Node node;
  2476. /* readonly */
  2477. uint numAttributes;
  2478. ObjectAnimation objectAnimation;
  2479. RigidBody2D otherBody;
  2480. /* readonly */
  2481. RigidBody2D ownerBody;
  2482. /* readonly */
  2483. int refs;
  2484. Vector2 target;
  2485. bool temporary;
  2486. /* readonly */
  2487. StringHash type;
  2488. /* readonly */
  2489. String typeName;
  2490. /* readonly */
  2491. int weakRefs;
  2492. };
  2493. class ConstraintPrismatic2D
  2494. {
  2495. // Methods:
  2496. void ApplyAttributes();
  2497. void DrawDebugGeometry(DebugRenderer, bool);
  2498. Variant GetAttribute(const String&) const;
  2499. ValueAnimation GetAttributeAnimation(const String&) const;
  2500. float GetAttributeAnimationSpeed(const String&) const;
  2501. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2502. Variant GetAttributeDefault(const String&) const;
  2503. bool Load(File, bool = false);
  2504. bool Load(VectorBuffer&, bool = false);
  2505. bool LoadXML(const XMLElement&, bool = false);
  2506. void MarkNetworkUpdate() const;
  2507. void Remove();
  2508. void RemoveInstanceDefault();
  2509. void ResetToDefault();
  2510. bool Save(File) const;
  2511. bool Save(VectorBuffer&) const;
  2512. bool SaveXML(XMLElement&) const;
  2513. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2514. bool SetAttribute(const String&, const Variant&);
  2515. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2516. void SetAttributeAnimationSpeed(const String&, float);
  2517. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2518. // Properties:
  2519. Vector2 anchor;
  2520. bool animationEnabled;
  2521. /* readonly */
  2522. Array<Variant> attributeDefaults;
  2523. /* readonly */
  2524. Array<AttributeInfo> attributeInfos;
  2525. Array<Variant> attributes;
  2526. Vector2 axis;
  2527. /* readonly */
  2528. StringHash baseType;
  2529. /* readonly */
  2530. String category;
  2531. bool collideConnected;
  2532. bool enableLimit;
  2533. bool enableMotor;
  2534. bool enabled;
  2535. /* readonly */
  2536. bool enabledEffective;
  2537. /* readonly */
  2538. uint id;
  2539. float lowerTranslation;
  2540. float maxMotorForce;
  2541. float motorSpeed;
  2542. /* readonly */
  2543. Node node;
  2544. /* readonly */
  2545. uint numAttributes;
  2546. ObjectAnimation objectAnimation;
  2547. RigidBody2D otherBody;
  2548. /* readonly */
  2549. RigidBody2D ownerBody;
  2550. /* readonly */
  2551. int refs;
  2552. bool temporary;
  2553. /* readonly */
  2554. StringHash type;
  2555. /* readonly */
  2556. String typeName;
  2557. float upperTranslation;
  2558. /* readonly */
  2559. int weakRefs;
  2560. };
  2561. class ConstraintPulley2D
  2562. {
  2563. // Methods:
  2564. void ApplyAttributes();
  2565. void DrawDebugGeometry(DebugRenderer, bool);
  2566. Variant GetAttribute(const String&) const;
  2567. ValueAnimation GetAttributeAnimation(const String&) const;
  2568. float GetAttributeAnimationSpeed(const String&) const;
  2569. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2570. Variant GetAttributeDefault(const String&) const;
  2571. bool Load(File, bool = false);
  2572. bool Load(VectorBuffer&, bool = false);
  2573. bool LoadXML(const XMLElement&, bool = false);
  2574. void MarkNetworkUpdate() const;
  2575. void Remove();
  2576. void RemoveInstanceDefault();
  2577. void ResetToDefault();
  2578. bool Save(File) const;
  2579. bool Save(VectorBuffer&) const;
  2580. bool SaveXML(XMLElement&) const;
  2581. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2582. bool SetAttribute(const String&, const Variant&);
  2583. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2584. void SetAttributeAnimationSpeed(const String&, float);
  2585. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2586. // Properties:
  2587. bool animationEnabled;
  2588. /* readonly */
  2589. Array<Variant> attributeDefaults;
  2590. /* readonly */
  2591. Array<AttributeInfo> attributeInfos;
  2592. Array<Variant> attributes;
  2593. /* readonly */
  2594. StringHash baseType;
  2595. /* readonly */
  2596. String category;
  2597. bool collideConnected;
  2598. bool enabled;
  2599. /* readonly */
  2600. bool enabledEffective;
  2601. /* readonly */
  2602. uint id;
  2603. /* readonly */
  2604. Node node;
  2605. /* readonly */
  2606. uint numAttributes;
  2607. ObjectAnimation objectAnimation;
  2608. RigidBody2D otherBody;
  2609. Vector2 otherBodyAnchor;
  2610. Vector2 otherBodyGroundAnchor;
  2611. /* readonly */
  2612. RigidBody2D ownerBody;
  2613. Vector2 ownerBodyAnchor;
  2614. Vector2 ownerBodyGroundAnchor;
  2615. float ratio;
  2616. /* readonly */
  2617. int refs;
  2618. bool temporary;
  2619. /* readonly */
  2620. StringHash type;
  2621. /* readonly */
  2622. String typeName;
  2623. /* readonly */
  2624. int weakRefs;
  2625. };
  2626. class ConstraintRevolute2D
  2627. {
  2628. // Methods:
  2629. void ApplyAttributes();
  2630. void DrawDebugGeometry(DebugRenderer, bool);
  2631. Variant GetAttribute(const String&) const;
  2632. ValueAnimation GetAttributeAnimation(const String&) const;
  2633. float GetAttributeAnimationSpeed(const String&) const;
  2634. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2635. Variant GetAttributeDefault(const String&) const;
  2636. bool Load(File, bool = false);
  2637. bool Load(VectorBuffer&, bool = false);
  2638. bool LoadXML(const XMLElement&, bool = false);
  2639. void MarkNetworkUpdate() const;
  2640. void Remove();
  2641. void RemoveInstanceDefault();
  2642. void ResetToDefault();
  2643. bool Save(File) const;
  2644. bool Save(VectorBuffer&) const;
  2645. bool SaveXML(XMLElement&) const;
  2646. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2647. bool SetAttribute(const String&, const Variant&);
  2648. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2649. void SetAttributeAnimationSpeed(const String&, float);
  2650. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2651. // Properties:
  2652. Vector2 anchor;
  2653. bool animationEnabled;
  2654. /* readonly */
  2655. Array<Variant> attributeDefaults;
  2656. /* readonly */
  2657. Array<AttributeInfo> attributeInfos;
  2658. Array<Variant> attributes;
  2659. /* readonly */
  2660. StringHash baseType;
  2661. /* readonly */
  2662. String category;
  2663. bool collideConnected;
  2664. bool enableLimit;
  2665. bool enableMotor;
  2666. bool enabled;
  2667. /* readonly */
  2668. bool enabledEffective;
  2669. /* readonly */
  2670. uint id;
  2671. float lowerAngle;
  2672. float maxMotorTorque;
  2673. float motorSpeed;
  2674. /* readonly */
  2675. Node node;
  2676. /* readonly */
  2677. uint numAttributes;
  2678. ObjectAnimation objectAnimation;
  2679. RigidBody2D otherBody;
  2680. /* readonly */
  2681. RigidBody2D ownerBody;
  2682. /* readonly */
  2683. int refs;
  2684. bool temporary;
  2685. /* readonly */
  2686. StringHash type;
  2687. /* readonly */
  2688. String typeName;
  2689. float upperAngle;
  2690. /* readonly */
  2691. int weakRefs;
  2692. };
  2693. class ConstraintRope2D
  2694. {
  2695. // Methods:
  2696. void ApplyAttributes();
  2697. void DrawDebugGeometry(DebugRenderer, bool);
  2698. Variant GetAttribute(const String&) const;
  2699. ValueAnimation GetAttributeAnimation(const String&) const;
  2700. float GetAttributeAnimationSpeed(const String&) const;
  2701. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2702. Variant GetAttributeDefault(const String&) const;
  2703. bool Load(File, bool = false);
  2704. bool Load(VectorBuffer&, bool = false);
  2705. bool LoadXML(const XMLElement&, bool = false);
  2706. void MarkNetworkUpdate() const;
  2707. void Remove();
  2708. void RemoveInstanceDefault();
  2709. void ResetToDefault();
  2710. bool Save(File) const;
  2711. bool Save(VectorBuffer&) const;
  2712. bool SaveXML(XMLElement&) const;
  2713. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2714. bool SetAttribute(const String&, const Variant&);
  2715. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2716. void SetAttributeAnimationSpeed(const String&, float);
  2717. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2718. // Properties:
  2719. bool animationEnabled;
  2720. /* readonly */
  2721. Array<Variant> attributeDefaults;
  2722. /* readonly */
  2723. Array<AttributeInfo> attributeInfos;
  2724. Array<Variant> attributes;
  2725. /* readonly */
  2726. StringHash baseType;
  2727. /* readonly */
  2728. String category;
  2729. bool collideConnected;
  2730. bool enabled;
  2731. /* readonly */
  2732. bool enabledEffective;
  2733. /* readonly */
  2734. uint id;
  2735. float maxLength;
  2736. /* readonly */
  2737. Node node;
  2738. /* readonly */
  2739. uint numAttributes;
  2740. ObjectAnimation objectAnimation;
  2741. RigidBody2D otherBody;
  2742. Vector2 otherBodyAnchor;
  2743. /* readonly */
  2744. RigidBody2D ownerBody;
  2745. Vector2 ownerBodyAnchor;
  2746. /* readonly */
  2747. int refs;
  2748. bool temporary;
  2749. /* readonly */
  2750. StringHash type;
  2751. /* readonly */
  2752. String typeName;
  2753. /* readonly */
  2754. int weakRefs;
  2755. };
  2756. class ConstraintWeld2D
  2757. {
  2758. // Methods:
  2759. void ApplyAttributes();
  2760. void DrawDebugGeometry(DebugRenderer, bool);
  2761. Variant GetAttribute(const String&) const;
  2762. ValueAnimation GetAttributeAnimation(const String&) const;
  2763. float GetAttributeAnimationSpeed(const String&) const;
  2764. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2765. Variant GetAttributeDefault(const String&) const;
  2766. bool Load(File, bool = false);
  2767. bool Load(VectorBuffer&, bool = false);
  2768. bool LoadXML(const XMLElement&, bool = false);
  2769. void MarkNetworkUpdate() const;
  2770. void Remove();
  2771. void RemoveInstanceDefault();
  2772. void ResetToDefault();
  2773. bool Save(File) const;
  2774. bool Save(VectorBuffer&) const;
  2775. bool SaveXML(XMLElement&) const;
  2776. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2777. bool SetAttribute(const String&, const Variant&);
  2778. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2779. void SetAttributeAnimationSpeed(const String&, float);
  2780. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2781. // Properties:
  2782. Vector2 anchor;
  2783. bool animationEnabled;
  2784. /* readonly */
  2785. Array<Variant> attributeDefaults;
  2786. /* readonly */
  2787. Array<AttributeInfo> attributeInfos;
  2788. Array<Variant> attributes;
  2789. /* readonly */
  2790. StringHash baseType;
  2791. /* readonly */
  2792. String category;
  2793. bool collideConnected;
  2794. float dampingRatio;
  2795. bool enabled;
  2796. /* readonly */
  2797. bool enabledEffective;
  2798. float frequencyHz;
  2799. /* readonly */
  2800. uint id;
  2801. /* readonly */
  2802. Node node;
  2803. /* readonly */
  2804. uint numAttributes;
  2805. ObjectAnimation objectAnimation;
  2806. RigidBody2D otherBody;
  2807. /* readonly */
  2808. RigidBody2D ownerBody;
  2809. /* readonly */
  2810. int refs;
  2811. bool temporary;
  2812. /* readonly */
  2813. StringHash type;
  2814. /* readonly */
  2815. String typeName;
  2816. /* readonly */
  2817. int weakRefs;
  2818. };
  2819. class ConstraintWheel2D
  2820. {
  2821. // Methods:
  2822. void ApplyAttributes();
  2823. void DrawDebugGeometry(DebugRenderer, bool);
  2824. Variant GetAttribute(const String&) const;
  2825. ValueAnimation GetAttributeAnimation(const String&) const;
  2826. float GetAttributeAnimationSpeed(const String&) const;
  2827. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2828. Variant GetAttributeDefault(const String&) const;
  2829. bool Load(File, bool = false);
  2830. bool Load(VectorBuffer&, bool = false);
  2831. bool LoadXML(const XMLElement&, bool = false);
  2832. void MarkNetworkUpdate() const;
  2833. void Remove();
  2834. void RemoveInstanceDefault();
  2835. void ResetToDefault();
  2836. bool Save(File) const;
  2837. bool Save(VectorBuffer&) const;
  2838. bool SaveXML(XMLElement&) const;
  2839. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2840. bool SetAttribute(const String&, const Variant&);
  2841. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2842. void SetAttributeAnimationSpeed(const String&, float);
  2843. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2844. // Properties:
  2845. Vector2 anchor;
  2846. bool animationEnabled;
  2847. /* readonly */
  2848. Array<Variant> attributeDefaults;
  2849. /* readonly */
  2850. Array<AttributeInfo> attributeInfos;
  2851. Array<Variant> attributes;
  2852. Vector2 axis;
  2853. /* readonly */
  2854. StringHash baseType;
  2855. /* readonly */
  2856. String category;
  2857. bool collideConnected;
  2858. float dampingRatio;
  2859. bool enableMotor;
  2860. bool enabled;
  2861. /* readonly */
  2862. bool enabledEffective;
  2863. float frequencyHz;
  2864. /* readonly */
  2865. uint id;
  2866. float maxMotorTorque;
  2867. float motorSpeed;
  2868. /* readonly */
  2869. Node node;
  2870. /* readonly */
  2871. uint numAttributes;
  2872. ObjectAnimation objectAnimation;
  2873. RigidBody2D otherBody;
  2874. /* readonly */
  2875. RigidBody2D ownerBody;
  2876. /* readonly */
  2877. int refs;
  2878. bool temporary;
  2879. /* readonly */
  2880. StringHash type;
  2881. /* readonly */
  2882. String typeName;
  2883. /* readonly */
  2884. int weakRefs;
  2885. };
  2886. class Controls
  2887. {
  2888. // Methods:
  2889. bool IsDown(uint) const;
  2890. bool IsPressed(uint, const Controls&) const;
  2891. void Reset();
  2892. void Set(uint, bool);
  2893. // Properties:
  2894. uint buttons;
  2895. VariantMap extraData;
  2896. float pitch;
  2897. float yaw;
  2898. };
  2899. class Cursor
  2900. {
  2901. // Methods:
  2902. void AddChild(UIElement);
  2903. void ApplyAttributes();
  2904. void BringToFront();
  2905. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  2906. void DefineShape(CursorShape, Texture, const IntRect&, const IntVector2&);
  2907. void DefineShape(const String&, Texture, const IntRect&, const IntVector2&);
  2908. void DisableLayoutUpdate();
  2909. IntVector2 ElementToScreen(const IntVector2&);
  2910. void EnableLayoutUpdate();
  2911. uint FindChild(UIElement) const;
  2912. Variant GetAttribute(const String&) const;
  2913. ValueAnimation GetAttributeAnimation(const String&) const;
  2914. float GetAttributeAnimationSpeed(const String&) const;
  2915. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2916. Variant GetAttributeDefault(const String&) const;
  2917. UIElement GetChild(const String&, bool = false) const;
  2918. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  2919. Array<UIElement> GetChildren(bool = false) const;
  2920. UIElement GetElementEventSender() const;
  2921. uint GetNumChildren(bool) const;
  2922. void InsertChild(uint, UIElement);
  2923. bool IsInside(IntVector2, bool);
  2924. bool IsInsideCombined(IntVector2, bool);
  2925. bool Load(File, bool = false);
  2926. bool Load(VectorBuffer&, bool = false);
  2927. bool LoadChildXML(XMLFile, XMLFile = null);
  2928. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  2929. bool LoadXML(File);
  2930. bool LoadXML(VectorBuffer&);
  2931. bool LoadXML(XMLFile, XMLFile);
  2932. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  2933. bool LoadXML(const XMLElement&, bool = false);
  2934. void MarkNetworkUpdate() const;
  2935. void Remove();
  2936. void RemoveAllChildren();
  2937. void RemoveChild(UIElement, uint = 0);
  2938. void RemoveChild(uint);
  2939. void RemoveInstanceDefault();
  2940. void ResetDeepEnabled();
  2941. void ResetToDefault();
  2942. bool Save(File) const;
  2943. bool Save(VectorBuffer&) const;
  2944. bool SaveXML(File);
  2945. bool SaveXML(VectorBuffer&);
  2946. bool SaveXML(XMLElement&) const;
  2947. IntVector2 ScreenToElement(const IntVector2&);
  2948. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2949. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  2950. bool SetAttribute(const String&, const Variant&);
  2951. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2952. void SetAttributeAnimationSpeed(const String&, float);
  2953. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2954. void SetDeepEnabled(bool);
  2955. void SetEnabledRecursive(bool);
  2956. void SetFixedHeight(int);
  2957. void SetFixedSize(int, int);
  2958. void SetFixedWidth(int);
  2959. void SetFullImageRect();
  2960. void SetHoverOffset(int, int);
  2961. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  2962. void SetMaxSize(int, int);
  2963. void SetMinSize(int, int);
  2964. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  2965. void SetPosition(int, int);
  2966. void SetShape(CursorShape);
  2967. void SetShape(const String&);
  2968. void SetSize(int, int);
  2969. bool SetStyle(const String&, XMLFile = null);
  2970. bool SetStyle(const XMLElement&);
  2971. bool SetStyleAuto(XMLFile = null);
  2972. void UpdateLayout();
  2973. const Variant& GetVar(const StringHash&);
  2974. // Properties:
  2975. bool animationEnabled;
  2976. /* readonly */
  2977. Array<Variant> attributeDefaults;
  2978. /* readonly */
  2979. Array<AttributeInfo> attributeInfos;
  2980. Array<Variant> attributes;
  2981. /* readonly */
  2982. StringHash baseType;
  2983. BlendMode blendMode;
  2984. IntRect border;
  2985. bool bringToBack;
  2986. bool bringToFront;
  2987. /* readonly */
  2988. String category;
  2989. /* readonly */
  2990. IntVector2 childOffset;
  2991. /* readonly */
  2992. Array<UIElement> children;
  2993. IntRect clipBorder;
  2994. bool clipChildren;
  2995. /* writeonly */
  2996. Color color;
  2997. /* readonly */
  2998. bool colorGradient;
  2999. Array<Color> colors;
  3000. /* readonly */
  3001. IntRect combinedScreenRect;
  3002. XMLFile defaultStyle;
  3003. /* readonly */
  3004. float derivedOpacity;
  3005. /* readonly */
  3006. uint dragButtonCombo;
  3007. /* readonly */
  3008. int dragButtonCount;
  3009. uint dragDropMode;
  3010. bool editable;
  3011. bool elementEventSender;
  3012. bool enabled;
  3013. /* readonly */
  3014. bool enabledSelf;
  3015. /* readonly */
  3016. bool fixedHeight;
  3017. /* readonly */
  3018. bool fixedSize;
  3019. /* readonly */
  3020. bool fixedWidth;
  3021. bool focus;
  3022. FocusMode focusMode;
  3023. int height;
  3024. HorizontalAlignment horizontalAlignment;
  3025. IntVector2 hoverOffset;
  3026. /* readonly */
  3027. bool hovering;
  3028. IntRect imageBorder;
  3029. IntRect imageRect;
  3030. int indent;
  3031. int indentSpacing;
  3032. /* readonly */
  3033. int indentWidth;
  3034. bool internal;
  3035. IntRect layoutBorder;
  3036. Vector2 layoutFlexScale;
  3037. LayoutMode layoutMode;
  3038. int layoutSpacing;
  3039. int maxHeight;
  3040. IntVector2 maxSize;
  3041. int maxWidth;
  3042. int minHeight;
  3043. IntVector2 minSize;
  3044. int minWidth;
  3045. String name;
  3046. /* readonly */
  3047. uint numAllChildren;
  3048. /* readonly */
  3049. uint numAttributes;
  3050. /* readonly */
  3051. uint numChildren;
  3052. ObjectAnimation objectAnimation;
  3053. float opacity;
  3054. UIElement parent;
  3055. IntVector2 position;
  3056. int priority;
  3057. /* readonly */
  3058. int refs;
  3059. /* readonly */
  3060. UIElement root;
  3061. /* readonly */
  3062. IntVector2 screenPosition;
  3063. bool selected;
  3064. String shape;
  3065. IntVector2 size;
  3066. bool sortChildren;
  3067. String style;
  3068. bool temporary;
  3069. Texture texture;
  3070. bool tiled;
  3071. TraversalMode traversalMode;
  3072. /* readonly */
  3073. StringHash type;
  3074. /* readonly */
  3075. String typeName;
  3076. bool useDerivedOpacity;
  3077. bool useSystemShapes;
  3078. /* readonly */
  3079. VariantMap vars;
  3080. VerticalAlignment verticalAlignment;
  3081. bool visible;
  3082. /* readonly */
  3083. int weakRefs;
  3084. int width;
  3085. };
  3086. class CustomGeometry
  3087. {
  3088. // Methods:
  3089. void ApplyAttributes();
  3090. void BeginGeometry(uint, PrimitiveType);
  3091. void Clear();
  3092. void Commit();
  3093. void DefineColor(const Color&);
  3094. void DefineGeometry(uint, PrimitiveType, uint, bool, bool, bool, bool);
  3095. void DefineNormal(const Vector3&);
  3096. void DefineTangent(const Vector4&);
  3097. void DefineTexCoord(const Vector2&);
  3098. void DefineVertex(const Vector3&);
  3099. void DrawDebugGeometry(DebugRenderer, bool);
  3100. Variant GetAttribute(const String&) const;
  3101. ValueAnimation GetAttributeAnimation(const String&) const;
  3102. float GetAttributeAnimationSpeed(const String&) const;
  3103. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3104. Variant GetAttributeDefault(const String&) const;
  3105. CustomGeometryVertex GetVertex(uint, uint);
  3106. bool IsInView(Camera) const;
  3107. bool Load(File, bool = false);
  3108. bool Load(VectorBuffer&, bool = false);
  3109. bool LoadXML(const XMLElement&, bool = false);
  3110. void MarkNetworkUpdate() const;
  3111. void Remove();
  3112. void RemoveInstanceDefault();
  3113. void ResetToDefault();
  3114. bool Save(File) const;
  3115. bool Save(VectorBuffer&) const;
  3116. bool SaveXML(XMLElement&) const;
  3117. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3118. bool SetAttribute(const String&, const Variant&);
  3119. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3120. void SetAttributeAnimationSpeed(const String&, float);
  3121. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3122. // Properties:
  3123. bool animationEnabled;
  3124. /* readonly */
  3125. Array<Variant> attributeDefaults;
  3126. /* readonly */
  3127. Array<AttributeInfo> attributeInfos;
  3128. Array<Variant> attributes;
  3129. /* readonly */
  3130. StringHash baseType;
  3131. /* readonly */
  3132. BoundingBox boundingBox;
  3133. bool castShadows;
  3134. /* readonly */
  3135. String category;
  3136. float drawDistance;
  3137. bool dynamic;
  3138. bool enabled;
  3139. /* readonly */
  3140. bool enabledEffective;
  3141. /* readonly */
  3142. uint id;
  3143. /* readonly */
  3144. bool inView;
  3145. uint lightMask;
  3146. float lodBias;
  3147. /* writeonly */
  3148. Material material;
  3149. Array<Material> materials;
  3150. uint maxLights;
  3151. /* readonly */
  3152. Node node;
  3153. /* readonly */
  3154. uint numAttributes;
  3155. uint numGeometries;
  3156. /* readonly */
  3157. Array<uint> numVertices;
  3158. ObjectAnimation objectAnimation;
  3159. bool occludee;
  3160. bool occluder;
  3161. /* readonly */
  3162. int refs;
  3163. float shadowDistance;
  3164. uint shadowMask;
  3165. bool temporary;
  3166. /* readonly */
  3167. StringHash type;
  3168. /* readonly */
  3169. String typeName;
  3170. uint viewMask;
  3171. /* readonly */
  3172. int weakRefs;
  3173. /* readonly */
  3174. BoundingBox worldBoundingBox;
  3175. /* readonly */
  3176. Zone zone;
  3177. uint zoneMask;
  3178. };
  3179. class CustomGeometryVertex
  3180. {
  3181. // Properties:
  3182. uint color;
  3183. Vector3 normal;
  3184. Vector3 position;
  3185. Vector4 tangent;
  3186. Vector2 texCoord;
  3187. };
  3188. class DebugHud
  3189. {
  3190. // Methods:
  3191. void ClearAppStats();
  3192. void ResetAppStats(const String&);
  3193. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3194. void SetAppStats(const String&, const String&);
  3195. void SetAppStats(const String&, const Variant&);
  3196. void Toggle(uint);
  3197. void ToggleAll();
  3198. void Update();
  3199. // Properties:
  3200. /* readonly */
  3201. StringHash baseType;
  3202. /* readonly */
  3203. String category;
  3204. XMLFile defaultStyle;
  3205. uint mode;
  3206. /* readonly */
  3207. Text modeText;
  3208. float profilerInterval;
  3209. uint profilerMaxDepth;
  3210. /* readonly */
  3211. Text profilerText;
  3212. /* readonly */
  3213. int refs;
  3214. /* readonly */
  3215. Text statsText;
  3216. /* readonly */
  3217. StringHash type;
  3218. /* readonly */
  3219. String typeName;
  3220. bool useRendererStats;
  3221. /* readonly */
  3222. int weakRefs;
  3223. };
  3224. class DebugRenderer
  3225. {
  3226. // Methods:
  3227. void AddBoundingBox(const BoundingBox&, const Color&, bool = true);
  3228. void AddFrustum(const Frustum&, const Color&, bool = true);
  3229. void AddLine(const Vector3&, const Vector3&, const Color&, bool = true);
  3230. void AddNode(Node, float = 1.0, bool = true);
  3231. void AddPolyhedron(const Polyhedron&, const Color&, bool = true);
  3232. void AddSkeleton(Skeleton, const Color&, bool = true);
  3233. void AddSphere(const Sphere&, const Color&, bool = true);
  3234. void AddTriangle(const Vector3&, const Vector3&, const Vector3&, const Color&, bool = true);
  3235. void ApplyAttributes();
  3236. void DrawDebugGeometry(DebugRenderer, bool);
  3237. Variant GetAttribute(const String&) const;
  3238. ValueAnimation GetAttributeAnimation(const String&) const;
  3239. float GetAttributeAnimationSpeed(const String&) const;
  3240. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3241. Variant GetAttributeDefault(const String&) const;
  3242. bool Load(File, bool = false);
  3243. bool Load(VectorBuffer&, bool = false);
  3244. bool LoadXML(const XMLElement&, bool = false);
  3245. void MarkNetworkUpdate() const;
  3246. void Remove();
  3247. void RemoveInstanceDefault();
  3248. void ResetToDefault();
  3249. bool Save(File) const;
  3250. bool Save(VectorBuffer&) const;
  3251. bool SaveXML(XMLElement&) const;
  3252. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3253. bool SetAttribute(const String&, const Variant&);
  3254. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3255. void SetAttributeAnimationSpeed(const String&, float);
  3256. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3257. // Properties:
  3258. bool animationEnabled;
  3259. /* readonly */
  3260. Array<Variant> attributeDefaults;
  3261. /* readonly */
  3262. Array<AttributeInfo> attributeInfos;
  3263. Array<Variant> attributes;
  3264. /* readonly */
  3265. StringHash baseType;
  3266. /* readonly */
  3267. String category;
  3268. bool enabled;
  3269. /* readonly */
  3270. bool enabledEffective;
  3271. /* readonly */
  3272. uint id;
  3273. /* readonly */
  3274. Node node;
  3275. /* readonly */
  3276. uint numAttributes;
  3277. ObjectAnimation objectAnimation;
  3278. /* readonly */
  3279. int refs;
  3280. bool temporary;
  3281. /* readonly */
  3282. StringHash type;
  3283. /* readonly */
  3284. String typeName;
  3285. /* readonly */
  3286. int weakRefs;
  3287. };
  3288. class DecalSet
  3289. {
  3290. // Methods:
  3291. bool AddDecal(Drawable, const Vector3&, const Quaternion&, float, float, float, const Vector2&, const Vector2&, float = 0.0, float = 0.1, uint = 0xffffffff);
  3292. void ApplyAttributes();
  3293. void DrawDebugGeometry(DebugRenderer, bool);
  3294. Variant GetAttribute(const String&) const;
  3295. ValueAnimation GetAttributeAnimation(const String&) const;
  3296. float GetAttributeAnimationSpeed(const String&) const;
  3297. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3298. Variant GetAttributeDefault(const String&) const;
  3299. bool IsInView(Camera) const;
  3300. bool Load(File, bool = false);
  3301. bool Load(VectorBuffer&, bool = false);
  3302. bool LoadXML(const XMLElement&, bool = false);
  3303. void MarkNetworkUpdate() const;
  3304. void Remove();
  3305. void RemoveAllDecals();
  3306. void RemoveDecals(uint);
  3307. void RemoveInstanceDefault();
  3308. void ResetToDefault();
  3309. bool Save(File) const;
  3310. bool Save(VectorBuffer&) const;
  3311. bool SaveXML(XMLElement&) const;
  3312. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3313. bool SetAttribute(const String&, const Variant&);
  3314. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3315. void SetAttributeAnimationSpeed(const String&, float);
  3316. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3317. // Properties:
  3318. bool animationEnabled;
  3319. /* readonly */
  3320. Array<Variant> attributeDefaults;
  3321. /* readonly */
  3322. Array<AttributeInfo> attributeInfos;
  3323. Array<Variant> attributes;
  3324. /* readonly */
  3325. StringHash baseType;
  3326. /* readonly */
  3327. BoundingBox boundingBox;
  3328. bool castShadows;
  3329. /* readonly */
  3330. String category;
  3331. float drawDistance;
  3332. bool enabled;
  3333. /* readonly */
  3334. bool enabledEffective;
  3335. /* readonly */
  3336. uint id;
  3337. /* readonly */
  3338. bool inView;
  3339. uint lightMask;
  3340. float lodBias;
  3341. Material material;
  3342. uint maxIndices;
  3343. uint maxLights;
  3344. uint maxVertices;
  3345. /* readonly */
  3346. Node node;
  3347. /* readonly */
  3348. uint numAttributes;
  3349. /* readonly */
  3350. uint numDecals;
  3351. /* readonly */
  3352. uint numIndices;
  3353. /* readonly */
  3354. uint numVertices;
  3355. ObjectAnimation objectAnimation;
  3356. bool occludee;
  3357. bool occluder;
  3358. /* readonly */
  3359. int refs;
  3360. float shadowDistance;
  3361. uint shadowMask;
  3362. bool temporary;
  3363. /* readonly */
  3364. StringHash type;
  3365. /* readonly */
  3366. String typeName;
  3367. uint viewMask;
  3368. /* readonly */
  3369. int weakRefs;
  3370. /* readonly */
  3371. BoundingBox worldBoundingBox;
  3372. /* readonly */
  3373. Zone zone;
  3374. uint zoneMask;
  3375. };
  3376. class Deserializer
  3377. {
  3378. // Methods:
  3379. Array<uint8> Read(uint);
  3380. bool ReadBool();
  3381. BoundingBox ReadBoundingBox();
  3382. int8 ReadByte();
  3383. Color ReadColor();
  3384. String ReadFileID();
  3385. float ReadFloat();
  3386. int ReadInt();
  3387. IntRect ReadIntRect();
  3388. IntVector2 ReadIntVector2();
  3389. String ReadLine();
  3390. Matrix3 ReadMatrix3();
  3391. Matrix3x4 ReadMatrix3x4();
  3392. Matrix4 ReadMatrix4();
  3393. uint ReadNetID();
  3394. Quaternion ReadPackedQuaternion();
  3395. Vector3 ReadPackedVector3(float);
  3396. Quaternion ReadQuaternion();
  3397. int16 ReadShort();
  3398. String ReadString();
  3399. StringHash ReadStringHash();
  3400. uint8 ReadUByte();
  3401. uint ReadUInt();
  3402. uint16 ReadUShort();
  3403. uint ReadVLE();
  3404. Variant ReadVariant();
  3405. VariantMap ReadVariantMap();
  3406. Vector2 ReadVector2();
  3407. Vector3 ReadVector3();
  3408. Vector4 ReadVector4();
  3409. uint Seek(uint);
  3410. // Properties:
  3411. /* readonly */
  3412. uint checksum;
  3413. /* readonly */
  3414. bool eof;
  3415. /* readonly */
  3416. String name;
  3417. /* readonly */
  3418. uint position;
  3419. /* readonly */
  3420. uint size;
  3421. };
  3422. class Dictionary
  3423. {
  3424. // Methods:
  3425. void Clear();
  3426. void Erase(const String&);
  3427. bool Exists(const String&) const;
  3428. bool Get(const String&, void*) const;
  3429. bool Get(const String&, double&) const;
  3430. bool Get(const String&, int64&) const;
  3431. void Set(const String&, const void*);
  3432. void Set(const String&, const double&);
  3433. void Set(const String&, const int64&);
  3434. // Properties:
  3435. /* readonly */
  3436. bool empty;
  3437. /* readonly */
  3438. Array<String> keys;
  3439. /* readonly */
  3440. uint length;
  3441. };
  3442. class DictionaryValue
  3443. {
  3444. };
  3445. class Drawable
  3446. {
  3447. // Methods:
  3448. void ApplyAttributes();
  3449. void DrawDebugGeometry(DebugRenderer, bool);
  3450. Variant GetAttribute(const String&) const;
  3451. ValueAnimation GetAttributeAnimation(const String&) const;
  3452. float GetAttributeAnimationSpeed(const String&) const;
  3453. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3454. Variant GetAttributeDefault(const String&) const;
  3455. bool IsInView(Camera) const;
  3456. bool Load(File, bool = false);
  3457. bool Load(VectorBuffer&, bool = false);
  3458. bool LoadXML(const XMLElement&, bool = false);
  3459. void MarkNetworkUpdate() const;
  3460. void Remove();
  3461. void RemoveInstanceDefault();
  3462. void ResetToDefault();
  3463. bool Save(File) const;
  3464. bool Save(VectorBuffer&) const;
  3465. bool SaveXML(XMLElement&) const;
  3466. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3467. bool SetAttribute(const String&, const Variant&);
  3468. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3469. void SetAttributeAnimationSpeed(const String&, float);
  3470. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3471. // Properties:
  3472. bool animationEnabled;
  3473. /* readonly */
  3474. Array<Variant> attributeDefaults;
  3475. /* readonly */
  3476. Array<AttributeInfo> attributeInfos;
  3477. Array<Variant> attributes;
  3478. /* readonly */
  3479. StringHash baseType;
  3480. /* readonly */
  3481. BoundingBox boundingBox;
  3482. bool castShadows;
  3483. /* readonly */
  3484. String category;
  3485. float drawDistance;
  3486. bool enabled;
  3487. /* readonly */
  3488. bool enabledEffective;
  3489. /* readonly */
  3490. uint id;
  3491. /* readonly */
  3492. bool inView;
  3493. uint lightMask;
  3494. float lodBias;
  3495. uint maxLights;
  3496. /* readonly */
  3497. Node node;
  3498. /* readonly */
  3499. uint numAttributes;
  3500. ObjectAnimation objectAnimation;
  3501. bool occludee;
  3502. bool occluder;
  3503. /* readonly */
  3504. int refs;
  3505. float shadowDistance;
  3506. uint shadowMask;
  3507. bool temporary;
  3508. /* readonly */
  3509. StringHash type;
  3510. /* readonly */
  3511. String typeName;
  3512. uint viewMask;
  3513. /* readonly */
  3514. int weakRefs;
  3515. /* readonly */
  3516. BoundingBox worldBoundingBox;
  3517. uint zoneMask;
  3518. };
  3519. class Drawable2D
  3520. {
  3521. // Methods:
  3522. void ApplyAttributes();
  3523. void DrawDebugGeometry(DebugRenderer, bool);
  3524. Variant GetAttribute(const String&) const;
  3525. ValueAnimation GetAttributeAnimation(const String&) const;
  3526. float GetAttributeAnimationSpeed(const String&) const;
  3527. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3528. Variant GetAttributeDefault(const String&) const;
  3529. bool IsInView(Camera) const;
  3530. bool Load(File, bool = false);
  3531. bool Load(VectorBuffer&, bool = false);
  3532. bool LoadXML(const XMLElement&, bool = false);
  3533. void MarkNetworkUpdate() const;
  3534. void Remove();
  3535. void RemoveInstanceDefault();
  3536. void ResetToDefault();
  3537. bool Save(File) const;
  3538. bool Save(VectorBuffer&) const;
  3539. bool SaveXML(XMLElement&) const;
  3540. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3541. bool SetAttribute(const String&, const Variant&);
  3542. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3543. void SetAttributeAnimationSpeed(const String&, float);
  3544. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3545. // Properties:
  3546. bool animationEnabled;
  3547. /* readonly */
  3548. Array<Variant> attributeDefaults;
  3549. /* readonly */
  3550. Array<AttributeInfo> attributeInfos;
  3551. Array<Variant> attributes;
  3552. /* readonly */
  3553. StringHash baseType;
  3554. BlendMode blendMode;
  3555. /* readonly */
  3556. BoundingBox boundingBox;
  3557. bool castShadows;
  3558. /* readonly */
  3559. String category;
  3560. float drawDistance;
  3561. bool enabled;
  3562. /* readonly */
  3563. bool enabledEffective;
  3564. /* readonly */
  3565. uint id;
  3566. /* readonly */
  3567. bool inView;
  3568. int layer;
  3569. uint lightMask;
  3570. float lodBias;
  3571. uint maxLights;
  3572. /* readonly */
  3573. Node node;
  3574. /* readonly */
  3575. uint numAttributes;
  3576. ObjectAnimation objectAnimation;
  3577. bool occludee;
  3578. bool occluder;
  3579. int orderInLayer;
  3580. /* readonly */
  3581. int refs;
  3582. float shadowDistance;
  3583. uint shadowMask;
  3584. bool temporary;
  3585. Texture2D texture;
  3586. /* readonly */
  3587. StringHash type;
  3588. /* readonly */
  3589. String typeName;
  3590. uint viewMask;
  3591. /* readonly */
  3592. int weakRefs;
  3593. /* readonly */
  3594. BoundingBox worldBoundingBox;
  3595. uint zoneMask;
  3596. };
  3597. class DropDownList
  3598. {
  3599. // Methods:
  3600. void AddChild(UIElement);
  3601. void AddItem(UIElement);
  3602. void ApplyAttributes();
  3603. void BringToFront();
  3604. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  3605. void DisableLayoutUpdate();
  3606. IntVector2 ElementToScreen(const IntVector2&);
  3607. void EnableLayoutUpdate();
  3608. uint FindChild(UIElement) const;
  3609. Variant GetAttribute(const String&) const;
  3610. ValueAnimation GetAttributeAnimation(const String&) const;
  3611. float GetAttributeAnimationSpeed(const String&) const;
  3612. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3613. Variant GetAttributeDefault(const String&) const;
  3614. UIElement GetChild(const String&, bool = false) const;
  3615. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  3616. Array<UIElement> GetChildren(bool = false) const;
  3617. UIElement GetElementEventSender() const;
  3618. Array<UIElement> GetItems() const;
  3619. uint GetNumChildren(bool) const;
  3620. void InsertChild(uint, UIElement);
  3621. void InsertItem(uint, UIElement);
  3622. bool IsInside(IntVector2, bool);
  3623. bool IsInsideCombined(IntVector2, bool);
  3624. bool Load(File, bool = false);
  3625. bool Load(VectorBuffer&, bool = false);
  3626. bool LoadChildXML(XMLFile, XMLFile = null);
  3627. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  3628. bool LoadXML(File);
  3629. bool LoadXML(VectorBuffer&);
  3630. bool LoadXML(XMLFile, XMLFile);
  3631. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  3632. bool LoadXML(const XMLElement&, bool = false);
  3633. void MarkNetworkUpdate() const;
  3634. void Remove();
  3635. void RemoveAllChildren();
  3636. void RemoveAllItems();
  3637. void RemoveChild(UIElement, uint = 0);
  3638. void RemoveChild(uint);
  3639. void RemoveInstanceDefault();
  3640. void RemoveItem(UIElement);
  3641. void RemoveItem(uint);
  3642. void ResetDeepEnabled();
  3643. void ResetToDefault();
  3644. bool Save(File) const;
  3645. bool Save(VectorBuffer&) const;
  3646. bool SaveXML(File);
  3647. bool SaveXML(VectorBuffer&);
  3648. bool SaveXML(XMLElement&) const;
  3649. IntVector2 ScreenToElement(const IntVector2&);
  3650. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3651. void SetAccelerator(int, int);
  3652. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  3653. bool SetAttribute(const String&, const Variant&);
  3654. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3655. void SetAttributeAnimationSpeed(const String&, float);
  3656. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3657. void SetDeepEnabled(bool);
  3658. void SetEnabledRecursive(bool);
  3659. void SetFixedHeight(int);
  3660. void SetFixedSize(int, int);
  3661. void SetFixedWidth(int);
  3662. void SetFullImageRect();
  3663. void SetHoverOffset(int, int);
  3664. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  3665. void SetMaxSize(int, int);
  3666. void SetMinSize(int, int);
  3667. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  3668. void SetPosition(int, int);
  3669. void SetPressedChildOffset(int, int);
  3670. void SetPressedOffset(int, int);
  3671. void SetRepeat(float, float);
  3672. void SetSize(int, int);
  3673. bool SetStyle(const String&, XMLFile = null);
  3674. bool SetStyle(const XMLElement&);
  3675. bool SetStyleAuto(XMLFile = null);
  3676. void UpdateLayout();
  3677. const Variant& GetVar(const StringHash&);
  3678. UIElement getPopup() const;
  3679. // Properties:
  3680. /* readonly */
  3681. int acceleratorKey;
  3682. /* readonly */
  3683. int acceleratorQualifiers;
  3684. bool animationEnabled;
  3685. /* readonly */
  3686. Array<Variant> attributeDefaults;
  3687. /* readonly */
  3688. Array<AttributeInfo> attributeInfos;
  3689. Array<Variant> attributes;
  3690. /* readonly */
  3691. StringHash baseType;
  3692. BlendMode blendMode;
  3693. IntRect border;
  3694. bool bringToBack;
  3695. bool bringToFront;
  3696. /* readonly */
  3697. String category;
  3698. /* readonly */
  3699. IntVector2 childOffset;
  3700. /* readonly */
  3701. Array<UIElement> children;
  3702. IntRect clipBorder;
  3703. bool clipChildren;
  3704. /* writeonly */
  3705. Color color;
  3706. /* readonly */
  3707. bool colorGradient;
  3708. Array<Color> colors;
  3709. /* readonly */
  3710. IntRect combinedScreenRect;
  3711. XMLFile defaultStyle;
  3712. /* readonly */
  3713. float derivedOpacity;
  3714. /* readonly */
  3715. uint dragButtonCombo;
  3716. /* readonly */
  3717. int dragButtonCount;
  3718. uint dragDropMode;
  3719. bool editable;
  3720. bool elementEventSender;
  3721. bool enabled;
  3722. /* readonly */
  3723. bool enabledSelf;
  3724. /* readonly */
  3725. bool fixedHeight;
  3726. /* readonly */
  3727. bool fixedSize;
  3728. /* readonly */
  3729. bool fixedWidth;
  3730. bool focus;
  3731. FocusMode focusMode;
  3732. int height;
  3733. HorizontalAlignment horizontalAlignment;
  3734. IntVector2 hoverOffset;
  3735. /* readonly */
  3736. bool hovering;
  3737. IntRect imageBorder;
  3738. IntRect imageRect;
  3739. int indent;
  3740. int indentSpacing;
  3741. /* readonly */
  3742. int indentWidth;
  3743. bool internal;
  3744. /* readonly */
  3745. Array<UIElement> items;
  3746. IntRect layoutBorder;
  3747. Vector2 layoutFlexScale;
  3748. LayoutMode layoutMode;
  3749. int layoutSpacing;
  3750. /* readonly */
  3751. ListView listView;
  3752. int maxHeight;
  3753. IntVector2 maxSize;
  3754. int maxWidth;
  3755. int minHeight;
  3756. IntVector2 minSize;
  3757. int minWidth;
  3758. String name;
  3759. /* readonly */
  3760. uint numAllChildren;
  3761. /* readonly */
  3762. uint numAttributes;
  3763. /* readonly */
  3764. uint numChildren;
  3765. /* readonly */
  3766. uint numItems;
  3767. ObjectAnimation objectAnimation;
  3768. float opacity;
  3769. UIElement parent;
  3770. /* readonly */
  3771. UIElement placeholder;
  3772. String placeholderText;
  3773. IntVector2 position;
  3774. /* readonly */
  3775. bool pressed;
  3776. IntVector2 pressedChildOffset;
  3777. IntVector2 pressedOffset;
  3778. int priority;
  3779. /* readonly */
  3780. int refs;
  3781. float repeatDelay;
  3782. float repeatRate;
  3783. bool resizePopup;
  3784. /* readonly */
  3785. UIElement root;
  3786. /* readonly */
  3787. IntVector2 screenPosition;
  3788. bool selected;
  3789. /* readonly */
  3790. UIElement selectedItem;
  3791. uint selection;
  3792. bool showPopup;
  3793. IntVector2 size;
  3794. bool sortChildren;
  3795. String style;
  3796. bool temporary;
  3797. Texture texture;
  3798. bool tiled;
  3799. TraversalMode traversalMode;
  3800. /* readonly */
  3801. StringHash type;
  3802. /* readonly */
  3803. String typeName;
  3804. bool useDerivedOpacity;
  3805. /* readonly */
  3806. VariantMap vars;
  3807. VerticalAlignment verticalAlignment;
  3808. bool visible;
  3809. /* readonly */
  3810. int weakRefs;
  3811. int width;
  3812. };
  3813. class Engine
  3814. {
  3815. // Methods:
  3816. Console CreateConsole();
  3817. DebugHud CreateDebugHud();
  3818. void DumpMemory();
  3819. void DumpProfiler();
  3820. void DumpResources(bool = false);
  3821. void Exit();
  3822. void RunFrame();
  3823. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3824. // Properties:
  3825. bool autoExit;
  3826. /* readonly */
  3827. StringHash baseType;
  3828. /* readonly */
  3829. String category;
  3830. /* readonly */
  3831. bool exiting;
  3832. /* readonly */
  3833. bool headless;
  3834. /* readonly */
  3835. bool initialized;
  3836. int maxFps;
  3837. int maxInactiveFps;
  3838. int minFps;
  3839. bool pauseMinimized;
  3840. /* readonly */
  3841. int refs;
  3842. int timeStepSmoothing;
  3843. /* readonly */
  3844. StringHash type;
  3845. /* readonly */
  3846. String typeName;
  3847. /* readonly */
  3848. int weakRefs;
  3849. };
  3850. class File
  3851. {
  3852. // Methods:
  3853. void Close();
  3854. bool Open(const String&, FileMode = FILE_READ);
  3855. Array<uint8> Read(uint);
  3856. bool ReadBool();
  3857. BoundingBox ReadBoundingBox();
  3858. int8 ReadByte();
  3859. Color ReadColor();
  3860. String ReadFileID();
  3861. float ReadFloat();
  3862. int ReadInt();
  3863. IntRect ReadIntRect();
  3864. IntVector2 ReadIntVector2();
  3865. String ReadLine();
  3866. Matrix3 ReadMatrix3();
  3867. Matrix3x4 ReadMatrix3x4();
  3868. Matrix4 ReadMatrix4();
  3869. uint ReadNetID();
  3870. Quaternion ReadPackedQuaternion();
  3871. Vector3 ReadPackedVector3(float);
  3872. Quaternion ReadQuaternion();
  3873. int16 ReadShort();
  3874. String ReadString();
  3875. StringHash ReadStringHash();
  3876. uint8 ReadUByte();
  3877. uint ReadUInt();
  3878. uint16 ReadUShort();
  3879. uint ReadVLE();
  3880. Variant ReadVariant();
  3881. VariantMap ReadVariantMap();
  3882. Vector2 ReadVector2();
  3883. Vector3 ReadVector3();
  3884. Vector4 ReadVector4();
  3885. uint Seek(uint);
  3886. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3887. uint Write(Array<uint8>);
  3888. bool WriteBool(bool);
  3889. bool WriteBoundingBox(const BoundingBox&);
  3890. bool WriteByte(int8);
  3891. bool WriteColor(const Color&);
  3892. bool WriteFileID(const String&);
  3893. bool WriteFloat(float);
  3894. bool WriteInt(int);
  3895. bool WriteIntRect(const IntRect&);
  3896. bool WriteIntVector2(const IntVector2&);
  3897. bool WriteLine(const String&);
  3898. bool WriteMatrix3(const Matrix3&);
  3899. bool WriteMatrix3x4(const Matrix3x4&);
  3900. bool WriteMatrix4(const Matrix4&);
  3901. bool WriteNetID(uint);
  3902. bool WritePackedQuaternion(const Quaternion&);
  3903. bool WritePackedVector3(const Vector3&, float);
  3904. bool WriteQuaternion(const Quaternion&);
  3905. bool WriteShort(int16);
  3906. bool WriteString(const String&);
  3907. bool WriteStringHash(const StringHash&);
  3908. bool WriteUByte(uint8);
  3909. bool WriteUInt(uint);
  3910. bool WriteUShort(uint16);
  3911. bool WriteVLE(uint);
  3912. bool WriteVariant(const Variant&);
  3913. bool WriteVariantMap(const VariantMap&);
  3914. bool WriteVector2(const Vector2&);
  3915. bool WriteVector3(const Vector3&);
  3916. bool WriteVector4(const Vector4&);
  3917. // Properties:
  3918. /* readonly */
  3919. StringHash baseType;
  3920. /* readonly */
  3921. String category;
  3922. /* readonly */
  3923. uint checksum;
  3924. /* readonly */
  3925. bool eof;
  3926. /* readonly */
  3927. FileMode mode;
  3928. /* readonly */
  3929. String name;
  3930. /* readonly */
  3931. bool open;
  3932. /* readonly */
  3933. bool packaged;
  3934. /* readonly */
  3935. uint position;
  3936. /* readonly */
  3937. int refs;
  3938. /* readonly */
  3939. uint size;
  3940. /* readonly */
  3941. StringHash type;
  3942. /* readonly */
  3943. String typeName;
  3944. /* readonly */
  3945. int weakRefs;
  3946. };
  3947. class FileSelector
  3948. {
  3949. // Methods:
  3950. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3951. void SetButtonTexts(const String&, const String&);
  3952. void SetFilters(Array<String>, uint);
  3953. void UpdateElements();
  3954. // Properties:
  3955. /* readonly */
  3956. StringHash baseType;
  3957. /* readonly */
  3958. Button cancelButton;
  3959. /* readonly */
  3960. String category;
  3961. XMLFile defaultStyle;
  3962. bool directoryMode;
  3963. /* readonly */
  3964. ListView fileList;
  3965. String fileName;
  3966. /* readonly */
  3967. LineEdit fileNameEdit;
  3968. /* readonly */
  3969. String filter;
  3970. /* readonly */
  3971. uint filterIndex;
  3972. /* readonly */
  3973. DropDownList filterList;
  3974. /* readonly */
  3975. Button okButton;
  3976. String path;
  3977. /* readonly */
  3978. LineEdit pathEdit;
  3979. /* readonly */
  3980. int refs;
  3981. String title;
  3982. /* readonly */
  3983. Text titleText;
  3984. /* readonly */
  3985. StringHash type;
  3986. /* readonly */
  3987. String typeName;
  3988. /* readonly */
  3989. int weakRefs;
  3990. /* readonly */
  3991. Window window;
  3992. };
  3993. class FileSystem
  3994. {
  3995. // Methods:
  3996. bool Copy(const String&, const String&);
  3997. bool CreateDir(const String&);
  3998. bool Delete(const String&);
  3999. bool DirExists(const String&) const;
  4000. bool FileExists(const String&) const;
  4001. String GetAppPreferencesDir(const String&, const String&) const;
  4002. uint GetLastModifiedTime(const String&) const;
  4003. bool Rename(const String&, const String&);
  4004. Array<String> ScanDir(const String&, const String&, uint, bool) const;
  4005. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4006. bool SetLastModifiedTime(const String&, uint);
  4007. int SystemCommand(const String&, bool = false);
  4008. uint SystemCommandAsync(const String&);
  4009. bool SystemOpen(const String&, const String&);
  4010. int SystemRun(const String&, Array<String>);
  4011. uint SystemRunAsync(const String&, Array<String>);
  4012. // Properties:
  4013. /* readonly */
  4014. StringHash baseType;
  4015. /* readonly */
  4016. String category;
  4017. String currentDir;
  4018. bool executeConsoleCommands;
  4019. /* readonly */
  4020. String programDir;
  4021. /* readonly */
  4022. int refs;
  4023. /* readonly */
  4024. StringHash type;
  4025. /* readonly */
  4026. String typeName;
  4027. /* readonly */
  4028. String userDocumentsDir;
  4029. /* readonly */
  4030. int weakRefs;
  4031. };
  4032. class FocusParameters
  4033. {
  4034. // Properties:
  4035. bool autoSize;
  4036. bool focus;
  4037. float minView;
  4038. bool nonUniform;
  4039. float quantize;
  4040. };
  4041. class Font
  4042. {
  4043. // Methods:
  4044. IntVector2 GetTotalGlyphOffset(int) const;
  4045. bool Load(File);
  4046. bool Load(VectorBuffer&);
  4047. bool Save(File) const;
  4048. bool Save(VectorBuffer&) const;
  4049. bool SaveXML(File, int, bool = false);
  4050. bool SaveXML(VectorBuffer&, int, bool = false);
  4051. bool SaveXML(const String&, int, bool = false);
  4052. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4053. // Properties:
  4054. IntVector2 absoluteGlyphOffset;
  4055. /* readonly */
  4056. StringHash baseType;
  4057. /* readonly */
  4058. String category;
  4059. /* readonly */
  4060. uint memoryUse;
  4061. String name;
  4062. /* readonly */
  4063. int refs;
  4064. Vector2 scaledGlyphOffset;
  4065. /* readonly */
  4066. StringHash type;
  4067. /* readonly */
  4068. String typeName;
  4069. /* readonly */
  4070. uint useTimer;
  4071. /* readonly */
  4072. int weakRefs;
  4073. };
  4074. class Frustum
  4075. {
  4076. // Methods:
  4077. void Define(const BoundingBox&, const Matrix3x4&);
  4078. void Define(const Vector3&, const Vector3&, const Matrix3x4&);
  4079. void Define(float, float, float, float, float, const Matrix3x4&);
  4080. void DefineOrtho(float, float, float, float, float, const Matrix3x4&);
  4081. float Distance(const Vector3&) const;
  4082. Intersection IsInside(const BoundingBox&);
  4083. Intersection IsInside(const Sphere&);
  4084. Intersection IsInside(const Vector3&);
  4085. void Transform(const Matrix3&);
  4086. void Transform(const Matrix3x4&);
  4087. Frustum Transformed(const Matrix3&) const;
  4088. Frustum Transformed(const Matrix3x4&) const;
  4089. // Properties:
  4090. /* readonly */
  4091. Array<Vector3> vertices;
  4092. };
  4093. class Graphics
  4094. {
  4095. // Methods:
  4096. void BeginDumpShaders(const String&);
  4097. void Close();
  4098. void EndDumpShaders();
  4099. void Maximize();
  4100. void Minimize();
  4101. void PrecacheShaders(File);
  4102. void PrecacheShaders(VectorBuffer&);
  4103. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4104. bool SetMode(int, int);
  4105. bool SetMode(int, int, bool, bool, bool, bool, bool, int);
  4106. void SetWindowPosition(int, int);
  4107. bool TakeScreenShot(Image);
  4108. bool ToggleFullscreen();
  4109. // Properties:
  4110. /* readonly */
  4111. StringHash baseType;
  4112. /* readonly */
  4113. bool borderless;
  4114. /* readonly */
  4115. String category;
  4116. /* readonly */
  4117. bool deferredSupport;
  4118. /* readonly */
  4119. IntVector2 desktopResolution;
  4120. /* readonly */
  4121. bool deviceLost;
  4122. bool flushGPU;
  4123. bool forceSM2;
  4124. /* readonly */
  4125. bool fullscreen;
  4126. /* readonly */
  4127. bool hardwareShadowSupport;
  4128. /* readonly */
  4129. int height;
  4130. /* readonly */
  4131. bool initialized;
  4132. /* readonly */
  4133. bool instancingSupport;
  4134. /* readonly */
  4135. bool lightPrepassSupport;
  4136. /* readonly */
  4137. int multiSample;
  4138. /* readonly */
  4139. Array<int> multiSampleLevels;
  4140. /* readonly */
  4141. uint numBatches;
  4142. /* readonly */
  4143. uint numPrimitives;
  4144. String orientations;
  4145. /* readonly */
  4146. int refs;
  4147. /* readonly */
  4148. bool resizable;
  4149. /* readonly */
  4150. Array<IntVector2> resolutions;
  4151. bool sRGB;
  4152. /* readonly */
  4153. bool sRGBSupport;
  4154. /* readonly */
  4155. bool sRGBWriteSupport;
  4156. /* readonly */
  4157. bool sm3Support;
  4158. /* readonly */
  4159. bool tripleBuffer;
  4160. /* readonly */
  4161. StringHash type;
  4162. /* readonly */
  4163. String typeName;
  4164. /* readonly */
  4165. bool vsync;
  4166. /* readonly */
  4167. int weakRefs;
  4168. /* readonly */
  4169. int width;
  4170. /* writeonly */
  4171. Image windowIcon;
  4172. IntVector2 windowPosition;
  4173. String windowTitle;
  4174. };
  4175. class HttpRequest
  4176. {
  4177. // Methods:
  4178. Array<uint8> Read(uint);
  4179. bool ReadBool();
  4180. BoundingBox ReadBoundingBox();
  4181. int8 ReadByte();
  4182. Color ReadColor();
  4183. String ReadFileID();
  4184. float ReadFloat();
  4185. int ReadInt();
  4186. IntRect ReadIntRect();
  4187. IntVector2 ReadIntVector2();
  4188. String ReadLine();
  4189. Matrix3 ReadMatrix3();
  4190. Matrix3x4 ReadMatrix3x4();
  4191. Matrix4 ReadMatrix4();
  4192. uint ReadNetID();
  4193. Quaternion ReadPackedQuaternion();
  4194. Vector3 ReadPackedVector3(float);
  4195. Quaternion ReadQuaternion();
  4196. int16 ReadShort();
  4197. String ReadString();
  4198. StringHash ReadStringHash();
  4199. uint8 ReadUByte();
  4200. uint ReadUInt();
  4201. uint16 ReadUShort();
  4202. uint ReadVLE();
  4203. Variant ReadVariant();
  4204. VariantMap ReadVariantMap();
  4205. Vector2 ReadVector2();
  4206. Vector3 ReadVector3();
  4207. Vector4 ReadVector4();
  4208. uint Seek(uint);
  4209. // Properties:
  4210. /* readonly */
  4211. uint availableSize;
  4212. /* readonly */
  4213. uint checksum;
  4214. /* readonly */
  4215. bool eof;
  4216. /* readonly */
  4217. String error;
  4218. /* readonly */
  4219. String name;
  4220. /* readonly */
  4221. bool open;
  4222. /* readonly */
  4223. uint position;
  4224. /* readonly */
  4225. int refs;
  4226. /* readonly */
  4227. uint size;
  4228. /* readonly */
  4229. HttpRequestState state;
  4230. /* readonly */
  4231. String url;
  4232. /* readonly */
  4233. String verb;
  4234. /* readonly */
  4235. int weakRefs;
  4236. };
  4237. class Image
  4238. {
  4239. // Methods:
  4240. void Clear(const Color&);
  4241. void ClearInt(uint);
  4242. bool FlipHorizontal();
  4243. bool FlipVertical();
  4244. Color GetPixel(int, int) const;
  4245. Color GetPixel(int, int, int) const;
  4246. Color GetPixelBilinear(float, float) const;
  4247. uint GetPixelInt(int, int) const;
  4248. uint GetPixelInt(int, int, int) const;
  4249. Color GetPixelTrilinear(float, float, float) const;
  4250. Image GetSubimage(const IntRect&) const;
  4251. bool Load(File);
  4252. bool Load(VectorBuffer&);
  4253. bool LoadColorLUT(File);
  4254. bool LoadColorLUT(VectorBuffer&);
  4255. bool Resize(int, int);
  4256. bool Save(File) const;
  4257. bool Save(VectorBuffer&) const;
  4258. void SaveBMP(const String&) const;
  4259. void SaveJPG(const String&, int) const;
  4260. void SavePNG(const String&) const;
  4261. void SaveTGA(const String&) const;
  4262. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4263. void SetPixel(int, int, const Color&);
  4264. void SetPixel(int, int, int, const Color&);
  4265. void SetPixelInt(int, int, int, uint);
  4266. void SetPixelInt(int, int, uint);
  4267. bool SetSize(int, int, int, uint);
  4268. bool SetSize(int, int, uint);
  4269. // Properties:
  4270. /* readonly */
  4271. StringHash baseType;
  4272. /* readonly */
  4273. String category;
  4274. /* readonly */
  4275. uint components;
  4276. /* readonly */
  4277. bool compressed;
  4278. /* readonly */
  4279. CompressedFormat compressedFormat;
  4280. /* readonly */
  4281. int depth;
  4282. /* readonly */
  4283. int height;
  4284. /* readonly */
  4285. uint memoryUse;
  4286. String name;
  4287. /* readonly */
  4288. uint numCompressedLevels;
  4289. /* readonly */
  4290. int refs;
  4291. /* readonly */
  4292. StringHash type;
  4293. /* readonly */
  4294. String typeName;
  4295. /* readonly */
  4296. uint useTimer;
  4297. /* readonly */
  4298. int weakRefs;
  4299. /* readonly */
  4300. int width;
  4301. };
  4302. class Input
  4303. {
  4304. // Methods:
  4305. int AddScreenJoystick(XMLFile = null, XMLFile = null);
  4306. int GetKeyFromName(const String&) const;
  4307. int GetKeyFromScancode(int) const;
  4308. String GetKeyName(int) const;
  4309. int GetScancodeFromKey(int) const;
  4310. int GetScancodeFromName(const String&) const;
  4311. String GetScancodeName(int) const;
  4312. uint LoadGestures(File);
  4313. uint LoadGestures(VectorBuffer&);
  4314. bool RecordGesture();
  4315. void RemoveAllGestures();
  4316. bool RemoveGesture(uint);
  4317. bool RemoveScreenJoystick(int);
  4318. void ResetMouseVisible();
  4319. bool SaveGesture(File, uint);
  4320. bool SaveGesture(VectorBuffer&, uint);
  4321. bool SaveGestures(File);
  4322. bool SaveGestures(VectorBuffer&);
  4323. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4324. void SetMouseVisible(bool, bool = false);
  4325. // Properties:
  4326. /* readonly */
  4327. StringHash baseType;
  4328. /* readonly */
  4329. String category;
  4330. /* readonly */
  4331. bool focus;
  4332. /* readonly */
  4333. Array<JoystickState> joysticks;
  4334. /* readonly */
  4335. Array<JoystickState> joysticksByIndex;
  4336. /* readonly */
  4337. Array<bool> keyDown;
  4338. /* readonly */
  4339. Array<bool> keyPress;
  4340. /* readonly */
  4341. bool minimized;
  4342. /* readonly */
  4343. Array<bool> mouseButtonDown;
  4344. /* readonly */
  4345. Array<bool> mouseButtonPress;
  4346. bool mouseGrabbed;
  4347. MouseMode mouseMode;
  4348. /* readonly */
  4349. IntVector2 mouseMove;
  4350. /* readonly */
  4351. int mouseMoveWheel;
  4352. /* readonly */
  4353. int mouseMoveX;
  4354. /* readonly */
  4355. int mouseMoveY;
  4356. /* readonly */
  4357. IntVector2 mousePosition;
  4358. bool mouseVisible;
  4359. /* readonly */
  4360. uint numJoysticks;
  4361. /* readonly */
  4362. uint numTouches;
  4363. /* readonly */
  4364. Array<bool> qualifierDown;
  4365. /* readonly */
  4366. Array<bool> qualifierPress;
  4367. /* readonly */
  4368. int qualifiers;
  4369. /* readonly */
  4370. int refs;
  4371. /* readonly */
  4372. Array<bool> scancodeDown;
  4373. /* readonly */
  4374. Array<bool> scancodePress;
  4375. Array<bool> screenJoystickVisible;
  4376. /* readonly */
  4377. bool screenKeyboardSupport;
  4378. bool screenKeyboardVisible;
  4379. bool toggleFullscreen;
  4380. bool touchEmulation;
  4381. /* readonly */
  4382. Array<TouchState> touches;
  4383. /* readonly */
  4384. StringHash type;
  4385. /* readonly */
  4386. String typeName;
  4387. /* readonly */
  4388. int weakRefs;
  4389. };
  4390. class IntRect
  4391. {
  4392. // Methods:
  4393. Intersection IsInside(const IntVector2&) const;
  4394. // Properties:
  4395. int bottom;
  4396. /* readonly */
  4397. Array<int> data;
  4398. /* readonly */
  4399. int height;
  4400. int left;
  4401. int right;
  4402. /* readonly */
  4403. IntVector2 size;
  4404. int top;
  4405. /* readonly */
  4406. int width;
  4407. };
  4408. class IntVector2
  4409. {
  4410. // Methods:
  4411. String ToString() const;
  4412. // Properties:
  4413. /* readonly */
  4414. Array<int> data;
  4415. int x;
  4416. int y;
  4417. };
  4418. class JSONFile
  4419. {
  4420. // Methods:
  4421. JSONValue CreateRoot(JSONValueType = JSON_ANY);
  4422. JSONValue GetRoot(JSONValueType = JSON_ANY);
  4423. bool Load(File);
  4424. bool Load(VectorBuffer&);
  4425. bool Save(File) const;
  4426. bool Save(VectorBuffer&) const;
  4427. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4428. // Properties:
  4429. /* readonly */
  4430. StringHash baseType;
  4431. /* readonly */
  4432. String category;
  4433. /* readonly */
  4434. uint memoryUse;
  4435. String name;
  4436. /* readonly */
  4437. int refs;
  4438. /* readonly */
  4439. StringHash type;
  4440. /* readonly */
  4441. String typeName;
  4442. /* readonly */
  4443. uint useTimer;
  4444. /* readonly */
  4445. int weakRefs;
  4446. };
  4447. class JSONValue
  4448. {
  4449. // Methods:
  4450. void AddBool(bool);
  4451. void AddColor(const Color&);
  4452. void AddFloat(float);
  4453. void AddInt(int);
  4454. void AddIntRect(const IntRect&);
  4455. void AddIntVector2(const IntVector2&);
  4456. void AddMatrix3(const Matrix3&);
  4457. void AddMatrix3x4(const Matrix3x4&);
  4458. void AddMatrix4(const Matrix4&);
  4459. void AddQuaternion(const Quaternion&);
  4460. void AddResourceRef(const ResourceRef&);
  4461. void AddResourceRefList(const ResourceRefList&);
  4462. void AddString(const String);
  4463. void AddVariant(const Variant&);
  4464. void AddVariantValue(const Variant&);
  4465. void AddVector2(const Vector2&);
  4466. void AddVector3(const Vector3&);
  4467. void AddVector4(const Vector4&);
  4468. void AddVectorVariant(const Variant&);
  4469. JSONValue CreateChild(JSONValueType = JSON_OBJECT);
  4470. JSONValue CreateChild(const String&, JSONValueType = JSON_OBJECT);
  4471. bool GetBool(const String&) const;
  4472. bool GetBool(uint) const;
  4473. JSONValue GetChild(const String&, JSONValueType = JSON_ANY) const;
  4474. JSONValue GetChild(uint, JSONValueType = JSON_ANY) const;
  4475. Array<String> GetChildNames() const;
  4476. Color GetColor(const String&) const;
  4477. Color GetColor(uint) const;
  4478. float GetFloat(const String&) const;
  4479. float GetFloat(uint) const;
  4480. int GetInt(const String&) const;
  4481. int GetInt(uint) const;
  4482. IntRect GetIntRect(const String&) const;
  4483. IntRect GetIntRect(uint) const;
  4484. IntVector2 GetIntVector2(const String&) const;
  4485. IntVector2 GetIntVector2(uint) const;
  4486. Matrix3 GetMatrix3(const String&) const;
  4487. Matrix3 GetMatrix3(uint) const;
  4488. Matrix3x4 GetMatrix3x4(const String&) const;
  4489. Matrix3x4 GetMatrix3x4(uint) const;
  4490. Matrix4 GetMatrix4(const String&) const;
  4491. Matrix4 GetMatrix4(uint) const;
  4492. Quaternion GetQuaternion(const String&) const;
  4493. Quaternion GetQuaternion(uint) const;
  4494. ResourceRef GetResourceRef(const String&) const;
  4495. ResourceRef GetResourceRef(uint) const;
  4496. ResourceRefList GetResourceRefList(const String&) const;
  4497. ResourceRefList GetResourceRefList(uint) const;
  4498. String GetString(const String&) const;
  4499. String GetString(uint) const;
  4500. Array<String> GetValueNames() const;
  4501. Variant GetVariant(const String&) const;
  4502. Variant GetVariant(uint) const;
  4503. Variant GetVariantValue(const String&, VariantType) const;
  4504. Variant GetVariantValue(uint, VariantType) const;
  4505. Vector2 GetVector2(const String&) const;
  4506. Vector2 GetVector2(uint) const;
  4507. Vector3 GetVector3(const String&) const;
  4508. Vector3 GetVector3(uint) const;
  4509. Vector4 GetVector4(const String&) const;
  4510. Vector4 GetVector4(uint) const;
  4511. Variant GetVectorVariant(const String&) const;
  4512. Variant GetVectorVariant(uint) const;
  4513. void SetBool(const String&, bool);
  4514. void SetColor(const String&, const Color&);
  4515. void SetFloat(const String&, float);
  4516. void SetInt(const String&, int);
  4517. void SetIntRect(const String&, const IntRect&);
  4518. void SetIntVector2(const String&, const IntVector2&);
  4519. void SetMatrix3(const String&, const Matrix3&);
  4520. void SetMatrix3x4(const String&, const Matrix3x4&);
  4521. void SetMatrix4(const String&, const Matrix4&);
  4522. void SetQuaternion(const String&, const Quaternion&);
  4523. void SetResourceRef(const String&, const ResourceRef&);
  4524. void SetResourceRefList(const String&, const ResourceRefList&);
  4525. void SetString(const String&, const String);
  4526. void SetVariant(const String&, const Variant&);
  4527. void SetVariantValue(const String&, const Variant&);
  4528. void SetVector2(const String&, const Vector2&);
  4529. void SetVector3(const String&, const Vector3&);
  4530. void SetVector4(const String&, const Vector4&);
  4531. void SetVectorVariant(const String&, const Variant&);
  4532. // Properties:
  4533. /* readonly */
  4534. bool isArray;
  4535. /* readonly */
  4536. bool isNull;
  4537. /* readonly */
  4538. bool isObject;
  4539. /* readonly */
  4540. bool notNull;
  4541. /* readonly */
  4542. uint size;
  4543. };
  4544. class JoystickState
  4545. {
  4546. // Properties:
  4547. /* readonly */
  4548. Array<float> axisPosition;
  4549. /* readonly */
  4550. Array<bool> buttonDown;
  4551. /* readonly */
  4552. Array<bool> buttonPress;
  4553. /* readonly */
  4554. bool controller;
  4555. /* readonly */
  4556. Array<int> hatPosition;
  4557. int joystickID;
  4558. String name;
  4559. /* readonly */
  4560. uint numAxes;
  4561. /* readonly */
  4562. uint numButtons;
  4563. /* readonly */
  4564. uint numHats;
  4565. };
  4566. class Light
  4567. {
  4568. // Methods:
  4569. void ApplyAttributes();
  4570. void DrawDebugGeometry(DebugRenderer, bool);
  4571. Variant GetAttribute(const String&) const;
  4572. ValueAnimation GetAttributeAnimation(const String&) const;
  4573. float GetAttributeAnimationSpeed(const String&) const;
  4574. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4575. Variant GetAttributeDefault(const String&) const;
  4576. bool IsInView(Camera) const;
  4577. bool Load(File, bool = false);
  4578. bool Load(VectorBuffer&, bool = false);
  4579. bool LoadXML(const XMLElement&, bool = false);
  4580. void MarkNetworkUpdate() const;
  4581. void Remove();
  4582. void RemoveInstanceDefault();
  4583. void ResetToDefault();
  4584. bool Save(File) const;
  4585. bool Save(VectorBuffer&) const;
  4586. bool SaveXML(XMLElement&) const;
  4587. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4588. bool SetAttribute(const String&, const Variant&);
  4589. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4590. void SetAttributeAnimationSpeed(const String&, float);
  4591. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4592. // Properties:
  4593. bool animationEnabled;
  4594. float aspectRatio;
  4595. /* readonly */
  4596. Array<Variant> attributeDefaults;
  4597. /* readonly */
  4598. Array<AttributeInfo> attributeInfos;
  4599. Array<Variant> attributes;
  4600. /* readonly */
  4601. StringHash baseType;
  4602. /* readonly */
  4603. BoundingBox boundingBox;
  4604. float brightness;
  4605. bool castShadows;
  4606. /* readonly */
  4607. String category;
  4608. Color color;
  4609. float drawDistance;
  4610. /* readonly */
  4611. Color effectiveColor;
  4612. /* readonly */
  4613. float effectiveSpecularIntensity;
  4614. bool enabled;
  4615. /* readonly */
  4616. bool enabledEffective;
  4617. float fadeDistance;
  4618. float fov;
  4619. /* readonly */
  4620. Frustum frustum;
  4621. /* readonly */
  4622. uint id;
  4623. /* readonly */
  4624. bool inView;
  4625. uint lightMask;
  4626. LightType lightType;
  4627. float lodBias;
  4628. uint maxLights;
  4629. /* readonly */
  4630. bool negative;
  4631. /* readonly */
  4632. Node node;
  4633. /* readonly */
  4634. uint numAttributes;
  4635. /* readonly */
  4636. int numShadowSplits;
  4637. ObjectAnimation objectAnimation;
  4638. bool occludee;
  4639. bool occluder;
  4640. bool perVertex;
  4641. Texture rampTexture;
  4642. float range;
  4643. /* readonly */
  4644. int refs;
  4645. BiasParameters shadowBias;
  4646. CascadeParameters shadowCascade;
  4647. float shadowDistance;
  4648. float shadowFadeDistance;
  4649. FocusParameters shadowFocus;
  4650. float shadowIntensity;
  4651. uint shadowMask;
  4652. float shadowNearFarRatio;
  4653. float shadowResolution;
  4654. Texture shapeTexture;
  4655. float specularIntensity;
  4656. bool temporary;
  4657. /* readonly */
  4658. StringHash type;
  4659. /* readonly */
  4660. String typeName;
  4661. uint viewMask;
  4662. /* readonly */
  4663. int weakRefs;
  4664. /* readonly */
  4665. BoundingBox worldBoundingBox;
  4666. uint zoneMask;
  4667. };
  4668. class LineEdit
  4669. {
  4670. // Methods:
  4671. void AddChild(UIElement);
  4672. void ApplyAttributes();
  4673. void BringToFront();
  4674. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4675. void DisableLayoutUpdate();
  4676. IntVector2 ElementToScreen(const IntVector2&);
  4677. void EnableLayoutUpdate();
  4678. uint FindChild(UIElement) const;
  4679. Variant GetAttribute(const String&) const;
  4680. ValueAnimation GetAttributeAnimation(const String&) const;
  4681. float GetAttributeAnimationSpeed(const String&) const;
  4682. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4683. Variant GetAttributeDefault(const String&) const;
  4684. UIElement GetChild(const String&, bool = false) const;
  4685. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  4686. Array<UIElement> GetChildren(bool = false) const;
  4687. UIElement GetElementEventSender() const;
  4688. uint GetNumChildren(bool) const;
  4689. void InsertChild(uint, UIElement);
  4690. bool IsInside(IntVector2, bool);
  4691. bool IsInsideCombined(IntVector2, bool);
  4692. bool Load(File, bool = false);
  4693. bool Load(VectorBuffer&, bool = false);
  4694. bool LoadChildXML(XMLFile, XMLFile = null);
  4695. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4696. bool LoadXML(File);
  4697. bool LoadXML(VectorBuffer&);
  4698. bool LoadXML(XMLFile, XMLFile);
  4699. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4700. bool LoadXML(const XMLElement&, bool = false);
  4701. void MarkNetworkUpdate() const;
  4702. void Remove();
  4703. void RemoveAllChildren();
  4704. void RemoveChild(UIElement, uint = 0);
  4705. void RemoveChild(uint);
  4706. void RemoveInstanceDefault();
  4707. void ResetDeepEnabled();
  4708. void ResetToDefault();
  4709. bool Save(File) const;
  4710. bool Save(VectorBuffer&) const;
  4711. bool SaveXML(File);
  4712. bool SaveXML(VectorBuffer&);
  4713. bool SaveXML(XMLElement&) const;
  4714. IntVector2 ScreenToElement(const IntVector2&);
  4715. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4716. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4717. bool SetAttribute(const String&, const Variant&);
  4718. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4719. void SetAttributeAnimationSpeed(const String&, float);
  4720. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4721. void SetDeepEnabled(bool);
  4722. void SetEnabledRecursive(bool);
  4723. void SetFixedHeight(int);
  4724. void SetFixedSize(int, int);
  4725. void SetFixedWidth(int);
  4726. void SetFullImageRect();
  4727. void SetHoverOffset(int, int);
  4728. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4729. void SetMaxSize(int, int);
  4730. void SetMinSize(int, int);
  4731. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4732. void SetPosition(int, int);
  4733. void SetSize(int, int);
  4734. bool SetStyle(const String&, XMLFile = null);
  4735. bool SetStyle(const XMLElement&);
  4736. bool SetStyleAuto(XMLFile = null);
  4737. void UpdateLayout();
  4738. const Variant& GetVar(const StringHash&);
  4739. // Properties:
  4740. bool animationEnabled;
  4741. /* readonly */
  4742. Array<Variant> attributeDefaults;
  4743. /* readonly */
  4744. Array<AttributeInfo> attributeInfos;
  4745. Array<Variant> attributes;
  4746. /* readonly */
  4747. StringHash baseType;
  4748. BlendMode blendMode;
  4749. IntRect border;
  4750. bool bringToBack;
  4751. bool bringToFront;
  4752. /* readonly */
  4753. String category;
  4754. /* readonly */
  4755. IntVector2 childOffset;
  4756. /* readonly */
  4757. Array<UIElement> children;
  4758. IntRect clipBorder;
  4759. bool clipChildren;
  4760. /* writeonly */
  4761. Color color;
  4762. /* readonly */
  4763. bool colorGradient;
  4764. Array<Color> colors;
  4765. /* readonly */
  4766. IntRect combinedScreenRect;
  4767. /* readonly */
  4768. BorderImage cursor;
  4769. float cursorBlinkRate;
  4770. bool cursorMovable;
  4771. uint cursorPosition;
  4772. XMLFile defaultStyle;
  4773. /* readonly */
  4774. float derivedOpacity;
  4775. /* readonly */
  4776. uint dragButtonCombo;
  4777. /* readonly */
  4778. int dragButtonCount;
  4779. uint dragDropMode;
  4780. uint echoCharacter;
  4781. bool editable;
  4782. bool elementEventSender;
  4783. bool enabled;
  4784. /* readonly */
  4785. bool enabledSelf;
  4786. /* readonly */
  4787. bool fixedHeight;
  4788. /* readonly */
  4789. bool fixedSize;
  4790. /* readonly */
  4791. bool fixedWidth;
  4792. bool focus;
  4793. FocusMode focusMode;
  4794. int height;
  4795. HorizontalAlignment horizontalAlignment;
  4796. IntVector2 hoverOffset;
  4797. /* readonly */
  4798. bool hovering;
  4799. IntRect imageBorder;
  4800. IntRect imageRect;
  4801. int indent;
  4802. int indentSpacing;
  4803. /* readonly */
  4804. int indentWidth;
  4805. bool internal;
  4806. IntRect layoutBorder;
  4807. Vector2 layoutFlexScale;
  4808. LayoutMode layoutMode;
  4809. int layoutSpacing;
  4810. int maxHeight;
  4811. uint maxLength;
  4812. IntVector2 maxSize;
  4813. int maxWidth;
  4814. int minHeight;
  4815. IntVector2 minSize;
  4816. int minWidth;
  4817. String name;
  4818. /* readonly */
  4819. uint numAllChildren;
  4820. /* readonly */
  4821. uint numAttributes;
  4822. /* readonly */
  4823. uint numChildren;
  4824. ObjectAnimation objectAnimation;
  4825. float opacity;
  4826. UIElement parent;
  4827. IntVector2 position;
  4828. int priority;
  4829. /* readonly */
  4830. int refs;
  4831. /* readonly */
  4832. UIElement root;
  4833. /* readonly */
  4834. IntVector2 screenPosition;
  4835. bool selected;
  4836. IntVector2 size;
  4837. bool sortChildren;
  4838. String style;
  4839. bool temporary;
  4840. String text;
  4841. bool textCopyable;
  4842. /* readonly */
  4843. Text textElement;
  4844. bool textSelectable;
  4845. Texture texture;
  4846. bool tiled;
  4847. TraversalMode traversalMode;
  4848. /* readonly */
  4849. StringHash type;
  4850. /* readonly */
  4851. String typeName;
  4852. bool useDerivedOpacity;
  4853. /* readonly */
  4854. VariantMap vars;
  4855. VerticalAlignment verticalAlignment;
  4856. bool visible;
  4857. /* readonly */
  4858. int weakRefs;
  4859. int width;
  4860. };
  4861. class ListView
  4862. {
  4863. // Methods:
  4864. void AddChild(UIElement);
  4865. void AddItem(UIElement);
  4866. void AddSelection(uint);
  4867. void ApplyAttributes();
  4868. void BringToFront();
  4869. void ChangeSelection(int, bool);
  4870. void ClearSelection();
  4871. void CopySelectedItemsToClipboard();
  4872. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4873. void DisableLayoutUpdate();
  4874. IntVector2 ElementToScreen(const IntVector2&);
  4875. void EnableLayoutUpdate();
  4876. void Expand(uint, bool, bool = false);
  4877. uint FindChild(UIElement) const;
  4878. uint FindItem(UIElement);
  4879. Variant GetAttribute(const String&) const;
  4880. ValueAnimation GetAttributeAnimation(const String&) const;
  4881. float GetAttributeAnimationSpeed(const String&) const;
  4882. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4883. Variant GetAttributeDefault(const String&) const;
  4884. UIElement GetChild(const String&, bool = false) const;
  4885. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  4886. Array<UIElement> GetChildren(bool = false) const;
  4887. UIElement GetElementEventSender() const;
  4888. Array<UIElement> GetItems() const;
  4889. uint GetNumChildren(bool) const;
  4890. void InsertChild(uint, UIElement);
  4891. void InsertItem(uint, UIElement, UIElement = null);
  4892. bool IsExpanded(uint) const;
  4893. bool IsInside(IntVector2, bool);
  4894. bool IsInsideCombined(IntVector2, bool);
  4895. bool IsSelected(uint) const;
  4896. bool Load(File, bool = false);
  4897. bool Load(VectorBuffer&, bool = false);
  4898. bool LoadChildXML(XMLFile, XMLFile = null);
  4899. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4900. bool LoadXML(File);
  4901. bool LoadXML(VectorBuffer&);
  4902. bool LoadXML(XMLFile, XMLFile);
  4903. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4904. bool LoadXML(const XMLElement&, bool = false);
  4905. void MarkNetworkUpdate() const;
  4906. void Remove();
  4907. void RemoveAllChildren();
  4908. void RemoveAllItems();
  4909. void RemoveChild(UIElement, uint = 0);
  4910. void RemoveChild(uint);
  4911. void RemoveInstanceDefault();
  4912. void RemoveItem(UIElement, uint = 0);
  4913. void RemoveItem(uint);
  4914. void RemoveSelection(uint);
  4915. void ResetDeepEnabled();
  4916. void ResetToDefault();
  4917. bool Save(File) const;
  4918. bool Save(VectorBuffer&) const;
  4919. bool SaveXML(File);
  4920. bool SaveXML(VectorBuffer&);
  4921. bool SaveXML(XMLElement&) const;
  4922. IntVector2 ScreenToElement(const IntVector2&);
  4923. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4924. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4925. bool SetAttribute(const String&, const Variant&);
  4926. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4927. void SetAttributeAnimationSpeed(const String&, float);
  4928. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4929. void SetDeepEnabled(bool);
  4930. void SetEnabledRecursive(bool);
  4931. void SetFixedHeight(int);
  4932. void SetFixedSize(int, int);
  4933. void SetFixedWidth(int);
  4934. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4935. void SetMaxSize(int, int);
  4936. void SetMinSize(int, int);
  4937. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4938. void SetPosition(int, int);
  4939. void SetScrollBarsVisible(bool, bool);
  4940. void SetSelections(Array<uint>);
  4941. void SetSize(int, int);
  4942. bool SetStyle(const String&, XMLFile = null);
  4943. bool SetStyle(const XMLElement&);
  4944. bool SetStyleAuto(XMLFile = null);
  4945. void SetViewPosition(int, int);
  4946. void ToggleExpand(uint, bool = false);
  4947. void ToggleSelection(uint);
  4948. void UpdateLayout();
  4949. const Variant& GetVar(const StringHash&);
  4950. // Properties:
  4951. bool animationEnabled;
  4952. /* readonly */
  4953. Array<Variant> attributeDefaults;
  4954. /* readonly */
  4955. Array<AttributeInfo> attributeInfos;
  4956. Array<Variant> attributes;
  4957. bool autoDisableChildren;
  4958. float autoDisableThreshold;
  4959. int baseIndent;
  4960. /* readonly */
  4961. StringHash baseType;
  4962. bool bringToBack;
  4963. bool bringToFront;
  4964. /* readonly */
  4965. String category;
  4966. /* readonly */
  4967. IntVector2 childOffset;
  4968. /* readonly */
  4969. Array<UIElement> children;
  4970. bool clearSelectionOnDefocus;
  4971. IntRect clipBorder;
  4972. bool clipChildren;
  4973. /* writeonly */
  4974. Color color;
  4975. /* readonly */
  4976. bool colorGradient;
  4977. Array<Color> colors;
  4978. /* readonly */
  4979. IntRect combinedScreenRect;
  4980. /* readonly */
  4981. UIElement contentElement;
  4982. XMLFile defaultStyle;
  4983. /* readonly */
  4984. float derivedOpacity;
  4985. /* readonly */
  4986. uint dragButtonCombo;
  4987. /* readonly */
  4988. int dragButtonCount;
  4989. uint dragDropMode;
  4990. bool editable;
  4991. bool elementEventSender;
  4992. bool enabled;
  4993. /* readonly */
  4994. bool enabledSelf;
  4995. /* readonly */
  4996. bool fixedHeight;
  4997. /* readonly */
  4998. bool fixedSize;
  4999. /* readonly */
  5000. bool fixedWidth;
  5001. bool focus;
  5002. FocusMode focusMode;
  5003. int height;
  5004. bool hierarchyMode;
  5005. HighlightMode highlightMode;
  5006. HorizontalAlignment horizontalAlignment;
  5007. /* readonly */
  5008. ScrollBar horizontalScrollBar;
  5009. /* readonly */
  5010. bool hovering;
  5011. int indent;
  5012. int indentSpacing;
  5013. /* readonly */
  5014. int indentWidth;
  5015. bool internal;
  5016. /* readonly */
  5017. Array<UIElement> items;
  5018. IntRect layoutBorder;
  5019. Vector2 layoutFlexScale;
  5020. LayoutMode layoutMode;
  5021. int layoutSpacing;
  5022. int maxHeight;
  5023. IntVector2 maxSize;
  5024. int maxWidth;
  5025. int minHeight;
  5026. IntVector2 minSize;
  5027. int minWidth;
  5028. bool multiselect;
  5029. String name;
  5030. /* readonly */
  5031. uint numAllChildren;
  5032. /* readonly */
  5033. uint numAttributes;
  5034. /* readonly */
  5035. uint numChildren;
  5036. /* readonly */
  5037. uint numItems;
  5038. ObjectAnimation objectAnimation;
  5039. float opacity;
  5040. float pageStep;
  5041. UIElement parent;
  5042. IntVector2 position;
  5043. int priority;
  5044. /* readonly */
  5045. int refs;
  5046. /* readonly */
  5047. UIElement root;
  5048. /* readonly */
  5049. IntVector2 screenPosition;
  5050. bool scrollBarsAutoVisible;
  5051. float scrollDeceleration;
  5052. /* readonly */
  5053. BorderImage scrollPanel;
  5054. float scrollSnapEpsilon;
  5055. float scrollStep;
  5056. bool selectOnClickEnd;
  5057. bool selected;
  5058. /* readonly */
  5059. UIElement selectedItem;
  5060. /* readonly */
  5061. Array<UIElement> selectedItems;
  5062. uint selection;
  5063. /* readonly */
  5064. Array<uint> selections;
  5065. IntVector2 size;
  5066. bool sortChildren;
  5067. String style;
  5068. bool temporary;
  5069. TraversalMode traversalMode;
  5070. /* readonly */
  5071. StringHash type;
  5072. /* readonly */
  5073. String typeName;
  5074. bool useDerivedOpacity;
  5075. /* readonly */
  5076. VariantMap vars;
  5077. VerticalAlignment verticalAlignment;
  5078. /* readonly */
  5079. ScrollBar verticalScrollBar;
  5080. IntVector2 viewPosition;
  5081. bool visible;
  5082. /* readonly */
  5083. int weakRefs;
  5084. int width;
  5085. };
  5086. class Log
  5087. {
  5088. // Methods:
  5089. void Close();
  5090. void Debug(const String&);
  5091. void Error(const String&);
  5092. void Info(const String&);
  5093. void Open(const String&);
  5094. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5095. void Warning(const String&);
  5096. void Write(const String&, bool = false);
  5097. // Properties:
  5098. /* readonly */
  5099. StringHash baseType;
  5100. /* readonly */
  5101. String category;
  5102. /* readonly */
  5103. String lastMessage;
  5104. int level;
  5105. bool quiet;
  5106. /* readonly */
  5107. int refs;
  5108. bool timeStamp;
  5109. /* readonly */
  5110. StringHash type;
  5111. /* readonly */
  5112. String typeName;
  5113. /* readonly */
  5114. int weakRefs;
  5115. };
  5116. class Material
  5117. {
  5118. // Methods:
  5119. Material Clone(const String& = String ( )) const;
  5120. ValueAnimation GetShaderParameterAnimation(const String&) const;
  5121. float GetShaderParameterAnimationSpeed(const String&) const;
  5122. WrapMode GetShaderParameterAnimationWrapMode(const String&) const;
  5123. bool Load(File);
  5124. bool Load(VectorBuffer&);
  5125. bool Load(const XMLElement&);
  5126. void RemoveShaderParameter(const String&);
  5127. bool Save(File) const;
  5128. bool Save(VectorBuffer&) const;
  5129. bool Save(XMLElement&) const;
  5130. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5131. void SetShaderParameterAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5132. void SetShaderParameterAnimationSpeed(const String&, float);
  5133. void SetShaderParameterAnimationWrapMode(const String&, WrapMode);
  5134. void SetTechnique(uint, Technique, uint = 0, float = 0.0);
  5135. void SetUVTransform(const Vector2&, float, const Vector2&);
  5136. void SetUVTransform(const Vector2&, float, float);
  5137. void SortTechniques();
  5138. // Properties:
  5139. /* readonly */
  5140. StringHash baseType;
  5141. /* readonly */
  5142. String category;
  5143. CullMode cullMode;
  5144. BiasParameters depthBias;
  5145. /* readonly */
  5146. uint memoryUse;
  5147. String name;
  5148. uint numTechniques;
  5149. /* readonly */
  5150. uint numUsedTextureUnits;
  5151. /* readonly */
  5152. bool occlusion;
  5153. /* readonly */
  5154. int refs;
  5155. Scene scene;
  5156. /* readonly */
  5157. Array<String> shaderParameterNames;
  5158. Array<Variant> shaderParameters;
  5159. CullMode shadowCullMode;
  5160. /* readonly */
  5161. Array<TechniqueEntry> techniqueEntries;
  5162. /* readonly */
  5163. Array<Technique> techniques;
  5164. Array<Texture> textures;
  5165. /* readonly */
  5166. StringHash type;
  5167. /* readonly */
  5168. String typeName;
  5169. /* readonly */
  5170. uint useTimer;
  5171. /* readonly */
  5172. int weakRefs;
  5173. };
  5174. class Matrix3
  5175. {
  5176. // Methods:
  5177. bool Equals(const Matrix3&) const;
  5178. Matrix3 Inverse() const;
  5179. Vector3 Scale() const;
  5180. Matrix3 Scaled(const Vector3&) const;
  5181. void SetScale(const Vector3&);
  5182. void SetScale(float);
  5183. String ToString() const;
  5184. Matrix3 Transpose() const;
  5185. // Properties:
  5186. float m00;
  5187. float m01;
  5188. float m02;
  5189. float m10;
  5190. float m11;
  5191. float m12;
  5192. float m20;
  5193. float m21;
  5194. float m22;
  5195. };
  5196. class Matrix3x4
  5197. {
  5198. // Methods:
  5199. void Decompose(Vector3&, Quaternion&, Vector3&) const;
  5200. bool Equals(const Matrix3x4&) const;
  5201. Matrix3x4 Inverse() const;
  5202. Quaternion Rotation() const;
  5203. Matrix3 RotationMatrix() const;
  5204. Vector3 Scale() const;
  5205. void SetRotation(const Matrix3&);
  5206. void SetScale(const Vector3&);
  5207. void SetScale(float);
  5208. void SetTranslation(const Vector3&);
  5209. Matrix3 ToMatrix3() const;
  5210. Matrix4 ToMatrix4() const;
  5211. String ToString() const;
  5212. Vector3 Translation() const;
  5213. // Properties:
  5214. float m00;
  5215. float m01;
  5216. float m02;
  5217. float m03;
  5218. float m10;
  5219. float m11;
  5220. float m12;
  5221. float m13;
  5222. float m20;
  5223. float m21;
  5224. float m22;
  5225. float m23;
  5226. };
  5227. class Matrix4
  5228. {
  5229. // Methods:
  5230. void Decompose(Vector3&, Quaternion&, Vector3&) const;
  5231. bool Equals(const Matrix4&) const;
  5232. Matrix4 Inverse() const;
  5233. Quaternion Rotation() const;
  5234. Matrix3 RotationMatrix() const;
  5235. Vector3 Scale() const;
  5236. void SetRotation(const Matrix3&);
  5237. void SetScale(const Vector3&);
  5238. void SetScale(float);
  5239. void SetTranslation(const Vector3&);
  5240. Matrix3 ToMatrix3() const;
  5241. String ToString() const;
  5242. Vector3 Translation() const;
  5243. Matrix4 Transpose() const;
  5244. // Properties:
  5245. float m00;
  5246. float m01;
  5247. float m02;
  5248. float m03;
  5249. float m10;
  5250. float m11;
  5251. float m12;
  5252. float m13;
  5253. float m20;
  5254. float m21;
  5255. float m22;
  5256. float m23;
  5257. float m30;
  5258. float m31;
  5259. float m32;
  5260. float m33;
  5261. };
  5262. class Menu
  5263. {
  5264. // Methods:
  5265. void AddChild(UIElement);
  5266. void ApplyAttributes();
  5267. void BringToFront();
  5268. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  5269. void DisableLayoutUpdate();
  5270. IntVector2 ElementToScreen(const IntVector2&);
  5271. void EnableLayoutUpdate();
  5272. uint FindChild(UIElement) const;
  5273. Variant GetAttribute(const String&) const;
  5274. ValueAnimation GetAttributeAnimation(const String&) const;
  5275. float GetAttributeAnimationSpeed(const String&) const;
  5276. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5277. Variant GetAttributeDefault(const String&) const;
  5278. UIElement GetChild(const String&, bool = false) const;
  5279. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  5280. Array<UIElement> GetChildren(bool = false) const;
  5281. UIElement GetElementEventSender() const;
  5282. uint GetNumChildren(bool) const;
  5283. void InsertChild(uint, UIElement);
  5284. bool IsInside(IntVector2, bool);
  5285. bool IsInsideCombined(IntVector2, bool);
  5286. bool Load(File, bool = false);
  5287. bool Load(VectorBuffer&, bool = false);
  5288. bool LoadChildXML(XMLFile, XMLFile = null);
  5289. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  5290. bool LoadXML(File);
  5291. bool LoadXML(VectorBuffer&);
  5292. bool LoadXML(XMLFile, XMLFile);
  5293. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  5294. bool LoadXML(const XMLElement&, bool = false);
  5295. void MarkNetworkUpdate() const;
  5296. void Remove();
  5297. void RemoveAllChildren();
  5298. void RemoveChild(UIElement, uint = 0);
  5299. void RemoveChild(uint);
  5300. void RemoveInstanceDefault();
  5301. void ResetDeepEnabled();
  5302. void ResetToDefault();
  5303. bool Save(File) const;
  5304. bool Save(VectorBuffer&) const;
  5305. bool SaveXML(File);
  5306. bool SaveXML(VectorBuffer&);
  5307. bool SaveXML(XMLElement&) const;
  5308. IntVector2 ScreenToElement(const IntVector2&);
  5309. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5310. void SetAccelerator(int, int);
  5311. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  5312. bool SetAttribute(const String&, const Variant&);
  5313. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5314. void SetAttributeAnimationSpeed(const String&, float);
  5315. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5316. void SetDeepEnabled(bool);
  5317. void SetEnabledRecursive(bool);
  5318. void SetFixedHeight(int);
  5319. void SetFixedSize(int, int);
  5320. void SetFixedWidth(int);
  5321. void SetFullImageRect();
  5322. void SetHoverOffset(int, int);
  5323. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  5324. void SetMaxSize(int, int);
  5325. void SetMinSize(int, int);
  5326. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  5327. void SetPopupOffset(int, int);
  5328. void SetPosition(int, int);
  5329. void SetPressedChildOffset(int, int);
  5330. void SetPressedOffset(int, int);
  5331. void SetRepeat(float, float);
  5332. void SetSize(int, int);
  5333. bool SetStyle(const String&, XMLFile = null);
  5334. bool SetStyle(const XMLElement&);
  5335. bool SetStyleAuto(XMLFile = null);
  5336. void UpdateLayout();
  5337. const Variant& GetVar(const StringHash&);
  5338. // Properties:
  5339. /* readonly */
  5340. int acceleratorKey;
  5341. /* readonly */
  5342. int acceleratorQualifiers;
  5343. bool animationEnabled;
  5344. /* readonly */
  5345. Array<Variant> attributeDefaults;
  5346. /* readonly */
  5347. Array<AttributeInfo> attributeInfos;
  5348. Array<Variant> attributes;
  5349. /* readonly */
  5350. StringHash baseType;
  5351. BlendMode blendMode;
  5352. IntRect border;
  5353. bool bringToBack;
  5354. bool bringToFront;
  5355. /* readonly */
  5356. String category;
  5357. /* readonly */
  5358. IntVector2 childOffset;
  5359. /* readonly */
  5360. Array<UIElement> children;
  5361. IntRect clipBorder;
  5362. bool clipChildren;
  5363. /* writeonly */
  5364. Color color;
  5365. /* readonly */
  5366. bool colorGradient;
  5367. Array<Color> colors;
  5368. /* readonly */
  5369. IntRect combinedScreenRect;
  5370. XMLFile defaultStyle;
  5371. /* readonly */
  5372. float derivedOpacity;
  5373. /* readonly */
  5374. uint dragButtonCombo;
  5375. /* readonly */
  5376. int dragButtonCount;
  5377. uint dragDropMode;
  5378. bool editable;
  5379. bool elementEventSender;
  5380. bool enabled;
  5381. /* readonly */
  5382. bool enabledSelf;
  5383. /* readonly */
  5384. bool fixedHeight;
  5385. /* readonly */
  5386. bool fixedSize;
  5387. /* readonly */
  5388. bool fixedWidth;
  5389. bool focus;
  5390. FocusMode focusMode;
  5391. int height;
  5392. HorizontalAlignment horizontalAlignment;
  5393. IntVector2 hoverOffset;
  5394. /* readonly */
  5395. bool hovering;
  5396. IntRect imageBorder;
  5397. IntRect imageRect;
  5398. int indent;
  5399. int indentSpacing;
  5400. /* readonly */
  5401. int indentWidth;
  5402. bool internal;
  5403. IntRect layoutBorder;
  5404. Vector2 layoutFlexScale;
  5405. LayoutMode layoutMode;
  5406. int layoutSpacing;
  5407. int maxHeight;
  5408. IntVector2 maxSize;
  5409. int maxWidth;
  5410. int minHeight;
  5411. IntVector2 minSize;
  5412. int minWidth;
  5413. String name;
  5414. /* readonly */
  5415. uint numAllChildren;
  5416. /* readonly */
  5417. uint numAttributes;
  5418. /* readonly */
  5419. uint numChildren;
  5420. ObjectAnimation objectAnimation;
  5421. float opacity;
  5422. UIElement parent;
  5423. UIElement popup;
  5424. IntVector2 popupOffset;
  5425. IntVector2 position;
  5426. /* readonly */
  5427. bool pressed;
  5428. IntVector2 pressedChildOffset;
  5429. IntVector2 pressedOffset;
  5430. int priority;
  5431. /* readonly */
  5432. int refs;
  5433. float repeatDelay;
  5434. float repeatRate;
  5435. /* readonly */
  5436. UIElement root;
  5437. /* readonly */
  5438. IntVector2 screenPosition;
  5439. bool selected;
  5440. bool showPopup;
  5441. IntVector2 size;
  5442. bool sortChildren;
  5443. String style;
  5444. bool temporary;
  5445. Texture texture;
  5446. bool tiled;
  5447. TraversalMode traversalMode;
  5448. /* readonly */
  5449. StringHash type;
  5450. /* readonly */
  5451. String typeName;
  5452. bool useDerivedOpacity;
  5453. /* readonly */
  5454. VariantMap vars;
  5455. VerticalAlignment verticalAlignment;
  5456. bool visible;
  5457. /* readonly */
  5458. int weakRefs;
  5459. int width;
  5460. };
  5461. class MessageBox
  5462. {
  5463. // Methods:
  5464. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5465. // Properties:
  5466. /* readonly */
  5467. StringHash baseType;
  5468. /* readonly */
  5469. String category;
  5470. String message;
  5471. /* readonly */
  5472. int refs;
  5473. String title;
  5474. /* readonly */
  5475. StringHash type;
  5476. /* readonly */
  5477. String typeName;
  5478. /* readonly */
  5479. int weakRefs;
  5480. /* readonly */
  5481. UIElement window;
  5482. };
  5483. class Model
  5484. {
  5485. // Methods:
  5486. Model Clone(const String& = String ( )) const;
  5487. bool Load(File);
  5488. bool Load(VectorBuffer&);
  5489. bool Save(File) const;
  5490. bool Save(VectorBuffer&) const;
  5491. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5492. // Properties:
  5493. /* readonly */
  5494. StringHash baseType;
  5495. /* readonly */
  5496. BoundingBox boundingBox;
  5497. /* readonly */
  5498. String category;
  5499. /* readonly */
  5500. uint memoryUse;
  5501. String name;
  5502. /* readonly */
  5503. uint numGeometries;
  5504. /* readonly */
  5505. Array<uint> numGeometryLodLevels;
  5506. /* readonly */
  5507. uint numMorphs;
  5508. /* readonly */
  5509. int refs;
  5510. /* readonly */
  5511. Skeleton skeleton;
  5512. /* readonly */
  5513. StringHash type;
  5514. /* readonly */
  5515. String typeName;
  5516. /* readonly */
  5517. uint useTimer;
  5518. /* readonly */
  5519. int weakRefs;
  5520. };
  5521. class Navigable
  5522. {
  5523. // Methods:
  5524. void ApplyAttributes();
  5525. void DrawDebugGeometry(DebugRenderer, bool);
  5526. Variant GetAttribute(const String&) const;
  5527. ValueAnimation GetAttributeAnimation(const String&) const;
  5528. float GetAttributeAnimationSpeed(const String&) const;
  5529. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5530. Variant GetAttributeDefault(const String&) const;
  5531. bool Load(File, bool = false);
  5532. bool Load(VectorBuffer&, bool = false);
  5533. bool LoadXML(const XMLElement&, bool = false);
  5534. void MarkNetworkUpdate() const;
  5535. void Remove();
  5536. void RemoveInstanceDefault();
  5537. void ResetToDefault();
  5538. bool Save(File) const;
  5539. bool Save(VectorBuffer&) const;
  5540. bool SaveXML(XMLElement&) const;
  5541. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5542. bool SetAttribute(const String&, const Variant&);
  5543. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5544. void SetAttributeAnimationSpeed(const String&, float);
  5545. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5546. // Properties:
  5547. bool animationEnabled;
  5548. /* readonly */
  5549. Array<Variant> attributeDefaults;
  5550. /* readonly */
  5551. Array<AttributeInfo> attributeInfos;
  5552. Array<Variant> attributes;
  5553. /* readonly */
  5554. StringHash baseType;
  5555. /* readonly */
  5556. String category;
  5557. bool enabled;
  5558. /* readonly */
  5559. bool enabledEffective;
  5560. /* readonly */
  5561. uint id;
  5562. /* readonly */
  5563. Node node;
  5564. /* readonly */
  5565. uint numAttributes;
  5566. ObjectAnimation objectAnimation;
  5567. bool recursive;
  5568. /* readonly */
  5569. int refs;
  5570. bool temporary;
  5571. /* readonly */
  5572. StringHash type;
  5573. /* readonly */
  5574. String typeName;
  5575. /* readonly */
  5576. int weakRefs;
  5577. };
  5578. class NavigationMesh
  5579. {
  5580. // Methods:
  5581. void ApplyAttributes();
  5582. bool Build();
  5583. bool Build(const BoundingBox&);
  5584. void DrawDebugGeometry(DebugRenderer, bool);
  5585. void DrawDebugGeometry(bool);
  5586. Vector3 FindNearestPoint(const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  5587. Array<Vector3> FindPath(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  5588. Variant GetAttribute(const String&) const;
  5589. ValueAnimation GetAttributeAnimation(const String&) const;
  5590. float GetAttributeAnimationSpeed(const String&) const;
  5591. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5592. Variant GetAttributeDefault(const String&) const;
  5593. float GetDistanceToWall(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  5594. Vector3 GetRandomPoint();
  5595. Vector3 GetRandomPointInCircle(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  5596. bool Load(File, bool = false);
  5597. bool Load(VectorBuffer&, bool = false);
  5598. bool LoadXML(const XMLElement&, bool = false);
  5599. void MarkNetworkUpdate() const;
  5600. Vector3 MoveAlongSurface(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ), uint = 3);
  5601. Vector3 Raycast(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  5602. void Remove();
  5603. void RemoveInstanceDefault();
  5604. void ResetToDefault();
  5605. bool Save(File) const;
  5606. bool Save(VectorBuffer&) const;
  5607. bool SaveXML(XMLElement&) const;
  5608. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5609. bool SetAttribute(const String&, const Variant&);
  5610. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5611. void SetAttributeAnimationSpeed(const String&, float);
  5612. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5613. // Properties:
  5614. float agentHeight;
  5615. float agentMaxClimb;
  5616. float agentMaxSlope;
  5617. float agentRadius;
  5618. bool animationEnabled;
  5619. /* readonly */
  5620. Array<Variant> attributeDefaults;
  5621. /* readonly */
  5622. Array<AttributeInfo> attributeInfos;
  5623. Array<Variant> attributes;
  5624. /* readonly */
  5625. StringHash baseType;
  5626. /* readonly */
  5627. BoundingBox boundingBox;
  5628. /* readonly */
  5629. String category;
  5630. float cellHeight;
  5631. float cellSize;
  5632. float detailSampleDistance;
  5633. float detailSampleMaxError;
  5634. float edgeMaxError;
  5635. float edgeMaxLength;
  5636. bool enabled;
  5637. /* readonly */
  5638. bool enabledEffective;
  5639. /* readonly */
  5640. uint id;
  5641. /* readonly */
  5642. bool initialized;
  5643. /* readonly */
  5644. Node node;
  5645. /* readonly */
  5646. uint numAttributes;
  5647. /* readonly */
  5648. IntVector2 numTiles;
  5649. ObjectAnimation objectAnimation;
  5650. Vector3 padding;
  5651. /* readonly */
  5652. int refs;
  5653. float regionMergeSize;
  5654. float regionMinSize;
  5655. bool temporary;
  5656. int tileSize;
  5657. /* readonly */
  5658. StringHash type;
  5659. /* readonly */
  5660. String typeName;
  5661. /* readonly */
  5662. int weakRefs;
  5663. /* readonly */
  5664. BoundingBox worldBoundingBox;
  5665. };
  5666. class Network
  5667. {
  5668. // Methods:
  5669. void BroadcastMessage(int, bool, bool, const VectorBuffer&, uint = 0);
  5670. void BroadcastRemoteEvent(Node, const String&, bool, const VariantMap& = VariantMap ( ));
  5671. void BroadcastRemoteEvent(Scene, const String&, bool, const VariantMap& = VariantMap ( ));
  5672. void BroadcastRemoteEvent(const String&, bool, const VariantMap& = VariantMap ( ));
  5673. bool CheckRemoteEvent(const String&) const;
  5674. bool Connect(const String&, uint16, Scene, const VariantMap& = VariantMap ( ));
  5675. void Disconnect(int = 0);
  5676. HttpRequest MakeHttpRequest(const String&, const String& = String ( ), Array<String> = null, const String& = String ( ));
  5677. void RegisterRemoteEvent(const String&) const;
  5678. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5679. void SendPackageToClients(Scene, PackageFile);
  5680. bool StartServer(uint16);
  5681. void StopServer();
  5682. void UnregisterAllRemoteEvents();
  5683. void UnregisterRemoteEvent(const String&) const;
  5684. // Properties:
  5685. /* readonly */
  5686. StringHash baseType;
  5687. /* readonly */
  5688. String category;
  5689. /* readonly */
  5690. Array<Connection> clientConnections;
  5691. String packageCacheDir;
  5692. /* readonly */
  5693. int refs;
  5694. /* readonly */
  5695. Connection serverConnection;
  5696. /* readonly */
  5697. bool serverRunning;
  5698. /* readonly */
  5699. StringHash type;
  5700. /* readonly */
  5701. String typeName;
  5702. int updateFps;
  5703. /* readonly */
  5704. int weakRefs;
  5705. };
  5706. class NetworkPriority
  5707. {
  5708. // Methods:
  5709. void ApplyAttributes();
  5710. void DrawDebugGeometry(DebugRenderer, bool);
  5711. Variant GetAttribute(const String&) const;
  5712. ValueAnimation GetAttributeAnimation(const String&) const;
  5713. float GetAttributeAnimationSpeed(const String&) const;
  5714. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5715. Variant GetAttributeDefault(const String&) const;
  5716. bool Load(File, bool = false);
  5717. bool Load(VectorBuffer&, bool = false);
  5718. bool LoadXML(const XMLElement&, bool = false);
  5719. void MarkNetworkUpdate() const;
  5720. void Remove();
  5721. void RemoveInstanceDefault();
  5722. void ResetToDefault();
  5723. bool Save(File) const;
  5724. bool Save(VectorBuffer&) const;
  5725. bool SaveXML(XMLElement&) const;
  5726. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5727. bool SetAttribute(const String&, const Variant&);
  5728. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5729. void SetAttributeAnimationSpeed(const String&, float);
  5730. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5731. // Properties:
  5732. bool alwaysUpdateOwner;
  5733. bool animationEnabled;
  5734. /* readonly */
  5735. Array<Variant> attributeDefaults;
  5736. /* readonly */
  5737. Array<AttributeInfo> attributeInfos;
  5738. Array<Variant> attributes;
  5739. float basePriority;
  5740. /* readonly */
  5741. StringHash baseType;
  5742. /* readonly */
  5743. String category;
  5744. float distanceFactor;
  5745. bool enabled;
  5746. /* readonly */
  5747. bool enabledEffective;
  5748. /* readonly */
  5749. uint id;
  5750. float minPriority;
  5751. /* readonly */
  5752. Node node;
  5753. /* readonly */
  5754. uint numAttributes;
  5755. ObjectAnimation objectAnimation;
  5756. /* readonly */
  5757. int refs;
  5758. bool temporary;
  5759. /* readonly */
  5760. StringHash type;
  5761. /* readonly */
  5762. String typeName;
  5763. /* readonly */
  5764. int weakRefs;
  5765. };
  5766. class Node
  5767. {
  5768. // Methods:
  5769. void AddChild(Node, uint = M_MAX_UNSIGNED);
  5770. void ApplyAttributes();
  5771. Node Clone(CreateMode = REPLICATED);
  5772. Component CloneComponent(Component, CreateMode, uint = 0);
  5773. Component CloneComponent(Component, uint = 0);
  5774. Node CreateChild(const String& = String ( ), CreateMode = REPLICATED, uint = 0);
  5775. Component CreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  5776. ScriptObject CreateScriptObject(ScriptFile, const String&, CreateMode = REPLICATED);
  5777. ScriptObject CreateScriptObject(const String&, const String&, CreateMode = REPLICATED);
  5778. Variant GetAttribute(const String&) const;
  5779. ValueAnimation GetAttributeAnimation(const String&) const;
  5780. float GetAttributeAnimationSpeed(const String&) const;
  5781. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5782. Variant GetAttributeDefault(const String&) const;
  5783. Node GetChild(const String&, bool = false) const;
  5784. Array<Node> GetChildren(bool = false) const;
  5785. Array<Node> GetChildrenWithComponent(const String&, bool = false) const;
  5786. Array<Node> GetChildrenWithScript(bool = false) const;
  5787. Array<Node> GetChildrenWithScript(const String&, bool = false) const;
  5788. Component GetComponent(const String&) const;
  5789. Array<Component> GetComponents() const;
  5790. Array<Component> GetComponents(const String&, bool = false) const;
  5791. Component GetOrCreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  5792. ScriptObject GetScriptObject() const;
  5793. ScriptObject GetScriptObject(const String&) const;
  5794. bool HasComponent(const String&) const;
  5795. bool Load(File, bool = false);
  5796. bool Load(VectorBuffer&, bool = false);
  5797. bool LoadXML(const XMLElement&, bool = false);
  5798. Vector3 LocalToWorld(const Vector3&) const;
  5799. Vector3 LocalToWorld(const Vector4&) const;
  5800. Vector2 LocalToWorld2D(const Vector2&) const;
  5801. bool LookAt(const Vector3&, const Vector3& = Vector3 ( 0 , 1 , 0 ), TransformSpace = TS_WORLD);
  5802. void MarkNetworkUpdate() const;
  5803. void Pitch(float, TransformSpace = TS_LOCAL);
  5804. void Remove();
  5805. void RemoveAllChildren();
  5806. void RemoveAllComponents();
  5807. void RemoveChild(Node);
  5808. void RemoveChildren(bool, bool, bool);
  5809. void RemoveComponent(Component);
  5810. void RemoveComponent(const String&);
  5811. void RemoveComponents(bool, bool);
  5812. void RemoveInstanceDefault();
  5813. void ResetDeepEnabled();
  5814. void ResetToDefault();
  5815. void Roll(float, TransformSpace = TS_LOCAL);
  5816. void Rotate(const Quaternion&, TransformSpace = TS_LOCAL);
  5817. void Rotate2D(float, TransformSpace = TS_LOCAL);
  5818. void RotateAround(const Vector3&, const Quaternion&, TransformSpace = TS_LOCAL);
  5819. void RotateAround2D(const Vector2&, float, TransformSpace = TS_LOCAL);
  5820. bool Save(File) const;
  5821. bool Save(VectorBuffer&) const;
  5822. bool SaveXML(File);
  5823. bool SaveXML(VectorBuffer&);
  5824. bool SaveXML(XMLElement&) const;
  5825. void Scale(const Vector3&);
  5826. void Scale(float);
  5827. void Scale2D(const Vector2&);
  5828. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5829. bool SetAttribute(const String&, const Variant&);
  5830. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5831. void SetAttributeAnimationSpeed(const String&, float);
  5832. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5833. void SetDeepEnabled(bool);
  5834. void SetEnabledRecursive(bool);
  5835. void SetPosition2D(float, float);
  5836. void SetScale(float);
  5837. void SetScale2D(float, float);
  5838. void SetTransform(const Vector3&, const Quaternion&);
  5839. void SetTransform(const Vector3&, const Quaternion&, const Vector3&);
  5840. void SetTransform(const Vector3&, const Quaternion&, float);
  5841. void SetTransform2D(const Vector2&, float);
  5842. void SetTransform2D(const Vector2&, float, const Vector2&);
  5843. void SetTransform2D(const Vector2&, float, float);
  5844. void SetWorldTransform(const Vector3&, const Quaternion&);
  5845. void SetWorldTransform(const Vector3&, const Quaternion&, const Vector3&);
  5846. void SetWorldTransform(const Vector3&, const Quaternion&, float);
  5847. void SetWorldTransform2D(const Vector2&, float);
  5848. void SetWorldTransform2D(const Vector2&, float, const Vector2&);
  5849. void SetWorldTransform2D(const Vector2&, float, float);
  5850. void Translate(const Vector3&, TransformSpace = TS_LOCAL);
  5851. void Translate2D(const Vector2&, TransformSpace = TS_LOCAL);
  5852. Vector3 WorldToLocal(const Vector3&) const;
  5853. Vector3 WorldToLocal(const Vector4&) const;
  5854. Vector2 WorldToLocal2D(const Vector2&) const;
  5855. void Yaw(float, TransformSpace = TS_LOCAL);
  5856. // Properties:
  5857. bool animationEnabled;
  5858. /* readonly */
  5859. Array<Variant> attributeDefaults;
  5860. /* readonly */
  5861. Array<AttributeInfo> attributeInfos;
  5862. Array<Variant> attributes;
  5863. /* readonly */
  5864. StringHash baseType;
  5865. /* readonly */
  5866. String category;
  5867. /* readonly */
  5868. Array<Node> children;
  5869. /* readonly */
  5870. Array<Component> components;
  5871. Vector3 direction;
  5872. bool enabled;
  5873. /* readonly */
  5874. bool enabledSelf;
  5875. /* readonly */
  5876. uint id;
  5877. String name;
  5878. /* readonly */
  5879. uint numAllChildren;
  5880. /* readonly */
  5881. uint numAttributes;
  5882. /* readonly */
  5883. uint numChildren;
  5884. /* readonly */
  5885. uint numComponents;
  5886. ObjectAnimation objectAnimation;
  5887. Connection owner;
  5888. Node parent;
  5889. Vector3 position;
  5890. Vector2 position2D;
  5891. /* readonly */
  5892. int refs;
  5893. /* readonly */
  5894. Vector3 right;
  5895. Quaternion rotation;
  5896. float rotation2D;
  5897. Vector3 scale;
  5898. Vector2 scale2D;
  5899. /* readonly */
  5900. Scene scene;
  5901. /* readonly */
  5902. ScriptObject scriptObject;
  5903. bool temporary;
  5904. /* readonly */
  5905. Matrix3x4 transform;
  5906. /* readonly */
  5907. StringHash type;
  5908. /* readonly */
  5909. String typeName;
  5910. /* readonly */
  5911. Vector3 up;
  5912. /* readonly */
  5913. VariantMap vars;
  5914. /* readonly */
  5915. int weakRefs;
  5916. Vector3 worldDirection;
  5917. Vector3 worldPosition;
  5918. Vector2 worldPosition2D;
  5919. /* readonly */
  5920. Vector3 worldRight;
  5921. Quaternion worldRotation;
  5922. float worldRotation2D;
  5923. Vector3 worldScale;
  5924. Vector2 worldScale2D;
  5925. /* readonly */
  5926. Matrix3x4 worldTransform;
  5927. /* readonly */
  5928. Vector3 worldUp;
  5929. };
  5930. class Object
  5931. {
  5932. // Methods:
  5933. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5934. // Properties:
  5935. /* readonly */
  5936. StringHash baseType;
  5937. /* readonly */
  5938. String category;
  5939. /* readonly */
  5940. int refs;
  5941. /* readonly */
  5942. StringHash type;
  5943. /* readonly */
  5944. String typeName;
  5945. /* readonly */
  5946. int weakRefs;
  5947. };
  5948. class ObjectAnimation
  5949. {
  5950. // Methods:
  5951. void AddAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5952. ValueAnimation GetAttributeAnimation(const String&) const;
  5953. float GetAttributeAnimationSpeed(const String&) const;
  5954. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5955. bool Load(File);
  5956. bool Load(VectorBuffer&);
  5957. void RemoveAttributeAnimation(ValueAnimation);
  5958. void RemoveAttributeAnimation(const String&);
  5959. bool Save(File) const;
  5960. bool Save(VectorBuffer&) const;
  5961. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5962. // Properties:
  5963. /* readonly */
  5964. Array<Variant> attributeAnimations;
  5965. /* readonly */
  5966. StringHash baseType;
  5967. /* readonly */
  5968. String category;
  5969. /* readonly */
  5970. uint memoryUse;
  5971. String name;
  5972. /* readonly */
  5973. int refs;
  5974. /* readonly */
  5975. Array<Variant> speeds;
  5976. /* readonly */
  5977. StringHash type;
  5978. /* readonly */
  5979. String typeName;
  5980. /* readonly */
  5981. uint useTimer;
  5982. /* readonly */
  5983. int weakRefs;
  5984. /* readonly */
  5985. Array<Variant> wrapModes;
  5986. };
  5987. class Octree
  5988. {
  5989. // Methods:
  5990. void AddManualDrawable(Drawable);
  5991. void ApplyAttributes();
  5992. void DrawDebugGeometry(DebugRenderer, bool);
  5993. void DrawDebugGeometry(bool) const;
  5994. Variant GetAttribute(const String&) const;
  5995. ValueAnimation GetAttributeAnimation(const String&) const;
  5996. float GetAttributeAnimationSpeed(const String&) const;
  5997. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5998. Variant GetAttributeDefault(const String&) const;
  5999. Array<Node> GetDrawables(const BoundingBox&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  6000. Array<Node> GetDrawables(const Frustum&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  6001. Array<Node> GetDrawables(const Sphere&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  6002. Array<Node> GetDrawables(const Vector3&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  6003. bool Load(File, bool = false);
  6004. bool Load(VectorBuffer&, bool = false);
  6005. bool LoadXML(const XMLElement&, bool = false);
  6006. void MarkNetworkUpdate() const;
  6007. Array<RayQueryResult> Raycast(const Ray&, RayQueryLevel = RAY_TRIANGLE, float = M_INFINITY, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK) const;
  6008. RayQueryResult RaycastSingle(const Ray&, RayQueryLevel = RAY_TRIANGLE, float = M_INFINITY, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK) const;
  6009. void Remove();
  6010. void RemoveInstanceDefault();
  6011. void RemoveManualDrawable(Drawable);
  6012. void ResetToDefault();
  6013. bool Save(File) const;
  6014. bool Save(VectorBuffer&) const;
  6015. bool SaveXML(XMLElement&) const;
  6016. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6017. bool SetAttribute(const String&, const Variant&);
  6018. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6019. void SetAttributeAnimationSpeed(const String&, float);
  6020. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6021. void SetSize(const BoundingBox&, uint);
  6022. // Properties:
  6023. bool animationEnabled;
  6024. /* readonly */
  6025. Array<Variant> attributeDefaults;
  6026. /* readonly */
  6027. Array<AttributeInfo> attributeInfos;
  6028. Array<Variant> attributes;
  6029. /* readonly */
  6030. StringHash baseType;
  6031. /* readonly */
  6032. String category;
  6033. bool enabled;
  6034. /* readonly */
  6035. bool enabledEffective;
  6036. /* readonly */
  6037. uint id;
  6038. /* readonly */
  6039. Node node;
  6040. /* readonly */
  6041. uint numAttributes;
  6042. /* readonly */
  6043. uint numLevels;
  6044. ObjectAnimation objectAnimation;
  6045. /* readonly */
  6046. int refs;
  6047. bool temporary;
  6048. /* readonly */
  6049. StringHash type;
  6050. /* readonly */
  6051. String typeName;
  6052. /* readonly */
  6053. int weakRefs;
  6054. /* readonly */
  6055. BoundingBox worldBoundingBox;
  6056. };
  6057. class OffMeshConnection
  6058. {
  6059. // Methods:
  6060. void ApplyAttributes();
  6061. void DrawDebugGeometry(DebugRenderer, bool);
  6062. Variant GetAttribute(const String&) const;
  6063. ValueAnimation GetAttributeAnimation(const String&) const;
  6064. float GetAttributeAnimationSpeed(const String&) const;
  6065. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6066. Variant GetAttributeDefault(const String&) const;
  6067. bool Load(File, bool = false);
  6068. bool Load(VectorBuffer&, bool = false);
  6069. bool LoadXML(const XMLElement&, bool = false);
  6070. void MarkNetworkUpdate() const;
  6071. void Remove();
  6072. void RemoveInstanceDefault();
  6073. void ResetToDefault();
  6074. bool Save(File) const;
  6075. bool Save(VectorBuffer&) const;
  6076. bool SaveXML(XMLElement&) const;
  6077. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6078. bool SetAttribute(const String&, const Variant&);
  6079. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6080. void SetAttributeAnimationSpeed(const String&, float);
  6081. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6082. // Properties:
  6083. bool animationEnabled;
  6084. /* readonly */
  6085. Array<Variant> attributeDefaults;
  6086. /* readonly */
  6087. Array<AttributeInfo> attributeInfos;
  6088. Array<Variant> attributes;
  6089. /* readonly */
  6090. StringHash baseType;
  6091. bool bidirectional;
  6092. /* readonly */
  6093. String category;
  6094. bool enabled;
  6095. /* readonly */
  6096. bool enabledEffective;
  6097. Node endPoint;
  6098. /* readonly */
  6099. uint id;
  6100. /* readonly */
  6101. Node node;
  6102. /* readonly */
  6103. uint numAttributes;
  6104. ObjectAnimation objectAnimation;
  6105. float radius;
  6106. /* readonly */
  6107. int refs;
  6108. bool temporary;
  6109. /* readonly */
  6110. StringHash type;
  6111. /* readonly */
  6112. String typeName;
  6113. /* readonly */
  6114. int weakRefs;
  6115. };
  6116. class PackageFile
  6117. {
  6118. // Methods:
  6119. bool Exists(const String&) const;
  6120. Array<String> GetEntryNames() const;
  6121. bool Open(const String&, uint = 0) const;
  6122. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6123. bool compressed() const;
  6124. // Properties:
  6125. /* readonly */
  6126. StringHash baseType;
  6127. /* readonly */
  6128. String category;
  6129. /* readonly */
  6130. uint checksum;
  6131. /* readonly */
  6132. String name;
  6133. /* readonly */
  6134. uint numFiles;
  6135. /* readonly */
  6136. int refs;
  6137. /* readonly */
  6138. uint totalSize;
  6139. /* readonly */
  6140. StringHash type;
  6141. /* readonly */
  6142. String typeName;
  6143. /* readonly */
  6144. int weakRefs;
  6145. };
  6146. class ParticleEffect
  6147. {
  6148. // Methods:
  6149. void AddColorFrame(ColorFrame);
  6150. void AddColorTime(Color&, float);
  6151. void AddTextureFrame(TextureFrame);
  6152. void AddTextureTime(Rect&, float);
  6153. ColorFrame GetColorFrame(uint) const;
  6154. TextureFrame GetTextureFrame(uint) const;
  6155. bool Load(File);
  6156. bool Load(VectorBuffer&);
  6157. bool Load(const XMLElement&);
  6158. void RemoveColorFrame(uint);
  6159. void RemoveTextureFrame(uint);
  6160. bool Save(File) const;
  6161. bool Save(VectorBuffer&) const;
  6162. bool Save(XMLElement&) const;
  6163. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6164. void SetColorFrame(uint, ColorFrame);
  6165. void SetTextureFrame(uint, TextureFrame);
  6166. void SortColorFrames();
  6167. void SortTextureFrames();
  6168. // Properties:
  6169. float activeTime;
  6170. float animationLodBias;
  6171. /* readonly */
  6172. StringHash baseType;
  6173. /* readonly */
  6174. String category;
  6175. Vector3 constantForce;
  6176. float dampingForce;
  6177. Vector3 emitterSize;
  6178. EmitterType emitterType;
  6179. float inactiveTime;
  6180. Material material;
  6181. Vector3 maxDirection;
  6182. float maxEmissionRate;
  6183. Vector2 maxParticleSize;
  6184. float maxRotation;
  6185. float maxRotationSpeed;
  6186. float maxTimeToLive;
  6187. float maxVelocity;
  6188. /* readonly */
  6189. uint memoryUse;
  6190. Vector3 minDirection;
  6191. float minEmissionRate;
  6192. Vector2 minParticleSize;
  6193. float minRotation;
  6194. float minRotationSpeed;
  6195. float minTimeToLive;
  6196. float minVelocity;
  6197. String name;
  6198. uint numColorFrames;
  6199. uint numParticles;
  6200. uint numTextureFrames;
  6201. /* readonly */
  6202. int refs;
  6203. bool relative;
  6204. bool scaled;
  6205. float sizeAdd;
  6206. float sizeMul;
  6207. bool sorted;
  6208. /* readonly */
  6209. StringHash type;
  6210. /* readonly */
  6211. String typeName;
  6212. bool updateInvisible;
  6213. /* readonly */
  6214. uint useTimer;
  6215. /* readonly */
  6216. int weakRefs;
  6217. };
  6218. class ParticleEffect2D
  6219. {
  6220. // Methods:
  6221. bool Load(File);
  6222. bool Load(VectorBuffer&);
  6223. bool Save(File) const;
  6224. bool Save(VectorBuffer&) const;
  6225. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6226. // Properties:
  6227. /* readonly */
  6228. StringHash baseType;
  6229. /* readonly */
  6230. String category;
  6231. /* readonly */
  6232. uint memoryUse;
  6233. String name;
  6234. /* readonly */
  6235. int refs;
  6236. /* readonly */
  6237. StringHash type;
  6238. /* readonly */
  6239. String typeName;
  6240. /* readonly */
  6241. uint useTimer;
  6242. /* readonly */
  6243. int weakRefs;
  6244. };
  6245. class ParticleEmitter
  6246. {
  6247. // Methods:
  6248. void ApplyAttributes();
  6249. void ApplyEffect();
  6250. void Commit();
  6251. void DrawDebugGeometry(DebugRenderer, bool);
  6252. Variant GetAttribute(const String&) const;
  6253. ValueAnimation GetAttributeAnimation(const String&) const;
  6254. float GetAttributeAnimationSpeed(const String&) const;
  6255. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6256. Variant GetAttributeDefault(const String&) const;
  6257. bool IsInView(Camera) const;
  6258. bool Load(File, bool = false);
  6259. bool Load(VectorBuffer&, bool = false);
  6260. bool LoadXML(const XMLElement&, bool = false);
  6261. void MarkNetworkUpdate() const;
  6262. void Remove();
  6263. void RemoveAllParticles();
  6264. void RemoveInstanceDefault();
  6265. void Reset();
  6266. void ResetEmissionTimer();
  6267. void ResetToDefault();
  6268. bool Save(File) const;
  6269. bool Save(VectorBuffer&) const;
  6270. bool SaveXML(XMLElement&) const;
  6271. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6272. bool SetAttribute(const String&, const Variant&);
  6273. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6274. void SetAttributeAnimationSpeed(const String&, float);
  6275. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6276. // Properties:
  6277. bool animationEnabled;
  6278. float animationLodBias;
  6279. /* readonly */
  6280. Array<Variant> attributeDefaults;
  6281. /* readonly */
  6282. Array<AttributeInfo> attributeInfos;
  6283. Array<Variant> attributes;
  6284. /* readonly */
  6285. StringHash baseType;
  6286. /* readonly */
  6287. Array<Billboard> billboards;
  6288. /* readonly */
  6289. BoundingBox boundingBox;
  6290. bool castShadows;
  6291. /* readonly */
  6292. String category;
  6293. float drawDistance;
  6294. ParticleEffect effect;
  6295. bool emitting;
  6296. bool enabled;
  6297. /* readonly */
  6298. bool enabledEffective;
  6299. FaceCameraMode faceCameraMode;
  6300. /* readonly */
  6301. uint id;
  6302. /* readonly */
  6303. bool inView;
  6304. uint lightMask;
  6305. float lodBias;
  6306. Material material;
  6307. uint maxLights;
  6308. /* readonly */
  6309. Node node;
  6310. /* readonly */
  6311. uint numAttributes;
  6312. uint numBillboards;
  6313. uint numParticles;
  6314. ObjectAnimation objectAnimation;
  6315. bool occludee;
  6316. bool occluder;
  6317. /* readonly */
  6318. int refs;
  6319. bool relative;
  6320. bool scaled;
  6321. bool serializeParticles;
  6322. float shadowDistance;
  6323. uint shadowMask;
  6324. bool sorted;
  6325. bool temporary;
  6326. /* readonly */
  6327. StringHash type;
  6328. /* readonly */
  6329. String typeName;
  6330. uint viewMask;
  6331. /* readonly */
  6332. int weakRefs;
  6333. /* readonly */
  6334. BoundingBox worldBoundingBox;
  6335. /* readonly */
  6336. Zone zone;
  6337. uint zoneMask;
  6338. };
  6339. class ParticleEmitter2D
  6340. {
  6341. // Methods:
  6342. void ApplyAttributes();
  6343. void DrawDebugGeometry(DebugRenderer, bool);
  6344. Variant GetAttribute(const String&) const;
  6345. ValueAnimation GetAttributeAnimation(const String&) const;
  6346. float GetAttributeAnimationSpeed(const String&) const;
  6347. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6348. Variant GetAttributeDefault(const String&) const;
  6349. bool IsInView(Camera) const;
  6350. bool Load(File, bool = false);
  6351. bool Load(VectorBuffer&, bool = false);
  6352. bool LoadXML(const XMLElement&, bool = false);
  6353. void MarkNetworkUpdate() const;
  6354. void Remove();
  6355. void RemoveInstanceDefault();
  6356. void ResetToDefault();
  6357. bool Save(File) const;
  6358. bool Save(VectorBuffer&) const;
  6359. bool SaveXML(XMLElement&) const;
  6360. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6361. bool SetAttribute(const String&, const Variant&);
  6362. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6363. void SetAttributeAnimationSpeed(const String&, float);
  6364. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6365. // Properties:
  6366. bool animationEnabled;
  6367. /* readonly */
  6368. Array<Variant> attributeDefaults;
  6369. /* readonly */
  6370. Array<AttributeInfo> attributeInfos;
  6371. Array<Variant> attributes;
  6372. /* readonly */
  6373. StringHash baseType;
  6374. BlendMode blendMode;
  6375. /* readonly */
  6376. BoundingBox boundingBox;
  6377. bool castShadows;
  6378. /* readonly */
  6379. String category;
  6380. float drawDistance;
  6381. ParticleEffect2D effect;
  6382. bool enabled;
  6383. /* readonly */
  6384. bool enabledEffective;
  6385. /* readonly */
  6386. uint id;
  6387. /* readonly */
  6388. bool inView;
  6389. int layer;
  6390. uint lightMask;
  6391. float lodBias;
  6392. uint maxLights;
  6393. /* readonly */
  6394. Node node;
  6395. /* readonly */
  6396. uint numAttributes;
  6397. ObjectAnimation objectAnimation;
  6398. bool occludee;
  6399. bool occluder;
  6400. int orderInLayer;
  6401. /* readonly */
  6402. int refs;
  6403. float shadowDistance;
  6404. uint shadowMask;
  6405. Sprite2D sprite;
  6406. bool temporary;
  6407. Texture2D texture;
  6408. /* readonly */
  6409. StringHash type;
  6410. /* readonly */
  6411. String typeName;
  6412. uint viewMask;
  6413. /* readonly */
  6414. int weakRefs;
  6415. /* readonly */
  6416. BoundingBox worldBoundingBox;
  6417. uint zoneMask;
  6418. };
  6419. class Pass
  6420. {
  6421. // Properties:
  6422. bool alphaMask;
  6423. BlendMode blendMode;
  6424. CompareMode depthTestMode;
  6425. bool depthWrite;
  6426. bool desktop;
  6427. PassLightingMode lightingMode;
  6428. String pixelShader;
  6429. String pixelShaderDefines;
  6430. /* readonly */
  6431. int refs;
  6432. bool sm3;
  6433. String vertexShader;
  6434. String vertexShaderDefines;
  6435. /* readonly */
  6436. int weakRefs;
  6437. };
  6438. class PhysicsRaycastResult
  6439. {
  6440. // Properties:
  6441. /* readonly */
  6442. RigidBody body;
  6443. float distance;
  6444. Vector3 normal;
  6445. Vector3 position;
  6446. };
  6447. class PhysicsRaycastResult2D
  6448. {
  6449. // Properties:
  6450. /* readonly */
  6451. RigidBody2D body;
  6452. float distance;
  6453. Vector2 normal;
  6454. Vector2 position;
  6455. };
  6456. class PhysicsWorld
  6457. {
  6458. // Methods:
  6459. void ApplyAttributes();
  6460. PhysicsRaycastResult ConvexCast(CollisionShape, const Vector3&, const Quaternion&, const Vector3&, const Quaternion&, uint = 0xffff);
  6461. void DrawDebugGeometry(DebugRenderer, bool);
  6462. void DrawDebugGeometry(bool);
  6463. Variant GetAttribute(const String&) const;
  6464. ValueAnimation GetAttributeAnimation(const String&) const;
  6465. float GetAttributeAnimationSpeed(const String&) const;
  6466. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6467. Variant GetAttributeDefault(const String&) const;
  6468. Array<RigidBody> GetRigidBodies(RigidBody);
  6469. Array<RigidBody> GetRigidBodies(const BoundingBox&, uint = 0xffff);
  6470. Array<RigidBody> GetRigidBodies(const Sphere&, uint = 0xffff);
  6471. bool Load(File, bool = false);
  6472. bool Load(VectorBuffer&, bool = false);
  6473. bool LoadXML(const XMLElement&, bool = false);
  6474. void MarkNetworkUpdate() const;
  6475. Array<PhysicsRaycastResult> Raycast(const Ray&, float = M_INFINITY, uint = 0xffff);
  6476. PhysicsRaycastResult RaycastSingle(const Ray&, float = M_INFINITY, uint = 0xffff);
  6477. void Remove();
  6478. void RemoveCachedGeometry(Model);
  6479. void RemoveInstanceDefault();
  6480. void ResetToDefault();
  6481. bool Save(File) const;
  6482. bool Save(VectorBuffer&) const;
  6483. bool SaveXML(XMLElement&) const;
  6484. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6485. bool SetAttribute(const String&, const Variant&);
  6486. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6487. void SetAttributeAnimationSpeed(const String&, float);
  6488. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6489. PhysicsRaycastResult SphereCast(const Ray&, float, float = M_INFINITY, uint = 0xffff);
  6490. void Update(float);
  6491. void UpdateCollisions();
  6492. // Properties:
  6493. bool animationEnabled;
  6494. /* readonly */
  6495. Array<Variant> attributeDefaults;
  6496. /* readonly */
  6497. Array<AttributeInfo> attributeInfos;
  6498. Array<Variant> attributes;
  6499. /* readonly */
  6500. StringHash baseType;
  6501. /* readonly */
  6502. String category;
  6503. bool enabled;
  6504. /* readonly */
  6505. bool enabledEffective;
  6506. int fps;
  6507. Vector3 gravity;
  6508. /* readonly */
  6509. uint id;
  6510. bool internalEdge;
  6511. bool interpolation;
  6512. int maxSubSteps;
  6513. /* readonly */
  6514. Node node;
  6515. /* readonly */
  6516. uint numAttributes;
  6517. int numIterations;
  6518. ObjectAnimation objectAnimation;
  6519. /* readonly */
  6520. int refs;
  6521. bool splitImpulse;
  6522. bool temporary;
  6523. /* readonly */
  6524. StringHash type;
  6525. /* readonly */
  6526. String typeName;
  6527. /* readonly */
  6528. int weakRefs;
  6529. };
  6530. class PhysicsWorld2D
  6531. {
  6532. // Methods:
  6533. void ApplyAttributes();
  6534. void DrawDebugGeometry() const;
  6535. void DrawDebugGeometry(DebugRenderer, bool);
  6536. Variant GetAttribute(const String&) const;
  6537. ValueAnimation GetAttributeAnimation(const String&) const;
  6538. float GetAttributeAnimationSpeed(const String&) const;
  6539. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6540. Variant GetAttributeDefault(const String&) const;
  6541. Array<RigidBody2D> GetRigidBodies(const Rect&, uint = 0xffff);
  6542. RigidBody2D GetRigidBody(const Vector2&, uint = 0xffff);
  6543. RigidBody2D GetRigidBody(int, int, uint = 0xffff);
  6544. bool Load(File, bool = false);
  6545. bool Load(VectorBuffer&, bool = false);
  6546. bool LoadXML(const XMLElement&, bool = false);
  6547. void MarkNetworkUpdate() const;
  6548. Array<PhysicsRaycastResult2D> Raycast(const Vector2&, const Vector2&, uint = 0xffff);
  6549. PhysicsRaycastResult2D RaycastSingle(const Vector2&, const Vector2&, uint = 0xffff);
  6550. void Remove();
  6551. void RemoveInstanceDefault();
  6552. void ResetToDefault();
  6553. bool Save(File) const;
  6554. bool Save(VectorBuffer&) const;
  6555. bool SaveXML(XMLElement&) const;
  6556. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6557. bool SetAttribute(const String&, const Variant&);
  6558. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6559. void SetAttributeAnimationSpeed(const String&, float);
  6560. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6561. // Properties:
  6562. bool allowSleeping;
  6563. bool animationEnabled;
  6564. /* readonly */
  6565. Array<Variant> attributeDefaults;
  6566. /* readonly */
  6567. Array<AttributeInfo> attributeInfos;
  6568. Array<Variant> attributes;
  6569. bool autoClearForces;
  6570. /* readonly */
  6571. StringHash baseType;
  6572. /* readonly */
  6573. String category;
  6574. bool continuousPhysics;
  6575. bool drawAabb;
  6576. bool drawCenterOfMass;
  6577. bool drawJoint;
  6578. bool drawPair;
  6579. bool drawShape;
  6580. bool enabled;
  6581. /* readonly */
  6582. bool enabledEffective;
  6583. Vector2 gravity;
  6584. /* readonly */
  6585. uint id;
  6586. /* readonly */
  6587. Node node;
  6588. /* readonly */
  6589. uint numAttributes;
  6590. ObjectAnimation objectAnimation;
  6591. uint positionIterations;
  6592. /* readonly */
  6593. int refs;
  6594. bool subStepping;
  6595. bool temporary;
  6596. /* readonly */
  6597. StringHash type;
  6598. /* readonly */
  6599. String typeName;
  6600. uint velocityIterations;
  6601. bool warmStarting;
  6602. /* readonly */
  6603. int weakRefs;
  6604. };
  6605. class Plane
  6606. {
  6607. // Methods:
  6608. void Define(const Vector3&, const Vector3&);
  6609. void Define(const Vector3&, const Vector3&, const Vector3&);
  6610. void Define(const Vector4&);
  6611. float Distance(const Vector3&) const;
  6612. Vector3 Project(const Vector3&) const;
  6613. Vector3 Reflect(const Vector3&) const;
  6614. Vector4 ToVector4() const;
  6615. void Transform(const Matrix3&);
  6616. void Transform(const Matrix3x4&);
  6617. void Transform(const Matrix4&);
  6618. Plane Transformed(const Matrix3&) const;
  6619. Plane Transformed(const Matrix3x4&) const;
  6620. Plane Transformed(const Matrix4&) const;
  6621. // Properties:
  6622. Vector3 absNormal;
  6623. float d;
  6624. Vector3 normal;
  6625. /* readonly */
  6626. Matrix3x4 reflectionMatrix;
  6627. };
  6628. class Polyhedron
  6629. {
  6630. // Methods:
  6631. void AddFace(const Vector3&, const Vector3&, const Vector3&);
  6632. void AddFace(const Vector3&, const Vector3&, const Vector3&, const Vector3&);
  6633. void AddFace(const Array<Vector3>);
  6634. void Clear();
  6635. void Clip(const BoundingBox&);
  6636. void Clip(const Frustum&);
  6637. void Define(const BoundingBox&);
  6638. void Define(const Frustum&);
  6639. void Transform(const Matrix3&);
  6640. void Transform(const Matrix3x4&);
  6641. Polyhedron Transformed(const Matrix3&) const;
  6642. Polyhedron Transformed(const Matrix3x4&) const;
  6643. // Properties:
  6644. /* readonly */
  6645. Array<Array<Vector3>> face;
  6646. /* readonly */
  6647. uint numFaces;
  6648. };
  6649. class PropertySet2D
  6650. {
  6651. // Methods:
  6652. bool HasProperty(const String&) const;
  6653. const String& GetProperty(const String&) const;
  6654. // Properties:
  6655. /* readonly */
  6656. int refs;
  6657. /* readonly */
  6658. int weakRefs;
  6659. };
  6660. class Quaternion
  6661. {
  6662. // Methods:
  6663. float DotProduct(const Quaternion&) const;
  6664. bool Equals(const Quaternion&) const;
  6665. void FromAngleAxis(float, const Vector3&);
  6666. void FromAxes(const Vector3&, const Vector3&, const Vector3&);
  6667. void FromEulerAngles(float, float, float);
  6668. bool FromLookRotation(const Vector3&, const Vector3&);
  6669. void FromRotationTo(const Vector3&, const Vector3&);
  6670. Quaternion Inverse() const;
  6671. bool IsNaN() const;
  6672. Quaternion Nlerp(Quaternion, float, bool) const;
  6673. void Normalize();
  6674. Quaternion Normalized() const;
  6675. Quaternion Slerp(Quaternion, float) const;
  6676. String ToString() const;
  6677. // Properties:
  6678. /* readonly */
  6679. Vector3 eulerAngles;
  6680. /* readonly */
  6681. float pitch;
  6682. /* readonly */
  6683. float roll;
  6684. float w;
  6685. float x;
  6686. float y;
  6687. /* readonly */
  6688. float yaw;
  6689. float z;
  6690. };
  6691. class Ray
  6692. {
  6693. // Methods:
  6694. Vector3 ClosestPoint(const Ray&) const;
  6695. void Define(const Vector3&, const Vector3&);
  6696. float Distance(const Vector3&) const;
  6697. float HitDistance(const BoundingBox&) const;
  6698. float HitDistance(const Frustum&, bool = true) const;
  6699. float HitDistance(const Plane&) const;
  6700. float HitDistance(const Sphere&) const;
  6701. float HitDistance(const Vector3&, const Vector3&, const Vector3&) const;
  6702. Vector3 Project(const Vector3&) const;
  6703. Ray Transformed(const Matrix3x4&) const;
  6704. // Properties:
  6705. Vector3 direction;
  6706. Vector3 origin;
  6707. };
  6708. class RayQueryResult
  6709. {
  6710. // Properties:
  6711. float distance;
  6712. /* readonly */
  6713. Drawable drawable;
  6714. /* readonly */
  6715. Node node;
  6716. Vector3 normal;
  6717. Vector3 position;
  6718. uint subObject;
  6719. };
  6720. class Rect
  6721. {
  6722. // Methods:
  6723. void Clear();
  6724. void Clip(const Rect&);
  6725. void Define(const Vector2&);
  6726. void Define(const Vector2&, const Vector2&);
  6727. bool Equals(const Rect&) const;
  6728. Intersection IsInside(const Vector2&) const;
  6729. void Merge(const Rect&);
  6730. void Merge(const Vector2&);
  6731. Vector4 ToVector4() const;
  6732. // Properties:
  6733. float bottom;
  6734. /* readonly */
  6735. Vector2 center;
  6736. bool defined;
  6737. /* readonly */
  6738. Vector2 halfSize;
  6739. float left;
  6740. Vector2 max;
  6741. Vector2 min;
  6742. float right;
  6743. /* readonly */
  6744. Vector2 size;
  6745. float top;
  6746. };
  6747. class RefCounted
  6748. {
  6749. // Properties:
  6750. /* readonly */
  6751. int refs;
  6752. /* readonly */
  6753. int weakRefs;
  6754. };
  6755. class RenderPath
  6756. {
  6757. // Methods:
  6758. void AddCommand(const RenderPathCommand&);
  6759. void AddRenderTarget(const RenderTargetInfo&);
  6760. bool Append(XMLFile);
  6761. RenderPath Clone();
  6762. void InsertCommand(uint, const RenderPathCommand&);
  6763. bool Load(XMLFile);
  6764. void RemoveCommand(uint);
  6765. void RemoveCommands(const String&);
  6766. void RemoveRenderTarget(const String&);
  6767. void RemoveRenderTarget(uint);
  6768. void RemoveRenderTargts(const String&);
  6769. void SetEnabled(const String&, bool);
  6770. void ToggleEnabled(const String&);
  6771. // Properties:
  6772. Array<RenderPathCommand> commands;
  6773. /* readonly */
  6774. uint numCommands;
  6775. /* readonly */
  6776. uint numRenderTargets;
  6777. /* readonly */
  6778. int refs;
  6779. Array<RenderTargetInfo> renderTargets;
  6780. Array<Variant> shaderParameters;
  6781. /* readonly */
  6782. int weakRefs;
  6783. };
  6784. class RenderPathCommand
  6785. {
  6786. // Methods:
  6787. void RemoveShaderParameter(const String&);
  6788. // Properties:
  6789. Color clearColor;
  6790. float clearDepth;
  6791. uint clearFlags;
  6792. uint clearStencil;
  6793. bool enabled;
  6794. bool markToStencil;
  6795. String metadata;
  6796. uint numOutputs;
  6797. Array<String> outputNames;
  6798. String pass;
  6799. String pixelShaderDefines;
  6800. String pixelShaderName;
  6801. Array<Variant> shaderParameters;
  6802. RenderCommandSortMode sortMode;
  6803. String tag;
  6804. Array<String> textureNames;
  6805. RenderCommandType type;
  6806. bool useFogColor;
  6807. bool useLitBase;
  6808. bool vertexLights;
  6809. String vertexShaderDefines;
  6810. String vertexShaderName;
  6811. };
  6812. class RenderSurface
  6813. {
  6814. // Methods:
  6815. void QueueUpdate();
  6816. // Properties:
  6817. /* readonly */
  6818. int height;
  6819. RenderSurface linkedDepthStencil;
  6820. RenderSurface linkedRenderTarget;
  6821. uint numViewports;
  6822. /* readonly */
  6823. Texture parentTexture;
  6824. RenderSurfaceUpdateMode updateMode;
  6825. /* readonly */
  6826. TextureUsage usage;
  6827. Array<Viewport> viewports;
  6828. /* readonly */
  6829. int width;
  6830. };
  6831. class RenderTargetInfo
  6832. {
  6833. // Properties:
  6834. bool enabled;
  6835. bool filtered;
  6836. uint format;
  6837. String name;
  6838. bool persistent;
  6839. bool sRGB;
  6840. Vector2 size;
  6841. RenderTargetSizeMode sizeMode;
  6842. String tag;
  6843. };
  6844. class Renderer
  6845. {
  6846. // Methods:
  6847. void DrawDebugGeometry(bool) const;
  6848. void ReloadShaders() const;
  6849. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6850. void SetDefaultRenderPath(XMLFile);
  6851. // Properties:
  6852. /* readonly */
  6853. StringHash baseType;
  6854. /* readonly */
  6855. String category;
  6856. /* readonly */
  6857. Material defaultLightRamp;
  6858. /* readonly */
  6859. Material defaultLightSpot;
  6860. /* readonly */
  6861. Material defaultMaterial;
  6862. RenderPath defaultRenderPath;
  6863. /* readonly */
  6864. Zone defaultZone;
  6865. bool drawShadows;
  6866. bool dynamicInstancing;
  6867. bool hdrRendering;
  6868. int materialQuality;
  6869. int maxInstanceTriangles;
  6870. int maxOccluderTriangles;
  6871. int maxShadowMaps;
  6872. int maxSortedInstances;
  6873. int minInstances;
  6874. float mobileShadowBiasAdd;
  6875. float mobileShadowBiasMul;
  6876. /* readonly */
  6877. uint numBatches;
  6878. /* readonly */
  6879. Array<uint> numGeometries;
  6880. /* readonly */
  6881. Array<uint> numLights;
  6882. /* readonly */
  6883. Array<uint> numOccluders;
  6884. /* readonly */
  6885. uint numPrimitives;
  6886. /* readonly */
  6887. Array<uint> numShadowMaps;
  6888. uint numViewports;
  6889. /* readonly */
  6890. uint numViews;
  6891. float occluderSizeThreshold;
  6892. int occlusionBufferSize;
  6893. /* readonly */
  6894. int refs;
  6895. bool reuseShadowMaps;
  6896. int shadowMapSize;
  6897. int shadowQuality;
  6898. bool specularLighting;
  6899. int textureAnisotropy;
  6900. TextureFilterMode textureFilterMode;
  6901. int textureQuality;
  6902. /* readonly */
  6903. StringHash type;
  6904. /* readonly */
  6905. String typeName;
  6906. Array<Viewport> viewports;
  6907. /* readonly */
  6908. int weakRefs;
  6909. };
  6910. class Resource
  6911. {
  6912. // Methods:
  6913. bool Load(File);
  6914. bool Load(VectorBuffer&);
  6915. bool Save(File) const;
  6916. bool Save(VectorBuffer&) const;
  6917. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6918. // Properties:
  6919. /* readonly */
  6920. StringHash baseType;
  6921. /* readonly */
  6922. String category;
  6923. /* readonly */
  6924. uint memoryUse;
  6925. String name;
  6926. /* readonly */
  6927. int refs;
  6928. /* readonly */
  6929. StringHash type;
  6930. /* readonly */
  6931. String typeName;
  6932. /* readonly */
  6933. uint useTimer;
  6934. /* readonly */
  6935. int weakRefs;
  6936. };
  6937. class ResourceCache
  6938. {
  6939. // Methods:
  6940. bool AddManualResource(Resource);
  6941. bool AddPackageFile(PackageFile, uint = M_MAX_UNSIGNED);
  6942. bool AddPackageFile(const String&, uint = M_MAX_UNSIGNED);
  6943. bool AddResourceDir(const String&, uint = M_MAX_UNSIGNED);
  6944. bool BackgroundLoadResource(const String&, const String&, bool = true);
  6945. bool Exists(const String&) const;
  6946. File GetFile(const String&);
  6947. String GetPreferredResourceDir(const String&) const;
  6948. Resource GetResource(StringHash, const String&, bool = true);
  6949. Resource GetResource(const String&, const String&, bool = true);
  6950. String GetResourceFileName(const String&) const;
  6951. void ReleaseAllResources(bool = false);
  6952. void ReleaseResource(const String&, const String&, bool = false);
  6953. void ReleaseResources(StringHash, bool = false);
  6954. void ReleaseResources(const String&, bool = false);
  6955. void ReleaseResources(const String&, const String&, bool = false);
  6956. bool ReloadResource(Resource);
  6957. void ReloadResourceWithDependencies(const String&);
  6958. void RemovePackageFile(PackageFile, bool = true, bool = false);
  6959. void RemovePackageFile(const String&, bool = true, bool = false);
  6960. void RemoveResourceDir(const String&);
  6961. String SanitateResourceDirName(const String&) const;
  6962. String SanitateResourceName(const String&) const;
  6963. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6964. // Properties:
  6965. bool autoReloadResources;
  6966. /* readonly */
  6967. StringHash baseType;
  6968. /* readonly */
  6969. String category;
  6970. int finishBackgroundResourcesMs;
  6971. Array<uint> memoryBudget;
  6972. /* readonly */
  6973. Array<uint> memoryUse;
  6974. /* readonly */
  6975. uint numBackgroundLoadResources;
  6976. /* readonly */
  6977. Array<PackageFile> packageFiles;
  6978. /* readonly */
  6979. int refs;
  6980. /* readonly */
  6981. Array<String> resourceDirs;
  6982. bool returnFailedResources;
  6983. /* readonly */
  6984. bool seachPackagesFirst;
  6985. /* writeonly */
  6986. bool searchPackagesFirst;
  6987. /* readonly */
  6988. uint totalMemoryUse;
  6989. /* readonly */
  6990. StringHash type;
  6991. /* readonly */
  6992. String typeName;
  6993. /* readonly */
  6994. int weakRefs;
  6995. };
  6996. class ResourceRef
  6997. {
  6998. // Properties:
  6999. String name;
  7000. StringHash type;
  7001. };
  7002. class ResourceRefList
  7003. {
  7004. // Methods:
  7005. void Resize(uint);
  7006. // Properties:
  7007. /* readonly */
  7008. bool empty;
  7009. /* readonly */
  7010. uint length;
  7011. Array<String> names;
  7012. StringHash type;
  7013. };
  7014. class RigidBody
  7015. {
  7016. // Methods:
  7017. void Activate();
  7018. void ApplyAttributes();
  7019. void ApplyForce(const Vector3&);
  7020. void ApplyForce(const Vector3&, const Vector3&);
  7021. void ApplyImpulse(const Vector3&);
  7022. void ApplyImpulse(const Vector3&, const Vector3&);
  7023. void ApplyTorque(const Vector3&);
  7024. void ApplyTorqueImpulse(const Vector3&);
  7025. void DisableMassUpdate();
  7026. void DrawDebugGeometry(DebugRenderer, bool);
  7027. void EnableMassUpdate();
  7028. Variant GetAttribute(const String&) const;
  7029. ValueAnimation GetAttributeAnimation(const String&) const;
  7030. float GetAttributeAnimationSpeed(const String&) const;
  7031. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7032. Variant GetAttributeDefault(const String&) const;
  7033. Vector3 GetVelocityAtPoint(const Vector3&) const;
  7034. bool Load(File, bool = false);
  7035. bool Load(VectorBuffer&, bool = false);
  7036. bool LoadXML(const XMLElement&, bool = false);
  7037. void MarkNetworkUpdate() const;
  7038. void ReAddBodyToWorld();
  7039. void Remove();
  7040. void RemoveInstanceDefault();
  7041. void ResetForces();
  7042. void ResetToDefault();
  7043. bool Save(File) const;
  7044. bool Save(VectorBuffer&) const;
  7045. bool SaveXML(XMLElement&) const;
  7046. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7047. bool SetAttribute(const String&, const Variant&);
  7048. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7049. void SetAttributeAnimationSpeed(const String&, float);
  7050. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7051. void SetCollisionLayerAndMask(uint, uint);
  7052. void SetTransform(const Vector3&, const Quaternion&);
  7053. // Properties:
  7054. /* readonly */
  7055. bool active;
  7056. float angularDamping;
  7057. Vector3 angularFactor;
  7058. float angularRestThreshold;
  7059. Vector3 angularVelocity;
  7060. bool animationEnabled;
  7061. Vector3 anisotropicFriction;
  7062. /* readonly */
  7063. Array<Variant> attributeDefaults;
  7064. /* readonly */
  7065. Array<AttributeInfo> attributeInfos;
  7066. Array<Variant> attributes;
  7067. /* readonly */
  7068. StringHash baseType;
  7069. /* readonly */
  7070. String category;
  7071. float ccdMotionThreshold;
  7072. float ccdRadius;
  7073. /* readonly */
  7074. Vector3 centerOfMass;
  7075. /* readonly */
  7076. Array<RigidBody> collidingBodies;
  7077. CollisionEventMode collisionEventMode;
  7078. uint collisionLayer;
  7079. uint collisionMask;
  7080. float contactProcessingThreshold;
  7081. bool enabled;
  7082. /* readonly */
  7083. bool enabledEffective;
  7084. float friction;
  7085. Vector3 gravityOverride;
  7086. /* readonly */
  7087. uint id;
  7088. bool kinematic;
  7089. float linearDamping;
  7090. Vector3 linearFactor;
  7091. float linearRestThreshold;
  7092. Vector3 linearVelocity;
  7093. float mass;
  7094. /* readonly */
  7095. Node node;
  7096. /* readonly */
  7097. uint numAttributes;
  7098. ObjectAnimation objectAnimation;
  7099. Vector3 position;
  7100. /* readonly */
  7101. int refs;
  7102. float restitution;
  7103. float rollingFriction;
  7104. Quaternion rotation;
  7105. bool temporary;
  7106. bool trigger;
  7107. /* readonly */
  7108. StringHash type;
  7109. /* readonly */
  7110. String typeName;
  7111. bool useGravity;
  7112. /* readonly */
  7113. int weakRefs;
  7114. };
  7115. class RigidBody2D
  7116. {
  7117. // Methods:
  7118. void ApplyAngularImpulse(float, bool);
  7119. void ApplyAttributes();
  7120. void ApplyForce(const Vector2&, const Vector2&, bool);
  7121. void ApplyForceToCenter(const Vector2&, bool);
  7122. void ApplyLinearImpulse(const Vector2&, const Vector2&, bool);
  7123. void ApplyTorque(float, bool);
  7124. void DrawDebugGeometry(DebugRenderer, bool);
  7125. Variant GetAttribute(const String&) const;
  7126. ValueAnimation GetAttributeAnimation(const String&) const;
  7127. float GetAttributeAnimationSpeed(const String&) const;
  7128. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7129. Variant GetAttributeDefault(const String&) const;
  7130. bool Load(File, bool = false);
  7131. bool Load(VectorBuffer&, bool = false);
  7132. bool LoadXML(const XMLElement&, bool = false);
  7133. void MarkNetworkUpdate() const;
  7134. void Remove();
  7135. void RemoveInstanceDefault();
  7136. void ResetToDefault();
  7137. bool Save(File) const;
  7138. bool Save(VectorBuffer&) const;
  7139. bool SaveXML(XMLElement&) const;
  7140. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7141. bool SetAttribute(const String&, const Variant&);
  7142. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7143. void SetAttributeAnimationSpeed(const String&, float);
  7144. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7145. // Properties:
  7146. bool allowSleep;
  7147. float angularDamping;
  7148. bool animationEnabled;
  7149. /* readonly */
  7150. Array<Variant> attributeDefaults;
  7151. /* readonly */
  7152. Array<AttributeInfo> attributeInfos;
  7153. Array<Variant> attributes;
  7154. bool awake;
  7155. /* readonly */
  7156. StringHash baseType;
  7157. BodyType2D bodyType;
  7158. bool bullet;
  7159. /* readonly */
  7160. String category;
  7161. bool enabled;
  7162. /* readonly */
  7163. bool enabledEffective;
  7164. bool fixedRotation;
  7165. float gravityScale;
  7166. /* readonly */
  7167. uint id;
  7168. float inertia;
  7169. float linearDamping;
  7170. Vector2 linearVelocity;
  7171. float mass;
  7172. Vector2 massCenter;
  7173. /* readonly */
  7174. Node node;
  7175. /* readonly */
  7176. uint numAttributes;
  7177. ObjectAnimation objectAnimation;
  7178. /* readonly */
  7179. int refs;
  7180. bool temporary;
  7181. /* readonly */
  7182. StringHash type;
  7183. /* readonly */
  7184. String typeName;
  7185. bool useFixtureMass;
  7186. /* readonly */
  7187. int weakRefs;
  7188. };
  7189. class Scene
  7190. {
  7191. // Methods:
  7192. void AddChild(Node, uint = M_MAX_UNSIGNED);
  7193. void AddRequiredPackageFile(PackageFile);
  7194. void ApplyAttributes();
  7195. void Clear(bool = true, bool = true);
  7196. void ClearRequiredPackageFiles();
  7197. Component CloneComponent(Component, CreateMode, uint = 0);
  7198. Component CloneComponent(Component, uint = 0);
  7199. Node CreateChild(const String& = String ( ), CreateMode = REPLICATED, uint = 0);
  7200. Component CreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  7201. ScriptObject CreateScriptObject(ScriptFile, const String&, CreateMode = REPLICATED);
  7202. ScriptObject CreateScriptObject(const String&, const String&, CreateMode = REPLICATED);
  7203. Variant GetAttribute(const String&) const;
  7204. ValueAnimation GetAttributeAnimation(const String&) const;
  7205. float GetAttributeAnimationSpeed(const String&) const;
  7206. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7207. Variant GetAttributeDefault(const String&) const;
  7208. Node GetChild(const String&, bool = false) const;
  7209. Array<Node> GetChildren(bool = false) const;
  7210. Array<Node> GetChildrenWithComponent(const String&, bool = false) const;
  7211. Array<Node> GetChildrenWithScript(bool = false) const;
  7212. Array<Node> GetChildrenWithScript(const String&, bool = false) const;
  7213. Component GetComponent(const String&) const;
  7214. Component GetComponent(uint);
  7215. Array<Component> GetComponents() const;
  7216. Array<Component> GetComponents(const String&, bool = false) const;
  7217. Node GetNode(uint);
  7218. Component GetOrCreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  7219. ScriptObject GetScriptObject() const;
  7220. ScriptObject GetScriptObject(const String&) const;
  7221. bool HasComponent(const String&) const;
  7222. Node Instantiate(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  7223. Node Instantiate(VectorBuffer&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  7224. Node InstantiateXML(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  7225. Node InstantiateXML(VectorBuffer&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  7226. Node InstantiateXML(XMLFile, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  7227. Node InstantiateXML(const XMLElement&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  7228. bool Load(File, bool = false);
  7229. bool Load(VectorBuffer&, bool = false);
  7230. bool LoadAsync(File, LoadMode = LOAD_SCENE_AND_RESOURCES);
  7231. bool LoadAsyncXML(File, LoadMode = LOAD_SCENE_AND_RESOURCES);
  7232. bool LoadXML(File);
  7233. bool LoadXML(VectorBuffer&);
  7234. bool LoadXML(const XMLElement&, bool = false);
  7235. Vector3 LocalToWorld(const Vector3&) const;
  7236. Vector3 LocalToWorld(const Vector4&) const;
  7237. Vector2 LocalToWorld2D(const Vector2&) const;
  7238. bool LookAt(const Vector3&, const Vector3& = Vector3 ( 0 , 1 , 0 ), TransformSpace = TS_WORLD);
  7239. void MarkNetworkUpdate() const;
  7240. void Pitch(float, TransformSpace = TS_LOCAL);
  7241. void RegisterVar(const String&);
  7242. void Remove();
  7243. void RemoveAllChildren();
  7244. void RemoveAllComponents();
  7245. void RemoveChild(Node);
  7246. void RemoveChildren(bool, bool, bool);
  7247. void RemoveComponent(Component);
  7248. void RemoveComponent(const String&);
  7249. void RemoveComponents(bool, bool);
  7250. void RemoveInstanceDefault();
  7251. void ResetToDefault();
  7252. void Roll(float, TransformSpace = TS_LOCAL);
  7253. void Rotate(const Quaternion&, TransformSpace = TS_LOCAL);
  7254. void Rotate2D(float, TransformSpace = TS_LOCAL);
  7255. void RotateAround(const Vector3&, const Quaternion&, TransformSpace = TS_LOCAL);
  7256. void RotateAround2D(const Vector2&, float, TransformSpace = TS_LOCAL);
  7257. bool Save(File) const;
  7258. bool Save(VectorBuffer&) const;
  7259. bool SaveXML(File);
  7260. bool SaveXML(VectorBuffer&);
  7261. bool SaveXML(XMLElement&) const;
  7262. void Scale(const Vector3&);
  7263. void Scale(float);
  7264. void Scale2D(const Vector2&);
  7265. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7266. bool SetAttribute(const String&, const Variant&);
  7267. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7268. void SetAttributeAnimationSpeed(const String&, float);
  7269. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7270. void SetPosition2D(float, float);
  7271. void SetScale(float);
  7272. void SetScale2D(float, float);
  7273. void SetTransform(const Vector3&, const Quaternion&);
  7274. void SetTransform(const Vector3&, const Quaternion&, const Vector3&);
  7275. void SetTransform(const Vector3&, const Quaternion&, float);
  7276. void SetTransform2D(const Vector2&, float);
  7277. void SetTransform2D(const Vector2&, float, const Vector2&);
  7278. void SetTransform2D(const Vector2&, float, float);
  7279. void SetWorldTransform(const Vector3&, const Quaternion&);
  7280. void SetWorldTransform(const Vector3&, const Quaternion&, const Vector3&);
  7281. void SetWorldTransform(const Vector3&, const Quaternion&, float);
  7282. void SetWorldTransform2D(const Vector2&, float);
  7283. void SetWorldTransform2D(const Vector2&, float, const Vector2&);
  7284. void SetWorldTransform2D(const Vector2&, float, float);
  7285. void StopAsyncLoading();
  7286. const String& GetVarName(StringHash) const;
  7287. void Translate(const Vector3&, TransformSpace = TS_LOCAL);
  7288. void Translate2D(const Vector2&, TransformSpace = TS_LOCAL);
  7289. void UnregisterAllVars(const String&);
  7290. void UnregisterVar(const String&);
  7291. void Update(float);
  7292. Vector3 WorldToLocal(const Vector3&) const;
  7293. Vector3 WorldToLocal(const Vector4&) const;
  7294. Vector2 WorldToLocal2D(const Vector2&) const;
  7295. void Yaw(float, TransformSpace = TS_LOCAL);
  7296. // Properties:
  7297. bool animationEnabled;
  7298. /* readonly */
  7299. LoadMode asyncLoadMode;
  7300. /* readonly */
  7301. bool asyncLoading;
  7302. int asyncLoadingMs;
  7303. /* readonly */
  7304. float asyncProgress;
  7305. /* readonly */
  7306. Array<Variant> attributeDefaults;
  7307. /* readonly */
  7308. Array<AttributeInfo> attributeInfos;
  7309. Array<Variant> attributes;
  7310. /* readonly */
  7311. StringHash baseType;
  7312. /* readonly */
  7313. String category;
  7314. /* readonly */
  7315. uint checksum;
  7316. /* readonly */
  7317. Array<Node> children;
  7318. /* readonly */
  7319. Array<Component> components;
  7320. /* readonly */
  7321. DebugRenderer debugRenderer;
  7322. Vector3 direction;
  7323. float elapsedTime;
  7324. /* readonly */
  7325. String fileName;
  7326. /* readonly */
  7327. uint id;
  7328. String name;
  7329. /* readonly */
  7330. uint numAllChildren;
  7331. /* readonly */
  7332. uint numAttributes;
  7333. /* readonly */
  7334. uint numChildren;
  7335. /* readonly */
  7336. uint numComponents;
  7337. ObjectAnimation objectAnimation;
  7338. /* readonly */
  7339. Octree octree;
  7340. Node parent;
  7341. /* readonly */
  7342. PhysicsWorld physicsWorld;
  7343. /* readonly */
  7344. PhysicsWorld2D physicsWorld2D;
  7345. Vector3 position;
  7346. Vector2 position2D;
  7347. /* readonly */
  7348. int refs;
  7349. /* readonly */
  7350. Array<PackageFile> requiredPackageFiles;
  7351. /* readonly */
  7352. Vector3 right;
  7353. Quaternion rotation;
  7354. float rotation2D;
  7355. Vector3 scale;
  7356. Vector2 scale2D;
  7357. /* readonly */
  7358. ScriptObject scriptObject;
  7359. float smoothingConstant;
  7360. float snapThreshold;
  7361. bool temporary;
  7362. float timeScale;
  7363. /* readonly */
  7364. Matrix3x4 transform;
  7365. /* readonly */
  7366. StringHash type;
  7367. /* readonly */
  7368. String typeName;
  7369. /* readonly */
  7370. Vector3 up;
  7371. bool updateEnabled;
  7372. /* readonly */
  7373. VariantMap vars;
  7374. /* readonly */
  7375. int weakRefs;
  7376. Vector3 worldDirection;
  7377. Vector3 worldPosition;
  7378. Vector2 worldPosition2D;
  7379. /* readonly */
  7380. Vector3 worldRight;
  7381. Quaternion worldRotation;
  7382. float worldRotation2D;
  7383. Vector3 worldScale;
  7384. Vector2 worldScale2D;
  7385. /* readonly */
  7386. Matrix3x4 worldTransform;
  7387. /* readonly */
  7388. Vector3 worldUp;
  7389. };
  7390. class Script
  7391. {
  7392. // Methods:
  7393. void DumpAPI(DumpMode = DOXYGEN, const String& = String ( ));
  7394. bool Execute(const String&);
  7395. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7396. // Properties:
  7397. /* readonly */
  7398. StringHash baseType;
  7399. /* readonly */
  7400. String category;
  7401. Scene defaultScene;
  7402. ScriptFile defaultScriptFile;
  7403. bool executeConsoleCommands;
  7404. /* readonly */
  7405. int refs;
  7406. /* readonly */
  7407. StringHash type;
  7408. /* readonly */
  7409. String typeName;
  7410. /* readonly */
  7411. int weakRefs;
  7412. };
  7413. class ScriptFile
  7414. {
  7415. // Methods:
  7416. void ClearDelayedExecute(const String& = String ( ));
  7417. void DelayedExecute(float, bool, const String&);
  7418. void DelayedExecute(float, bool, const String&, const Array<Variant>);
  7419. bool Execute(const String&, const Array<Variant>);
  7420. bool Load(File);
  7421. bool Load(VectorBuffer&);
  7422. bool Save(File) const;
  7423. bool Save(VectorBuffer&) const;
  7424. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7425. // Properties:
  7426. /* readonly */
  7427. StringHash baseType;
  7428. /* readonly */
  7429. String category;
  7430. /* readonly */
  7431. bool compiled;
  7432. /* readonly */
  7433. uint memoryUse;
  7434. String name;
  7435. /* readonly */
  7436. int refs;
  7437. /* readonly */
  7438. StringHash type;
  7439. /* readonly */
  7440. String typeName;
  7441. /* readonly */
  7442. uint useTimer;
  7443. /* readonly */
  7444. int weakRefs;
  7445. };
  7446. class ScriptInstance
  7447. {
  7448. // Methods:
  7449. void ApplyAttributes();
  7450. void ClearDelayedExecute(const String& = String ( ));
  7451. bool CreateObject(ScriptFile, const String&);
  7452. void DelayedExecute(float, bool, const String&);
  7453. void DelayedExecute(float, bool, const String&, const Array<Variant>);
  7454. void DrawDebugGeometry(DebugRenderer, bool);
  7455. bool Execute(const String&);
  7456. bool Execute(const String&, const Array<Variant>);
  7457. Variant GetAttribute(const String&) const;
  7458. ValueAnimation GetAttributeAnimation(const String&) const;
  7459. float GetAttributeAnimationSpeed(const String&) const;
  7460. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7461. Variant GetAttributeDefault(const String&) const;
  7462. bool Load(File, bool = false);
  7463. bool Load(VectorBuffer&, bool = false);
  7464. bool LoadXML(const XMLElement&, bool = false);
  7465. void MarkNetworkUpdate() const;
  7466. void Remove();
  7467. void RemoveInstanceDefault();
  7468. void ResetToDefault();
  7469. bool Save(File) const;
  7470. bool Save(VectorBuffer&) const;
  7471. bool SaveXML(XMLElement&) const;
  7472. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7473. bool SetAttribute(const String&, const Variant&);
  7474. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7475. void SetAttributeAnimationSpeed(const String&, float);
  7476. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7477. // Properties:
  7478. bool animationEnabled;
  7479. /* readonly */
  7480. Array<Variant> attributeDefaults;
  7481. /* readonly */
  7482. Array<AttributeInfo> attributeInfos;
  7483. Array<Variant> attributes;
  7484. /* readonly */
  7485. StringHash baseType;
  7486. /* readonly */
  7487. String category;
  7488. String className;
  7489. bool enabled;
  7490. /* readonly */
  7491. bool enabledEffective;
  7492. /* readonly */
  7493. uint id;
  7494. /* readonly */
  7495. Node node;
  7496. /* readonly */
  7497. uint numAttributes;
  7498. ObjectAnimation objectAnimation;
  7499. /* readonly */
  7500. int refs;
  7501. ScriptFile scriptFile;
  7502. /* readonly */
  7503. ScriptObject scriptObject;
  7504. bool temporary;
  7505. /* readonly */
  7506. StringHash type;
  7507. /* readonly */
  7508. String typeName;
  7509. /* readonly */
  7510. int weakRefs;
  7511. };
  7512. class ScriptObject
  7513. {
  7514. };
  7515. class ScrollBar
  7516. {
  7517. // Methods:
  7518. void AddChild(UIElement);
  7519. void ApplyAttributes();
  7520. void BringToFront();
  7521. void ChangeValue(float);
  7522. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  7523. void DisableLayoutUpdate();
  7524. IntVector2 ElementToScreen(const IntVector2&);
  7525. void EnableLayoutUpdate();
  7526. uint FindChild(UIElement) const;
  7527. Variant GetAttribute(const String&) const;
  7528. ValueAnimation GetAttributeAnimation(const String&) const;
  7529. float GetAttributeAnimationSpeed(const String&) const;
  7530. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7531. Variant GetAttributeDefault(const String&) const;
  7532. UIElement GetChild(const String&, bool = false) const;
  7533. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  7534. Array<UIElement> GetChildren(bool = false) const;
  7535. UIElement GetElementEventSender() const;
  7536. uint GetNumChildren(bool) const;
  7537. void InsertChild(uint, UIElement);
  7538. bool IsInside(IntVector2, bool);
  7539. bool IsInsideCombined(IntVector2, bool);
  7540. bool Load(File, bool = false);
  7541. bool Load(VectorBuffer&, bool = false);
  7542. bool LoadChildXML(XMLFile, XMLFile = null);
  7543. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  7544. bool LoadXML(File);
  7545. bool LoadXML(VectorBuffer&);
  7546. bool LoadXML(XMLFile, XMLFile);
  7547. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  7548. bool LoadXML(const XMLElement&, bool = false);
  7549. void MarkNetworkUpdate() const;
  7550. void Remove();
  7551. void RemoveAllChildren();
  7552. void RemoveChild(UIElement, uint = 0);
  7553. void RemoveChild(uint);
  7554. void RemoveInstanceDefault();
  7555. void ResetDeepEnabled();
  7556. void ResetToDefault();
  7557. bool Save(File) const;
  7558. bool Save(VectorBuffer&) const;
  7559. bool SaveXML(File);
  7560. bool SaveXML(VectorBuffer&);
  7561. bool SaveXML(XMLElement&) const;
  7562. IntVector2 ScreenToElement(const IntVector2&);
  7563. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7564. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  7565. bool SetAttribute(const String&, const Variant&);
  7566. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7567. void SetAttributeAnimationSpeed(const String&, float);
  7568. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7569. void SetDeepEnabled(bool);
  7570. void SetEnabledRecursive(bool);
  7571. void SetFixedHeight(int);
  7572. void SetFixedSize(int, int);
  7573. void SetFixedWidth(int);
  7574. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  7575. void SetMaxSize(int, int);
  7576. void SetMinSize(int, int);
  7577. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  7578. void SetPosition(int, int);
  7579. void SetSize(int, int);
  7580. bool SetStyle(const String&, XMLFile = null);
  7581. bool SetStyle(const XMLElement&);
  7582. bool SetStyleAuto(XMLFile = null);
  7583. void StepBack();
  7584. void StepForward();
  7585. void UpdateLayout();
  7586. const Variant& GetVar(const StringHash&);
  7587. // Properties:
  7588. bool animationEnabled;
  7589. /* readonly */
  7590. Array<Variant> attributeDefaults;
  7591. /* readonly */
  7592. Array<AttributeInfo> attributeInfos;
  7593. Array<Variant> attributes;
  7594. /* readonly */
  7595. Button backButton;
  7596. /* readonly */
  7597. StringHash baseType;
  7598. bool bringToBack;
  7599. bool bringToFront;
  7600. /* readonly */
  7601. String category;
  7602. /* readonly */
  7603. IntVector2 childOffset;
  7604. /* readonly */
  7605. Array<UIElement> children;
  7606. IntRect clipBorder;
  7607. bool clipChildren;
  7608. /* writeonly */
  7609. Color color;
  7610. /* readonly */
  7611. bool colorGradient;
  7612. Array<Color> colors;
  7613. /* readonly */
  7614. IntRect combinedScreenRect;
  7615. XMLFile defaultStyle;
  7616. /* readonly */
  7617. float derivedOpacity;
  7618. /* readonly */
  7619. uint dragButtonCombo;
  7620. /* readonly */
  7621. int dragButtonCount;
  7622. uint dragDropMode;
  7623. bool editable;
  7624. /* readonly */
  7625. float effectiveScrollStep;
  7626. bool elementEventSender;
  7627. bool enabled;
  7628. /* readonly */
  7629. bool enabledSelf;
  7630. /* readonly */
  7631. bool fixedHeight;
  7632. /* readonly */
  7633. bool fixedSize;
  7634. /* readonly */
  7635. bool fixedWidth;
  7636. bool focus;
  7637. FocusMode focusMode;
  7638. /* readonly */
  7639. Button forwardButton;
  7640. int height;
  7641. HorizontalAlignment horizontalAlignment;
  7642. /* readonly */
  7643. bool hovering;
  7644. int indent;
  7645. int indentSpacing;
  7646. /* readonly */
  7647. int indentWidth;
  7648. bool internal;
  7649. IntRect layoutBorder;
  7650. Vector2 layoutFlexScale;
  7651. LayoutMode layoutMode;
  7652. int layoutSpacing;
  7653. int maxHeight;
  7654. IntVector2 maxSize;
  7655. int maxWidth;
  7656. int minHeight;
  7657. IntVector2 minSize;
  7658. int minWidth;
  7659. String name;
  7660. /* readonly */
  7661. uint numAllChildren;
  7662. /* readonly */
  7663. uint numAttributes;
  7664. /* readonly */
  7665. uint numChildren;
  7666. ObjectAnimation objectAnimation;
  7667. float opacity;
  7668. Orientation orientation;
  7669. UIElement parent;
  7670. IntVector2 position;
  7671. int priority;
  7672. float range;
  7673. /* readonly */
  7674. int refs;
  7675. /* readonly */
  7676. UIElement root;
  7677. /* readonly */
  7678. IntVector2 screenPosition;
  7679. float scrollStep;
  7680. bool selected;
  7681. IntVector2 size;
  7682. /* readonly */
  7683. Slider slider;
  7684. bool sortChildren;
  7685. float stepFactor;
  7686. String style;
  7687. bool temporary;
  7688. TraversalMode traversalMode;
  7689. /* readonly */
  7690. StringHash type;
  7691. /* readonly */
  7692. String typeName;
  7693. bool useDerivedOpacity;
  7694. float value;
  7695. /* readonly */
  7696. VariantMap vars;
  7697. VerticalAlignment verticalAlignment;
  7698. bool visible;
  7699. /* readonly */
  7700. int weakRefs;
  7701. int width;
  7702. };
  7703. class ScrollView
  7704. {
  7705. // Methods:
  7706. void AddChild(UIElement);
  7707. void ApplyAttributes();
  7708. void BringToFront();
  7709. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  7710. void DisableLayoutUpdate();
  7711. IntVector2 ElementToScreen(const IntVector2&);
  7712. void EnableLayoutUpdate();
  7713. uint FindChild(UIElement) const;
  7714. Variant GetAttribute(const String&) const;
  7715. ValueAnimation GetAttributeAnimation(const String&) const;
  7716. float GetAttributeAnimationSpeed(const String&) const;
  7717. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7718. Variant GetAttributeDefault(const String&) const;
  7719. UIElement GetChild(const String&, bool = false) const;
  7720. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  7721. Array<UIElement> GetChildren(bool = false) const;
  7722. UIElement GetElementEventSender() const;
  7723. uint GetNumChildren(bool) const;
  7724. void InsertChild(uint, UIElement);
  7725. bool IsInside(IntVector2, bool);
  7726. bool IsInsideCombined(IntVector2, bool);
  7727. bool Load(File, bool = false);
  7728. bool Load(VectorBuffer&, bool = false);
  7729. bool LoadChildXML(XMLFile, XMLFile = null);
  7730. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  7731. bool LoadXML(File);
  7732. bool LoadXML(VectorBuffer&);
  7733. bool LoadXML(XMLFile, XMLFile);
  7734. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  7735. bool LoadXML(const XMLElement&, bool = false);
  7736. void MarkNetworkUpdate() const;
  7737. void Remove();
  7738. void RemoveAllChildren();
  7739. void RemoveChild(UIElement, uint = 0);
  7740. void RemoveChild(uint);
  7741. void RemoveInstanceDefault();
  7742. void ResetDeepEnabled();
  7743. void ResetToDefault();
  7744. bool Save(File) const;
  7745. bool Save(VectorBuffer&) const;
  7746. bool SaveXML(File);
  7747. bool SaveXML(VectorBuffer&);
  7748. bool SaveXML(XMLElement&) const;
  7749. IntVector2 ScreenToElement(const IntVector2&);
  7750. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7751. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  7752. bool SetAttribute(const String&, const Variant&);
  7753. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7754. void SetAttributeAnimationSpeed(const String&, float);
  7755. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7756. void SetDeepEnabled(bool);
  7757. void SetEnabledRecursive(bool);
  7758. void SetFixedHeight(int);
  7759. void SetFixedSize(int, int);
  7760. void SetFixedWidth(int);
  7761. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  7762. void SetMaxSize(int, int);
  7763. void SetMinSize(int, int);
  7764. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  7765. void SetPosition(int, int);
  7766. void SetScrollBarsVisible(bool, bool);
  7767. void SetSize(int, int);
  7768. bool SetStyle(const String&, XMLFile = null);
  7769. bool SetStyle(const XMLElement&);
  7770. bool SetStyleAuto(XMLFile = null);
  7771. void SetViewPosition(int, int);
  7772. void UpdateLayout();
  7773. const Variant& GetVar(const StringHash&);
  7774. // Properties:
  7775. bool animationEnabled;
  7776. /* readonly */
  7777. Array<Variant> attributeDefaults;
  7778. /* readonly */
  7779. Array<AttributeInfo> attributeInfos;
  7780. Array<Variant> attributes;
  7781. bool autoDisableChildren;
  7782. float autoDisableThreshold;
  7783. /* readonly */
  7784. StringHash baseType;
  7785. bool bringToBack;
  7786. bool bringToFront;
  7787. /* readonly */
  7788. String category;
  7789. /* readonly */
  7790. IntVector2 childOffset;
  7791. /* readonly */
  7792. Array<UIElement> children;
  7793. IntRect clipBorder;
  7794. bool clipChildren;
  7795. /* writeonly */
  7796. Color color;
  7797. /* readonly */
  7798. bool colorGradient;
  7799. Array<Color> colors;
  7800. /* readonly */
  7801. IntRect combinedScreenRect;
  7802. UIElement contentElement;
  7803. XMLFile defaultStyle;
  7804. /* readonly */
  7805. float derivedOpacity;
  7806. /* readonly */
  7807. uint dragButtonCombo;
  7808. /* readonly */
  7809. int dragButtonCount;
  7810. uint dragDropMode;
  7811. bool editable;
  7812. bool elementEventSender;
  7813. bool enabled;
  7814. /* readonly */
  7815. bool enabledSelf;
  7816. /* readonly */
  7817. bool fixedHeight;
  7818. /* readonly */
  7819. bool fixedSize;
  7820. /* readonly */
  7821. bool fixedWidth;
  7822. bool focus;
  7823. FocusMode focusMode;
  7824. int height;
  7825. HorizontalAlignment horizontalAlignment;
  7826. /* readonly */
  7827. ScrollBar horizontalScrollBar;
  7828. /* readonly */
  7829. bool hovering;
  7830. int indent;
  7831. int indentSpacing;
  7832. /* readonly */
  7833. int indentWidth;
  7834. bool internal;
  7835. IntRect layoutBorder;
  7836. Vector2 layoutFlexScale;
  7837. LayoutMode layoutMode;
  7838. int layoutSpacing;
  7839. int maxHeight;
  7840. IntVector2 maxSize;
  7841. int maxWidth;
  7842. int minHeight;
  7843. IntVector2 minSize;
  7844. int minWidth;
  7845. String name;
  7846. /* readonly */
  7847. uint numAllChildren;
  7848. /* readonly */
  7849. uint numAttributes;
  7850. /* readonly */
  7851. uint numChildren;
  7852. ObjectAnimation objectAnimation;
  7853. float opacity;
  7854. float pageStep;
  7855. UIElement parent;
  7856. IntVector2 position;
  7857. int priority;
  7858. /* readonly */
  7859. int refs;
  7860. /* readonly */
  7861. UIElement root;
  7862. /* readonly */
  7863. IntVector2 screenPosition;
  7864. bool scrollBarsAutoVisible;
  7865. float scrollDeceleration;
  7866. /* readonly */
  7867. BorderImage scrollPanel;
  7868. float scrollSnapEpsilon;
  7869. float scrollStep;
  7870. bool selected;
  7871. IntVector2 size;
  7872. bool sortChildren;
  7873. String style;
  7874. bool temporary;
  7875. TraversalMode traversalMode;
  7876. /* readonly */
  7877. StringHash type;
  7878. /* readonly */
  7879. String typeName;
  7880. bool useDerivedOpacity;
  7881. /* readonly */
  7882. VariantMap vars;
  7883. VerticalAlignment verticalAlignment;
  7884. /* readonly */
  7885. ScrollBar verticalScrollBar;
  7886. IntVector2 viewPosition;
  7887. bool visible;
  7888. /* readonly */
  7889. int weakRefs;
  7890. int width;
  7891. };
  7892. class Serializable
  7893. {
  7894. // Methods:
  7895. void ApplyAttributes();
  7896. Variant GetAttribute(const String&) const;
  7897. Variant GetAttributeDefault(const String&) const;
  7898. bool Load(File, bool = false);
  7899. bool Load(VectorBuffer&, bool = false);
  7900. bool LoadXML(const XMLElement&, bool = false);
  7901. void MarkNetworkUpdate() const;
  7902. void RemoveInstanceDefault();
  7903. void ResetToDefault();
  7904. bool Save(File) const;
  7905. bool Save(VectorBuffer&) const;
  7906. bool SaveXML(XMLElement&) const;
  7907. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7908. bool SetAttribute(const String&, const Variant&);
  7909. // Properties:
  7910. /* readonly */
  7911. Array<Variant> attributeDefaults;
  7912. /* readonly */
  7913. Array<AttributeInfo> attributeInfos;
  7914. Array<Variant> attributes;
  7915. /* readonly */
  7916. StringHash baseType;
  7917. /* readonly */
  7918. String category;
  7919. /* readonly */
  7920. uint numAttributes;
  7921. /* readonly */
  7922. int refs;
  7923. bool temporary;
  7924. /* readonly */
  7925. StringHash type;
  7926. /* readonly */
  7927. String typeName;
  7928. /* readonly */
  7929. int weakRefs;
  7930. };
  7931. class Serializer
  7932. {
  7933. // Methods:
  7934. uint Write(Array<uint8>);
  7935. bool WriteBool(bool);
  7936. bool WriteBoundingBox(const BoundingBox&);
  7937. bool WriteByte(int8);
  7938. bool WriteColor(const Color&);
  7939. bool WriteFileID(const String&);
  7940. bool WriteFloat(float);
  7941. bool WriteInt(int);
  7942. bool WriteIntRect(const IntRect&);
  7943. bool WriteIntVector2(const IntVector2&);
  7944. bool WriteLine(const String&);
  7945. bool WriteMatrix3(const Matrix3&);
  7946. bool WriteMatrix3x4(const Matrix3x4&);
  7947. bool WriteMatrix4(const Matrix4&);
  7948. bool WriteNetID(uint);
  7949. bool WritePackedQuaternion(const Quaternion&);
  7950. bool WritePackedVector3(const Vector3&, float);
  7951. bool WriteQuaternion(const Quaternion&);
  7952. bool WriteShort(int16);
  7953. bool WriteString(const String&);
  7954. bool WriteStringHash(const StringHash&);
  7955. bool WriteUByte(uint8);
  7956. bool WriteUInt(uint);
  7957. bool WriteUShort(uint16);
  7958. bool WriteVLE(uint);
  7959. bool WriteVariant(const Variant&);
  7960. bool WriteVariantMap(const VariantMap&);
  7961. bool WriteVector2(const Vector2&);
  7962. bool WriteVector3(const Vector3&);
  7963. bool WriteVector4(const Vector4&);
  7964. };
  7965. class Skeleton
  7966. {
  7967. // Methods:
  7968. Bone GetBone(const String&) const;
  7969. void Reset();
  7970. // Properties:
  7971. /* readonly */
  7972. Array<Bone> bones;
  7973. /* readonly */
  7974. uint numBones;
  7975. /* readonly */
  7976. Bone rootBone;
  7977. };
  7978. class Skybox
  7979. {
  7980. // Methods:
  7981. void ApplyAttributes();
  7982. void ApplyMaterialList(const String& = String ( ));
  7983. void DrawDebugGeometry(DebugRenderer, bool);
  7984. Variant GetAttribute(const String&) const;
  7985. ValueAnimation GetAttributeAnimation(const String&) const;
  7986. float GetAttributeAnimationSpeed(const String&) const;
  7987. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7988. Variant GetAttributeDefault(const String&) const;
  7989. bool IsInView(Camera) const;
  7990. bool Load(File, bool = false);
  7991. bool Load(VectorBuffer&, bool = false);
  7992. bool LoadXML(const XMLElement&, bool = false);
  7993. void MarkNetworkUpdate() const;
  7994. void Remove();
  7995. void RemoveInstanceDefault();
  7996. void ResetToDefault();
  7997. bool Save(File) const;
  7998. bool Save(VectorBuffer&) const;
  7999. bool SaveXML(XMLElement&) const;
  8000. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8001. bool SetAttribute(const String&, const Variant&);
  8002. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8003. void SetAttributeAnimationSpeed(const String&, float);
  8004. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8005. // Properties:
  8006. bool animationEnabled;
  8007. /* readonly */
  8008. Array<Variant> attributeDefaults;
  8009. /* readonly */
  8010. Array<AttributeInfo> attributeInfos;
  8011. Array<Variant> attributes;
  8012. /* readonly */
  8013. StringHash baseType;
  8014. /* readonly */
  8015. BoundingBox boundingBox;
  8016. bool castShadows;
  8017. /* readonly */
  8018. String category;
  8019. float drawDistance;
  8020. bool enabled;
  8021. /* readonly */
  8022. bool enabledEffective;
  8023. /* readonly */
  8024. uint id;
  8025. /* readonly */
  8026. bool inView;
  8027. uint lightMask;
  8028. float lodBias;
  8029. /* writeonly */
  8030. Material material;
  8031. Array<Material> materials;
  8032. uint maxLights;
  8033. Model model;
  8034. /* readonly */
  8035. Node node;
  8036. /* readonly */
  8037. uint numAttributes;
  8038. /* readonly */
  8039. uint numGeometries;
  8040. ObjectAnimation objectAnimation;
  8041. bool occludee;
  8042. bool occluder;
  8043. /* readonly */
  8044. int refs;
  8045. float shadowDistance;
  8046. uint shadowMask;
  8047. bool temporary;
  8048. /* readonly */
  8049. StringHash type;
  8050. /* readonly */
  8051. String typeName;
  8052. uint viewMask;
  8053. /* readonly */
  8054. int weakRefs;
  8055. /* readonly */
  8056. BoundingBox worldBoundingBox;
  8057. /* readonly */
  8058. Zone zone;
  8059. uint zoneMask;
  8060. };
  8061. class Slider
  8062. {
  8063. // Methods:
  8064. void AddChild(UIElement);
  8065. void ApplyAttributes();
  8066. void BringToFront();
  8067. void ChangeValue(float);
  8068. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  8069. void DisableLayoutUpdate();
  8070. IntVector2 ElementToScreen(const IntVector2&);
  8071. void EnableLayoutUpdate();
  8072. uint FindChild(UIElement) const;
  8073. Variant GetAttribute(const String&) const;
  8074. ValueAnimation GetAttributeAnimation(const String&) const;
  8075. float GetAttributeAnimationSpeed(const String&) const;
  8076. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8077. Variant GetAttributeDefault(const String&) const;
  8078. UIElement GetChild(const String&, bool = false) const;
  8079. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  8080. Array<UIElement> GetChildren(bool = false) const;
  8081. UIElement GetElementEventSender() const;
  8082. uint GetNumChildren(bool) const;
  8083. void InsertChild(uint, UIElement);
  8084. bool IsInside(IntVector2, bool);
  8085. bool IsInsideCombined(IntVector2, bool);
  8086. bool Load(File, bool = false);
  8087. bool Load(VectorBuffer&, bool = false);
  8088. bool LoadChildXML(XMLFile, XMLFile = null);
  8089. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  8090. bool LoadXML(File);
  8091. bool LoadXML(VectorBuffer&);
  8092. bool LoadXML(XMLFile, XMLFile);
  8093. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  8094. bool LoadXML(const XMLElement&, bool = false);
  8095. void MarkNetworkUpdate() const;
  8096. void Remove();
  8097. void RemoveAllChildren();
  8098. void RemoveChild(UIElement, uint = 0);
  8099. void RemoveChild(uint);
  8100. void RemoveInstanceDefault();
  8101. void ResetDeepEnabled();
  8102. void ResetToDefault();
  8103. bool Save(File) const;
  8104. bool Save(VectorBuffer&) const;
  8105. bool SaveXML(File);
  8106. bool SaveXML(VectorBuffer&);
  8107. bool SaveXML(XMLElement&) const;
  8108. IntVector2 ScreenToElement(const IntVector2&);
  8109. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8110. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  8111. bool SetAttribute(const String&, const Variant&);
  8112. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8113. void SetAttributeAnimationSpeed(const String&, float);
  8114. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8115. void SetDeepEnabled(bool);
  8116. void SetEnabledRecursive(bool);
  8117. void SetFixedHeight(int);
  8118. void SetFixedSize(int, int);
  8119. void SetFixedWidth(int);
  8120. void SetFullImageRect();
  8121. void SetHoverOffset(int, int);
  8122. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  8123. void SetMaxSize(int, int);
  8124. void SetMinSize(int, int);
  8125. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  8126. void SetPosition(int, int);
  8127. void SetSize(int, int);
  8128. bool SetStyle(const String&, XMLFile = null);
  8129. bool SetStyle(const XMLElement&);
  8130. bool SetStyleAuto(XMLFile = null);
  8131. void UpdateLayout();
  8132. const Variant& GetVar(const StringHash&);
  8133. // Properties:
  8134. bool animationEnabled;
  8135. /* readonly */
  8136. Array<Variant> attributeDefaults;
  8137. /* readonly */
  8138. Array<AttributeInfo> attributeInfos;
  8139. Array<Variant> attributes;
  8140. /* readonly */
  8141. StringHash baseType;
  8142. BlendMode blendMode;
  8143. IntRect border;
  8144. bool bringToBack;
  8145. bool bringToFront;
  8146. /* readonly */
  8147. String category;
  8148. /* readonly */
  8149. IntVector2 childOffset;
  8150. /* readonly */
  8151. Array<UIElement> children;
  8152. IntRect clipBorder;
  8153. bool clipChildren;
  8154. /* writeonly */
  8155. Color color;
  8156. /* readonly */
  8157. bool colorGradient;
  8158. Array<Color> colors;
  8159. /* readonly */
  8160. IntRect combinedScreenRect;
  8161. XMLFile defaultStyle;
  8162. /* readonly */
  8163. float derivedOpacity;
  8164. /* readonly */
  8165. uint dragButtonCombo;
  8166. /* readonly */
  8167. int dragButtonCount;
  8168. uint dragDropMode;
  8169. bool editable;
  8170. bool elementEventSender;
  8171. bool enabled;
  8172. /* readonly */
  8173. bool enabledSelf;
  8174. /* readonly */
  8175. bool fixedHeight;
  8176. /* readonly */
  8177. bool fixedSize;
  8178. /* readonly */
  8179. bool fixedWidth;
  8180. bool focus;
  8181. FocusMode focusMode;
  8182. int height;
  8183. HorizontalAlignment horizontalAlignment;
  8184. IntVector2 hoverOffset;
  8185. /* readonly */
  8186. bool hovering;
  8187. IntRect imageBorder;
  8188. IntRect imageRect;
  8189. int indent;
  8190. int indentSpacing;
  8191. /* readonly */
  8192. int indentWidth;
  8193. bool internal;
  8194. /* readonly */
  8195. BorderImage knob;
  8196. IntRect layoutBorder;
  8197. Vector2 layoutFlexScale;
  8198. LayoutMode layoutMode;
  8199. int layoutSpacing;
  8200. int maxHeight;
  8201. IntVector2 maxSize;
  8202. int maxWidth;
  8203. int minHeight;
  8204. IntVector2 minSize;
  8205. int minWidth;
  8206. String name;
  8207. /* readonly */
  8208. uint numAllChildren;
  8209. /* readonly */
  8210. uint numAttributes;
  8211. /* readonly */
  8212. uint numChildren;
  8213. ObjectAnimation objectAnimation;
  8214. float opacity;
  8215. Orientation orientation;
  8216. UIElement parent;
  8217. IntVector2 position;
  8218. int priority;
  8219. float range;
  8220. /* readonly */
  8221. int refs;
  8222. float repeatRate;
  8223. /* readonly */
  8224. UIElement root;
  8225. /* readonly */
  8226. IntVector2 screenPosition;
  8227. bool selected;
  8228. IntVector2 size;
  8229. bool sortChildren;
  8230. String style;
  8231. bool temporary;
  8232. Texture texture;
  8233. bool tiled;
  8234. TraversalMode traversalMode;
  8235. /* readonly */
  8236. StringHash type;
  8237. /* readonly */
  8238. String typeName;
  8239. bool useDerivedOpacity;
  8240. float value;
  8241. /* readonly */
  8242. VariantMap vars;
  8243. VerticalAlignment verticalAlignment;
  8244. bool visible;
  8245. /* readonly */
  8246. int weakRefs;
  8247. int width;
  8248. };
  8249. class SmoothedTransform
  8250. {
  8251. // Methods:
  8252. void ApplyAttributes();
  8253. void DrawDebugGeometry(DebugRenderer, bool);
  8254. Variant GetAttribute(const String&) const;
  8255. ValueAnimation GetAttributeAnimation(const String&) const;
  8256. float GetAttributeAnimationSpeed(const String&) const;
  8257. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8258. Variant GetAttributeDefault(const String&) const;
  8259. bool Load(File, bool = false);
  8260. bool Load(VectorBuffer&, bool = false);
  8261. bool LoadXML(const XMLElement&, bool = false);
  8262. void MarkNetworkUpdate() const;
  8263. void Remove();
  8264. void RemoveInstanceDefault();
  8265. void ResetToDefault();
  8266. bool Save(File) const;
  8267. bool Save(VectorBuffer&) const;
  8268. bool SaveXML(XMLElement&) const;
  8269. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8270. bool SetAttribute(const String&, const Variant&);
  8271. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8272. void SetAttributeAnimationSpeed(const String&, float);
  8273. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8274. void Update(float, float);
  8275. // Properties:
  8276. bool animationEnabled;
  8277. /* readonly */
  8278. Array<Variant> attributeDefaults;
  8279. /* readonly */
  8280. Array<AttributeInfo> attributeInfos;
  8281. Array<Variant> attributes;
  8282. /* readonly */
  8283. StringHash baseType;
  8284. /* readonly */
  8285. String category;
  8286. bool enabled;
  8287. /* readonly */
  8288. bool enabledEffective;
  8289. /* readonly */
  8290. uint id;
  8291. /* readonly */
  8292. bool inProgress;
  8293. /* readonly */
  8294. Node node;
  8295. /* readonly */
  8296. uint numAttributes;
  8297. ObjectAnimation objectAnimation;
  8298. /* readonly */
  8299. int refs;
  8300. Vector3 targetPosition;
  8301. Quaternion targetRotation;
  8302. Vector3 targetWorldPosition;
  8303. Quaternion targetWorldRotation;
  8304. bool temporary;
  8305. /* readonly */
  8306. StringHash type;
  8307. /* readonly */
  8308. String typeName;
  8309. /* readonly */
  8310. int weakRefs;
  8311. };
  8312. class Sound
  8313. {
  8314. // Methods:
  8315. bool Load(File);
  8316. bool Load(VectorBuffer&);
  8317. bool Save(File) const;
  8318. bool Save(VectorBuffer&) const;
  8319. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8320. // Properties:
  8321. /* readonly */
  8322. StringHash baseType;
  8323. /* readonly */
  8324. String category;
  8325. /* readonly */
  8326. bool compressed;
  8327. /* readonly */
  8328. float frequency;
  8329. /* readonly */
  8330. float length;
  8331. bool looped;
  8332. /* readonly */
  8333. uint memoryUse;
  8334. String name;
  8335. /* readonly */
  8336. int refs;
  8337. /* readonly */
  8338. uint sampleSize;
  8339. /* readonly */
  8340. bool sixteenBit;
  8341. /* readonly */
  8342. bool stereo;
  8343. /* readonly */
  8344. StringHash type;
  8345. /* readonly */
  8346. String typeName;
  8347. /* readonly */
  8348. uint useTimer;
  8349. /* readonly */
  8350. int weakRefs;
  8351. };
  8352. class SoundListener
  8353. {
  8354. // Methods:
  8355. void ApplyAttributes();
  8356. void DrawDebugGeometry(DebugRenderer, bool);
  8357. Variant GetAttribute(const String&) const;
  8358. ValueAnimation GetAttributeAnimation(const String&) const;
  8359. float GetAttributeAnimationSpeed(const String&) const;
  8360. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8361. Variant GetAttributeDefault(const String&) const;
  8362. bool Load(File, bool = false);
  8363. bool Load(VectorBuffer&, bool = false);
  8364. bool LoadXML(const XMLElement&, bool = false);
  8365. void MarkNetworkUpdate() const;
  8366. void Remove();
  8367. void RemoveInstanceDefault();
  8368. void ResetToDefault();
  8369. bool Save(File) const;
  8370. bool Save(VectorBuffer&) const;
  8371. bool SaveXML(XMLElement&) const;
  8372. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8373. bool SetAttribute(const String&, const Variant&);
  8374. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8375. void SetAttributeAnimationSpeed(const String&, float);
  8376. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8377. // Properties:
  8378. bool animationEnabled;
  8379. /* readonly */
  8380. Array<Variant> attributeDefaults;
  8381. /* readonly */
  8382. Array<AttributeInfo> attributeInfos;
  8383. Array<Variant> attributes;
  8384. /* readonly */
  8385. StringHash baseType;
  8386. /* readonly */
  8387. String category;
  8388. bool enabled;
  8389. /* readonly */
  8390. bool enabledEffective;
  8391. /* readonly */
  8392. uint id;
  8393. /* readonly */
  8394. Node node;
  8395. /* readonly */
  8396. uint numAttributes;
  8397. ObjectAnimation objectAnimation;
  8398. /* readonly */
  8399. int refs;
  8400. bool temporary;
  8401. /* readonly */
  8402. StringHash type;
  8403. /* readonly */
  8404. String typeName;
  8405. /* readonly */
  8406. int weakRefs;
  8407. };
  8408. class SoundSource
  8409. {
  8410. // Methods:
  8411. void ApplyAttributes();
  8412. void DrawDebugGeometry(DebugRenderer, bool);
  8413. Variant GetAttribute(const String&) const;
  8414. ValueAnimation GetAttributeAnimation(const String&) const;
  8415. float GetAttributeAnimationSpeed(const String&) const;
  8416. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8417. Variant GetAttributeDefault(const String&) const;
  8418. bool Load(File, bool = false);
  8419. bool Load(VectorBuffer&, bool = false);
  8420. bool LoadXML(const XMLElement&, bool = false);
  8421. void MarkNetworkUpdate() const;
  8422. void Play(Sound);
  8423. void Play(Sound, float);
  8424. void Play(Sound, float, float);
  8425. void Play(Sound, float, float, float);
  8426. void Remove();
  8427. void RemoveInstanceDefault();
  8428. void ResetToDefault();
  8429. bool Save(File) const;
  8430. bool Save(VectorBuffer&) const;
  8431. bool SaveXML(XMLElement&) const;
  8432. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8433. bool SetAttribute(const String&, const Variant&);
  8434. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8435. void SetAttributeAnimationSpeed(const String&, float);
  8436. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8437. void Stop();
  8438. // Properties:
  8439. bool animationEnabled;
  8440. /* readonly */
  8441. float attenuation;
  8442. /* readonly */
  8443. Array<Variant> attributeDefaults;
  8444. /* readonly */
  8445. Array<AttributeInfo> attributeInfos;
  8446. Array<Variant> attributes;
  8447. bool autoRemove;
  8448. /* readonly */
  8449. StringHash baseType;
  8450. /* readonly */
  8451. String category;
  8452. bool enabled;
  8453. /* readonly */
  8454. bool enabledEffective;
  8455. float frequency;
  8456. float gain;
  8457. /* readonly */
  8458. uint id;
  8459. /* readonly */
  8460. Node node;
  8461. /* readonly */
  8462. uint numAttributes;
  8463. ObjectAnimation objectAnimation;
  8464. float panning;
  8465. /* readonly */
  8466. bool playing;
  8467. /* readonly */
  8468. int refs;
  8469. /* readonly */
  8470. Sound sound;
  8471. String soundType;
  8472. bool temporary;
  8473. /* readonly */
  8474. float timePosition;
  8475. /* readonly */
  8476. StringHash type;
  8477. /* readonly */
  8478. String typeName;
  8479. /* readonly */
  8480. int weakRefs;
  8481. };
  8482. class SoundSource3D
  8483. {
  8484. // Methods:
  8485. void ApplyAttributes();
  8486. void DrawDebugGeometry(DebugRenderer, bool);
  8487. Variant GetAttribute(const String&) const;
  8488. ValueAnimation GetAttributeAnimation(const String&) const;
  8489. float GetAttributeAnimationSpeed(const String&) const;
  8490. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8491. Variant GetAttributeDefault(const String&) const;
  8492. bool Load(File, bool = false);
  8493. bool Load(VectorBuffer&, bool = false);
  8494. bool LoadXML(const XMLElement&, bool = false);
  8495. void MarkNetworkUpdate() const;
  8496. void Play(Sound);
  8497. void Play(Sound, float);
  8498. void Play(Sound, float, float);
  8499. void Play(Sound, float, float, float);
  8500. void Remove();
  8501. void RemoveInstanceDefault();
  8502. void ResetToDefault();
  8503. bool Save(File) const;
  8504. bool Save(VectorBuffer&) const;
  8505. bool SaveXML(XMLElement&) const;
  8506. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8507. void SetAngleAttenuation(float, float);
  8508. bool SetAttribute(const String&, const Variant&);
  8509. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8510. void SetAttributeAnimationSpeed(const String&, float);
  8511. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8512. void SetDistanceAttenuation(float, float, float);
  8513. void Stop();
  8514. // Properties:
  8515. bool animationEnabled;
  8516. /* readonly */
  8517. float attenuation;
  8518. /* readonly */
  8519. Array<Variant> attributeDefaults;
  8520. /* readonly */
  8521. Array<AttributeInfo> attributeInfos;
  8522. Array<Variant> attributes;
  8523. bool autoRemove;
  8524. /* readonly */
  8525. StringHash baseType;
  8526. /* readonly */
  8527. String category;
  8528. bool enabled;
  8529. /* readonly */
  8530. bool enabledEffective;
  8531. float farDistance;
  8532. float frequency;
  8533. float gain;
  8534. /* readonly */
  8535. uint id;
  8536. float innerAngle;
  8537. float nearDistance;
  8538. /* readonly */
  8539. Node node;
  8540. /* readonly */
  8541. uint numAttributes;
  8542. ObjectAnimation objectAnimation;
  8543. float outerAngle;
  8544. float panning;
  8545. /* readonly */
  8546. bool playing;
  8547. /* readonly */
  8548. int refs;
  8549. float rolloffFactor;
  8550. /* readonly */
  8551. Sound sound;
  8552. String soundType;
  8553. bool temporary;
  8554. /* readonly */
  8555. float timePosition;
  8556. /* readonly */
  8557. StringHash type;
  8558. /* readonly */
  8559. String typeName;
  8560. /* readonly */
  8561. int weakRefs;
  8562. };
  8563. class Sphere
  8564. {
  8565. // Methods:
  8566. void Clear();
  8567. void Define(const BoundingBox&);
  8568. void Define(const Frustum&);
  8569. void Define(const Polyhedron&);
  8570. void Define(const Sphere&);
  8571. void Define(const Vector3&, float);
  8572. float Distance(const Vector3&) const;
  8573. Intersection IsInside(const BoundingBox&) const;
  8574. Intersection IsInside(const Sphere&) const;
  8575. Intersection IsInside(const Vector3&) const;
  8576. void Merge(const BoundingBox&);
  8577. void Merge(const Frustum&);
  8578. void Merge(const Sphere&);
  8579. void Merge(const Vector3&);
  8580. // Properties:
  8581. Vector3 center;
  8582. bool defined;
  8583. float radius;
  8584. };
  8585. class Spline
  8586. {
  8587. // Methods:
  8588. void AddKnot(const Variant&);
  8589. void AddKnot(const Variant&, uint);
  8590. void Clear();
  8591. Variant GetPoint(float);
  8592. void RemoveKnot();
  8593. void RemoveKnot(uint);
  8594. // Properties:
  8595. InterpolationMode interpolationMode;
  8596. Array<Variant> knot;
  8597. Array<Variant> knots;
  8598. };
  8599. class SplinePath
  8600. {
  8601. // Methods:
  8602. void AddControlPoint(Node, uint = M_MAX_UNSIGNED);
  8603. void ApplyAttributes();
  8604. void ClearControlPoints();
  8605. void DrawDebugGeometry(DebugRenderer, bool);
  8606. Variant GetAttribute(const String&) const;
  8607. ValueAnimation GetAttributeAnimation(const String&) const;
  8608. float GetAttributeAnimationSpeed(const String&) const;
  8609. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8610. Variant GetAttributeDefault(const String&) const;
  8611. Vector3 GetPoint(float) const;
  8612. bool Load(File, bool = false);
  8613. bool Load(VectorBuffer&, bool = false);
  8614. bool LoadXML(const XMLElement&, bool = false);
  8615. void MarkNetworkUpdate() const;
  8616. void Move(float);
  8617. void Remove();
  8618. void RemoveControlPoint(Node);
  8619. void RemoveInstanceDefault();
  8620. void Reset();
  8621. void ResetToDefault();
  8622. bool Save(File) const;
  8623. bool Save(VectorBuffer&) const;
  8624. bool SaveXML(XMLElement&) const;
  8625. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8626. bool SetAttribute(const String&, const Variant&);
  8627. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8628. void SetAttributeAnimationSpeed(const String&, float);
  8629. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8630. // Properties:
  8631. bool animationEnabled;
  8632. /* readonly */
  8633. Array<Variant> attributeDefaults;
  8634. /* readonly */
  8635. Array<AttributeInfo> attributeInfos;
  8636. Array<Variant> attributes;
  8637. /* readonly */
  8638. StringHash baseType;
  8639. /* readonly */
  8640. String category;
  8641. Node controlledNode;
  8642. bool enabled;
  8643. /* readonly */
  8644. bool enabledEffective;
  8645. /* readonly */
  8646. uint id;
  8647. InterpolationMode interpolationMode;
  8648. /* readonly */
  8649. bool isFinished;
  8650. /* readonly */
  8651. Node node;
  8652. /* readonly */
  8653. uint numAttributes;
  8654. ObjectAnimation objectAnimation;
  8655. Vector3 position;
  8656. /* readonly */
  8657. int refs;
  8658. float speed;
  8659. bool temporary;
  8660. /* readonly */
  8661. StringHash type;
  8662. /* readonly */
  8663. String typeName;
  8664. /* readonly */
  8665. int weakRefs;
  8666. };
  8667. class Sprite
  8668. {
  8669. // Methods:
  8670. void AddChild(UIElement);
  8671. void ApplyAttributes();
  8672. void BringToFront();
  8673. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  8674. uint FindChild(UIElement) const;
  8675. Variant GetAttribute(const String&) const;
  8676. ValueAnimation GetAttributeAnimation(const String&) const;
  8677. float GetAttributeAnimationSpeed(const String&) const;
  8678. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8679. Variant GetAttributeDefault(const String&) const;
  8680. UIElement GetChild(const String&, bool = false) const;
  8681. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  8682. Array<UIElement> GetChildren(bool = false) const;
  8683. UIElement GetElementEventSender() const;
  8684. uint GetNumChildren(bool) const;
  8685. void InsertChild(uint, UIElement);
  8686. bool Load(File, bool = false);
  8687. bool Load(VectorBuffer&, bool = false);
  8688. bool LoadChildXML(XMLFile, XMLFile = null);
  8689. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  8690. bool LoadXML(File);
  8691. bool LoadXML(VectorBuffer&);
  8692. bool LoadXML(XMLFile, XMLFile);
  8693. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  8694. bool LoadXML(const XMLElement&, bool = false);
  8695. void MarkNetworkUpdate() const;
  8696. void Remove();
  8697. void RemoveAllChildren();
  8698. void RemoveChild(UIElement, uint = 0);
  8699. void RemoveChild(uint);
  8700. void RemoveInstanceDefault();
  8701. void ResetToDefault();
  8702. bool Save(File) const;
  8703. bool Save(VectorBuffer&) const;
  8704. bool SaveXML(File);
  8705. bool SaveXML(VectorBuffer&);
  8706. bool SaveXML(XMLElement&) const;
  8707. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8708. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  8709. bool SetAttribute(const String&, const Variant&);
  8710. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8711. void SetAttributeAnimationSpeed(const String&, float);
  8712. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8713. void SetFixedHeight(int);
  8714. void SetFixedSize(int, int);
  8715. void SetFixedWidth(int);
  8716. void SetFullImageRect();
  8717. void SetHotSpot(int, int);
  8718. void SetMaxSize(int, int);
  8719. void SetMinSize(int, int);
  8720. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  8721. void SetPosition(float, float);
  8722. void SetScale(float);
  8723. void SetScale(float, float);
  8724. void SetSize(int, int);
  8725. bool SetStyle(const String&, XMLFile = null);
  8726. bool SetStyle(const XMLElement&);
  8727. bool SetStyleAuto(XMLFile = null);
  8728. const Variant& GetVar(const StringHash&);
  8729. // Properties:
  8730. bool animationEnabled;
  8731. /* readonly */
  8732. Array<Variant> attributeDefaults;
  8733. /* readonly */
  8734. Array<AttributeInfo> attributeInfos;
  8735. Array<Variant> attributes;
  8736. /* readonly */
  8737. StringHash baseType;
  8738. BlendMode blendMode;
  8739. bool bringToBack;
  8740. bool bringToFront;
  8741. /* readonly */
  8742. String category;
  8743. /* readonly */
  8744. Array<UIElement> children;
  8745. /* writeonly */
  8746. Color color;
  8747. /* readonly */
  8748. bool colorGradient;
  8749. Array<Color> colors;
  8750. XMLFile defaultStyle;
  8751. /* readonly */
  8752. float derivedOpacity;
  8753. /* readonly */
  8754. uint dragButtonCombo;
  8755. /* readonly */
  8756. int dragButtonCount;
  8757. bool elementEventSender;
  8758. int height;
  8759. HorizontalAlignment horizontalAlignment;
  8760. IntVector2 hotSpot;
  8761. IntRect imageRect;
  8762. String name;
  8763. /* readonly */
  8764. uint numAllChildren;
  8765. /* readonly */
  8766. uint numAttributes;
  8767. /* readonly */
  8768. uint numChildren;
  8769. ObjectAnimation objectAnimation;
  8770. float opacity;
  8771. UIElement parent;
  8772. Vector2 position;
  8773. int priority;
  8774. /* readonly */
  8775. int refs;
  8776. /* readonly */
  8777. UIElement root;
  8778. float rotation;
  8779. Vector2 scale;
  8780. IntVector2 size;
  8781. bool sortChildren;
  8782. String style;
  8783. bool temporary;
  8784. Texture texture;
  8785. /* readonly */
  8786. StringHash type;
  8787. /* readonly */
  8788. String typeName;
  8789. bool useDerivedOpacity;
  8790. /* readonly */
  8791. VariantMap vars;
  8792. VerticalAlignment verticalAlignment;
  8793. bool visible;
  8794. /* readonly */
  8795. int weakRefs;
  8796. int width;
  8797. };
  8798. class Sprite2D
  8799. {
  8800. // Methods:
  8801. bool Load(File);
  8802. bool Load(VectorBuffer&);
  8803. bool Save(File) const;
  8804. bool Save(VectorBuffer&) const;
  8805. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8806. // Properties:
  8807. /* readonly */
  8808. StringHash baseType;
  8809. /* readonly */
  8810. String category;
  8811. Vector2 hotSpot;
  8812. /* readonly */
  8813. uint memoryUse;
  8814. String name;
  8815. IntVector2 offset;
  8816. IntRect rectangle;
  8817. /* readonly */
  8818. int refs;
  8819. Texture2D texture;
  8820. /* readonly */
  8821. StringHash type;
  8822. /* readonly */
  8823. String typeName;
  8824. /* readonly */
  8825. uint useTimer;
  8826. /* readonly */
  8827. int weakRefs;
  8828. };
  8829. class SpriteSheet2D
  8830. {
  8831. // Methods:
  8832. void DefineSprite(const String&, const IntRect&, const Vector2& = Vector2 ( 0.5f , 0.5f ), const IntVector2& = IntVector2 :: ZERO);
  8833. Sprite2D GetSprite(const String&);
  8834. bool Load(File);
  8835. bool Load(VectorBuffer&);
  8836. bool Save(File) const;
  8837. bool Save(VectorBuffer&) const;
  8838. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8839. // Properties:
  8840. /* readonly */
  8841. StringHash baseType;
  8842. /* readonly */
  8843. String category;
  8844. /* readonly */
  8845. uint memoryUse;
  8846. String name;
  8847. /* readonly */
  8848. int refs;
  8849. /* readonly */
  8850. Texture2D texture;
  8851. /* readonly */
  8852. StringHash type;
  8853. /* readonly */
  8854. String typeName;
  8855. /* readonly */
  8856. uint useTimer;
  8857. /* readonly */
  8858. int weakRefs;
  8859. };
  8860. class StaticModel
  8861. {
  8862. // Methods:
  8863. void ApplyAttributes();
  8864. void ApplyMaterialList(const String& = String ( ));
  8865. void DrawDebugGeometry(DebugRenderer, bool);
  8866. Variant GetAttribute(const String&) const;
  8867. ValueAnimation GetAttributeAnimation(const String&) const;
  8868. float GetAttributeAnimationSpeed(const String&) const;
  8869. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8870. Variant GetAttributeDefault(const String&) const;
  8871. bool IsInView(Camera) const;
  8872. bool IsInside(const Vector3&) const;
  8873. bool IsInsideLocal(const Vector3&) const;
  8874. bool Load(File, bool = false);
  8875. bool Load(VectorBuffer&, bool = false);
  8876. bool LoadXML(const XMLElement&, bool = false);
  8877. void MarkNetworkUpdate() const;
  8878. void Remove();
  8879. void RemoveInstanceDefault();
  8880. void ResetToDefault();
  8881. bool Save(File) const;
  8882. bool Save(VectorBuffer&) const;
  8883. bool SaveXML(XMLElement&) const;
  8884. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8885. bool SetAttribute(const String&, const Variant&);
  8886. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8887. void SetAttributeAnimationSpeed(const String&, float);
  8888. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8889. // Properties:
  8890. bool animationEnabled;
  8891. /* readonly */
  8892. Array<Variant> attributeDefaults;
  8893. /* readonly */
  8894. Array<AttributeInfo> attributeInfos;
  8895. Array<Variant> attributes;
  8896. /* readonly */
  8897. StringHash baseType;
  8898. /* readonly */
  8899. BoundingBox boundingBox;
  8900. bool castShadows;
  8901. /* readonly */
  8902. String category;
  8903. float drawDistance;
  8904. bool enabled;
  8905. /* readonly */
  8906. bool enabledEffective;
  8907. /* readonly */
  8908. uint id;
  8909. /* readonly */
  8910. bool inView;
  8911. uint lightMask;
  8912. float lodBias;
  8913. /* writeonly */
  8914. Material material;
  8915. Array<Material> materials;
  8916. uint maxLights;
  8917. Model model;
  8918. /* readonly */
  8919. Node node;
  8920. /* readonly */
  8921. uint numAttributes;
  8922. /* readonly */
  8923. uint numGeometries;
  8924. ObjectAnimation objectAnimation;
  8925. bool occludee;
  8926. bool occluder;
  8927. uint occlusionLodLevel;
  8928. /* readonly */
  8929. int refs;
  8930. float shadowDistance;
  8931. uint shadowMask;
  8932. bool temporary;
  8933. /* readonly */
  8934. StringHash type;
  8935. /* readonly */
  8936. String typeName;
  8937. uint viewMask;
  8938. /* readonly */
  8939. int weakRefs;
  8940. /* readonly */
  8941. BoundingBox worldBoundingBox;
  8942. uint zoneMask;
  8943. };
  8944. class StaticModelGroup
  8945. {
  8946. // Methods:
  8947. void AddInstanceNode(Node);
  8948. void ApplyAttributes();
  8949. void ApplyMaterialList(const String& = String ( ));
  8950. void DrawDebugGeometry(DebugRenderer, bool);
  8951. Variant GetAttribute(const String&) const;
  8952. ValueAnimation GetAttributeAnimation(const String&) const;
  8953. float GetAttributeAnimationSpeed(const String&) const;
  8954. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8955. Variant GetAttributeDefault(const String&) const;
  8956. bool IsInView(Camera) const;
  8957. bool Load(File, bool = false);
  8958. bool Load(VectorBuffer&, bool = false);
  8959. bool LoadXML(const XMLElement&, bool = false);
  8960. void MarkNetworkUpdate() const;
  8961. void Remove();
  8962. void RemoveAllInstanceNodes();
  8963. void RemoveInstanceDefault();
  8964. void RemoveInstanceNode(Node);
  8965. void ResetToDefault();
  8966. bool Save(File) const;
  8967. bool Save(VectorBuffer&) const;
  8968. bool SaveXML(XMLElement&) const;
  8969. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8970. bool SetAttribute(const String&, const Variant&);
  8971. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8972. void SetAttributeAnimationSpeed(const String&, float);
  8973. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8974. // Properties:
  8975. bool animationEnabled;
  8976. /* readonly */
  8977. Array<Variant> attributeDefaults;
  8978. /* readonly */
  8979. Array<AttributeInfo> attributeInfos;
  8980. Array<Variant> attributes;
  8981. /* readonly */
  8982. StringHash baseType;
  8983. /* readonly */
  8984. BoundingBox boundingBox;
  8985. bool castShadows;
  8986. /* readonly */
  8987. String category;
  8988. float drawDistance;
  8989. bool enabled;
  8990. /* readonly */
  8991. bool enabledEffective;
  8992. /* readonly */
  8993. uint id;
  8994. /* readonly */
  8995. bool inView;
  8996. /* readonly */
  8997. Array<Node> instanceNodes;
  8998. uint lightMask;
  8999. float lodBias;
  9000. /* writeonly */
  9001. Material material;
  9002. Array<Material> materials;
  9003. uint maxLights;
  9004. Model model;
  9005. /* readonly */
  9006. Node node;
  9007. /* readonly */
  9008. uint numAttributes;
  9009. /* readonly */
  9010. uint numGeometries;
  9011. /* readonly */
  9012. uint numInstanceNodes;
  9013. ObjectAnimation objectAnimation;
  9014. bool occludee;
  9015. bool occluder;
  9016. uint occlusionLodLevel;
  9017. /* readonly */
  9018. int refs;
  9019. float shadowDistance;
  9020. uint shadowMask;
  9021. bool temporary;
  9022. /* readonly */
  9023. StringHash type;
  9024. /* readonly */
  9025. String typeName;
  9026. uint viewMask;
  9027. /* readonly */
  9028. int weakRefs;
  9029. /* readonly */
  9030. BoundingBox worldBoundingBox;
  9031. /* readonly */
  9032. Zone zone;
  9033. uint zoneMask;
  9034. };
  9035. class StaticSprite2D
  9036. {
  9037. // Methods:
  9038. void ApplyAttributes();
  9039. void DrawDebugGeometry(DebugRenderer, bool);
  9040. Variant GetAttribute(const String&) const;
  9041. ValueAnimation GetAttributeAnimation(const String&) const;
  9042. float GetAttributeAnimationSpeed(const String&) const;
  9043. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9044. Variant GetAttributeDefault(const String&) const;
  9045. bool IsInView(Camera) const;
  9046. bool Load(File, bool = false);
  9047. bool Load(VectorBuffer&, bool = false);
  9048. bool LoadXML(const XMLElement&, bool = false);
  9049. void MarkNetworkUpdate() const;
  9050. void Remove();
  9051. void RemoveInstanceDefault();
  9052. void ResetToDefault();
  9053. bool Save(File) const;
  9054. bool Save(VectorBuffer&) const;
  9055. bool SaveXML(XMLElement&) const;
  9056. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9057. bool SetAttribute(const String&, const Variant&);
  9058. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9059. void SetAttributeAnimationSpeed(const String&, float);
  9060. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9061. void SetFlip(bool, bool);
  9062. // Properties:
  9063. bool animationEnabled;
  9064. /* readonly */
  9065. Array<Variant> attributeDefaults;
  9066. /* readonly */
  9067. Array<AttributeInfo> attributeInfos;
  9068. Array<Variant> attributes;
  9069. /* readonly */
  9070. StringHash baseType;
  9071. BlendMode blendMode;
  9072. /* readonly */
  9073. BoundingBox boundingBox;
  9074. bool castShadows;
  9075. /* readonly */
  9076. String category;
  9077. Color color;
  9078. float drawDistance;
  9079. bool enabled;
  9080. /* readonly */
  9081. bool enabledEffective;
  9082. bool flipX;
  9083. bool flipY;
  9084. /* readonly */
  9085. uint id;
  9086. /* readonly */
  9087. bool inView;
  9088. int layer;
  9089. uint lightMask;
  9090. float lodBias;
  9091. uint maxLights;
  9092. /* readonly */
  9093. Node node;
  9094. /* readonly */
  9095. uint numAttributes;
  9096. ObjectAnimation objectAnimation;
  9097. bool occludee;
  9098. bool occluder;
  9099. int orderInLayer;
  9100. /* readonly */
  9101. int refs;
  9102. float shadowDistance;
  9103. uint shadowMask;
  9104. Sprite2D sprite;
  9105. bool temporary;
  9106. Texture2D texture;
  9107. /* readonly */
  9108. StringHash type;
  9109. /* readonly */
  9110. String typeName;
  9111. uint viewMask;
  9112. /* readonly */
  9113. int weakRefs;
  9114. /* readonly */
  9115. BoundingBox worldBoundingBox;
  9116. uint zoneMask;
  9117. };
  9118. class String
  9119. {
  9120. // Methods:
  9121. void AppendUTF8(uint);
  9122. uint AtUTF8(uint) const;
  9123. uint ByteOffsetUTF8(uint) const;
  9124. void Clear();
  9125. int Compare(const String&, bool = true) const;
  9126. bool Contains(const String&, bool = true) const;
  9127. bool Contains(uint8, bool = true) const;
  9128. bool EndsWith(const String&, bool = true) const;
  9129. uint Find(const String&, uint = 0, bool = true) const;
  9130. uint Find(uint8, uint = 0, bool = true) const;
  9131. uint FindLast(const String&, uint = 0xffffffff, bool = true) const;
  9132. uint FindLast(uint8, uint = 0xffffffff, bool = true) const;
  9133. void Join(Array<String>&, const String&);
  9134. uint NextUTF8Char(uint&) const;
  9135. void Replace(const String&, const String&, bool = true);
  9136. void Replace(uint8, uint8, bool = true);
  9137. void ReplaceUTF8(uint, uint);
  9138. String Replaced(const String&, const String&, bool = true) const;
  9139. String Replaced(uint8, uint8, bool = true) const;
  9140. void Resize(uint);
  9141. void SetUTF8FromLatin1(const String&);
  9142. Array<String> Split(uint8) const;
  9143. bool StartsWith(const String&, bool = true) const;
  9144. String Substring(uint) const;
  9145. String Substring(uint, uint) const;
  9146. String SubstringUTF8(uint) const;
  9147. String SubstringUTF8(uint, uint) const;
  9148. bool ToBool() const;
  9149. Color ToColor() const;
  9150. float ToFloat() const;
  9151. int ToInt() const;
  9152. IntRect ToIntRect() const;
  9153. IntVector2 ToIntVector2() const;
  9154. String ToLower() const;
  9155. Matrix3 ToMatrix3() const;
  9156. Matrix3x4 ToMatrix3x4() const;
  9157. Matrix4 ToMatrix4() const;
  9158. Quaternion ToQuaternion() const;
  9159. uint ToUInt() const;
  9160. String ToUpper() const;
  9161. Vector2 ToVector2() const;
  9162. Vector3 ToVector3() const;
  9163. Vector4 ToVector4(bool = false) const;
  9164. Variant ToVectorVariant() const;
  9165. String Trimmed() const;
  9166. // Properties:
  9167. /* readonly */
  9168. bool empty;
  9169. /* readonly */
  9170. uint length;
  9171. /* readonly */
  9172. uint utf8Length;
  9173. };
  9174. class StringHash
  9175. {
  9176. // Methods:
  9177. String ToString() const;
  9178. // Properties:
  9179. /* readonly */
  9180. uint value;
  9181. };
  9182. class Technique
  9183. {
  9184. // Methods:
  9185. Pass CreatePass(StringHash);
  9186. Pass GetPass(StringHash);
  9187. Pass GetSupportedPass(StringHash);
  9188. bool HasPass(StringHash) const;
  9189. bool Load(File);
  9190. bool Load(VectorBuffer&);
  9191. void RemovePass(StringHash);
  9192. bool Save(File) const;
  9193. bool Save(VectorBuffer&) const;
  9194. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9195. // Properties:
  9196. /* readonly */
  9197. StringHash baseType;
  9198. /* readonly */
  9199. String category;
  9200. bool desktop;
  9201. /* readonly */
  9202. uint memoryUse;
  9203. String name;
  9204. /* readonly */
  9205. uint numPasses;
  9206. /* readonly */
  9207. Array<StringHash> passTypes;
  9208. /* readonly */
  9209. Array<Pass> passes;
  9210. /* readonly */
  9211. int refs;
  9212. bool sm3;
  9213. /* readonly */
  9214. bool supported;
  9215. /* readonly */
  9216. StringHash type;
  9217. /* readonly */
  9218. String typeName;
  9219. /* readonly */
  9220. uint useTimer;
  9221. /* readonly */
  9222. int weakRefs;
  9223. };
  9224. class TechniqueEntry
  9225. {
  9226. // Properties:
  9227. float lodDistance;
  9228. int qualityLevel;
  9229. Technique technique;
  9230. };
  9231. class Terrain
  9232. {
  9233. // Methods:
  9234. void ApplyAttributes();
  9235. void ApplyHeightMap();
  9236. void DrawDebugGeometry(DebugRenderer, bool);
  9237. Variant GetAttribute(const String&) const;
  9238. ValueAnimation GetAttributeAnimation(const String&) const;
  9239. float GetAttributeAnimationSpeed(const String&) const;
  9240. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9241. Variant GetAttributeDefault(const String&) const;
  9242. float GetHeight(const Vector3&) const;
  9243. Vector3 GetNormal(const Vector3&) const;
  9244. TerrainPatch GetPatch(int, int) const;
  9245. bool Load(File, bool = false);
  9246. bool Load(VectorBuffer&, bool = false);
  9247. bool LoadXML(const XMLElement&, bool = false);
  9248. void MarkNetworkUpdate() const;
  9249. void Remove();
  9250. void RemoveInstanceDefault();
  9251. void ResetToDefault();
  9252. bool Save(File) const;
  9253. bool Save(VectorBuffer&) const;
  9254. bool SaveXML(XMLElement&) const;
  9255. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9256. bool SetAttribute(const String&, const Variant&);
  9257. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9258. void SetAttributeAnimationSpeed(const String&, float);
  9259. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9260. IntVector2 WorldToHeightMap(const Vector3&) const;
  9261. // Properties:
  9262. bool animationEnabled;
  9263. /* readonly */
  9264. Array<Variant> attributeDefaults;
  9265. /* readonly */
  9266. Array<AttributeInfo> attributeInfos;
  9267. Array<Variant> attributes;
  9268. /* readonly */
  9269. StringHash baseType;
  9270. bool castShadows;
  9271. /* readonly */
  9272. String category;
  9273. float drawDistance;
  9274. bool enabled;
  9275. /* readonly */
  9276. bool enabledEffective;
  9277. Image heightMap;
  9278. /* readonly */
  9279. uint id;
  9280. uint lightMask;
  9281. float lodBias;
  9282. Material material;
  9283. uint maxLights;
  9284. /* readonly */
  9285. Node node;
  9286. /* readonly */
  9287. uint numAttributes;
  9288. /* readonly */
  9289. IntVector2 numPatches;
  9290. /* readonly */
  9291. IntVector2 numVertices;
  9292. ObjectAnimation objectAnimation;
  9293. bool occludee;
  9294. bool occluder;
  9295. int patchSize;
  9296. /* readonly */
  9297. Array<TerrainPatch> patches;
  9298. /* readonly */
  9299. int refs;
  9300. float shadowDistance;
  9301. uint shadowMask;
  9302. bool smoothing;
  9303. Vector3 spacing;
  9304. bool temporary;
  9305. /* readonly */
  9306. StringHash type;
  9307. /* readonly */
  9308. String typeName;
  9309. uint viewMask;
  9310. /* readonly */
  9311. int weakRefs;
  9312. uint zoneMask;
  9313. };
  9314. class TerrainPatch
  9315. {
  9316. // Methods:
  9317. void ApplyAttributes();
  9318. void DrawDebugGeometry(DebugRenderer, bool);
  9319. Variant GetAttribute(const String&) const;
  9320. ValueAnimation GetAttributeAnimation(const String&) const;
  9321. float GetAttributeAnimationSpeed(const String&) const;
  9322. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9323. Variant GetAttributeDefault(const String&) const;
  9324. bool IsInView(Camera) const;
  9325. bool Load(File, bool = false);
  9326. bool Load(VectorBuffer&, bool = false);
  9327. bool LoadXML(const XMLElement&, bool = false);
  9328. void MarkNetworkUpdate() const;
  9329. void Remove();
  9330. void RemoveInstanceDefault();
  9331. void ResetToDefault();
  9332. bool Save(File) const;
  9333. bool Save(VectorBuffer&) const;
  9334. bool SaveXML(XMLElement&) const;
  9335. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9336. bool SetAttribute(const String&, const Variant&);
  9337. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9338. void SetAttributeAnimationSpeed(const String&, float);
  9339. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9340. // Properties:
  9341. bool animationEnabled;
  9342. /* readonly */
  9343. Array<Variant> attributeDefaults;
  9344. /* readonly */
  9345. Array<AttributeInfo> attributeInfos;
  9346. Array<Variant> attributes;
  9347. /* readonly */
  9348. StringHash baseType;
  9349. /* readonly */
  9350. BoundingBox boundingBox;
  9351. bool castShadows;
  9352. /* readonly */
  9353. String category;
  9354. float drawDistance;
  9355. bool enabled;
  9356. /* readonly */
  9357. bool enabledEffective;
  9358. /* readonly */
  9359. uint id;
  9360. /* readonly */
  9361. bool inView;
  9362. uint lightMask;
  9363. float lodBias;
  9364. uint maxLights;
  9365. /* readonly */
  9366. Node node;
  9367. /* readonly */
  9368. uint numAttributes;
  9369. ObjectAnimation objectAnimation;
  9370. bool occludee;
  9371. bool occluder;
  9372. /* readonly */
  9373. int refs;
  9374. float shadowDistance;
  9375. uint shadowMask;
  9376. bool temporary;
  9377. /* readonly */
  9378. StringHash type;
  9379. /* readonly */
  9380. String typeName;
  9381. uint viewMask;
  9382. /* readonly */
  9383. int weakRefs;
  9384. /* readonly */
  9385. BoundingBox worldBoundingBox;
  9386. uint zoneMask;
  9387. };
  9388. class Text
  9389. {
  9390. // Methods:
  9391. void AddChild(UIElement);
  9392. void ApplyAttributes();
  9393. void BringToFront();
  9394. void ClearSelection();
  9395. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  9396. void DisableLayoutUpdate();
  9397. IntVector2 ElementToScreen(const IntVector2&);
  9398. void EnableLayoutUpdate();
  9399. uint FindChild(UIElement) const;
  9400. Variant GetAttribute(const String&) const;
  9401. ValueAnimation GetAttributeAnimation(const String&) const;
  9402. float GetAttributeAnimationSpeed(const String&) const;
  9403. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9404. Variant GetAttributeDefault(const String&) const;
  9405. UIElement GetChild(const String&, bool = false) const;
  9406. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  9407. Array<UIElement> GetChildren(bool = false) const;
  9408. UIElement GetElementEventSender() const;
  9409. uint GetNumChildren(bool) const;
  9410. void InsertChild(uint, UIElement);
  9411. bool IsInside(IntVector2, bool);
  9412. bool IsInsideCombined(IntVector2, bool);
  9413. bool Load(File, bool = false);
  9414. bool Load(VectorBuffer&, bool = false);
  9415. bool LoadChildXML(XMLFile, XMLFile = null);
  9416. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  9417. bool LoadXML(File);
  9418. bool LoadXML(VectorBuffer&);
  9419. bool LoadXML(XMLFile, XMLFile);
  9420. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  9421. bool LoadXML(const XMLElement&, bool = false);
  9422. void MarkNetworkUpdate() const;
  9423. void Remove();
  9424. void RemoveAllChildren();
  9425. void RemoveChild(UIElement, uint = 0);
  9426. void RemoveChild(uint);
  9427. void RemoveInstanceDefault();
  9428. void ResetDeepEnabled();
  9429. void ResetToDefault();
  9430. bool Save(File) const;
  9431. bool Save(VectorBuffer&) const;
  9432. bool SaveXML(File);
  9433. bool SaveXML(VectorBuffer&);
  9434. bool SaveXML(XMLElement&) const;
  9435. IntVector2 ScreenToElement(const IntVector2&);
  9436. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9437. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  9438. bool SetAttribute(const String&, const Variant&);
  9439. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9440. void SetAttributeAnimationSpeed(const String&, float);
  9441. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9442. void SetDeepEnabled(bool);
  9443. void SetEnabledRecursive(bool);
  9444. void SetFixedHeight(int);
  9445. void SetFixedSize(int, int);
  9446. void SetFixedWidth(int);
  9447. bool SetFont(Font, int);
  9448. bool SetFont(const String&, int);
  9449. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  9450. void SetMaxSize(int, int);
  9451. void SetMinSize(int, int);
  9452. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  9453. void SetPosition(int, int);
  9454. void SetSelection(uint, uint = M_MAX_UNSIGNED);
  9455. void SetSize(int, int);
  9456. bool SetStyle(const String&, XMLFile = null);
  9457. bool SetStyle(const XMLElement&);
  9458. bool SetStyleAuto(XMLFile = null);
  9459. void UpdateLayout();
  9460. const Variant& GetVar(const StringHash&);
  9461. // Properties:
  9462. bool animationEnabled;
  9463. /* readonly */
  9464. Array<Variant> attributeDefaults;
  9465. /* readonly */
  9466. Array<AttributeInfo> attributeInfos;
  9467. Array<Variant> attributes;
  9468. /* readonly */
  9469. StringHash baseType;
  9470. bool bringToBack;
  9471. bool bringToFront;
  9472. /* readonly */
  9473. String category;
  9474. /* readonly */
  9475. Array<IntVector2> charPositions;
  9476. /* readonly */
  9477. Array<IntVector2> charSizes;
  9478. /* readonly */
  9479. IntVector2 childOffset;
  9480. /* readonly */
  9481. Array<UIElement> children;
  9482. IntRect clipBorder;
  9483. bool clipChildren;
  9484. /* writeonly */
  9485. Color color;
  9486. /* readonly */
  9487. bool colorGradient;
  9488. Array<Color> colors;
  9489. /* readonly */
  9490. IntRect combinedScreenRect;
  9491. XMLFile defaultStyle;
  9492. /* readonly */
  9493. float derivedOpacity;
  9494. /* readonly */
  9495. uint dragButtonCombo;
  9496. /* readonly */
  9497. int dragButtonCount;
  9498. uint dragDropMode;
  9499. bool editable;
  9500. Color effectColor;
  9501. bool elementEventSender;
  9502. bool enabled;
  9503. /* readonly */
  9504. bool enabledSelf;
  9505. /* readonly */
  9506. bool fixedHeight;
  9507. /* readonly */
  9508. bool fixedSize;
  9509. /* readonly */
  9510. bool fixedWidth;
  9511. bool focus;
  9512. FocusMode focusMode;
  9513. /* readonly */
  9514. Font font;
  9515. /* readonly */
  9516. int fontSize;
  9517. int height;
  9518. HorizontalAlignment horizontalAlignment;
  9519. Color hoverColor;
  9520. /* readonly */
  9521. bool hovering;
  9522. int indent;
  9523. int indentSpacing;
  9524. /* readonly */
  9525. int indentWidth;
  9526. bool internal;
  9527. IntRect layoutBorder;
  9528. Vector2 layoutFlexScale;
  9529. LayoutMode layoutMode;
  9530. int layoutSpacing;
  9531. int maxHeight;
  9532. IntVector2 maxSize;
  9533. int maxWidth;
  9534. int minHeight;
  9535. IntVector2 minSize;
  9536. int minWidth;
  9537. String name;
  9538. /* readonly */
  9539. uint numAllChildren;
  9540. /* readonly */
  9541. uint numAttributes;
  9542. /* readonly */
  9543. uint numChars;
  9544. /* readonly */
  9545. uint numChildren;
  9546. /* readonly */
  9547. uint numRows;
  9548. ObjectAnimation objectAnimation;
  9549. float opacity;
  9550. UIElement parent;
  9551. IntVector2 position;
  9552. int priority;
  9553. /* readonly */
  9554. int refs;
  9555. /* readonly */
  9556. UIElement root;
  9557. /* readonly */
  9558. int rowHeight;
  9559. float rowSpacing;
  9560. /* readonly */
  9561. Array<int> rowWidths;
  9562. /* readonly */
  9563. IntVector2 screenPosition;
  9564. bool selected;
  9565. Color selectionColor;
  9566. /* readonly */
  9567. uint selectionLength;
  9568. /* readonly */
  9569. uint selectionStart;
  9570. IntVector2 size;
  9571. bool sortChildren;
  9572. String style;
  9573. bool temporary;
  9574. String text;
  9575. HorizontalAlignment textAlignment;
  9576. TextEffect textEffect;
  9577. TraversalMode traversalMode;
  9578. /* readonly */
  9579. StringHash type;
  9580. /* readonly */
  9581. String typeName;
  9582. bool useDerivedOpacity;
  9583. /* readonly */
  9584. VariantMap vars;
  9585. VerticalAlignment verticalAlignment;
  9586. bool visible;
  9587. /* readonly */
  9588. int weakRefs;
  9589. int width;
  9590. bool wordwrap;
  9591. };
  9592. class Text3D
  9593. {
  9594. // Methods:
  9595. void ApplyAttributes();
  9596. void DrawDebugGeometry(DebugRenderer, bool);
  9597. Variant GetAttribute(const String&) const;
  9598. ValueAnimation GetAttributeAnimation(const String&) const;
  9599. float GetAttributeAnimationSpeed(const String&) const;
  9600. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9601. Variant GetAttributeDefault(const String&) const;
  9602. bool IsInView(Camera) const;
  9603. bool Load(File, bool = false);
  9604. bool Load(VectorBuffer&, bool = false);
  9605. bool LoadXML(const XMLElement&, bool = false);
  9606. void MarkNetworkUpdate() const;
  9607. void Remove();
  9608. void RemoveInstanceDefault();
  9609. void ResetToDefault();
  9610. bool Save(File) const;
  9611. bool Save(VectorBuffer&) const;
  9612. bool SaveXML(XMLElement&) const;
  9613. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9614. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  9615. bool SetAttribute(const String&, const Variant&);
  9616. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9617. void SetAttributeAnimationSpeed(const String&, float);
  9618. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9619. bool SetFont(Font, int);
  9620. bool SetFont(const String&, int);
  9621. // Properties:
  9622. bool animationEnabled;
  9623. /* readonly */
  9624. Array<Variant> attributeDefaults;
  9625. /* readonly */
  9626. Array<AttributeInfo> attributeInfos;
  9627. Array<Variant> attributes;
  9628. /* readonly */
  9629. StringHash baseType;
  9630. /* readonly */
  9631. BoundingBox boundingBox;
  9632. bool castShadows;
  9633. /* readonly */
  9634. String category;
  9635. /* readonly */
  9636. Array<IntVector2> charPositions;
  9637. /* readonly */
  9638. Array<IntVector2> charSizes;
  9639. /* writeonly */
  9640. Color color;
  9641. Array<Color> colors;
  9642. float drawDistance;
  9643. Color effectColor;
  9644. float effectDepthBias;
  9645. bool enabled;
  9646. /* readonly */
  9647. bool enabledEffective;
  9648. FaceCameraMode faceCameraMode;
  9649. /* readonly */
  9650. Font font;
  9651. /* readonly */
  9652. int fontSize;
  9653. HorizontalAlignment horizontalAlignment;
  9654. /* readonly */
  9655. uint id;
  9656. /* readonly */
  9657. bool inView;
  9658. uint lightMask;
  9659. float lodBias;
  9660. Material material;
  9661. uint maxLights;
  9662. /* readonly */
  9663. Node node;
  9664. /* readonly */
  9665. uint numAttributes;
  9666. /* readonly */
  9667. uint numChars;
  9668. /* readonly */
  9669. uint numRows;
  9670. ObjectAnimation objectAnimation;
  9671. bool occludee;
  9672. bool occluder;
  9673. float opacity;
  9674. /* readonly */
  9675. int refs;
  9676. /* readonly */
  9677. int rowHeight;
  9678. float rowSpacing;
  9679. /* readonly */
  9680. Array<int> rowWidths;
  9681. float shadowDistance;
  9682. uint shadowMask;
  9683. bool temporary;
  9684. String text;
  9685. HorizontalAlignment textAlignment;
  9686. TextEffect textEffect;
  9687. /* readonly */
  9688. StringHash type;
  9689. /* readonly */
  9690. String typeName;
  9691. VerticalAlignment verticalAlignment;
  9692. uint viewMask;
  9693. /* readonly */
  9694. int weakRefs;
  9695. int width;
  9696. bool wordwrap;
  9697. /* readonly */
  9698. BoundingBox worldBoundingBox;
  9699. uint zoneMask;
  9700. };
  9701. class Texture
  9702. {
  9703. // Methods:
  9704. void ClearDataLost();
  9705. bool Load(File);
  9706. bool Load(VectorBuffer&);
  9707. bool Save(File) const;
  9708. bool Save(VectorBuffer&) const;
  9709. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9710. void SetNumLevels(uint);
  9711. // Properties:
  9712. Array<TextureAddressMode> addressMode;
  9713. Texture backupTexture;
  9714. /* readonly */
  9715. StringHash baseType;
  9716. Color borderColor;
  9717. /* readonly */
  9718. String category;
  9719. /* readonly */
  9720. bool compressed;
  9721. /* readonly */
  9722. bool dataLost;
  9723. TextureFilterMode filterMode;
  9724. /* readonly */
  9725. uint format;
  9726. /* readonly */
  9727. int height;
  9728. /* readonly */
  9729. Array<int> levelHeight;
  9730. /* readonly */
  9731. Array<int> levelWidth;
  9732. /* readonly */
  9733. uint levels;
  9734. /* readonly */
  9735. uint memoryUse;
  9736. Array<int> mipsToSkip;
  9737. String name;
  9738. /* readonly */
  9739. int refs;
  9740. bool sRGB;
  9741. /* readonly */
  9742. StringHash type;
  9743. /* readonly */
  9744. String typeName;
  9745. /* readonly */
  9746. TextureUsage usage;
  9747. /* readonly */
  9748. uint useTimer;
  9749. /* readonly */
  9750. int weakRefs;
  9751. /* readonly */
  9752. int width;
  9753. };
  9754. class Texture2D
  9755. {
  9756. // Methods:
  9757. void ClearDataLost();
  9758. bool Load(File);
  9759. bool Load(VectorBuffer&);
  9760. bool Save(File) const;
  9761. bool Save(VectorBuffer&) const;
  9762. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9763. bool SetData(Image, bool = false);
  9764. void SetNumLevels(uint);
  9765. bool SetSize(int, int, uint, TextureUsage = TEXTURE_STATIC);
  9766. // Properties:
  9767. Array<TextureAddressMode> addressMode;
  9768. Texture backupTexture;
  9769. /* readonly */
  9770. StringHash baseType;
  9771. Color borderColor;
  9772. /* readonly */
  9773. String category;
  9774. /* readonly */
  9775. bool compressed;
  9776. /* readonly */
  9777. bool dataLost;
  9778. TextureFilterMode filterMode;
  9779. /* readonly */
  9780. uint format;
  9781. /* readonly */
  9782. int height;
  9783. /* readonly */
  9784. Array<int> levelHeight;
  9785. /* readonly */
  9786. Array<int> levelWidth;
  9787. /* readonly */
  9788. uint levels;
  9789. /* readonly */
  9790. uint memoryUse;
  9791. Array<int> mipsToSkip;
  9792. String name;
  9793. /* readonly */
  9794. int refs;
  9795. /* readonly */
  9796. RenderSurface renderSurface;
  9797. bool sRGB;
  9798. /* readonly */
  9799. StringHash type;
  9800. /* readonly */
  9801. String typeName;
  9802. /* readonly */
  9803. TextureUsage usage;
  9804. /* readonly */
  9805. uint useTimer;
  9806. /* readonly */
  9807. int weakRefs;
  9808. /* readonly */
  9809. int width;
  9810. };
  9811. class Texture3D
  9812. {
  9813. // Methods:
  9814. void ClearDataLost();
  9815. bool Load(File);
  9816. bool Load(VectorBuffer&);
  9817. bool Save(File) const;
  9818. bool Save(VectorBuffer&) const;
  9819. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9820. bool SetData(Image, bool = false);
  9821. void SetNumLevels(uint);
  9822. bool SetSize(int, int, uint, TextureUsage = TEXTURE_STATIC);
  9823. // Properties:
  9824. Array<TextureAddressMode> addressMode;
  9825. Texture backupTexture;
  9826. /* readonly */
  9827. StringHash baseType;
  9828. Color borderColor;
  9829. /* readonly */
  9830. String category;
  9831. /* readonly */
  9832. bool compressed;
  9833. /* readonly */
  9834. bool dataLost;
  9835. TextureFilterMode filterMode;
  9836. /* readonly */
  9837. uint format;
  9838. /* readonly */
  9839. int height;
  9840. /* readonly */
  9841. Array<int> levelHeight;
  9842. /* readonly */
  9843. Array<int> levelWidth;
  9844. /* readonly */
  9845. uint levels;
  9846. /* readonly */
  9847. uint memoryUse;
  9848. Array<int> mipsToSkip;
  9849. String name;
  9850. /* readonly */
  9851. int refs;
  9852. /* readonly */
  9853. RenderSurface renderSurface;
  9854. bool sRGB;
  9855. /* readonly */
  9856. StringHash type;
  9857. /* readonly */
  9858. String typeName;
  9859. /* readonly */
  9860. TextureUsage usage;
  9861. /* readonly */
  9862. uint useTimer;
  9863. /* readonly */
  9864. int weakRefs;
  9865. /* readonly */
  9866. int width;
  9867. };
  9868. class TextureCube
  9869. {
  9870. // Methods:
  9871. void ClearDataLost();
  9872. bool Load(File);
  9873. bool Load(VectorBuffer&);
  9874. bool Save(File) const;
  9875. bool Save(VectorBuffer&) const;
  9876. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9877. bool SetData(CubeMapFace, Image, bool = false);
  9878. void SetNumLevels(uint);
  9879. bool SetSize(int, uint, TextureUsage = TEXTURE_STATIC);
  9880. // Properties:
  9881. Array<TextureAddressMode> addressMode;
  9882. Texture backupTexture;
  9883. /* readonly */
  9884. StringHash baseType;
  9885. Color borderColor;
  9886. /* readonly */
  9887. String category;
  9888. /* readonly */
  9889. bool compressed;
  9890. /* readonly */
  9891. bool dataLost;
  9892. TextureFilterMode filterMode;
  9893. /* readonly */
  9894. uint format;
  9895. /* readonly */
  9896. int height;
  9897. /* readonly */
  9898. Array<int> levelHeight;
  9899. /* readonly */
  9900. Array<int> levelWidth;
  9901. /* readonly */
  9902. uint levels;
  9903. /* readonly */
  9904. uint memoryUse;
  9905. Array<int> mipsToSkip;
  9906. String name;
  9907. /* readonly */
  9908. int refs;
  9909. /* readonly */
  9910. Array<RenderSurface> renderSurfaces;
  9911. bool sRGB;
  9912. /* readonly */
  9913. StringHash type;
  9914. /* readonly */
  9915. String typeName;
  9916. /* readonly */
  9917. TextureUsage usage;
  9918. /* readonly */
  9919. uint useTimer;
  9920. /* readonly */
  9921. int weakRefs;
  9922. /* readonly */
  9923. int width;
  9924. };
  9925. class TextureFrame
  9926. {
  9927. // Properties:
  9928. float time;
  9929. Rect uv;
  9930. };
  9931. class Tile2D
  9932. {
  9933. // Methods:
  9934. bool HasProperty(const String&) const;
  9935. const String& GetProperty(const String&) const;
  9936. // Properties:
  9937. /* readonly */
  9938. int gid;
  9939. /* readonly */
  9940. int refs;
  9941. /* readonly */
  9942. Sprite2D sprite;
  9943. /* readonly */
  9944. int weakRefs;
  9945. };
  9946. class TileMap2D
  9947. {
  9948. // Methods:
  9949. void ApplyAttributes();
  9950. void DrawDebugGeometry(DebugRenderer, bool);
  9951. Variant GetAttribute(const String&) const;
  9952. ValueAnimation GetAttributeAnimation(const String&) const;
  9953. float GetAttributeAnimationSpeed(const String&) const;
  9954. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9955. Variant GetAttributeDefault(const String&) const;
  9956. TileMapLayer2D GetLayer(uint) const;
  9957. bool Load(File, bool = false);
  9958. bool Load(VectorBuffer&, bool = false);
  9959. bool LoadXML(const XMLElement&, bool = false);
  9960. void MarkNetworkUpdate() const;
  9961. bool PositionToTileIndex(int&, int&, const Vector2&) const;
  9962. void Remove();
  9963. void RemoveInstanceDefault();
  9964. void ResetToDefault();
  9965. bool Save(File) const;
  9966. bool Save(VectorBuffer&) const;
  9967. bool SaveXML(XMLElement&) const;
  9968. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9969. bool SetAttribute(const String&, const Variant&);
  9970. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9971. void SetAttributeAnimationSpeed(const String&, float);
  9972. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9973. Vector2 TileIndexToPosition(int, int) const;
  9974. // Properties:
  9975. bool animationEnabled;
  9976. /* readonly */
  9977. Array<Variant> attributeDefaults;
  9978. /* readonly */
  9979. Array<AttributeInfo> attributeInfos;
  9980. Array<Variant> attributes;
  9981. /* readonly */
  9982. StringHash baseType;
  9983. /* readonly */
  9984. String category;
  9985. bool enabled;
  9986. /* readonly */
  9987. bool enabledEffective;
  9988. /* readonly */
  9989. uint id;
  9990. /* readonly */
  9991. TileMapInfo2D info;
  9992. /* readonly */
  9993. Node node;
  9994. /* readonly */
  9995. uint numAttributes;
  9996. /* readonly */
  9997. uint numLayers;
  9998. ObjectAnimation objectAnimation;
  9999. /* readonly */
  10000. int refs;
  10001. bool temporary;
  10002. TmxFile2D tmxFile;
  10003. /* readonly */
  10004. StringHash type;
  10005. /* readonly */
  10006. String typeName;
  10007. /* readonly */
  10008. int weakRefs;
  10009. };
  10010. class TileMapInfo2D
  10011. {
  10012. // Properties:
  10013. int height;
  10014. /* readonly */
  10015. float mapHeight;
  10016. /* readonly */
  10017. float mapWidth;
  10018. Orientation2D orientation;
  10019. float tileHeight;
  10020. float tileWidth;
  10021. int width;
  10022. };
  10023. class TileMapLayer2D
  10024. {
  10025. // Methods:
  10026. void ApplyAttributes();
  10027. void DrawDebugGeometry(DebugRenderer, bool);
  10028. Variant GetAttribute(const String&) const;
  10029. ValueAnimation GetAttributeAnimation(const String&) const;
  10030. float GetAttributeAnimationSpeed(const String&) const;
  10031. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10032. Variant GetAttributeDefault(const String&) const;
  10033. TileMapObject2D GetObject(uint) const;
  10034. Node GetObjectNode(uint) const;
  10035. Tile2D GetTile(int, int) const;
  10036. Node GetTileNode(int, int) const;
  10037. bool HasProperty(const String&) const;
  10038. bool Load(File, bool = false);
  10039. bool Load(VectorBuffer&, bool = false);
  10040. bool LoadXML(const XMLElement&, bool = false);
  10041. void MarkNetworkUpdate() const;
  10042. void Remove();
  10043. void RemoveInstanceDefault();
  10044. void ResetToDefault();
  10045. bool Save(File) const;
  10046. bool Save(VectorBuffer&) const;
  10047. bool SaveXML(XMLElement&) const;
  10048. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10049. bool SetAttribute(const String&, const Variant&);
  10050. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10051. void SetAttributeAnimationSpeed(const String&, float);
  10052. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10053. const String& GetProperty(const String&) const;
  10054. // Properties:
  10055. bool animationEnabled;
  10056. /* readonly */
  10057. Array<Variant> attributeDefaults;
  10058. /* readonly */
  10059. Array<AttributeInfo> attributeInfos;
  10060. Array<Variant> attributes;
  10061. /* readonly */
  10062. StringHash baseType;
  10063. /* readonly */
  10064. String category;
  10065. int drawOrder;
  10066. bool enabled;
  10067. /* readonly */
  10068. bool enabledEffective;
  10069. /* readonly */
  10070. int height;
  10071. /* readonly */
  10072. uint id;
  10073. /* readonly */
  10074. Node imageNode;
  10075. /* readonly */
  10076. TileMapLayerType2D layerType;
  10077. /* readonly */
  10078. Node node;
  10079. /* readonly */
  10080. uint numAttributes;
  10081. /* readonly */
  10082. uint numObjects;
  10083. ObjectAnimation objectAnimation;
  10084. /* readonly */
  10085. int refs;
  10086. bool temporary;
  10087. /* readonly */
  10088. StringHash type;
  10089. /* readonly */
  10090. String typeName;
  10091. bool visible;
  10092. /* readonly */
  10093. int weakRefs;
  10094. /* readonly */
  10095. int width;
  10096. };
  10097. class TileMapObject2D
  10098. {
  10099. // Methods:
  10100. bool HasProperty(const String&) const;
  10101. const String& GetProperty(const String&) const;
  10102. const Vector2& GetPoint(uint) const;
  10103. // Properties:
  10104. /* readonly */
  10105. String name;
  10106. /* readonly */
  10107. uint numPoints;
  10108. /* readonly */
  10109. TileObjectType2D objectType;
  10110. /* readonly */
  10111. Vector2 position;
  10112. /* readonly */
  10113. int refs;
  10114. /* readonly */
  10115. Vector2 size;
  10116. /* readonly */
  10117. int tileGid;
  10118. /* readonly */
  10119. Sprite2D tileSprite;
  10120. /* readonly */
  10121. String type;
  10122. /* readonly */
  10123. int weakRefs;
  10124. };
  10125. class Time
  10126. {
  10127. // Methods:
  10128. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10129. // Properties:
  10130. /* readonly */
  10131. StringHash baseType;
  10132. /* readonly */
  10133. String category;
  10134. /* readonly */
  10135. float elapsedTime;
  10136. /* readonly */
  10137. uint frameNumber;
  10138. /* readonly */
  10139. int refs;
  10140. /* readonly */
  10141. uint systemTime;
  10142. /* readonly */
  10143. uint timeSinceEpoch;
  10144. /* readonly */
  10145. String timeStamp;
  10146. /* readonly */
  10147. float timeStep;
  10148. /* readonly */
  10149. StringHash type;
  10150. /* readonly */
  10151. String typeName;
  10152. /* readonly */
  10153. int weakRefs;
  10154. };
  10155. class Timer
  10156. {
  10157. // Methods:
  10158. uint GetMSec(bool);
  10159. void Reset();
  10160. };
  10161. class TmxFile2D
  10162. {
  10163. // Methods:
  10164. bool Load(File);
  10165. bool Load(VectorBuffer&);
  10166. bool Save(File) const;
  10167. bool Save(VectorBuffer&) const;
  10168. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10169. // Properties:
  10170. /* readonly */
  10171. StringHash baseType;
  10172. /* readonly */
  10173. String category;
  10174. /* readonly */
  10175. uint memoryUse;
  10176. String name;
  10177. /* readonly */
  10178. int refs;
  10179. /* readonly */
  10180. StringHash type;
  10181. /* readonly */
  10182. String typeName;
  10183. /* readonly */
  10184. uint useTimer;
  10185. /* readonly */
  10186. int weakRefs;
  10187. };
  10188. class ToolTip
  10189. {
  10190. // Methods:
  10191. void AddChild(UIElement);
  10192. void ApplyAttributes();
  10193. void BringToFront();
  10194. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  10195. void DisableLayoutUpdate();
  10196. IntVector2 ElementToScreen(const IntVector2&);
  10197. void EnableLayoutUpdate();
  10198. uint FindChild(UIElement) const;
  10199. Variant GetAttribute(const String&) const;
  10200. ValueAnimation GetAttributeAnimation(const String&) const;
  10201. float GetAttributeAnimationSpeed(const String&) const;
  10202. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10203. Variant GetAttributeDefault(const String&) const;
  10204. UIElement GetChild(const String&, bool = false) const;
  10205. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  10206. Array<UIElement> GetChildren(bool = false) const;
  10207. UIElement GetElementEventSender() const;
  10208. uint GetNumChildren(bool) const;
  10209. void InsertChild(uint, UIElement);
  10210. bool IsInside(IntVector2, bool);
  10211. bool IsInsideCombined(IntVector2, bool);
  10212. bool Load(File, bool = false);
  10213. bool Load(VectorBuffer&, bool = false);
  10214. bool LoadChildXML(XMLFile, XMLFile = null);
  10215. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  10216. bool LoadXML(File);
  10217. bool LoadXML(VectorBuffer&);
  10218. bool LoadXML(XMLFile, XMLFile);
  10219. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  10220. bool LoadXML(const XMLElement&, bool = false);
  10221. void MarkNetworkUpdate() const;
  10222. void Remove();
  10223. void RemoveAllChildren();
  10224. void RemoveChild(UIElement, uint = 0);
  10225. void RemoveChild(uint);
  10226. void RemoveInstanceDefault();
  10227. void ResetDeepEnabled();
  10228. void ResetToDefault();
  10229. bool Save(File) const;
  10230. bool Save(VectorBuffer&) const;
  10231. bool SaveXML(File);
  10232. bool SaveXML(VectorBuffer&);
  10233. bool SaveXML(XMLElement&) const;
  10234. IntVector2 ScreenToElement(const IntVector2&);
  10235. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10236. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  10237. bool SetAttribute(const String&, const Variant&);
  10238. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10239. void SetAttributeAnimationSpeed(const String&, float);
  10240. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10241. void SetDeepEnabled(bool);
  10242. void SetEnabledRecursive(bool);
  10243. void SetFixedHeight(int);
  10244. void SetFixedSize(int, int);
  10245. void SetFixedWidth(int);
  10246. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  10247. void SetMaxSize(int, int);
  10248. void SetMinSize(int, int);
  10249. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  10250. void SetPosition(int, int);
  10251. void SetSize(int, int);
  10252. bool SetStyle(const String&, XMLFile = null);
  10253. bool SetStyle(const XMLElement&);
  10254. bool SetStyleAuto(XMLFile = null);
  10255. void UpdateLayout();
  10256. const Variant& GetVar(const StringHash&);
  10257. // Properties:
  10258. bool animationEnabled;
  10259. /* readonly */
  10260. Array<Variant> attributeDefaults;
  10261. /* readonly */
  10262. Array<AttributeInfo> attributeInfos;
  10263. Array<Variant> attributes;
  10264. /* readonly */
  10265. StringHash baseType;
  10266. bool bringToBack;
  10267. bool bringToFront;
  10268. /* readonly */
  10269. String category;
  10270. /* readonly */
  10271. IntVector2 childOffset;
  10272. /* readonly */
  10273. Array<UIElement> children;
  10274. IntRect clipBorder;
  10275. bool clipChildren;
  10276. /* writeonly */
  10277. Color color;
  10278. /* readonly */
  10279. bool colorGradient;
  10280. Array<Color> colors;
  10281. /* readonly */
  10282. IntRect combinedScreenRect;
  10283. XMLFile defaultStyle;
  10284. float delay;
  10285. /* readonly */
  10286. float derivedOpacity;
  10287. /* readonly */
  10288. uint dragButtonCombo;
  10289. /* readonly */
  10290. int dragButtonCount;
  10291. uint dragDropMode;
  10292. bool editable;
  10293. bool elementEventSender;
  10294. bool enabled;
  10295. /* readonly */
  10296. bool enabledSelf;
  10297. /* readonly */
  10298. bool fixedHeight;
  10299. /* readonly */
  10300. bool fixedSize;
  10301. /* readonly */
  10302. bool fixedWidth;
  10303. bool focus;
  10304. FocusMode focusMode;
  10305. int height;
  10306. HorizontalAlignment horizontalAlignment;
  10307. /* readonly */
  10308. bool hovering;
  10309. int indent;
  10310. int indentSpacing;
  10311. /* readonly */
  10312. int indentWidth;
  10313. bool internal;
  10314. IntRect layoutBorder;
  10315. Vector2 layoutFlexScale;
  10316. LayoutMode layoutMode;
  10317. int layoutSpacing;
  10318. int maxHeight;
  10319. IntVector2 maxSize;
  10320. int maxWidth;
  10321. int minHeight;
  10322. IntVector2 minSize;
  10323. int minWidth;
  10324. String name;
  10325. /* readonly */
  10326. uint numAllChildren;
  10327. /* readonly */
  10328. uint numAttributes;
  10329. /* readonly */
  10330. uint numChildren;
  10331. ObjectAnimation objectAnimation;
  10332. float opacity;
  10333. UIElement parent;
  10334. IntVector2 position;
  10335. int priority;
  10336. /* readonly */
  10337. int refs;
  10338. /* readonly */
  10339. UIElement root;
  10340. /* readonly */
  10341. IntVector2 screenPosition;
  10342. bool selected;
  10343. IntVector2 size;
  10344. bool sortChildren;
  10345. String style;
  10346. bool temporary;
  10347. TraversalMode traversalMode;
  10348. /* readonly */
  10349. StringHash type;
  10350. /* readonly */
  10351. String typeName;
  10352. bool useDerivedOpacity;
  10353. /* readonly */
  10354. VariantMap vars;
  10355. VerticalAlignment verticalAlignment;
  10356. bool visible;
  10357. /* readonly */
  10358. int weakRefs;
  10359. int width;
  10360. };
  10361. class TouchState
  10362. {
  10363. // Properties:
  10364. IntVector2 delta;
  10365. IntVector2 lastPosition;
  10366. IntVector2 position;
  10367. float pressure;
  10368. int touchID;
  10369. /* readonly */
  10370. UIElement touchedElement;
  10371. };
  10372. class UI
  10373. {
  10374. // Methods:
  10375. void Clear();
  10376. void DebugDraw(UIElement);
  10377. UIElement GetElementAt(const IntVector2&, bool = true);
  10378. UIElement GetElementAt(int, int, bool = true);
  10379. bool HasModalElement() const;
  10380. bool IsDragging() const;
  10381. UIElement LoadLayout(File);
  10382. UIElement LoadLayout(File, XMLFile);
  10383. UIElement LoadLayout(VectorBuffer&);
  10384. UIElement LoadLayout(VectorBuffer&, XMLFile);
  10385. UIElement LoadLayout(XMLFile);
  10386. UIElement LoadLayout(XMLFile, XMLFile);
  10387. bool SaveLayout(File, UIElement);
  10388. bool SaveLayout(VectorBuffer&, UIElement);
  10389. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10390. void SetFocusElement(UIElement, bool = false);
  10391. const Array<UIElement> GetDragElements();
  10392. // Properties:
  10393. /* readonly */
  10394. StringHash baseType;
  10395. /* readonly */
  10396. String category;
  10397. String clipBoardText;
  10398. Cursor cursor;
  10399. /* readonly */
  10400. IntVector2 cursorPosition;
  10401. float defaultToolTipDelay;
  10402. float doubleClickInterval;
  10403. int dragBeginDistance;
  10404. float dragBeginInterval;
  10405. UIElement focusElement;
  10406. bool forceAutoHint;
  10407. /* readonly */
  10408. UIElement frontElement;
  10409. int maxFontTextureSize;
  10410. /* readonly */
  10411. UIElement modalRoot;
  10412. bool nonFocusedMouseWheel;
  10413. /* readonly */
  10414. int refs;
  10415. /* readonly */
  10416. UIElement root;
  10417. /* readonly */
  10418. StringHash type;
  10419. /* readonly */
  10420. String typeName;
  10421. bool useMutableGlyphs;
  10422. bool useScreenKeyboard;
  10423. bool useSystemClipboard;
  10424. /* readonly */
  10425. int weakRefs;
  10426. };
  10427. class UIElement
  10428. {
  10429. // Methods:
  10430. void AddChild(UIElement);
  10431. void ApplyAttributes();
  10432. void BringToFront();
  10433. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  10434. void DisableLayoutUpdate();
  10435. IntVector2 ElementToScreen(const IntVector2&);
  10436. void EnableLayoutUpdate();
  10437. uint FindChild(UIElement) const;
  10438. Variant GetAttribute(const String&) const;
  10439. ValueAnimation GetAttributeAnimation(const String&) const;
  10440. float GetAttributeAnimationSpeed(const String&) const;
  10441. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10442. Variant GetAttributeDefault(const String&) const;
  10443. UIElement GetChild(const String&, bool = false) const;
  10444. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  10445. Array<UIElement> GetChildren(bool = false) const;
  10446. UIElement GetElementEventSender() const;
  10447. uint GetNumChildren(bool) const;
  10448. void InsertChild(uint, UIElement);
  10449. bool IsInside(IntVector2, bool);
  10450. bool IsInsideCombined(IntVector2, bool);
  10451. bool Load(File, bool = false);
  10452. bool Load(VectorBuffer&, bool = false);
  10453. bool LoadChildXML(XMLFile, XMLFile = null);
  10454. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  10455. bool LoadXML(File);
  10456. bool LoadXML(VectorBuffer&);
  10457. bool LoadXML(XMLFile, XMLFile);
  10458. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  10459. bool LoadXML(const XMLElement&, bool = false);
  10460. void MarkNetworkUpdate() const;
  10461. void Remove();
  10462. void RemoveAllChildren();
  10463. void RemoveChild(UIElement, uint = 0);
  10464. void RemoveChild(uint);
  10465. void RemoveInstanceDefault();
  10466. void ResetDeepEnabled();
  10467. void ResetToDefault();
  10468. bool Save(File) const;
  10469. bool Save(VectorBuffer&) const;
  10470. bool SaveXML(File);
  10471. bool SaveXML(VectorBuffer&);
  10472. bool SaveXML(XMLElement&) const;
  10473. IntVector2 ScreenToElement(const IntVector2&);
  10474. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10475. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  10476. bool SetAttribute(const String&, const Variant&);
  10477. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10478. void SetAttributeAnimationSpeed(const String&, float);
  10479. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10480. void SetDeepEnabled(bool);
  10481. void SetEnabledRecursive(bool);
  10482. void SetFixedHeight(int);
  10483. void SetFixedSize(int, int);
  10484. void SetFixedWidth(int);
  10485. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  10486. void SetMaxSize(int, int);
  10487. void SetMinSize(int, int);
  10488. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  10489. void SetPosition(int, int);
  10490. void SetSize(int, int);
  10491. bool SetStyle(const String&, XMLFile = null);
  10492. bool SetStyle(const XMLElement&);
  10493. bool SetStyleAuto(XMLFile = null);
  10494. void UpdateLayout();
  10495. const Variant& GetVar(const StringHash&);
  10496. // Properties:
  10497. bool animationEnabled;
  10498. /* readonly */
  10499. Array<Variant> attributeDefaults;
  10500. /* readonly */
  10501. Array<AttributeInfo> attributeInfos;
  10502. Array<Variant> attributes;
  10503. /* readonly */
  10504. StringHash baseType;
  10505. bool bringToBack;
  10506. bool bringToFront;
  10507. /* readonly */
  10508. String category;
  10509. /* readonly */
  10510. IntVector2 childOffset;
  10511. /* readonly */
  10512. Array<UIElement> children;
  10513. IntRect clipBorder;
  10514. bool clipChildren;
  10515. /* writeonly */
  10516. Color color;
  10517. /* readonly */
  10518. bool colorGradient;
  10519. Array<Color> colors;
  10520. /* readonly */
  10521. IntRect combinedScreenRect;
  10522. XMLFile defaultStyle;
  10523. /* readonly */
  10524. float derivedOpacity;
  10525. /* readonly */
  10526. uint dragButtonCombo;
  10527. /* readonly */
  10528. int dragButtonCount;
  10529. uint dragDropMode;
  10530. bool editable;
  10531. bool elementEventSender;
  10532. bool enabled;
  10533. /* readonly */
  10534. bool enabledSelf;
  10535. /* readonly */
  10536. bool fixedHeight;
  10537. /* readonly */
  10538. bool fixedSize;
  10539. /* readonly */
  10540. bool fixedWidth;
  10541. bool focus;
  10542. FocusMode focusMode;
  10543. int height;
  10544. HorizontalAlignment horizontalAlignment;
  10545. /* readonly */
  10546. bool hovering;
  10547. int indent;
  10548. int indentSpacing;
  10549. /* readonly */
  10550. int indentWidth;
  10551. bool internal;
  10552. IntRect layoutBorder;
  10553. Vector2 layoutFlexScale;
  10554. LayoutMode layoutMode;
  10555. int layoutSpacing;
  10556. int maxHeight;
  10557. IntVector2 maxSize;
  10558. int maxWidth;
  10559. int minHeight;
  10560. IntVector2 minSize;
  10561. int minWidth;
  10562. String name;
  10563. /* readonly */
  10564. uint numAllChildren;
  10565. /* readonly */
  10566. uint numAttributes;
  10567. /* readonly */
  10568. uint numChildren;
  10569. ObjectAnimation objectAnimation;
  10570. float opacity;
  10571. UIElement parent;
  10572. IntVector2 position;
  10573. int priority;
  10574. /* readonly */
  10575. int refs;
  10576. /* readonly */
  10577. UIElement root;
  10578. /* readonly */
  10579. IntVector2 screenPosition;
  10580. bool selected;
  10581. IntVector2 size;
  10582. bool sortChildren;
  10583. String style;
  10584. bool temporary;
  10585. TraversalMode traversalMode;
  10586. /* readonly */
  10587. StringHash type;
  10588. /* readonly */
  10589. String typeName;
  10590. bool useDerivedOpacity;
  10591. /* readonly */
  10592. VariantMap vars;
  10593. VerticalAlignment verticalAlignment;
  10594. bool visible;
  10595. /* readonly */
  10596. int weakRefs;
  10597. int width;
  10598. };
  10599. class ValueAnimation
  10600. {
  10601. // Methods:
  10602. bool Load(File);
  10603. bool Load(VectorBuffer&);
  10604. bool Save(File) const;
  10605. bool Save(VectorBuffer&) const;
  10606. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10607. void SetEventFrame(float, const String&, const VariantMap& = VariantMap ( ));
  10608. void SetKeyFrame(float, const Variant&);
  10609. // Properties:
  10610. /* readonly */
  10611. StringHash baseType;
  10612. /* readonly */
  10613. String category;
  10614. InterpMethod interpolationMethod;
  10615. /* readonly */
  10616. uint memoryUse;
  10617. String name;
  10618. /* readonly */
  10619. int refs;
  10620. float splineTension;
  10621. /* readonly */
  10622. StringHash type;
  10623. /* readonly */
  10624. String typeName;
  10625. /* readonly */
  10626. uint useTimer;
  10627. VariantType valueType;
  10628. /* readonly */
  10629. int weakRefs;
  10630. };
  10631. class Variant
  10632. {
  10633. // Methods:
  10634. void Clear();
  10635. const Color& GetColor() const;
  10636. void FromString(VariantType, const String&);
  10637. void FromString(const String&, const String&);
  10638. bool GetBool() const;
  10639. VectorBuffer GetBuffer() const;
  10640. float GetFloat() const;
  10641. int GetInt() const;
  10642. RefCounted GetPtr() const;
  10643. ScriptObject GetScriptObject() const;
  10644. StringHash GetStringHash() const;
  10645. uint GetUInt() const;
  10646. Array<Variant> GetVariantVector() const;
  10647. const IntRect& GetIntRect() const;
  10648. const IntVector2& GetIntVector2() const;
  10649. const Matrix3& GetMatrix3() const;
  10650. const Matrix3x4& GetMatrix3x4() const;
  10651. const Matrix4& GetMatrix4() const;
  10652. const Quaternion& GetQuaternion() const;
  10653. const ResourceRef& GetResourceRef() const;
  10654. const ResourceRefList& GetResourceRefList() const;
  10655. const String& GetString() const;
  10656. String ToString() const;
  10657. const VariantMap& GetVariantMap() const;
  10658. const Vector2& GetVector2() const;
  10659. const Vector3& GetVector3() const;
  10660. const Vector4& GetVector4() const;
  10661. // Properties:
  10662. /* readonly */
  10663. bool empty;
  10664. /* readonly */
  10665. VariantType type;
  10666. /* readonly */
  10667. String typeName;
  10668. /* readonly */
  10669. bool zero;
  10670. };
  10671. class VariantMap
  10672. {
  10673. // Methods:
  10674. void Clear();
  10675. bool Contains(StringHash) const;
  10676. bool Contains(const String&) const;
  10677. bool Erase(StringHash);
  10678. bool Erase(const String&);
  10679. // Properties:
  10680. /* readonly */
  10681. Array<StringHash> keys;
  10682. /* readonly */
  10683. uint length;
  10684. /* readonly */
  10685. Array<Variant> values;
  10686. };
  10687. class Vector2
  10688. {
  10689. // Methods:
  10690. float AbsDotProduct(const Vector2&) const;
  10691. float DotProduct(const Vector2&) const;
  10692. bool Equals(const Vector2&) const;
  10693. bool IsNaN() const;
  10694. Vector2 Lerp(const Vector2&, float) const;
  10695. void Normalize();
  10696. Vector2 Normalized() const;
  10697. String ToString() const;
  10698. // Properties:
  10699. /* readonly */
  10700. Array<float> data;
  10701. /* readonly */
  10702. float length;
  10703. /* readonly */
  10704. float lengthSquared;
  10705. float x;
  10706. float y;
  10707. };
  10708. class Vector3
  10709. {
  10710. // Methods:
  10711. float AbsDotProduct(const Vector3&) const;
  10712. float Angle(const Vector3&) const;
  10713. Vector3 CrossProduct(const Vector3&) const;
  10714. float DotProduct(const Vector3&) const;
  10715. bool Equals(const Vector3&) const;
  10716. bool IsNaN() const;
  10717. Vector3 Lerp(const Vector3&, float) const;
  10718. void Normalize();
  10719. Vector3 Normalized() const;
  10720. String ToString() const;
  10721. // Properties:
  10722. /* readonly */
  10723. Array<float> data;
  10724. /* readonly */
  10725. float length;
  10726. /* readonly */
  10727. float lengthSquared;
  10728. float x;
  10729. float y;
  10730. float z;
  10731. };
  10732. class Vector4
  10733. {
  10734. // Methods:
  10735. float AbsDotProduct(const Vector4&) const;
  10736. float DotProduct(const Vector4&) const;
  10737. bool Equals(const Vector4&) const;
  10738. bool IsNaN() const;
  10739. Vector4 Lerp(const Vector4&, float) const;
  10740. String ToString() const;
  10741. // Properties:
  10742. /* readonly */
  10743. Array<float> data;
  10744. float w;
  10745. float x;
  10746. float y;
  10747. float z;
  10748. };
  10749. class VectorBuffer
  10750. {
  10751. // Methods:
  10752. void Clear();
  10753. Array<uint8> Read(uint);
  10754. bool ReadBool();
  10755. BoundingBox ReadBoundingBox();
  10756. int8 ReadByte();
  10757. Color ReadColor();
  10758. String ReadFileID();
  10759. float ReadFloat();
  10760. int ReadInt();
  10761. IntRect ReadIntRect();
  10762. IntVector2 ReadIntVector2();
  10763. String ReadLine();
  10764. Matrix3 ReadMatrix3();
  10765. Matrix3x4 ReadMatrix3x4();
  10766. Matrix4 ReadMatrix4();
  10767. uint ReadNetID();
  10768. Quaternion ReadPackedQuaternion();
  10769. Vector3 ReadPackedVector3(float);
  10770. Quaternion ReadQuaternion();
  10771. int16 ReadShort();
  10772. String ReadString();
  10773. StringHash ReadStringHash();
  10774. uint8 ReadUByte();
  10775. uint ReadUInt();
  10776. uint16 ReadUShort();
  10777. uint ReadVLE();
  10778. Variant ReadVariant();
  10779. VariantMap ReadVariantMap();
  10780. Vector2 ReadVector2();
  10781. Vector3 ReadVector3();
  10782. Vector4 ReadVector4();
  10783. void Resize(uint);
  10784. uint Seek(uint);
  10785. void SetData(Deserializer, uint);
  10786. uint Write(Array<uint8>);
  10787. bool WriteBool(bool);
  10788. bool WriteBoundingBox(const BoundingBox&);
  10789. bool WriteByte(int8);
  10790. bool WriteColor(const Color&);
  10791. bool WriteFileID(const String&);
  10792. bool WriteFloat(float);
  10793. bool WriteInt(int);
  10794. bool WriteIntRect(const IntRect&);
  10795. bool WriteIntVector2(const IntVector2&);
  10796. bool WriteLine(const String&);
  10797. bool WriteMatrix3(const Matrix3&);
  10798. bool WriteMatrix3x4(const Matrix3x4&);
  10799. bool WriteMatrix4(const Matrix4&);
  10800. bool WriteNetID(uint);
  10801. bool WritePackedQuaternion(const Quaternion&);
  10802. bool WritePackedVector3(const Vector3&, float);
  10803. bool WriteQuaternion(const Quaternion&);
  10804. bool WriteShort(int16);
  10805. bool WriteString(const String&);
  10806. bool WriteStringHash(const StringHash&);
  10807. bool WriteUByte(uint8);
  10808. bool WriteUInt(uint);
  10809. bool WriteUShort(uint16);
  10810. bool WriteVLE(uint);
  10811. bool WriteVariant(const Variant&);
  10812. bool WriteVariantMap(const VariantMap&);
  10813. bool WriteVector2(const Vector2&);
  10814. bool WriteVector3(const Vector3&);
  10815. bool WriteVector4(const Vector4&);
  10816. // Properties:
  10817. /* readonly */
  10818. uint checksum;
  10819. /* readonly */
  10820. bool eof;
  10821. /* readonly */
  10822. String name;
  10823. /* readonly */
  10824. uint position;
  10825. /* readonly */
  10826. uint size;
  10827. };
  10828. class View3D
  10829. {
  10830. // Methods:
  10831. void AddChild(UIElement);
  10832. void ApplyAttributes();
  10833. void BringToFront();
  10834. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  10835. void DisableLayoutUpdate();
  10836. IntVector2 ElementToScreen(const IntVector2&);
  10837. void EnableLayoutUpdate();
  10838. uint FindChild(UIElement) const;
  10839. Variant GetAttribute(const String&) const;
  10840. ValueAnimation GetAttributeAnimation(const String&) const;
  10841. float GetAttributeAnimationSpeed(const String&) const;
  10842. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10843. Variant GetAttributeDefault(const String&) const;
  10844. UIElement GetChild(const String&, bool = false) const;
  10845. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  10846. Array<UIElement> GetChildren(bool = false) const;
  10847. UIElement GetElementEventSender() const;
  10848. uint GetNumChildren(bool) const;
  10849. void InsertChild(uint, UIElement);
  10850. bool IsInside(IntVector2, bool);
  10851. bool IsInsideCombined(IntVector2, bool);
  10852. bool Load(File, bool = false);
  10853. bool Load(VectorBuffer&, bool = false);
  10854. bool LoadChildXML(XMLFile, XMLFile = null);
  10855. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  10856. bool LoadXML(File);
  10857. bool LoadXML(VectorBuffer&);
  10858. bool LoadXML(XMLFile, XMLFile);
  10859. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  10860. bool LoadXML(const XMLElement&, bool = false);
  10861. void MarkNetworkUpdate() const;
  10862. void QueueUpdate();
  10863. void Remove();
  10864. void RemoveAllChildren();
  10865. void RemoveChild(UIElement, uint = 0);
  10866. void RemoveChild(uint);
  10867. void RemoveInstanceDefault();
  10868. void ResetDeepEnabled();
  10869. void ResetToDefault();
  10870. bool Save(File) const;
  10871. bool Save(VectorBuffer&) const;
  10872. bool SaveXML(File);
  10873. bool SaveXML(VectorBuffer&);
  10874. bool SaveXML(XMLElement&) const;
  10875. IntVector2 ScreenToElement(const IntVector2&);
  10876. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10877. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  10878. bool SetAttribute(const String&, const Variant&);
  10879. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10880. void SetAttributeAnimationSpeed(const String&, float);
  10881. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10882. void SetDeepEnabled(bool);
  10883. void SetEnabledRecursive(bool);
  10884. void SetFixedHeight(int);
  10885. void SetFixedSize(int, int);
  10886. void SetFixedWidth(int);
  10887. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  10888. void SetMaxSize(int, int);
  10889. void SetMinSize(int, int);
  10890. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  10891. void SetPosition(int, int);
  10892. void SetSize(int, int);
  10893. bool SetStyle(const String&, XMLFile = null);
  10894. bool SetStyle(const XMLElement&);
  10895. bool SetStyleAuto(XMLFile = null);
  10896. void SetView(Scene, Camera, bool = true);
  10897. void UpdateLayout();
  10898. const Variant& GetVar(const StringHash&);
  10899. // Properties:
  10900. bool animationEnabled;
  10901. /* readonly */
  10902. Array<Variant> attributeDefaults;
  10903. /* readonly */
  10904. Array<AttributeInfo> attributeInfos;
  10905. Array<Variant> attributes;
  10906. bool autoUpdate;
  10907. /* readonly */
  10908. StringHash baseType;
  10909. bool bringToBack;
  10910. bool bringToFront;
  10911. /* readonly */
  10912. Node cameraNode;
  10913. /* readonly */
  10914. String category;
  10915. /* readonly */
  10916. IntVector2 childOffset;
  10917. /* readonly */
  10918. Array<UIElement> children;
  10919. IntRect clipBorder;
  10920. bool clipChildren;
  10921. /* writeonly */
  10922. Color color;
  10923. /* readonly */
  10924. bool colorGradient;
  10925. Array<Color> colors;
  10926. /* readonly */
  10927. IntRect combinedScreenRect;
  10928. XMLFile defaultStyle;
  10929. /* readonly */
  10930. Texture2D depthTexture;
  10931. /* readonly */
  10932. float derivedOpacity;
  10933. /* readonly */
  10934. uint dragButtonCombo;
  10935. /* readonly */
  10936. int dragButtonCount;
  10937. uint dragDropMode;
  10938. bool editable;
  10939. bool elementEventSender;
  10940. bool enabled;
  10941. /* readonly */
  10942. bool enabledSelf;
  10943. /* readonly */
  10944. bool fixedHeight;
  10945. bool fixedHeightResizing;
  10946. /* readonly */
  10947. bool fixedSize;
  10948. /* readonly */
  10949. bool fixedWidth;
  10950. bool fixedWidthResizing;
  10951. bool focus;
  10952. FocusMode focusMode;
  10953. uint format;
  10954. int height;
  10955. HorizontalAlignment horizontalAlignment;
  10956. /* readonly */
  10957. bool hovering;
  10958. int indent;
  10959. int indentSpacing;
  10960. /* readonly */
  10961. int indentWidth;
  10962. bool internal;
  10963. IntRect layoutBorder;
  10964. Vector2 layoutFlexScale;
  10965. LayoutMode layoutMode;
  10966. int layoutSpacing;
  10967. int maxHeight;
  10968. IntVector2 maxSize;
  10969. int maxWidth;
  10970. int minHeight;
  10971. IntVector2 minSize;
  10972. int minWidth;
  10973. bool modal;
  10974. bool modalAutoDismiss;
  10975. Color modalFrameColor;
  10976. IntVector2 modalFrameSize;
  10977. Color modalShadeColor;
  10978. bool movable;
  10979. String name;
  10980. /* readonly */
  10981. uint numAllChildren;
  10982. /* readonly */
  10983. uint numAttributes;
  10984. /* readonly */
  10985. uint numChildren;
  10986. ObjectAnimation objectAnimation;
  10987. float opacity;
  10988. UIElement parent;
  10989. IntVector2 position;
  10990. int priority;
  10991. /* readonly */
  10992. int refs;
  10993. /* readonly */
  10994. Texture2D renderTexture;
  10995. bool resizable;
  10996. IntRect resizeBorder;
  10997. /* readonly */
  10998. UIElement root;
  10999. /* readonly */
  11000. Scene scene;
  11001. /* readonly */
  11002. IntVector2 screenPosition;
  11003. bool selected;
  11004. IntVector2 size;
  11005. bool sortChildren;
  11006. String style;
  11007. bool temporary;
  11008. TraversalMode traversalMode;
  11009. /* readonly */
  11010. StringHash type;
  11011. /* readonly */
  11012. String typeName;
  11013. bool useDerivedOpacity;
  11014. /* readonly */
  11015. VariantMap vars;
  11016. VerticalAlignment verticalAlignment;
  11017. /* readonly */
  11018. Viewport viewport;
  11019. bool visible;
  11020. /* readonly */
  11021. int weakRefs;
  11022. int width;
  11023. };
  11024. class Viewport
  11025. {
  11026. // Methods:
  11027. Ray GetScreenRay(int, int) const;
  11028. Vector3 ScreenToWorldPoint(int, int, float) const;
  11029. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11030. void SetRenderPath(XMLFile);
  11031. Vector2 WorldToScreenPoint(const Vector3&) const;
  11032. // Properties:
  11033. /* readonly */
  11034. StringHash baseType;
  11035. Camera camera;
  11036. /* readonly */
  11037. String category;
  11038. bool drawDebug;
  11039. IntRect rect;
  11040. /* readonly */
  11041. int refs;
  11042. RenderPath renderPath;
  11043. Scene scene;
  11044. /* readonly */
  11045. StringHash type;
  11046. /* readonly */
  11047. String typeName;
  11048. /* readonly */
  11049. int weakRefs;
  11050. };
  11051. class WeakHandle
  11052. {
  11053. // Methods:
  11054. RefCounted Get() const;
  11055. // Properties:
  11056. /* readonly */
  11057. bool expired;
  11058. /* readonly */
  11059. int refs;
  11060. /* readonly */
  11061. int weakRefs;
  11062. };
  11063. class Window
  11064. {
  11065. // Methods:
  11066. void AddChild(UIElement);
  11067. void ApplyAttributes();
  11068. void BringToFront();
  11069. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  11070. void DisableLayoutUpdate();
  11071. IntVector2 ElementToScreen(const IntVector2&);
  11072. void EnableLayoutUpdate();
  11073. uint FindChild(UIElement) const;
  11074. Variant GetAttribute(const String&) const;
  11075. ValueAnimation GetAttributeAnimation(const String&) const;
  11076. float GetAttributeAnimationSpeed(const String&) const;
  11077. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11078. Variant GetAttributeDefault(const String&) const;
  11079. UIElement GetChild(const String&, bool = false) const;
  11080. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  11081. Array<UIElement> GetChildren(bool = false) const;
  11082. UIElement GetElementEventSender() const;
  11083. uint GetNumChildren(bool) const;
  11084. void InsertChild(uint, UIElement);
  11085. bool IsInside(IntVector2, bool);
  11086. bool IsInsideCombined(IntVector2, bool);
  11087. bool Load(File, bool = false);
  11088. bool Load(VectorBuffer&, bool = false);
  11089. bool LoadChildXML(XMLFile, XMLFile = null);
  11090. bool LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  11091. bool LoadXML(File);
  11092. bool LoadXML(VectorBuffer&);
  11093. bool LoadXML(XMLFile, XMLFile);
  11094. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  11095. bool LoadXML(const XMLElement&, bool = false);
  11096. void MarkNetworkUpdate() const;
  11097. void Remove();
  11098. void RemoveAllChildren();
  11099. void RemoveChild(UIElement, uint = 0);
  11100. void RemoveChild(uint);
  11101. void RemoveInstanceDefault();
  11102. void ResetDeepEnabled();
  11103. void ResetToDefault();
  11104. bool Save(File) const;
  11105. bool Save(VectorBuffer&) const;
  11106. bool SaveXML(File);
  11107. bool SaveXML(VectorBuffer&);
  11108. bool SaveXML(XMLElement&) const;
  11109. IntVector2 ScreenToElement(const IntVector2&);
  11110. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11111. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  11112. bool SetAttribute(const String&, const Variant&);
  11113. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11114. void SetAttributeAnimationSpeed(const String&, float);
  11115. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11116. void SetDeepEnabled(bool);
  11117. void SetEnabledRecursive(bool);
  11118. void SetFixedHeight(int);
  11119. void SetFixedSize(int, int);
  11120. void SetFixedWidth(int);
  11121. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  11122. void SetMaxSize(int, int);
  11123. void SetMinSize(int, int);
  11124. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  11125. void SetPosition(int, int);
  11126. void SetSize(int, int);
  11127. bool SetStyle(const String&, XMLFile = null);
  11128. bool SetStyle(const XMLElement&);
  11129. bool SetStyleAuto(XMLFile = null);
  11130. void UpdateLayout();
  11131. const Variant& GetVar(const StringHash&);
  11132. // Properties:
  11133. bool animationEnabled;
  11134. /* readonly */
  11135. Array<Variant> attributeDefaults;
  11136. /* readonly */
  11137. Array<AttributeInfo> attributeInfos;
  11138. Array<Variant> attributes;
  11139. /* readonly */
  11140. StringHash baseType;
  11141. bool bringToBack;
  11142. bool bringToFront;
  11143. /* readonly */
  11144. String category;
  11145. /* readonly */
  11146. IntVector2 childOffset;
  11147. /* readonly */
  11148. Array<UIElement> children;
  11149. IntRect clipBorder;
  11150. bool clipChildren;
  11151. /* writeonly */
  11152. Color color;
  11153. /* readonly */
  11154. bool colorGradient;
  11155. Array<Color> colors;
  11156. /* readonly */
  11157. IntRect combinedScreenRect;
  11158. XMLFile defaultStyle;
  11159. /* readonly */
  11160. float derivedOpacity;
  11161. /* readonly */
  11162. uint dragButtonCombo;
  11163. /* readonly */
  11164. int dragButtonCount;
  11165. uint dragDropMode;
  11166. bool editable;
  11167. bool elementEventSender;
  11168. bool enabled;
  11169. /* readonly */
  11170. bool enabledSelf;
  11171. /* readonly */
  11172. bool fixedHeight;
  11173. bool fixedHeightResizing;
  11174. /* readonly */
  11175. bool fixedSize;
  11176. /* readonly */
  11177. bool fixedWidth;
  11178. bool fixedWidthResizing;
  11179. bool focus;
  11180. FocusMode focusMode;
  11181. int height;
  11182. HorizontalAlignment horizontalAlignment;
  11183. /* readonly */
  11184. bool hovering;
  11185. int indent;
  11186. int indentSpacing;
  11187. /* readonly */
  11188. int indentWidth;
  11189. bool internal;
  11190. IntRect layoutBorder;
  11191. Vector2 layoutFlexScale;
  11192. LayoutMode layoutMode;
  11193. int layoutSpacing;
  11194. int maxHeight;
  11195. IntVector2 maxSize;
  11196. int maxWidth;
  11197. int minHeight;
  11198. IntVector2 minSize;
  11199. int minWidth;
  11200. bool modal;
  11201. bool modalAutoDismiss;
  11202. Color modalFrameColor;
  11203. IntVector2 modalFrameSize;
  11204. Color modalShadeColor;
  11205. bool movable;
  11206. String name;
  11207. /* readonly */
  11208. uint numAllChildren;
  11209. /* readonly */
  11210. uint numAttributes;
  11211. /* readonly */
  11212. uint numChildren;
  11213. ObjectAnimation objectAnimation;
  11214. float opacity;
  11215. UIElement parent;
  11216. IntVector2 position;
  11217. int priority;
  11218. /* readonly */
  11219. int refs;
  11220. bool resizable;
  11221. IntRect resizeBorder;
  11222. /* readonly */
  11223. UIElement root;
  11224. /* readonly */
  11225. IntVector2 screenPosition;
  11226. bool selected;
  11227. IntVector2 size;
  11228. bool sortChildren;
  11229. String style;
  11230. bool temporary;
  11231. TraversalMode traversalMode;
  11232. /* readonly */
  11233. StringHash type;
  11234. /* readonly */
  11235. String typeName;
  11236. bool useDerivedOpacity;
  11237. /* readonly */
  11238. VariantMap vars;
  11239. VerticalAlignment verticalAlignment;
  11240. bool visible;
  11241. /* readonly */
  11242. int weakRefs;
  11243. int width;
  11244. };
  11245. class XMLElement
  11246. {
  11247. // Methods:
  11248. XMLElement CreateChild(const String&);
  11249. String GetAttribute(const String& = String ( )) const;
  11250. String GetAttributeLower(const String&) const;
  11251. Array<String> GetAttributeNames() const;
  11252. String GetAttributeUpper(const String&) const;
  11253. bool GetBool(const String&) const;
  11254. BoundingBox GetBoundingBox() const;
  11255. XMLElement GetChild(const String& = String ( )) const;
  11256. Color GetColor(const String&) const;
  11257. float GetFloat(const String&) const;
  11258. int GetInt(const String&) const;
  11259. Matrix3 GetMatrix3(const String&) const;
  11260. Matrix3x4 GetMatrix3x4(const String&) const;
  11261. Matrix4 GetMatrix4(const String&) const;
  11262. XMLElement GetNext(const String& = String ( )) const;
  11263. Quaternion GetQuaternion(const String&) const;
  11264. ResourceRef GetResourceRef() const;
  11265. ResourceRefList GetResourceRefList() const;
  11266. uint GetUInt(const String&) const;
  11267. String GetValue() const;
  11268. Variant GetVariant() const;
  11269. VariantMap GetVariantMap() const;
  11270. Array<Variant> GetVariantVector() const;
  11271. Vector2 GetVector2(const String&) const;
  11272. Vector3 GetVector3(const String&) const;
  11273. Vector4 GetVector4(const String&) const;
  11274. Variant GetVectorVariant(const String&) const;
  11275. bool HasAttribute(const String&) const;
  11276. bool HasChild(const String&) const;
  11277. bool RemoveAttribute(const String& = String ( ));
  11278. bool RemoveChild(const String&);
  11279. bool RemoveChild(const XMLElement&);
  11280. bool RemoveChildren(const String& = String ( ));
  11281. XPathResultSet Select(const String&);
  11282. XPathResultSet SelectPrepared(const XPathQuery&);
  11283. XMLElement SelectSingle(const String&);
  11284. XMLElement SelectSinglePrepared(const XPathQuery&);
  11285. bool SetAttribute(const String&);
  11286. bool SetAttribute(const String&, const String&);
  11287. bool SetBool(const String&, bool);
  11288. bool SetBoundingBox(const BoundingBox&);
  11289. bool SetColor(const String&, const Color&);
  11290. bool SetFloat(const String&, float);
  11291. bool SetInt(const String&, int);
  11292. bool SetMatrix3(const String&, const Matrix3&);
  11293. bool SetMatrix3x4(const String&, const Matrix3x4&);
  11294. bool SetMatrix4(const String&, const Matrix4&);
  11295. bool SetQuaternion(const String&, const Quaternion&);
  11296. bool SetResourceRef(const String&, const ResourceRef&);
  11297. bool SetResourceRefList(const String&, const ResourceRefList&);
  11298. bool SetUInt(const String&, uint);
  11299. bool SetValue(const String&);
  11300. bool SetVariant(const Variant&);
  11301. bool SetVariantMap(const VariantMap&);
  11302. bool SetVariantVector(Array<Variant>);
  11303. bool SetVector2(const String&, const Vector2&);
  11304. bool SetVector3(const String&, const Vector3&);
  11305. bool SetVector4(const String&, const Vector4&);
  11306. bool SetVectorVariant(const String&, const Variant&);
  11307. // Properties:
  11308. /* readonly */
  11309. XMLFile file;
  11310. /* readonly */
  11311. bool isNull;
  11312. /* readonly */
  11313. String name;
  11314. /* readonly */
  11315. XMLElement nextResult;
  11316. /* readonly */
  11317. bool notNull;
  11318. /* readonly */
  11319. uint numAttributes;
  11320. /* readonly */
  11321. XMLElement parent;
  11322. String value;
  11323. };
  11324. class XMLFile
  11325. {
  11326. // Methods:
  11327. XMLElement CreateRoot(const String&);
  11328. bool FromString(const String&);
  11329. XMLElement GetRoot(const String& = String ( ));
  11330. bool Load(File);
  11331. bool Load(VectorBuffer&);
  11332. void Patch(XMLElement);
  11333. void Patch(XMLFile);
  11334. bool Save(File) const;
  11335. bool Save(VectorBuffer&) const;
  11336. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11337. String ToString() const;
  11338. // Properties:
  11339. /* readonly */
  11340. StringHash baseType;
  11341. /* readonly */
  11342. String category;
  11343. /* readonly */
  11344. uint memoryUse;
  11345. String name;
  11346. /* readonly */
  11347. int refs;
  11348. /* readonly */
  11349. XMLElement root;
  11350. /* readonly */
  11351. StringHash type;
  11352. /* readonly */
  11353. String typeName;
  11354. /* readonly */
  11355. uint useTimer;
  11356. /* readonly */
  11357. int weakRefs;
  11358. };
  11359. class XPathQuery
  11360. {
  11361. // Methods:
  11362. void Bind();
  11363. void Clear();
  11364. XPathResultSet Evaluate(XMLElement);
  11365. bool EvaluateToBool(XMLElement);
  11366. float EvaluateToFloat(XMLElement);
  11367. String EvaluateToString(XMLElement);
  11368. bool SetQuery(const String&, const String& = String ( ), bool = true);
  11369. bool SetVariable(const String&, bool);
  11370. bool SetVariable(const String&, const String&);
  11371. bool SetVariable(const String&, const XPathResultSet&);
  11372. bool SetVariable(const String&, float);
  11373. // Properties:
  11374. String query;
  11375. };
  11376. class XPathResultSet
  11377. {
  11378. // Properties:
  11379. /* readonly */
  11380. bool empty;
  11381. /* readonly */
  11382. XMLElement firstResult;
  11383. /* readonly */
  11384. uint size;
  11385. };
  11386. class Zone
  11387. {
  11388. // Methods:
  11389. void ApplyAttributes();
  11390. void DrawDebugGeometry(DebugRenderer, bool);
  11391. Variant GetAttribute(const String&) const;
  11392. ValueAnimation GetAttributeAnimation(const String&) const;
  11393. float GetAttributeAnimationSpeed(const String&) const;
  11394. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11395. Variant GetAttributeDefault(const String&) const;
  11396. bool IsInView(Camera) const;
  11397. bool Load(File, bool = false);
  11398. bool Load(VectorBuffer&, bool = false);
  11399. bool LoadXML(const XMLElement&, bool = false);
  11400. void MarkNetworkUpdate() const;
  11401. void Remove();
  11402. void RemoveInstanceDefault();
  11403. void ResetToDefault();
  11404. bool Save(File) const;
  11405. bool Save(VectorBuffer&) const;
  11406. bool SaveXML(XMLElement&) const;
  11407. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11408. bool SetAttribute(const String&, const Variant&);
  11409. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11410. void SetAttributeAnimationSpeed(const String&, float);
  11411. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11412. // Properties:
  11413. Color ambientColor;
  11414. /* readonly */
  11415. Color ambientEndColor;
  11416. bool ambientGradient;
  11417. /* readonly */
  11418. Color ambientStartColor;
  11419. bool animationEnabled;
  11420. /* readonly */
  11421. Array<Variant> attributeDefaults;
  11422. /* readonly */
  11423. Array<AttributeInfo> attributeInfos;
  11424. Array<Variant> attributes;
  11425. /* readonly */
  11426. StringHash baseType;
  11427. BoundingBox boundingBox;
  11428. bool castShadows;
  11429. /* readonly */
  11430. String category;
  11431. float drawDistance;
  11432. bool enabled;
  11433. /* readonly */
  11434. bool enabledEffective;
  11435. Color fogColor;
  11436. float fogEnd;
  11437. float fogHeight;
  11438. float fogHeightScale;
  11439. float fogStart;
  11440. bool heightFog;
  11441. /* readonly */
  11442. uint id;
  11443. /* readonly */
  11444. bool inView;
  11445. /* readonly */
  11446. Matrix3x4 inverseWorldTransform;
  11447. uint lightMask;
  11448. float lodBias;
  11449. uint maxLights;
  11450. /* readonly */
  11451. Node node;
  11452. /* readonly */
  11453. uint numAttributes;
  11454. ObjectAnimation objectAnimation;
  11455. bool occludee;
  11456. bool occluder;
  11457. bool override;
  11458. int priority;
  11459. /* readonly */
  11460. int refs;
  11461. float shadowDistance;
  11462. uint shadowMask;
  11463. bool temporary;
  11464. /* readonly */
  11465. StringHash type;
  11466. /* readonly */
  11467. String typeName;
  11468. uint viewMask;
  11469. /* readonly */
  11470. int weakRefs;
  11471. /* readonly */
  11472. BoundingBox worldBoundingBox;
  11473. uint zoneMask;
  11474. Texture zoneTexture;
  11475. };
  11476. // Enumerations
  11477. enum BlendMode
  11478. {
  11479. BLEND_REPLACE,
  11480. BLEND_ADD,
  11481. BLEND_MULTIPLY,
  11482. BLEND_ALPHA,
  11483. BLEND_ADDALPHA,
  11484. BLEND_PREMULALPHA,
  11485. BLEND_INVDESTALPHA,
  11486. BLEND_SUBTRACT,
  11487. BLEND_SUBTRACTALPHA,
  11488. };
  11489. enum BodyType2D
  11490. {
  11491. BT_STATIC,
  11492. BT_DYNAMIC,
  11493. BT_KINEMATIC,
  11494. };
  11495. enum CollisionEventMode
  11496. {
  11497. COLLISION_NEVER,
  11498. COLLISION_ACTIVE,
  11499. COLLISION_ALWAYS,
  11500. };
  11501. enum CompareMode
  11502. {
  11503. CMP_ALWAYS,
  11504. CMP_EQUAL,
  11505. CMP_NOTEQUAL,
  11506. CMP_LESS,
  11507. CMP_LESSEQUAL,
  11508. CMP_GREATER,
  11509. CMP_GREATEREQUAL,
  11510. };
  11511. enum CompressedFormat
  11512. {
  11513. CF_NONE,
  11514. CF_RGBA,
  11515. CF_DXT1,
  11516. CF_DXT3,
  11517. CF_DXT5,
  11518. CF_ETC1,
  11519. CF_PVRTC_RGB_2BPP,
  11520. CF_PVRTC_RGBA_2BPP,
  11521. CF_PVRTC_RGB_4BPP,
  11522. CF_PVRTC_RGBA_4BPP,
  11523. };
  11524. enum ConstraintType
  11525. {
  11526. CONSTRAINT_POINT,
  11527. CONSTRAINT_HINGE,
  11528. CONSTRAINT_SLIDER,
  11529. CONSTRAINT_CONETWIST,
  11530. };
  11531. enum Corner
  11532. {
  11533. C_TOPLEFT,
  11534. C_TOPRIGHT,
  11535. C_BOTTOMLEFT,
  11536. C_BOTTOMRIGHT,
  11537. };
  11538. enum CreateMode
  11539. {
  11540. REPLICATED,
  11541. LOCAL,
  11542. };
  11543. enum CubeMapFace
  11544. {
  11545. FACE_POSITIVE_X,
  11546. FACE_NEGATIVE_X,
  11547. FACE_POSITIVE_Y,
  11548. FACE_NEGATIVE_Y,
  11549. FACE_POSITIVE_Z,
  11550. FACE_NEGATIVE_Z,
  11551. };
  11552. enum CullMode
  11553. {
  11554. CULL_NONE,
  11555. CULL_CCW,
  11556. CULL_CW,
  11557. };
  11558. enum CursorShape
  11559. {
  11560. CS_NORMAL,
  11561. CS_IBEAM,
  11562. CS_CROSS,
  11563. CS_RESIZEVERTICAL,
  11564. CS_RESIZEDIAGONAL_TOPRIGHT,
  11565. CS_RESIZEHORIZONTAL,
  11566. CS_RESIZEDIAGONAL_TOPLEFT,
  11567. CS_RESIZE_ALL,
  11568. CS_ACCEPTDROP,
  11569. CS_REJECTDROP,
  11570. CS_BUSY,
  11571. CS_BUSY_ARROW,
  11572. };
  11573. enum DumpMode
  11574. {
  11575. DOXYGEN,
  11576. C_HEADER,
  11577. };
  11578. enum EmitterType
  11579. {
  11580. EMITTER_SPHERE,
  11581. EMITTER_BOX,
  11582. };
  11583. enum EmitterType2D
  11584. {
  11585. EMITTER_TYPE_GRAVITY,
  11586. EMITTER_TYPE_RADIAL,
  11587. };
  11588. enum FaceCameraMode
  11589. {
  11590. FC_NONE,
  11591. FC_ROTATE_XYZ,
  11592. FC_ROTATE_Y,
  11593. FC_LOOKAT_XYZ,
  11594. FC_LOOKAT_Y,
  11595. };
  11596. enum FileMode
  11597. {
  11598. FILE_READ,
  11599. FILE_WRITE,
  11600. FILE_READWRITE,
  11601. };
  11602. enum FillMode
  11603. {
  11604. FILL_SOLID,
  11605. FILL_WIREFRAME,
  11606. FILL_POINT,
  11607. };
  11608. enum FocusMode
  11609. {
  11610. FM_NOTFOCUSABLE,
  11611. FM_RESETFOCUS,
  11612. FM_FOCUSABLE,
  11613. FM_FOCUSABLE_DEFOCUSABLE,
  11614. };
  11615. enum HighlightMode
  11616. {
  11617. HM_NEVER,
  11618. HM_FOCUS,
  11619. HM_ALWAYS,
  11620. };
  11621. enum HorizontalAlignment
  11622. {
  11623. HA_LEFT,
  11624. HA_CENTER,
  11625. HA_RIGHT,
  11626. };
  11627. enum HttpRequestState
  11628. {
  11629. HTTP_INITIALIZING,
  11630. HTTP_ERROR,
  11631. HTTP_OPEN,
  11632. HTTP_CLOSED,
  11633. };
  11634. enum InterpMethod
  11635. {
  11636. IM_LINEAR,
  11637. IM_SPLINE,
  11638. };
  11639. enum InterpolationMode
  11640. {
  11641. BEZIER_CURVE,
  11642. };
  11643. enum Intersection
  11644. {
  11645. OUTSIDE,
  11646. INTERSECTS,
  11647. INSIDE,
  11648. };
  11649. enum JSONValueType
  11650. {
  11651. JSON_ANY,
  11652. JSON_OBJECT,
  11653. JSON_ARRAY,
  11654. };
  11655. enum LayoutMode
  11656. {
  11657. LM_FREE,
  11658. LM_HORIZONTAL,
  11659. LM_VERTICAL,
  11660. };
  11661. enum LightType
  11662. {
  11663. LIGHT_DIRECTIONAL,
  11664. LIGHT_SPOT,
  11665. LIGHT_POINT,
  11666. };
  11667. enum LoadMode
  11668. {
  11669. LOAD_RESOURCES_ONLY,
  11670. LOAD_SCENE,
  11671. LOAD_SCENE_AND_RESOURCES,
  11672. };
  11673. enum LoopMode2D
  11674. {
  11675. LM_DEFAULT,
  11676. LM_FORCE_LOOPED,
  11677. LM_FORCE_CLAMPED,
  11678. };
  11679. enum MouseMode
  11680. {
  11681. MM_ABSOLUTE,
  11682. MM_RELATIVE,
  11683. MM_WRAP,
  11684. };
  11685. enum Orientation
  11686. {
  11687. O_HORIZONTAL,
  11688. O_VERTICAL,
  11689. };
  11690. enum Orientation2D
  11691. {
  11692. O_ORTHOGONAL,
  11693. O_ISOMETRIC,
  11694. O_STAGGERED,
  11695. };
  11696. enum PassLightingMode
  11697. {
  11698. LIGHTING_UNLIT,
  11699. LIGHTING_PERVERTEX,
  11700. LIGHTING_PERPIXEL,
  11701. };
  11702. enum PrimitiveType
  11703. {
  11704. TRIANGLE_LIST,
  11705. LINE_LIST,
  11706. POINT_LIST,
  11707. TRIANGLE_STRIP,
  11708. LINE_STRIP,
  11709. TRIANGLE_FAN,
  11710. };
  11711. enum RayQueryLevel
  11712. {
  11713. RAY_AABB,
  11714. RAY_OBB,
  11715. RAY_TRIANGLE,
  11716. };
  11717. enum RenderCommandSortMode
  11718. {
  11719. SORT_FRONTTOBACK,
  11720. SORT_BACKTOFRONT,
  11721. };
  11722. enum RenderCommandType
  11723. {
  11724. CMD_NONE,
  11725. CMD_CLEAR,
  11726. CMD_SCENEPASS,
  11727. CMD_QUAD,
  11728. CMD_FORWARDLIGHTS,
  11729. CMD_LIGHTVOLUMES,
  11730. };
  11731. enum RenderSurfaceUpdateMode
  11732. {
  11733. SURFACE_MANUALUPDATE,
  11734. SURFACE_UPDATEVISIBLE,
  11735. SURFACE_UPDATEALWAYS,
  11736. };
  11737. enum RenderTargetSizeMode
  11738. {
  11739. SIZE_ABSOLUTE,
  11740. SIZE_VIEWPORTDIVISOR,
  11741. SIZE_VIEWPORTMULTIPLIER,
  11742. };
  11743. enum ShapeType
  11744. {
  11745. SHAPE_BOX,
  11746. SHAPE_SPHERE,
  11747. SHAPE_STATICPLANE,
  11748. SHAPE_CYLINDER,
  11749. SHAPE_CAPSULE,
  11750. SHAPE_CONE,
  11751. SHAPE_TRIANGLEMESH,
  11752. SHAPE_CONVEXHULL,
  11753. SHAPE_TERRAIN,
  11754. };
  11755. enum TextEffect
  11756. {
  11757. TE_NONE,
  11758. TE_SHADOW,
  11759. TE_STROKE,
  11760. };
  11761. enum TextureAddressMode
  11762. {
  11763. ADDRESS_WRAP,
  11764. ADDRESS_MIRROR,
  11765. ADDRESS_CLAMP,
  11766. ADDRESS_BORDER,
  11767. };
  11768. enum TextureCoordinate
  11769. {
  11770. COORD_U,
  11771. COORD_V,
  11772. COORD_W,
  11773. };
  11774. enum TextureFilterMode
  11775. {
  11776. FILTER_NEAREST,
  11777. FILTER_BILINEAR,
  11778. FILTER_TRILINEAR,
  11779. FILTER_ANISOTROPIC,
  11780. FILTER_DEFAULT,
  11781. };
  11782. enum TextureUnit
  11783. {
  11784. TU_DIFFUSE,
  11785. TU_NORMAL,
  11786. TU_SPECULAR,
  11787. TU_EMISSIVE,
  11788. TU_ENVIRONMENT,
  11789. TU_LIGHTRAMP,
  11790. TU_LIGHTSHAPE,
  11791. TU_SHADOWMAP,
  11792. TU_FACESELECT,
  11793. TU_INDIRECTION,
  11794. TU_ALBEDOBUFFER,
  11795. TU_NORMALBUFFER,
  11796. TU_DEPTHBUFFER,
  11797. TU_LIGHTBUFFER,
  11798. TU_VOLUMEMAP,
  11799. TU_ZONE,
  11800. MAX_MATERIAL_TEXTURE_UNITS,
  11801. MAX_NAMED_TEXTURE_UNITS,
  11802. MAX_TEXTURE_UNITS,
  11803. };
  11804. enum TextureUsage
  11805. {
  11806. TEXTURE_STATIC,
  11807. TEXTURE_DYNAMIC,
  11808. TEXTURE_RENDERTARGET,
  11809. TEXTURE_DEPTHSTENCIL,
  11810. };
  11811. enum TileMapLayerType2D
  11812. {
  11813. LT_TILE_LAYER,
  11814. LT_OBJECT_GROUP,
  11815. LT_IMAGE_LAYER,
  11816. LT_INVALID,
  11817. };
  11818. enum TileObjectType2D
  11819. {
  11820. OT_RECTANGLE,
  11821. OT_ELLIPSE,
  11822. OT_POLYGON,
  11823. OT_POLYLINE,
  11824. OT_TILE,
  11825. OT_INVALID,
  11826. };
  11827. enum TransformSpace
  11828. {
  11829. TS_LOCAL,
  11830. TS_PARENT,
  11831. TS_WORLD,
  11832. };
  11833. enum TraversalMode
  11834. {
  11835. TM_BREADTH_FIRST,
  11836. TM_DEPTH_FIRST,
  11837. };
  11838. enum VariantType
  11839. {
  11840. VAR_NONE,
  11841. VAR_INT,
  11842. VAR_BOOL,
  11843. VAR_FLOAT,
  11844. VAR_VECTOR2,
  11845. VAR_VECTOR3,
  11846. VAR_VECTOR4,
  11847. VAR_QUATERNION,
  11848. VAR_COLOR,
  11849. VAR_STRING,
  11850. VAR_BUFFER,
  11851. VAR_VOIDPTR,
  11852. VAR_RESOURCEREF,
  11853. VAR_RESOURCEREFLIST,
  11854. VAR_VARIANTVECTOR,
  11855. VAR_VARIANTMAP,
  11856. VAR_INTRECT,
  11857. VAR_INTVECTOR2,
  11858. VAR_PTR,
  11859. VAR_MATRIX3,
  11860. VAR_MATRIX3X4,
  11861. VAR_MATRIX4,
  11862. };
  11863. enum VerticalAlignment
  11864. {
  11865. VA_TOP,
  11866. VA_CENTER,
  11867. VA_BOTTOM,
  11868. };
  11869. enum WrapMode
  11870. {
  11871. WM_LOOP,
  11872. WM_ONCE,
  11873. WM_CLAMP,
  11874. };
  11875. // Global functions
  11876. float Abs(float);
  11877. float Acos(float);
  11878. String AddTrailingSlash(const String&);
  11879. float Asin(float);
  11880. float Atan(float);
  11881. float Atan2(float, float);
  11882. float Ceil(float);
  11883. float Clamp(float, float, float);
  11884. int Clamp(int, int, int);
  11885. void ClearDelayedExecute(const String& = String ( ));
  11886. VectorBuffer CompressVectorBuffer(VectorBuffer&);
  11887. float Cos(float);
  11888. uint CountSetBits(uint);
  11889. VectorBuffer DecompressVectorBuffer(VectorBuffer&);
  11890. void DelayedExecute(float, bool, const String&);
  11891. void DelayedExecute(float, bool, const String&, const Array<Variant>);
  11892. bool Equals(float, float);
  11893. void ErrorDialog(const String&, const String&);
  11894. float Floor(float);
  11895. uint GetAlphaFormat();
  11896. Array<String> GetArguments();
  11897. String GetConsoleInput();
  11898. uint GetDepthStencilFormat();
  11899. Object GetEventSender();
  11900. String GetExtension(const String&, bool = true);
  11901. String GetFileName(const String&);
  11902. String GetFileNameAndExtension(const String&, bool = false);
  11903. uint GetFloat16Format();
  11904. uint GetFloat32Format();
  11905. uint GetFormat(const String&);
  11906. String GetInternalPath(const String&);
  11907. uint GetLuminanceAlphaFormat();
  11908. uint GetLuminanceFormat();
  11909. uint GetNumLogicalCPUs();
  11910. uint GetNumPhysicalCPUs();
  11911. Array<String> GetObjectCategories();
  11912. Array<String> GetObjectsByCategory(const String&);
  11913. String GetParentPath(const String&);
  11914. String GetPath(const String&);
  11915. String GetPlatform();
  11916. uint GetRG16Format();
  11917. uint GetRGBA16Format();
  11918. uint GetRGBAFloat16Format();
  11919. uint GetRGBAFloat32Format();
  11920. uint GetRGBAFormat();
  11921. uint GetRGBFormat();
  11922. uint GetRGFloat16Format();
  11923. uint GetRGFloat32Format();
  11924. uint GetRandomSeed();
  11925. String GetTextureUnitName(TextureUnit);
  11926. bool IsAbsolutePath(const String&);
  11927. bool IsAlpha(uint);
  11928. bool IsDigit(uint);
  11929. bool IsNaN(float);
  11930. bool IsPowerOfTwo(uint);
  11931. String Join(Array<String>&, const String&);
  11932. float Lerp(float, float, float);
  11933. void MarkNetworkUpdate();
  11934. float Max(float, float);
  11935. int Max(int, int);
  11936. float Min(float, float);
  11937. int Min(int, int);
  11938. float Mod(float, float);
  11939. uint NextPowerOfTwo(uint);
  11940. void OpenConsoleWindow();
  11941. float Pow(float, float);
  11942. void Print(bool, bool = false);
  11943. void Print(const String&, bool = false);
  11944. void Print(const Variant&, bool = false);
  11945. void Print(float, bool = false);
  11946. void Print(int, bool = false);
  11947. void Print(uint, bool = false);
  11948. void PrintCallStack(bool = false);
  11949. float Random();
  11950. float Random(float);
  11951. float Random(float, float);
  11952. int RandomInt();
  11953. int RandomInt(int);
  11954. int RandomInt(int, int);
  11955. float RandomNormal(float, float);
  11956. void Remove();
  11957. String RemoveTrailingSlash(const String&);
  11958. String ReplaceExtension(const String&, const String&);
  11959. uint SDBMHash(uint, uint8);
  11960. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11961. void SetRandomSeed(uint);
  11962. float Sign(float);
  11963. float Sin(float);
  11964. float SmoothStep(float, float, float);
  11965. float Sqrt(float);
  11966. const String& GetTypeName(StringHash);
  11967. void SubscribeToEvent(Object, const String&, const String&);
  11968. void SubscribeToEvent(const String&, const String&);
  11969. float Tan(float);
  11970. uint ToLower(uint);
  11971. String ToStringHex(int);
  11972. uint ToUpper(uint);
  11973. void UnsubscribeFromAllEvents();
  11974. void UnsubscribeFromAllEventsExcept(Array<String>);
  11975. void UnsubscribeFromEvent(Object, const String&);
  11976. void UnsubscribeFromEvent(const String&);
  11977. void UnsubscribeFromEvents(Object);
  11978. // Global properties
  11979. Audio audio;
  11980. ResourceCache cache;
  11981. Console console;
  11982. DebugHud debugHud;
  11983. DebugRenderer debugRenderer;
  11984. Engine engine;
  11985. FileSystem fileSystem;
  11986. Graphics graphics;
  11987. Input input;
  11988. Log log;
  11989. Network network;
  11990. Node node;
  11991. Octree octree;
  11992. PhysicsWorld physicsWorld;
  11993. PhysicsWorld2D physicsWorld2D;
  11994. Renderer renderer;
  11995. ResourceCache resourceCache;
  11996. Scene scene;
  11997. Script script;
  11998. ScriptFile scriptFile;
  11999. ScriptInstance self;
  12000. Time time;
  12001. UI ui;
  12002. // Global constants
  12003. uint AM_COMPONENTID;
  12004. uint AM_DEFAULT;
  12005. uint AM_FILE;
  12006. uint AM_LATESTDATA;
  12007. uint AM_NET;
  12008. uint AM_NODEID;
  12009. uint AM_NODEIDVECTOR;
  12010. uint AM_NOEDIT;
  12011. Color BLACK;
  12012. Color BLUE;
  12013. int CONTROLLER_AXIS_LEFTX;
  12014. int CONTROLLER_AXIS_LEFTY;
  12015. int CONTROLLER_AXIS_RIGHTX;
  12016. int CONTROLLER_AXIS_RIGHTY;
  12017. int CONTROLLER_AXIS_TRIGGERLEFT;
  12018. int CONTROLLER_AXIS_TRIGGERRIGHT;
  12019. int CONTROLLER_BUTTON_A;
  12020. int CONTROLLER_BUTTON_B;
  12021. int CONTROLLER_BUTTON_BACK;
  12022. int CONTROLLER_BUTTON_DPAD_DOWN;
  12023. int CONTROLLER_BUTTON_DPAD_LEFT;
  12024. int CONTROLLER_BUTTON_DPAD_RIGHT;
  12025. int CONTROLLER_BUTTON_DPAD_UP;
  12026. int CONTROLLER_BUTTON_GUIDE;
  12027. int CONTROLLER_BUTTON_LEFTSHOULDER;
  12028. int CONTROLLER_BUTTON_LEFTSTICK;
  12029. int CONTROLLER_BUTTON_RIGHTSHOULDER;
  12030. int CONTROLLER_BUTTON_RIGHTSTICK;
  12031. int CONTROLLER_BUTTON_START;
  12032. int CONTROLLER_BUTTON_X;
  12033. int CONTROLLER_BUTTON_Y;
  12034. Color CYAN;
  12035. uint DD_DISABLED;
  12036. uint DD_SOURCE;
  12037. uint DD_SOURCE_AND_TARGET;
  12038. uint DD_TARGET;
  12039. uint DEBUGHUD_SHOW_ALL;
  12040. uint DEBUGHUD_SHOW_MODE;
  12041. uint DEBUGHUD_SHOW_NONE;
  12042. uint DEBUGHUD_SHOW_PROFILER;
  12043. uint DEBUGHUD_SHOW_STATS;
  12044. uint DEFAULT_LIGHTMASK;
  12045. uint DEFAULT_VIEWMASK;
  12046. uint DRAWABLE_ANY;
  12047. uint DRAWABLE_GEOMETRY;
  12048. uint DRAWABLE_GEOMETRY2D;
  12049. uint DRAWABLE_LIGHT;
  12050. uint DRAWABLE_ZONE;
  12051. uint FIRST_LOCAL_ID;
  12052. uint FIRST_REPLICATED_ID;
  12053. Color GRAY;
  12054. Color GREEN;
  12055. int HAT_CENTER;
  12056. int HAT_DOWN;
  12057. int HAT_LEFT;
  12058. int HAT_RIGHT;
  12059. int HAT_UP;
  12060. int KEY_0;
  12061. int KEY_1;
  12062. int KEY_2;
  12063. int KEY_3;
  12064. int KEY_4;
  12065. int KEY_5;
  12066. int KEY_6;
  12067. int KEY_7;
  12068. int KEY_8;
  12069. int KEY_9;
  12070. int KEY_A;
  12071. int KEY_ALT;
  12072. int KEY_APPLICATION;
  12073. int KEY_B;
  12074. int KEY_BACKSPACE;
  12075. int KEY_C;
  12076. int KEY_CAPSLOCK;
  12077. int KEY_CTRL;
  12078. int KEY_D;
  12079. int KEY_DELETE;
  12080. int KEY_DOWN;
  12081. int KEY_E;
  12082. int KEY_END;
  12083. int KEY_ESC;
  12084. int KEY_F;
  12085. int KEY_F1;
  12086. int KEY_F10;
  12087. int KEY_F11;
  12088. int KEY_F12;
  12089. int KEY_F13;
  12090. int KEY_F14;
  12091. int KEY_F15;
  12092. int KEY_F16;
  12093. int KEY_F17;
  12094. int KEY_F18;
  12095. int KEY_F19;
  12096. int KEY_F2;
  12097. int KEY_F20;
  12098. int KEY_F21;
  12099. int KEY_F22;
  12100. int KEY_F23;
  12101. int KEY_F24;
  12102. int KEY_F3;
  12103. int KEY_F4;
  12104. int KEY_F5;
  12105. int KEY_F6;
  12106. int KEY_F7;
  12107. int KEY_F8;
  12108. int KEY_F9;
  12109. int KEY_G;
  12110. int KEY_GUI;
  12111. int KEY_H;
  12112. int KEY_HOME;
  12113. int KEY_I;
  12114. int KEY_INSERT;
  12115. int KEY_J;
  12116. int KEY_K;
  12117. int KEY_KP_0;
  12118. int KEY_KP_1;
  12119. int KEY_KP_2;
  12120. int KEY_KP_3;
  12121. int KEY_KP_4;
  12122. int KEY_KP_5;
  12123. int KEY_KP_6;
  12124. int KEY_KP_7;
  12125. int KEY_KP_8;
  12126. int KEY_KP_9;
  12127. int KEY_KP_DIVIDE;
  12128. int KEY_KP_ENTER;
  12129. int KEY_KP_MINUS;
  12130. int KEY_KP_MULTIPLY;
  12131. int KEY_KP_PERIOD;
  12132. int KEY_KP_PLUS;
  12133. int KEY_L;
  12134. int KEY_LALT;
  12135. int KEY_LCTRL;
  12136. int KEY_LEFT;
  12137. int KEY_LGUI;
  12138. int KEY_LSHIFT;
  12139. int KEY_M;
  12140. int KEY_N;
  12141. int KEY_NUMLOCKCLEAR;
  12142. int KEY_O;
  12143. int KEY_P;
  12144. int KEY_PAGEDOWN;
  12145. int KEY_PAGEUP;
  12146. int KEY_PAUSE;
  12147. int KEY_PRINTSCREEN;
  12148. int KEY_Q;
  12149. int KEY_R;
  12150. int KEY_RALT;
  12151. int KEY_RCTRL;
  12152. int KEY_RETURN;
  12153. int KEY_RETURN2;
  12154. int KEY_RGUI;
  12155. int KEY_RIGHT;
  12156. int KEY_RSHIFT;
  12157. int KEY_S;
  12158. int KEY_SCROLLLOCK;
  12159. int KEY_SELECT;
  12160. int KEY_SHIFT;
  12161. int KEY_SPACE;
  12162. int KEY_T;
  12163. int KEY_TAB;
  12164. int KEY_U;
  12165. int KEY_UP;
  12166. int KEY_V;
  12167. int KEY_W;
  12168. int KEY_X;
  12169. int KEY_Y;
  12170. int KEY_Z;
  12171. uint LAST_LOCAL_ID;
  12172. uint LAST_REPLICATED_ID;
  12173. int LOG_DEBUG;
  12174. int LOG_ERROR;
  12175. int LOG_INFO;
  12176. int LOG_NONE;
  12177. int LOG_WARNING;
  12178. Color MAGENTA;
  12179. int MOUSEB_LEFT;
  12180. int MOUSEB_MIDDLE;
  12181. int MOUSEB_RIGHT;
  12182. float M_DEGTORAD;
  12183. float M_DEGTORAD_2;
  12184. float M_EPSILON;
  12185. float M_HALF_PI;
  12186. float M_INFINITY;
  12187. float M_LARGE_EPSILON;
  12188. float M_LARGE_VALUE;
  12189. int M_MAX_INT;
  12190. uint M_MAX_UNSIGNED;
  12191. int M_MIN_INT;
  12192. uint M_MIN_UNSIGNED;
  12193. float M_PI;
  12194. float M_RADTODEG;
  12195. float PIXEL_SIZE;
  12196. int QUALITY_HIGH;
  12197. int QUALITY_LOW;
  12198. int QUALITY_MAX;
  12199. int QUALITY_MEDIUM;
  12200. int QUAL_ALT;
  12201. int QUAL_ANY;
  12202. int QUAL_CTRL;
  12203. int QUAL_SHIFT;
  12204. Color RED;
  12205. int SCANCODE_0;
  12206. int SCANCODE_1;
  12207. int SCANCODE_2;
  12208. int SCANCODE_3;
  12209. int SCANCODE_4;
  12210. int SCANCODE_5;
  12211. int SCANCODE_6;
  12212. int SCANCODE_7;
  12213. int SCANCODE_8;
  12214. int SCANCODE_9;
  12215. int SCANCODE_A;
  12216. int SCANCODE_AC_BACK;
  12217. int SCANCODE_AC_BOOKMARKS;
  12218. int SCANCODE_AC_FORWARD;
  12219. int SCANCODE_AC_HOME;
  12220. int SCANCODE_AC_REFRESH;
  12221. int SCANCODE_AC_SEARCH;
  12222. int SCANCODE_AC_STOP;
  12223. int SCANCODE_AGAIN;
  12224. int SCANCODE_ALT;
  12225. int SCANCODE_ALTERASE;
  12226. int SCANCODE_APOSTROPHE;
  12227. int SCANCODE_APP1;
  12228. int SCANCODE_APP2;
  12229. int SCANCODE_APPLICATION;
  12230. int SCANCODE_AUDIOMUTE;
  12231. int SCANCODE_AUDIONEXT;
  12232. int SCANCODE_AUDIOPLAY;
  12233. int SCANCODE_AUDIOPREV;
  12234. int SCANCODE_AUDIOSTOP;
  12235. int SCANCODE_B;
  12236. int SCANCODE_BACKSLASH;
  12237. int SCANCODE_BACKSPACE;
  12238. int SCANCODE_BRIGHTNESSDOWN;
  12239. int SCANCODE_BRIGHTNESSUP;
  12240. int SCANCODE_C;
  12241. int SCANCODE_CALCULATOR;
  12242. int SCANCODE_CANCEL;
  12243. int SCANCODE_CAPSLOCK;
  12244. int SCANCODE_CLEAR;
  12245. int SCANCODE_CLEARAGAIN;
  12246. int SCANCODE_COMMA;
  12247. int SCANCODE_COMPUTER;
  12248. int SCANCODE_COPY;
  12249. int SCANCODE_CRSEL;
  12250. int SCANCODE_CTRL;
  12251. int SCANCODE_CURRENCYSUBUNIT;
  12252. int SCANCODE_CURRENCYUNIT;
  12253. int SCANCODE_CUT;
  12254. int SCANCODE_D;
  12255. int SCANCODE_DECIMALSEPARATOR;
  12256. int SCANCODE_DELETE;
  12257. int SCANCODE_DISPLAYSWITCH;
  12258. int SCANCODE_DOWN;
  12259. int SCANCODE_E;
  12260. int SCANCODE_EJECT;
  12261. int SCANCODE_END;
  12262. int SCANCODE_EQUALS;
  12263. int SCANCODE_ESCAPE;
  12264. int SCANCODE_EXECUTE;
  12265. int SCANCODE_EXSEL;
  12266. int SCANCODE_F;
  12267. int SCANCODE_F1;
  12268. int SCANCODE_F10;
  12269. int SCANCODE_F11;
  12270. int SCANCODE_F12;
  12271. int SCANCODE_F13;
  12272. int SCANCODE_F14;
  12273. int SCANCODE_F15;
  12274. int SCANCODE_F16;
  12275. int SCANCODE_F17;
  12276. int SCANCODE_F18;
  12277. int SCANCODE_F19;
  12278. int SCANCODE_F2;
  12279. int SCANCODE_F20;
  12280. int SCANCODE_F21;
  12281. int SCANCODE_F22;
  12282. int SCANCODE_F23;
  12283. int SCANCODE_F24;
  12284. int SCANCODE_F3;
  12285. int SCANCODE_F4;
  12286. int SCANCODE_F5;
  12287. int SCANCODE_F6;
  12288. int SCANCODE_F7;
  12289. int SCANCODE_F8;
  12290. int SCANCODE_F9;
  12291. int SCANCODE_FIND;
  12292. int SCANCODE_G;
  12293. int SCANCODE_GRAVE;
  12294. int SCANCODE_GUI;
  12295. int SCANCODE_H;
  12296. int SCANCODE_HELP;
  12297. int SCANCODE_HOME;
  12298. int SCANCODE_I;
  12299. int SCANCODE_INSERT;
  12300. int SCANCODE_INTERNATIONAL1;
  12301. int SCANCODE_INTERNATIONAL2;
  12302. int SCANCODE_INTERNATIONAL3;
  12303. int SCANCODE_INTERNATIONAL4;
  12304. int SCANCODE_INTERNATIONAL5;
  12305. int SCANCODE_INTERNATIONAL6;
  12306. int SCANCODE_INTERNATIONAL7;
  12307. int SCANCODE_INTERNATIONAL8;
  12308. int SCANCODE_INTERNATIONAL9;
  12309. int SCANCODE_J;
  12310. int SCANCODE_K;
  12311. int SCANCODE_KBDILLUMDOWN;
  12312. int SCANCODE_KBDILLUMTOGGLE;
  12313. int SCANCODE_KBDILLUMUP;
  12314. int SCANCODE_KP_0;
  12315. int SCANCODE_KP_00;
  12316. int SCANCODE_KP_000;
  12317. int SCANCODE_KP_1;
  12318. int SCANCODE_KP_2;
  12319. int SCANCODE_KP_3;
  12320. int SCANCODE_KP_4;
  12321. int SCANCODE_KP_5;
  12322. int SCANCODE_KP_6;
  12323. int SCANCODE_KP_7;
  12324. int SCANCODE_KP_8;
  12325. int SCANCODE_KP_9;
  12326. int SCANCODE_KP_A;
  12327. int SCANCODE_KP_AMPERSAND;
  12328. int SCANCODE_KP_AT;
  12329. int SCANCODE_KP_B;
  12330. int SCANCODE_KP_BACKSPACE;
  12331. int SCANCODE_KP_BINARY;
  12332. int SCANCODE_KP_C;
  12333. int SCANCODE_KP_CLEAR;
  12334. int SCANCODE_KP_CLEARENTRY;
  12335. int SCANCODE_KP_COLON;
  12336. int SCANCODE_KP_COMMA;
  12337. int SCANCODE_KP_D;
  12338. int SCANCODE_KP_DBLAMPERSAND;
  12339. int SCANCODE_KP_DBLVERTICALBAR;
  12340. int SCANCODE_KP_DECIMAL;
  12341. int SCANCODE_KP_DIVIDE;
  12342. int SCANCODE_KP_E;
  12343. int SCANCODE_KP_ENTER;
  12344. int SCANCODE_KP_EQUALS;
  12345. int SCANCODE_KP_EQUALSAS400;
  12346. int SCANCODE_KP_EXCLAM;
  12347. int SCANCODE_KP_F;
  12348. int SCANCODE_KP_GREATER;
  12349. int SCANCODE_KP_HASH;
  12350. int SCANCODE_KP_HEXADECIMAL;
  12351. int SCANCODE_KP_LEFTBRACE;
  12352. int SCANCODE_KP_LEFTPAREN;
  12353. int SCANCODE_KP_LESS;
  12354. int SCANCODE_KP_MEMADD;
  12355. int SCANCODE_KP_MEMCLEAR;
  12356. int SCANCODE_KP_MEMDIVIDE;
  12357. int SCANCODE_KP_MEMMULTIPLY;
  12358. int SCANCODE_KP_MEMRECALL;
  12359. int SCANCODE_KP_MEMSTORE;
  12360. int SCANCODE_KP_MEMSUBTRACT;
  12361. int SCANCODE_KP_MINUS;
  12362. int SCANCODE_KP_MULTIPLY;
  12363. int SCANCODE_KP_OCTAL;
  12364. int SCANCODE_KP_PERCENT;
  12365. int SCANCODE_KP_PERIOD;
  12366. int SCANCODE_KP_PLUS;
  12367. int SCANCODE_KP_PLUSMINUS;
  12368. int SCANCODE_KP_POWER;
  12369. int SCANCODE_KP_RIGHTBRACE;
  12370. int SCANCODE_KP_RIGHTPAREN;
  12371. int SCANCODE_KP_SPACE;
  12372. int SCANCODE_KP_TAB;
  12373. int SCANCODE_KP_VERTICALBAR;
  12374. int SCANCODE_KP_XOR;
  12375. int SCANCODE_L;
  12376. int SCANCODE_LALT;
  12377. int SCANCODE_LANG1;
  12378. int SCANCODE_LANG2;
  12379. int SCANCODE_LANG3;
  12380. int SCANCODE_LANG4;
  12381. int SCANCODE_LANG5;
  12382. int SCANCODE_LANG6;
  12383. int SCANCODE_LANG7;
  12384. int SCANCODE_LANG8;
  12385. int SCANCODE_LANG9;
  12386. int SCANCODE_LCTRL;
  12387. int SCANCODE_LEFT;
  12388. int SCANCODE_LEFTBRACKET;
  12389. int SCANCODE_LGUI;
  12390. int SCANCODE_LSHIFT;
  12391. int SCANCODE_M;
  12392. int SCANCODE_MAIL;
  12393. int SCANCODE_MEDIASELECT;
  12394. int SCANCODE_MENU;
  12395. int SCANCODE_MINUS;
  12396. int SCANCODE_MODE;
  12397. int SCANCODE_MUTE;
  12398. int SCANCODE_N;
  12399. int SCANCODE_NONUSBACKSLASH;
  12400. int SCANCODE_NONUSHASH;
  12401. int SCANCODE_NUMLOCKCLEAR;
  12402. int SCANCODE_O;
  12403. int SCANCODE_OPER;
  12404. int SCANCODE_OUT;
  12405. int SCANCODE_P;
  12406. int SCANCODE_PAGEDOWN;
  12407. int SCANCODE_PAGEUP;
  12408. int SCANCODE_PASTE;
  12409. int SCANCODE_PAUSE;
  12410. int SCANCODE_PERIOD;
  12411. int SCANCODE_POWER;
  12412. int SCANCODE_PRINTSCREEN;
  12413. int SCANCODE_PRIOR;
  12414. int SCANCODE_Q;
  12415. int SCANCODE_R;
  12416. int SCANCODE_RALT;
  12417. int SCANCODE_RCTRL;
  12418. int SCANCODE_RETURN;
  12419. int SCANCODE_RETURN2;
  12420. int SCANCODE_RGUI;
  12421. int SCANCODE_RIGHT;
  12422. int SCANCODE_RIGHTBRACKET;
  12423. int SCANCODE_RSHIFT;
  12424. int SCANCODE_S;
  12425. int SCANCODE_SCROLLLOCK;
  12426. int SCANCODE_SELECT;
  12427. int SCANCODE_SEMICOLON;
  12428. int SCANCODE_SEPARATOR;
  12429. int SCANCODE_SHIFT;
  12430. int SCANCODE_SLASH;
  12431. int SCANCODE_SLEEP;
  12432. int SCANCODE_SPACE;
  12433. int SCANCODE_STOP;
  12434. int SCANCODE_SYSREQ;
  12435. int SCANCODE_T;
  12436. int SCANCODE_TAB;
  12437. int SCANCODE_THOUSANDSSEPARATOR;
  12438. int SCANCODE_U;
  12439. int SCANCODE_UNDO;
  12440. int SCANCODE_UNKNOWN;
  12441. int SCANCODE_UP;
  12442. int SCANCODE_V;
  12443. int SCANCODE_VOLUMEDOWN;
  12444. int SCANCODE_VOLUMEUP;
  12445. int SCANCODE_W;
  12446. int SCANCODE_WWW;
  12447. int SCANCODE_X;
  12448. int SCANCODE_Y;
  12449. int SCANCODE_Z;
  12450. uint SCAN_DIRS;
  12451. uint SCAN_FILES;
  12452. uint SCAN_HIDDEN;
  12453. int SHADOWQUALITY_HIGH_16BIT;
  12454. int SHADOWQUALITY_HIGH_24BIT;
  12455. int SHADOWQUALITY_LOW_16BIT;
  12456. int SHADOWQUALITY_LOW_24BIT;
  12457. String SOUND_AMBIENT;
  12458. String SOUND_EFFECT;
  12459. String SOUND_MASTER;
  12460. String SOUND_MUSIC;
  12461. String SOUND_VOICE;
  12462. Color TRANSPARENT;
  12463. uint VO_DISABLE_OCCLUSION;
  12464. uint VO_DISABLE_SHADOWS;
  12465. uint VO_LOW_MATERIAL_QUALITY;
  12466. uint VO_NONE;
  12467. Color WHITE;
  12468. Color YELLOW;