AngelScriptAPI.h 408 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572
  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. #define in
  10. #define out
  11. #define inout
  12. #define is ==
  13. #define interface struct
  14. #define class struct
  15. #define cast reinterpret_cast
  16. #define mixin
  17. #define funcdef
  18. // Classes
  19. class Animatable
  20. {
  21. public:
  22. // Methods:
  23. void ApplyAttributes();
  24. Variant GetAttribute(const String&) const;
  25. ValueAnimation GetAttributeAnimation(const String&) const;
  26. float GetAttributeAnimationSpeed(const String&) const;
  27. float GetAttributeAnimationTime(const String&) const;
  28. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  29. Variant GetAttributeDefault(const String&) const;
  30. bool GetInterceptNetworkUpdate(const String&) const;
  31. bool HasSubscribedToEvent(Object, const String&);
  32. bool HasSubscribedToEvent(const String&);
  33. bool Load(File, bool = false);
  34. bool Load(VectorBuffer&, bool = false);
  35. bool LoadJSON(const JSONValue&, bool = false);
  36. bool LoadXML(const XMLElement&, bool = false);
  37. void MarkNetworkUpdate() const;
  38. void RemoveAttributeAnimation(const String&);
  39. void RemoveInstanceDefault();
  40. void RemoveObjectAnimation();
  41. void ResetToDefault();
  42. bool Save(File) const;
  43. bool Save(VectorBuffer&) const;
  44. bool SaveJSON(JSONValue&) const;
  45. bool SaveXML(XMLElement&) const;
  46. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  47. void SetAnimationTime(float);
  48. bool SetAttribute(const String&, const Variant&);
  49. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  50. void SetAttributeAnimationSpeed(const String&, float);
  51. void SetAttributeAnimationTime(const String&, float);
  52. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  53. void SetInterceptNetworkUpdate(const String&, bool);
  54. // Properties:
  55. bool animationEnabled;
  56. /* readonly */
  57. Array<Variant> attributeDefaults;
  58. /* readonly */
  59. Array<AttributeInfo> attributeInfos;
  60. Array<Variant> attributes;
  61. /* readonly */
  62. String category;
  63. /* readonly */
  64. uint numAttributes;
  65. ObjectAnimation objectAnimation;
  66. /* readonly */
  67. int refs;
  68. bool temporary;
  69. /* readonly */
  70. StringHash type;
  71. /* readonly */
  72. String typeName;
  73. /* readonly */
  74. int weakRefs;
  75. };
  76. class AnimatedModel
  77. {
  78. public:
  79. // Methods:
  80. AnimationState AddAnimationState(Animation);
  81. void ApplyAttributes();
  82. void ApplyMaterialList(const String& = String ( ));
  83. void DrawDebugGeometry(DebugRenderer, bool);
  84. AnimationState GetAnimationState(Animation) const;
  85. AnimationState GetAnimationState(uint) const;
  86. Variant GetAttribute(const String&) const;
  87. ValueAnimation GetAttributeAnimation(const String&) const;
  88. float GetAttributeAnimationSpeed(const String&) const;
  89. float GetAttributeAnimationTime(const String&) const;
  90. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  91. Variant GetAttributeDefault(const String&) const;
  92. bool GetInterceptNetworkUpdate(const String&) const;
  93. float GetMorphWeight(uint) const;
  94. bool HasSubscribedToEvent(Object, const String&);
  95. bool HasSubscribedToEvent(const String&);
  96. bool IsInView(Camera) const;
  97. bool Load(File, bool = false);
  98. bool Load(VectorBuffer&, bool = false);
  99. bool LoadJSON(const JSONValue&, bool = false);
  100. bool LoadXML(const XMLElement&, bool = false);
  101. void MarkNetworkUpdate() const;
  102. void Remove();
  103. void RemoveAllAnimationStates();
  104. void RemoveAnimationState(Animation);
  105. void RemoveAnimationState(AnimationState);
  106. void RemoveAnimationState(const String&);
  107. void RemoveAnimationState(uint);
  108. void RemoveAttributeAnimation(const String&);
  109. void RemoveInstanceDefault();
  110. void RemoveObjectAnimation();
  111. void ResetMorphWeights();
  112. void ResetToDefault();
  113. bool Save(File) const;
  114. bool Save(VectorBuffer&) const;
  115. bool SaveJSON(JSONValue&) const;
  116. bool SaveXML(XMLElement&) const;
  117. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  118. void SetAnimationTime(float);
  119. bool SetAttribute(const String&, const Variant&);
  120. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  121. void SetAttributeAnimationSpeed(const String&, float);
  122. void SetAttributeAnimationTime(const String&, float);
  123. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  124. void SetInterceptNetworkUpdate(const String&, bool);
  125. void SetMorphWeight(uint, float);
  126. void UpdateBoneBoundingBox();
  127. // Properties:
  128. bool animationEnabled;
  129. float animationLodBias;
  130. /* readonly */
  131. Array<AnimationState> animationStates;
  132. /* readonly */
  133. Array<Variant> attributeDefaults;
  134. /* readonly */
  135. Array<AttributeInfo> attributeInfos;
  136. Array<Variant> attributes;
  137. /* readonly */
  138. BoundingBox boundingBox;
  139. bool castShadows;
  140. /* readonly */
  141. String category;
  142. float drawDistance;
  143. bool enabled;
  144. /* readonly */
  145. bool enabledEffective;
  146. /* readonly */
  147. uint id;
  148. /* readonly */
  149. bool inView;
  150. uint lightMask;
  151. float lodBias;
  152. /* writeonly */
  153. Material material;
  154. Array<Material> materials;
  155. uint maxLights;
  156. Model model;
  157. /* readonly */
  158. Array<String> morphNames;
  159. Array<float> morphWeights;
  160. /* readonly */
  161. Node node;
  162. /* readonly */
  163. uint numAnimationStates;
  164. /* readonly */
  165. uint numAttributes;
  166. /* readonly */
  167. uint numGeometries;
  168. /* readonly */
  169. uint numMorphs;
  170. ObjectAnimation objectAnimation;
  171. bool occludee;
  172. bool occluder;
  173. /* readonly */
  174. int refs;
  175. float shadowDistance;
  176. uint shadowMask;
  177. /* readonly */
  178. Skeleton skeleton;
  179. bool temporary;
  180. /* readonly */
  181. StringHash type;
  182. /* readonly */
  183. String typeName;
  184. bool updateInvisible;
  185. uint viewMask;
  186. /* readonly */
  187. int weakRefs;
  188. /* readonly */
  189. BoundingBox worldBoundingBox;
  190. /* readonly */
  191. Zone zone;
  192. uint zoneMask;
  193. };
  194. class AnimatedSprite2D
  195. {
  196. public:
  197. // Methods:
  198. void ApplyAttributes();
  199. void DrawDebugGeometry(DebugRenderer, bool);
  200. Variant GetAttribute(const String&) const;
  201. ValueAnimation GetAttributeAnimation(const String&) const;
  202. float GetAttributeAnimationSpeed(const String&) const;
  203. float GetAttributeAnimationTime(const String&) const;
  204. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  205. Variant GetAttributeDefault(const String&) const;
  206. bool GetInterceptNetworkUpdate(const String&) const;
  207. bool HasSubscribedToEvent(Object, const String&);
  208. bool HasSubscribedToEvent(const String&);
  209. bool IsInView(Camera) const;
  210. bool Load(File, bool = false);
  211. bool Load(VectorBuffer&, bool = false);
  212. bool LoadJSON(const JSONValue&, bool = false);
  213. bool LoadXML(const XMLElement&, bool = false);
  214. void MarkNetworkUpdate() const;
  215. void Remove();
  216. void RemoveAttributeAnimation(const String&);
  217. void RemoveInstanceDefault();
  218. void RemoveObjectAnimation();
  219. void ResetToDefault();
  220. bool Save(File) const;
  221. bool Save(VectorBuffer&) const;
  222. bool SaveJSON(JSONValue&) const;
  223. bool SaveXML(XMLElement&) const;
  224. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  225. void SetAnimation(const String&, LoopMode2D = LM_DEFAULT);
  226. void SetAnimationTime(float);
  227. bool SetAttribute(const String&, const Variant&);
  228. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  229. void SetAttributeAnimationSpeed(const String&, float);
  230. void SetAttributeAnimationTime(const String&, float);
  231. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  232. void SetFlip(bool, bool);
  233. void SetInterceptNetworkUpdate(const String&, bool);
  234. // Properties:
  235. float alpha;
  236. String animation;
  237. bool animationEnabled;
  238. AnimationSet2D animationSet;
  239. /* readonly */
  240. Array<Variant> attributeDefaults;
  241. /* readonly */
  242. Array<AttributeInfo> attributeInfos;
  243. Array<Variant> attributes;
  244. BlendMode blendMode;
  245. /* readonly */
  246. BoundingBox boundingBox;
  247. bool castShadows;
  248. /* readonly */
  249. String category;
  250. Color color;
  251. Material customMaterial;
  252. float drawDistance;
  253. Rect drawRect;
  254. bool enabled;
  255. /* readonly */
  256. bool enabledEffective;
  257. String entity;
  258. bool flipX;
  259. bool flipY;
  260. Vector2 hotSpot;
  261. /* readonly */
  262. uint id;
  263. /* readonly */
  264. bool inView;
  265. int layer;
  266. uint lightMask;
  267. float lodBias;
  268. LoopMode2D loopMode;
  269. uint maxLights;
  270. /* readonly */
  271. Node node;
  272. /* readonly */
  273. uint numAttributes;
  274. ObjectAnimation objectAnimation;
  275. bool occludee;
  276. bool occluder;
  277. int orderInLayer;
  278. /* readonly */
  279. int refs;
  280. float shadowDistance;
  281. uint shadowMask;
  282. float speed;
  283. Sprite2D sprite;
  284. bool temporary;
  285. Rect textureRect;
  286. /* readonly */
  287. StringHash type;
  288. /* readonly */
  289. String typeName;
  290. bool useDrawRect;
  291. bool useHotSpot;
  292. bool useTextureRect;
  293. uint viewMask;
  294. /* readonly */
  295. int weakRefs;
  296. /* readonly */
  297. BoundingBox worldBoundingBox;
  298. uint zoneMask;
  299. };
  300. class Animation
  301. {
  302. public:
  303. Animation();
  304. Animation(const String&in);
  305. // Methods:
  306. void AddTrigger(const AnimationTriggerPoint&);
  307. void AddTrigger(float, bool, const Variant&);
  308. Animation Clone(const String& = String ( )) const;
  309. AnimationTrack CreateTrack(const String&);
  310. AnimationTrack GetTrack(uint);
  311. bool HasSubscribedToEvent(Object, const String&);
  312. bool HasSubscribedToEvent(const String&);
  313. bool Load(File);
  314. bool Load(VectorBuffer&);
  315. bool Load(const String&);
  316. bool RemoveAllTracks();
  317. void RemoveAllTriggers();
  318. bool RemoveTrack(const String&);
  319. void RemoveTrigger(uint);
  320. bool Save(File) const;
  321. bool Save(VectorBuffer&) const;
  322. bool Save(const String&) const;
  323. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  324. // Properties:
  325. String animationName;
  326. /* readonly */
  327. String category;
  328. float length;
  329. /* readonly */
  330. uint memoryUse;
  331. String name;
  332. /* readonly */
  333. uint numTracks;
  334. uint numTriggers;
  335. /* readonly */
  336. int refs;
  337. /* readonly */
  338. Array<AnimationTrack> tracks;
  339. Array<AnimationTriggerPoint> triggers;
  340. /* readonly */
  341. StringHash type;
  342. /* readonly */
  343. String typeName;
  344. /* readonly */
  345. uint useTimer;
  346. /* readonly */
  347. int weakRefs;
  348. };
  349. class AnimationControl
  350. {
  351. public:
  352. // Properties:
  353. float autoFadeTime;
  354. float fadeTime;
  355. StringHash hash;
  356. String name;
  357. bool removeOnCompletion;
  358. float speed;
  359. float targetWeight;
  360. };
  361. class AnimationController
  362. {
  363. public:
  364. // Methods:
  365. void ApplyAttributes();
  366. void DrawDebugGeometry(DebugRenderer, bool);
  367. bool Fade(const String&, float, float);
  368. bool FadeOthers(const String&, float, float);
  369. AnimationState GetAnimationState(StringHash) const;
  370. AnimationState GetAnimationState(const String&) const;
  371. Variant GetAttribute(const String&) const;
  372. ValueAnimation GetAttributeAnimation(const String&) const;
  373. float GetAttributeAnimationSpeed(const String&) const;
  374. float GetAttributeAnimationTime(const String&) const;
  375. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  376. Variant GetAttributeDefault(const String&) const;
  377. float GetAutoFade(const String&) const;
  378. AnimationBlendMode GetBlendMode(const String&) const;
  379. float GetFadeTarget(const String&) const;
  380. float GetFadeTime(const String&) const;
  381. bool GetInterceptNetworkUpdate(const String&) const;
  382. uint8 GetLayer(const String&) const;
  383. float GetLength(const String&) const;
  384. bool GetLooped(const String&) const;
  385. bool GetRemoveOnCompletion(const String&);
  386. float GetSpeed(const String&) const;
  387. float GetTime(const String&) const;
  388. float GetWeight(const String&) const;
  389. bool HasSubscribedToEvent(Object, const String&);
  390. bool HasSubscribedToEvent(const String&);
  391. bool IsAtEnd(const String&) const;
  392. bool IsFadingIn(const String&) const;
  393. bool IsFadingOut(const String&) const;
  394. bool IsPlaying(const String&) const;
  395. bool IsPlaying(uint8) const;
  396. bool Load(File, bool = false);
  397. bool Load(VectorBuffer&, bool = false);
  398. bool LoadJSON(const JSONValue&, bool = false);
  399. bool LoadXML(const XMLElement&, bool = false);
  400. void MarkNetworkUpdate() const;
  401. bool Play(const String&, uint8, bool, float = 0.0f);
  402. bool PlayExclusive(const String&, uint8, bool, float = 0.0f);
  403. void Remove();
  404. void RemoveAttributeAnimation(const String&);
  405. void RemoveInstanceDefault();
  406. void RemoveObjectAnimation();
  407. void ResetToDefault();
  408. bool Save(File) const;
  409. bool Save(VectorBuffer&) const;
  410. bool SaveJSON(JSONValue&) const;
  411. bool SaveXML(XMLElement&) const;
  412. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  413. void SetAnimationTime(float);
  414. bool SetAttribute(const String&, const Variant&);
  415. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  416. void SetAttributeAnimationSpeed(const String&, float);
  417. void SetAttributeAnimationTime(const String&, float);
  418. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  419. bool SetAutoFade(const String&, float);
  420. bool SetBlendMode(const String&, AnimationBlendMode);
  421. void SetInterceptNetworkUpdate(const String&, bool);
  422. bool SetLayer(const String&, uint8);
  423. bool SetLooped(const String&, bool);
  424. bool SetRemoveOnCompletion(const String&, bool);
  425. bool SetSpeed(const String&, float);
  426. bool SetStartBone(const String&, const String&);
  427. bool SetTime(const String&, float);
  428. bool SetWeight(const String&, float);
  429. void Stop(const String&, float = 0.0f);
  430. void StopAll(float = 0.0f);
  431. void StopLayer(uint8, float = 0.0f);
  432. const String& GetStartBone(const String&) const;
  433. // Properties:
  434. bool animationEnabled;
  435. /* readonly */
  436. Array<AnimationControl> animations;
  437. /* readonly */
  438. Array<Variant> attributeDefaults;
  439. /* readonly */
  440. Array<AttributeInfo> attributeInfos;
  441. Array<Variant> attributes;
  442. /* readonly */
  443. String category;
  444. bool enabled;
  445. /* readonly */
  446. bool enabledEffective;
  447. /* readonly */
  448. uint id;
  449. /* readonly */
  450. Node node;
  451. /* readonly */
  452. uint numAnimations;
  453. /* readonly */
  454. uint numAttributes;
  455. ObjectAnimation objectAnimation;
  456. /* readonly */
  457. int refs;
  458. bool temporary;
  459. /* readonly */
  460. StringHash type;
  461. /* readonly */
  462. String typeName;
  463. /* readonly */
  464. int weakRefs;
  465. };
  466. class AnimationKeyFrame
  467. {
  468. public:
  469. ~AnimationKeyFrame();
  470. AnimationKeyFrame();
  471. AnimationKeyFrame(const AnimationKeyFrame&in);
  472. // Properties:
  473. Vector3 position;
  474. Quaternion rotation;
  475. Vector3 scale;
  476. float time;
  477. };
  478. class AnimationSet2D
  479. {
  480. public:
  481. AnimationSet2D();
  482. AnimationSet2D(const String&in);
  483. // Methods:
  484. String GetAnimation(uint) const;
  485. bool HasSubscribedToEvent(Object, const String&);
  486. bool HasSubscribedToEvent(const String&);
  487. bool Load(File);
  488. bool Load(VectorBuffer&);
  489. bool Load(const String&);
  490. bool Save(File) const;
  491. bool Save(VectorBuffer&) const;
  492. bool Save(const String&) const;
  493. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  494. // Properties:
  495. /* readonly */
  496. String category;
  497. /* readonly */
  498. uint memoryUse;
  499. String name;
  500. /* readonly */
  501. uint numAnimations;
  502. /* readonly */
  503. int refs;
  504. /* readonly */
  505. StringHash type;
  506. /* readonly */
  507. String typeName;
  508. /* readonly */
  509. uint useTimer;
  510. /* readonly */
  511. int weakRefs;
  512. };
  513. class AnimationState
  514. {
  515. public:
  516. AnimationState(Node&, Animation&);
  517. // Methods:
  518. void AddTime(float);
  519. void AddWeight(float);
  520. void Apply();
  521. float GetBoneWeight(StringHash) const;
  522. float GetBoneWeight(uint) const;
  523. uint GetTrackIndex(StringHash) const;
  524. uint GetTrackIndex(const String&) const;
  525. void SetBoneWeight(StringHash, float, bool = false);
  526. void SetBoneWeight(const String&, float, bool = false);
  527. void SetBoneWeight(uint, float, bool = false);
  528. // Properties:
  529. /* readonly */
  530. Animation animation;
  531. AnimationBlendMode blendMode;
  532. Array<float> boneWeights;
  533. /* readonly */
  534. bool enabled;
  535. uint8 layer;
  536. /* readonly */
  537. float length;
  538. bool looped;
  539. /* readonly */
  540. AnimatedModel model;
  541. /* readonly */
  542. Node node;
  543. /* readonly */
  544. int refs;
  545. Bone startBone;
  546. float time;
  547. /* readonly */
  548. int weakRefs;
  549. float weight;
  550. };
  551. class AnimationTrack
  552. {
  553. public:
  554. // Methods:
  555. void AddKeyFrame(const AnimationKeyFrame&);
  556. void InsertKeyFrame(uint, const AnimationKeyFrame&);
  557. void RemoveAllKeyFrames();
  558. void RemoveKeyFrame(uint);
  559. // Properties:
  560. uint8 channelMask;
  561. Array<AnimationKeyFrame> keyFrames;
  562. String name;
  563. StringHash nameHash;
  564. /* readonly */
  565. uint numKeyFrames;
  566. };
  567. class AnimationTriggerPoint
  568. {
  569. public:
  570. ~AnimationTriggerPoint();
  571. AnimationTriggerPoint();
  572. AnimationTriggerPoint(const AnimationTriggerPoint&in);
  573. // Properties:
  574. Variant data;
  575. float time;
  576. };
  577. template <class T>
  578. class Array
  579. {
  580. public:
  581. Array(int&in);
  582. Array(int&in, uint);
  583. Array(int&in, uint, const T&in);
  584. // Methods:
  585. void Clear();
  586. void Erase(uint);
  587. int Find(const T&) const;
  588. int Find(uint, const T&) const;
  589. int FindByRef(const T&) const;
  590. int FindByRef(uint, const T&) const;
  591. void Insert(uint, const T&);
  592. void Pop();
  593. void Push(const T&);
  594. void Reserve(uint);
  595. void Resize(uint);
  596. void Reverse();
  597. void Sort();
  598. void Sort(uint, uint);
  599. void SortReverse();
  600. void SortReverse(uint, uint);
  601. // Properties:
  602. /* readonly */
  603. bool empty;
  604. uint length;
  605. };
  606. class AttributeInfo
  607. {
  608. public:
  609. ~AttributeInfo();
  610. AttributeInfo();
  611. AttributeInfo(const AttributeInfo&in);
  612. // Properties:
  613. Variant defaultValue;
  614. /* readonly */
  615. Array<String> enumNames;
  616. uint mode;
  617. String name;
  618. VariantType type;
  619. /* readonly */
  620. Array<String> variantStructureElementNames;
  621. };
  622. class Audio
  623. {
  624. public:
  625. // Methods:
  626. bool HasMasterGain(const String&) const;
  627. bool HasSubscribedToEvent(Object, const String&);
  628. bool HasSubscribedToEvent(const String&);
  629. bool IsSoundTypePaused(const String&);
  630. void PauseSoundType(const String&);
  631. bool Play();
  632. void ResumeAll();
  633. void ResumeSoundType(const String&);
  634. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  635. void SetMode(int, int, bool, bool = true);
  636. void Stop();
  637. // Properties:
  638. /* readonly */
  639. String category;
  640. /* readonly */
  641. bool initialized;
  642. /* readonly */
  643. bool interpolation;
  644. SoundListener listener;
  645. Array<float> masterGain;
  646. /* readonly */
  647. int mixRate;
  648. /* readonly */
  649. bool playing;
  650. /* readonly */
  651. int refs;
  652. /* readonly */
  653. uint sampleSize;
  654. /* readonly */
  655. bool stereo;
  656. /* readonly */
  657. StringHash type;
  658. /* readonly */
  659. String typeName;
  660. /* readonly */
  661. int weakRefs;
  662. };
  663. class BiasParameters
  664. {
  665. public:
  666. BiasParameters();
  667. BiasParameters(const BiasParameters&in);
  668. BiasParameters(float, float, float normalOffset = 0.0f);
  669. // Properties:
  670. float constantBias;
  671. float normalOffset;
  672. float slopeScaledBias;
  673. };
  674. class Billboard
  675. {
  676. public:
  677. // Properties:
  678. Color color;
  679. Vector3 direction;
  680. bool enabled;
  681. Vector3 position;
  682. float rotation;
  683. Vector2 size;
  684. Rect uv;
  685. };
  686. class BillboardSet
  687. {
  688. public:
  689. // Methods:
  690. void ApplyAttributes();
  691. void Commit();
  692. void DrawDebugGeometry(DebugRenderer, bool);
  693. Variant GetAttribute(const String&) const;
  694. ValueAnimation GetAttributeAnimation(const String&) const;
  695. float GetAttributeAnimationSpeed(const String&) const;
  696. float GetAttributeAnimationTime(const String&) const;
  697. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  698. Variant GetAttributeDefault(const String&) const;
  699. bool GetInterceptNetworkUpdate(const String&) const;
  700. bool HasSubscribedToEvent(Object, const String&);
  701. bool HasSubscribedToEvent(const String&);
  702. bool IsInView(Camera) const;
  703. bool Load(File, bool = false);
  704. bool Load(VectorBuffer&, bool = false);
  705. bool LoadJSON(const JSONValue&, bool = false);
  706. bool LoadXML(const XMLElement&, bool = false);
  707. void MarkNetworkUpdate() const;
  708. void Remove();
  709. void RemoveAttributeAnimation(const String&);
  710. void RemoveInstanceDefault();
  711. void RemoveObjectAnimation();
  712. void ResetToDefault();
  713. bool Save(File) const;
  714. bool Save(VectorBuffer&) const;
  715. bool SaveJSON(JSONValue&) const;
  716. bool SaveXML(XMLElement&) const;
  717. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  718. void SetAnimationTime(float);
  719. bool SetAttribute(const String&, const Variant&);
  720. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  721. void SetAttributeAnimationSpeed(const String&, float);
  722. void SetAttributeAnimationTime(const String&, float);
  723. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  724. void SetInterceptNetworkUpdate(const String&, bool);
  725. // Properties:
  726. bool animationEnabled;
  727. float animationLodBias;
  728. /* readonly */
  729. Array<Variant> attributeDefaults;
  730. /* readonly */
  731. Array<AttributeInfo> attributeInfos;
  732. Array<Variant> attributes;
  733. /* readonly */
  734. Array<Billboard> billboards;
  735. /* readonly */
  736. BoundingBox boundingBox;
  737. bool castShadows;
  738. /* readonly */
  739. String category;
  740. float drawDistance;
  741. bool enabled;
  742. /* readonly */
  743. bool enabledEffective;
  744. FaceCameraMode faceCameraMode;
  745. bool fixedScreenSize;
  746. /* readonly */
  747. uint id;
  748. /* readonly */
  749. bool inView;
  750. uint lightMask;
  751. float lodBias;
  752. Material material;
  753. uint maxLights;
  754. float minAngle;
  755. /* readonly */
  756. Node node;
  757. /* readonly */
  758. uint numAttributes;
  759. uint numBillboards;
  760. ObjectAnimation objectAnimation;
  761. bool occludee;
  762. bool occluder;
  763. /* readonly */
  764. int refs;
  765. bool relative;
  766. bool scaled;
  767. float shadowDistance;
  768. uint shadowMask;
  769. bool sorted;
  770. bool temporary;
  771. /* readonly */
  772. StringHash type;
  773. /* readonly */
  774. String typeName;
  775. uint viewMask;
  776. /* readonly */
  777. int weakRefs;
  778. /* readonly */
  779. BoundingBox worldBoundingBox;
  780. /* readonly */
  781. Zone zone;
  782. uint zoneMask;
  783. };
  784. class Bone
  785. {
  786. public:
  787. // Properties:
  788. bool animated;
  789. BoundingBox boundingBox;
  790. Vector3 initialPosition;
  791. Quaternion initialRotation;
  792. Vector3 initialScale;
  793. String name;
  794. Node node;
  795. float radius;
  796. };
  797. class BorderImage
  798. {
  799. public:
  800. BorderImage();
  801. BorderImage(const String&in);
  802. // Methods:
  803. void AddChild(UIElement);
  804. void AddTag(const String&);
  805. void AddTags(const String&, int8 = ';');
  806. void ApplyAttributes();
  807. void BringToFront();
  808. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  809. void DisableLayoutUpdate();
  810. IntVector2 ElementToScreen(const IntVector2&);
  811. void EnableLayoutUpdate();
  812. uint FindChild(UIElement) const;
  813. Variant GetAttribute(const String&) const;
  814. ValueAnimation GetAttributeAnimation(const String&) const;
  815. float GetAttributeAnimationSpeed(const String&) const;
  816. float GetAttributeAnimationTime(const String&) const;
  817. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  818. Variant GetAttributeDefault(const String&) const;
  819. UIElement GetChild(const String&, bool = false) const;
  820. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  821. Array<UIElement> GetChildren(bool = false) const;
  822. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  823. UIElement GetElementEventSender() const;
  824. bool GetInterceptNetworkUpdate(const String&) const;
  825. uint GetNumChildren(bool) const;
  826. bool HasSubscribedToEvent(Object, const String&);
  827. bool HasSubscribedToEvent(const String&);
  828. bool HasTag(const String&) const;
  829. void InsertChild(uint, UIElement);
  830. bool IsInside(IntVector2, bool);
  831. bool IsInsideCombined(IntVector2, bool);
  832. bool Load(File, bool = false);
  833. bool Load(VectorBuffer&, bool = false);
  834. UIElement LoadChildXML(XMLFile, XMLFile = null);
  835. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  836. bool LoadJSON(const JSONValue&, bool = false);
  837. bool LoadXML(File);
  838. bool LoadXML(VectorBuffer&);
  839. bool LoadXML(XMLFile, XMLFile);
  840. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  841. bool LoadXML(const XMLElement&, bool = false);
  842. void MarkNetworkUpdate() const;
  843. void Remove();
  844. void RemoveAllChildren();
  845. void RemoveAllTags();
  846. void RemoveAttributeAnimation(const String&);
  847. void RemoveChild(UIElement, uint = 0);
  848. void RemoveChild(uint);
  849. void RemoveInstanceDefault();
  850. void RemoveObjectAnimation();
  851. bool RemoveTag(const String&);
  852. void ResetDeepEnabled();
  853. void ResetToDefault();
  854. bool Save(File) const;
  855. bool Save(VectorBuffer&) const;
  856. bool SaveJSON(JSONValue&) const;
  857. bool SaveXML(File, const String& = "\t");
  858. bool SaveXML(VectorBuffer&, const String& = "\t");
  859. bool SaveXML(XMLElement&) const;
  860. IntVector2 ScreenToElement(const IntVector2&);
  861. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  862. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  863. void SetAnimationTime(float);
  864. bool SetAttribute(const String&, const Variant&);
  865. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  866. void SetAttributeAnimationSpeed(const String&, float);
  867. void SetAttributeAnimationTime(const String&, float);
  868. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  869. void SetDeepEnabled(bool);
  870. void SetEnabledRecursive(bool);
  871. void SetFixedHeight(int);
  872. void SetFixedSize(int, int);
  873. void SetFixedWidth(int);
  874. void SetFullImageRect();
  875. void SetHoverOffset(int, int);
  876. void SetInterceptNetworkUpdate(const String&, bool);
  877. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  878. void SetMaxAnchor(float, float);
  879. void SetMaxSize(int, int);
  880. void SetMinAnchor(float, float);
  881. void SetMinSize(int, int);
  882. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  883. void SetPivot(float, float);
  884. void SetPosition(int, int);
  885. void SetSize(int, int);
  886. bool SetStyle(const String&, XMLFile = null);
  887. bool SetStyle(const XMLElement&);
  888. bool SetStyleAuto(XMLFile = null);
  889. void UpdateLayout();
  890. const Variant& GetVar(const StringHash&);
  891. // Properties:
  892. bool animationEnabled;
  893. /* readonly */
  894. Array<Variant> attributeDefaults;
  895. /* readonly */
  896. Array<AttributeInfo> attributeInfos;
  897. Array<Variant> attributes;
  898. BlendMode blendMode;
  899. IntRect border;
  900. bool bringToBack;
  901. bool bringToFront;
  902. /* readonly */
  903. String category;
  904. /* readonly */
  905. IntVector2 childOffset;
  906. /* readonly */
  907. Array<UIElement> children;
  908. IntRect clipBorder;
  909. bool clipChildren;
  910. /* writeonly */
  911. Color color;
  912. /* readonly */
  913. bool colorGradient;
  914. Array<Color> colors;
  915. /* readonly */
  916. IntRect combinedScreenRect;
  917. XMLFile defaultStyle;
  918. /* readonly */
  919. float derivedOpacity;
  920. /* readonly */
  921. uint dragButtonCombo;
  922. /* readonly */
  923. int dragButtonCount;
  924. uint dragDropMode;
  925. bool editable;
  926. bool elementEventSender;
  927. bool enableAnchor;
  928. bool enabled;
  929. /* readonly */
  930. bool enabledSelf;
  931. /* readonly */
  932. bool fixedHeight;
  933. /* readonly */
  934. bool fixedSize;
  935. /* readonly */
  936. bool fixedWidth;
  937. bool focus;
  938. FocusMode focusMode;
  939. int height;
  940. HorizontalAlignment horizontalAlignment;
  941. IntVector2 hoverOffset;
  942. /* readonly */
  943. bool hovering;
  944. IntRect imageBorder;
  945. IntRect imageRect;
  946. int indent;
  947. int indentSpacing;
  948. /* readonly */
  949. int indentWidth;
  950. bool internal;
  951. IntRect layoutBorder;
  952. Vector2 layoutFlexScale;
  953. LayoutMode layoutMode;
  954. int layoutSpacing;
  955. Vector2 maxAnchor;
  956. int maxHeight;
  957. IntVector2 maxOffset;
  958. IntVector2 maxSize;
  959. int maxWidth;
  960. Vector2 minAnchor;
  961. int minHeight;
  962. IntVector2 minOffset;
  963. IntVector2 minSize;
  964. int minWidth;
  965. String name;
  966. /* readonly */
  967. uint numAllChildren;
  968. /* readonly */
  969. uint numAttributes;
  970. /* readonly */
  971. uint numChildren;
  972. ObjectAnimation objectAnimation;
  973. float opacity;
  974. UIElement parent;
  975. Vector2 pivot;
  976. IntVector2 position;
  977. int priority;
  978. /* readonly */
  979. int refs;
  980. /* readonly */
  981. UIElement root;
  982. /* readonly */
  983. IntVector2 screenPosition;
  984. bool selected;
  985. IntVector2 size;
  986. bool sortChildren;
  987. String style;
  988. /* readonly */
  989. Array<String> tags;
  990. bool temporary;
  991. Texture texture;
  992. bool tiled;
  993. TraversalMode traversalMode;
  994. /* readonly */
  995. StringHash type;
  996. /* readonly */
  997. String typeName;
  998. bool useDerivedOpacity;
  999. /* readonly */
  1000. VariantMap vars;
  1001. VerticalAlignment verticalAlignment;
  1002. bool visible;
  1003. /* readonly */
  1004. bool visibleEffective;
  1005. /* readonly */
  1006. int weakRefs;
  1007. int width;
  1008. };
  1009. class BoundingBox
  1010. {
  1011. public:
  1012. BoundingBox();
  1013. BoundingBox(const BoundingBox&in);
  1014. BoundingBox(const Rect&in);
  1015. BoundingBox(const Vector3&in, const Vector3&in);
  1016. BoundingBox(float, float);
  1017. BoundingBox(const Frustum&in);
  1018. BoundingBox(const Polyhedron&in);
  1019. BoundingBox(const Sphere&in);
  1020. // Methods:
  1021. void Clear();
  1022. void Clip(const BoundingBox&);
  1023. void Define(const BoundingBox&);
  1024. void Define(const Frustum&);
  1025. void Define(const Polyhedron&);
  1026. void Define(const Sphere&);
  1027. void Define(const Vector3&);
  1028. void Define(const Vector3&, const Vector3&);
  1029. void Define(float, float);
  1030. bool Defined() const;
  1031. Intersection IsInside(const BoundingBox&) const;
  1032. Intersection IsInside(const Sphere&) const;
  1033. Intersection IsInside(const Vector3&) const;
  1034. Intersection IsInsideFast(const BoundingBox&) const;
  1035. Intersection IsInsideFast(const Sphere&) const;
  1036. void Merge(const BoundingBox&);
  1037. void Merge(const Frustum&);
  1038. void Merge(const Polyhedron&);
  1039. void Merge(const Sphere&);
  1040. void Merge(const Vector3&);
  1041. Rect Projected(const Matrix4&) const;
  1042. String ToString() const;
  1043. void Transform(const Matrix3&);
  1044. void Transform(const Matrix3x4&);
  1045. BoundingBox Transformed(const Matrix3&) const;
  1046. BoundingBox Transformed(const Matrix3x4&) const;
  1047. // Properties:
  1048. /* readonly */
  1049. Vector3 center;
  1050. /* readonly */
  1051. Vector3 halfSize;
  1052. Vector3 max;
  1053. Vector3 min;
  1054. /* readonly */
  1055. Vector3 size;
  1056. };
  1057. class Button
  1058. {
  1059. public:
  1060. Button();
  1061. Button(const String&in);
  1062. // Methods:
  1063. void AddChild(UIElement);
  1064. void AddTag(const String&);
  1065. void AddTags(const String&, int8 = ';');
  1066. void ApplyAttributes();
  1067. void BringToFront();
  1068. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  1069. void DisableLayoutUpdate();
  1070. IntVector2 ElementToScreen(const IntVector2&);
  1071. void EnableLayoutUpdate();
  1072. uint FindChild(UIElement) const;
  1073. Variant GetAttribute(const String&) const;
  1074. ValueAnimation GetAttributeAnimation(const String&) const;
  1075. float GetAttributeAnimationSpeed(const String&) const;
  1076. float GetAttributeAnimationTime(const String&) const;
  1077. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1078. Variant GetAttributeDefault(const String&) const;
  1079. UIElement GetChild(const String&, bool = false) const;
  1080. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  1081. Array<UIElement> GetChildren(bool = false) const;
  1082. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  1083. UIElement GetElementEventSender() const;
  1084. bool GetInterceptNetworkUpdate(const String&) const;
  1085. uint GetNumChildren(bool) const;
  1086. bool HasSubscribedToEvent(Object, const String&);
  1087. bool HasSubscribedToEvent(const String&);
  1088. bool HasTag(const String&) const;
  1089. void InsertChild(uint, UIElement);
  1090. bool IsInside(IntVector2, bool);
  1091. bool IsInsideCombined(IntVector2, bool);
  1092. bool Load(File, bool = false);
  1093. bool Load(VectorBuffer&, bool = false);
  1094. UIElement LoadChildXML(XMLFile, XMLFile = null);
  1095. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  1096. bool LoadJSON(const JSONValue&, bool = false);
  1097. bool LoadXML(File);
  1098. bool LoadXML(VectorBuffer&);
  1099. bool LoadXML(XMLFile, XMLFile);
  1100. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  1101. bool LoadXML(const XMLElement&, bool = false);
  1102. void MarkNetworkUpdate() const;
  1103. void Remove();
  1104. void RemoveAllChildren();
  1105. void RemoveAllTags();
  1106. void RemoveAttributeAnimation(const String&);
  1107. void RemoveChild(UIElement, uint = 0);
  1108. void RemoveChild(uint);
  1109. void RemoveInstanceDefault();
  1110. void RemoveObjectAnimation();
  1111. bool RemoveTag(const String&);
  1112. void ResetDeepEnabled();
  1113. void ResetToDefault();
  1114. bool Save(File) const;
  1115. bool Save(VectorBuffer&) const;
  1116. bool SaveJSON(JSONValue&) const;
  1117. bool SaveXML(File, const String& = "\t");
  1118. bool SaveXML(VectorBuffer&, const String& = "\t");
  1119. bool SaveXML(XMLElement&) const;
  1120. IntVector2 ScreenToElement(const IntVector2&);
  1121. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1122. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  1123. void SetAnimationTime(float);
  1124. bool SetAttribute(const String&, const Variant&);
  1125. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1126. void SetAttributeAnimationSpeed(const String&, float);
  1127. void SetAttributeAnimationTime(const String&, float);
  1128. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1129. void SetDeepEnabled(bool);
  1130. void SetEnabledRecursive(bool);
  1131. void SetFixedHeight(int);
  1132. void SetFixedSize(int, int);
  1133. void SetFixedWidth(int);
  1134. void SetFullImageRect();
  1135. void SetHoverOffset(int, int);
  1136. void SetInterceptNetworkUpdate(const String&, bool);
  1137. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  1138. void SetMaxAnchor(float, float);
  1139. void SetMaxSize(int, int);
  1140. void SetMinAnchor(float, float);
  1141. void SetMinSize(int, int);
  1142. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  1143. void SetPivot(float, float);
  1144. void SetPosition(int, int);
  1145. void SetPressedChildOffset(int, int);
  1146. void SetPressedOffset(int, int);
  1147. void SetRepeat(float, float);
  1148. void SetSize(int, int);
  1149. bool SetStyle(const String&, XMLFile = null);
  1150. bool SetStyle(const XMLElement&);
  1151. bool SetStyleAuto(XMLFile = null);
  1152. void UpdateLayout();
  1153. const Variant& GetVar(const StringHash&);
  1154. // Properties:
  1155. bool animationEnabled;
  1156. /* readonly */
  1157. Array<Variant> attributeDefaults;
  1158. /* readonly */
  1159. Array<AttributeInfo> attributeInfos;
  1160. Array<Variant> attributes;
  1161. BlendMode blendMode;
  1162. IntRect border;
  1163. bool bringToBack;
  1164. bool bringToFront;
  1165. /* readonly */
  1166. String category;
  1167. /* readonly */
  1168. IntVector2 childOffset;
  1169. /* readonly */
  1170. Array<UIElement> children;
  1171. IntRect clipBorder;
  1172. bool clipChildren;
  1173. /* writeonly */
  1174. Color color;
  1175. /* readonly */
  1176. bool colorGradient;
  1177. Array<Color> colors;
  1178. /* readonly */
  1179. IntRect combinedScreenRect;
  1180. XMLFile defaultStyle;
  1181. /* readonly */
  1182. float derivedOpacity;
  1183. /* readonly */
  1184. uint dragButtonCombo;
  1185. /* readonly */
  1186. int dragButtonCount;
  1187. uint dragDropMode;
  1188. bool editable;
  1189. bool elementEventSender;
  1190. bool enableAnchor;
  1191. bool enabled;
  1192. /* readonly */
  1193. bool enabledSelf;
  1194. /* readonly */
  1195. bool fixedHeight;
  1196. /* readonly */
  1197. bool fixedSize;
  1198. /* readonly */
  1199. bool fixedWidth;
  1200. bool focus;
  1201. FocusMode focusMode;
  1202. int height;
  1203. HorizontalAlignment horizontalAlignment;
  1204. IntVector2 hoverOffset;
  1205. /* readonly */
  1206. bool hovering;
  1207. IntRect imageBorder;
  1208. IntRect imageRect;
  1209. int indent;
  1210. int indentSpacing;
  1211. /* readonly */
  1212. int indentWidth;
  1213. bool internal;
  1214. IntRect layoutBorder;
  1215. Vector2 layoutFlexScale;
  1216. LayoutMode layoutMode;
  1217. int layoutSpacing;
  1218. Vector2 maxAnchor;
  1219. int maxHeight;
  1220. IntVector2 maxOffset;
  1221. IntVector2 maxSize;
  1222. int maxWidth;
  1223. Vector2 minAnchor;
  1224. int minHeight;
  1225. IntVector2 minOffset;
  1226. IntVector2 minSize;
  1227. int minWidth;
  1228. String name;
  1229. /* readonly */
  1230. uint numAllChildren;
  1231. /* readonly */
  1232. uint numAttributes;
  1233. /* readonly */
  1234. uint numChildren;
  1235. ObjectAnimation objectAnimation;
  1236. float opacity;
  1237. UIElement parent;
  1238. Vector2 pivot;
  1239. IntVector2 position;
  1240. /* readonly */
  1241. bool pressed;
  1242. IntVector2 pressedChildOffset;
  1243. IntVector2 pressedOffset;
  1244. int priority;
  1245. /* readonly */
  1246. int refs;
  1247. float repeatDelay;
  1248. float repeatRate;
  1249. /* readonly */
  1250. UIElement root;
  1251. /* readonly */
  1252. IntVector2 screenPosition;
  1253. bool selected;
  1254. IntVector2 size;
  1255. bool sortChildren;
  1256. String style;
  1257. /* readonly */
  1258. Array<String> tags;
  1259. bool temporary;
  1260. Texture texture;
  1261. bool tiled;
  1262. TraversalMode traversalMode;
  1263. /* readonly */
  1264. StringHash type;
  1265. /* readonly */
  1266. String typeName;
  1267. bool useDerivedOpacity;
  1268. /* readonly */
  1269. VariantMap vars;
  1270. VerticalAlignment verticalAlignment;
  1271. bool visible;
  1272. /* readonly */
  1273. bool visibleEffective;
  1274. /* readonly */
  1275. int weakRefs;
  1276. int width;
  1277. };
  1278. class Camera
  1279. {
  1280. public:
  1281. // Methods:
  1282. void ApplyAttributes();
  1283. void DrawDebugGeometry(DebugRenderer, bool);
  1284. Variant GetAttribute(const String&) const;
  1285. ValueAnimation GetAttributeAnimation(const String&) const;
  1286. float GetAttributeAnimationSpeed(const String&) const;
  1287. float GetAttributeAnimationTime(const String&) const;
  1288. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1289. Variant GetAttributeDefault(const String&) const;
  1290. float GetDistance(const Vector3&) const;
  1291. float GetDistanceSquared(const Vector3&) const;
  1292. bool GetInterceptNetworkUpdate(const String&) const;
  1293. Ray GetScreenRay(float, float) const;
  1294. Frustum GetSplitFrustum(float, float) const;
  1295. bool HasSubscribedToEvent(Object, const String&);
  1296. bool HasSubscribedToEvent(const String&);
  1297. bool Load(File, bool = false);
  1298. bool Load(VectorBuffer&, bool = false);
  1299. bool LoadJSON(const JSONValue&, bool = false);
  1300. bool LoadXML(const XMLElement&, bool = false);
  1301. void MarkNetworkUpdate() const;
  1302. void Remove();
  1303. void RemoveAttributeAnimation(const String&);
  1304. void RemoveInstanceDefault();
  1305. void RemoveObjectAnimation();
  1306. void ResetToDefault();
  1307. bool Save(File) const;
  1308. bool Save(VectorBuffer&) const;
  1309. bool SaveJSON(JSONValue&) const;
  1310. bool SaveXML(XMLElement&) const;
  1311. Vector3 ScreenToWorldPoint(const Vector3&) const;
  1312. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1313. void SetAnimationTime(float);
  1314. bool SetAttribute(const String&, const Variant&);
  1315. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1316. void SetAttributeAnimationSpeed(const String&, float);
  1317. void SetAttributeAnimationTime(const String&, float);
  1318. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1319. void SetInterceptNetworkUpdate(const String&, bool);
  1320. void SetOrthoSize(const Vector2&);
  1321. Vector2 WorldToScreenPoint(const Vector3&) const;
  1322. // Properties:
  1323. bool animationEnabled;
  1324. float aspectRatio;
  1325. /* readonly */
  1326. Array<Variant> attributeDefaults;
  1327. /* readonly */
  1328. Array<AttributeInfo> attributeInfos;
  1329. Array<Variant> attributes;
  1330. bool autoAspectRatio;
  1331. /* readonly */
  1332. String category;
  1333. Plane clipPlane;
  1334. /* readonly */
  1335. Matrix3x4 effectiveWorldTransform;
  1336. bool enabled;
  1337. /* readonly */
  1338. bool enabledEffective;
  1339. float farClip;
  1340. FillMode fillMode;
  1341. float fov;
  1342. /* readonly */
  1343. Frustum frustum;
  1344. /* readonly */
  1345. Matrix4 gpuProjection;
  1346. /* readonly */
  1347. float halfViewSize;
  1348. /* readonly */
  1349. uint id;
  1350. float lodBias;
  1351. float nearClip;
  1352. /* readonly */
  1353. Node node;
  1354. /* readonly */
  1355. uint numAttributes;
  1356. ObjectAnimation objectAnimation;
  1357. float orthoSize;
  1358. bool orthographic;
  1359. Matrix4 projection;
  1360. Vector2 projectionOffset;
  1361. Plane reflectionPlane;
  1362. /* readonly */
  1363. int refs;
  1364. bool temporary;
  1365. /* readonly */
  1366. StringHash type;
  1367. /* readonly */
  1368. String typeName;
  1369. bool useClipping;
  1370. bool useReflection;
  1371. /* readonly */
  1372. Matrix3x4 view;
  1373. uint viewMask;
  1374. uint viewOverrideFlags;
  1375. /* readonly */
  1376. Frustum viewSpaceFrustum;
  1377. /* readonly */
  1378. int weakRefs;
  1379. float zoom;
  1380. };
  1381. class CascadeParameters
  1382. {
  1383. public:
  1384. CascadeParameters();
  1385. CascadeParameters(const CascadeParameters&in);
  1386. CascadeParameters(float, float, float, float, float, float biasAutoAdjust = 1.0);
  1387. // Properties:
  1388. float biasAutoAdjust;
  1389. float fadeStart;
  1390. float split1;
  1391. float split2;
  1392. float split3;
  1393. float split4;
  1394. };
  1395. class CheckBox
  1396. {
  1397. public:
  1398. CheckBox();
  1399. CheckBox(const String&in);
  1400. // Methods:
  1401. void AddChild(UIElement);
  1402. void AddTag(const String&);
  1403. void AddTags(const String&, int8 = ';');
  1404. void ApplyAttributes();
  1405. void BringToFront();
  1406. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  1407. void DisableLayoutUpdate();
  1408. IntVector2 ElementToScreen(const IntVector2&);
  1409. void EnableLayoutUpdate();
  1410. uint FindChild(UIElement) const;
  1411. Variant GetAttribute(const String&) const;
  1412. ValueAnimation GetAttributeAnimation(const String&) const;
  1413. float GetAttributeAnimationSpeed(const String&) const;
  1414. float GetAttributeAnimationTime(const String&) const;
  1415. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1416. Variant GetAttributeDefault(const String&) const;
  1417. UIElement GetChild(const String&, bool = false) const;
  1418. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  1419. Array<UIElement> GetChildren(bool = false) const;
  1420. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  1421. UIElement GetElementEventSender() const;
  1422. bool GetInterceptNetworkUpdate(const String&) const;
  1423. uint GetNumChildren(bool) const;
  1424. bool HasSubscribedToEvent(Object, const String&);
  1425. bool HasSubscribedToEvent(const String&);
  1426. bool HasTag(const String&) const;
  1427. void InsertChild(uint, UIElement);
  1428. bool IsInside(IntVector2, bool);
  1429. bool IsInsideCombined(IntVector2, bool);
  1430. bool Load(File, bool = false);
  1431. bool Load(VectorBuffer&, bool = false);
  1432. UIElement LoadChildXML(XMLFile, XMLFile = null);
  1433. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  1434. bool LoadJSON(const JSONValue&, bool = false);
  1435. bool LoadXML(File);
  1436. bool LoadXML(VectorBuffer&);
  1437. bool LoadXML(XMLFile, XMLFile);
  1438. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  1439. bool LoadXML(const XMLElement&, bool = false);
  1440. void MarkNetworkUpdate() const;
  1441. void Remove();
  1442. void RemoveAllChildren();
  1443. void RemoveAllTags();
  1444. void RemoveAttributeAnimation(const String&);
  1445. void RemoveChild(UIElement, uint = 0);
  1446. void RemoveChild(uint);
  1447. void RemoveInstanceDefault();
  1448. void RemoveObjectAnimation();
  1449. bool RemoveTag(const String&);
  1450. void ResetDeepEnabled();
  1451. void ResetToDefault();
  1452. bool Save(File) const;
  1453. bool Save(VectorBuffer&) const;
  1454. bool SaveJSON(JSONValue&) const;
  1455. bool SaveXML(File, const String& = "\t");
  1456. bool SaveXML(VectorBuffer&, const String& = "\t");
  1457. bool SaveXML(XMLElement&) const;
  1458. IntVector2 ScreenToElement(const IntVector2&);
  1459. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1460. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  1461. void SetAnimationTime(float);
  1462. bool SetAttribute(const String&, const Variant&);
  1463. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1464. void SetAttributeAnimationSpeed(const String&, float);
  1465. void SetAttributeAnimationTime(const String&, float);
  1466. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1467. void SetCheckedOffset(int, int);
  1468. void SetDeepEnabled(bool);
  1469. void SetEnabledRecursive(bool);
  1470. void SetFixedHeight(int);
  1471. void SetFixedSize(int, int);
  1472. void SetFixedWidth(int);
  1473. void SetFullImageRect();
  1474. void SetHoverOffset(int, int);
  1475. void SetInterceptNetworkUpdate(const String&, bool);
  1476. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  1477. void SetMaxAnchor(float, float);
  1478. void SetMaxSize(int, int);
  1479. void SetMinAnchor(float, float);
  1480. void SetMinSize(int, int);
  1481. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  1482. void SetPivot(float, float);
  1483. void SetPosition(int, int);
  1484. void SetSize(int, int);
  1485. bool SetStyle(const String&, XMLFile = null);
  1486. bool SetStyle(const XMLElement&);
  1487. bool SetStyleAuto(XMLFile = null);
  1488. void UpdateLayout();
  1489. const Variant& GetVar(const StringHash&);
  1490. // Properties:
  1491. bool animationEnabled;
  1492. /* readonly */
  1493. Array<Variant> attributeDefaults;
  1494. /* readonly */
  1495. Array<AttributeInfo> attributeInfos;
  1496. Array<Variant> attributes;
  1497. BlendMode blendMode;
  1498. IntRect border;
  1499. bool bringToBack;
  1500. bool bringToFront;
  1501. /* readonly */
  1502. String category;
  1503. bool checked;
  1504. IntVector2 checkedOffset;
  1505. /* readonly */
  1506. IntVector2 childOffset;
  1507. /* readonly */
  1508. Array<UIElement> children;
  1509. IntRect clipBorder;
  1510. bool clipChildren;
  1511. /* writeonly */
  1512. Color color;
  1513. /* readonly */
  1514. bool colorGradient;
  1515. Array<Color> colors;
  1516. /* readonly */
  1517. IntRect combinedScreenRect;
  1518. XMLFile defaultStyle;
  1519. /* readonly */
  1520. float derivedOpacity;
  1521. /* readonly */
  1522. uint dragButtonCombo;
  1523. /* readonly */
  1524. int dragButtonCount;
  1525. uint dragDropMode;
  1526. bool editable;
  1527. bool elementEventSender;
  1528. bool enableAnchor;
  1529. bool enabled;
  1530. /* readonly */
  1531. bool enabledSelf;
  1532. /* readonly */
  1533. bool fixedHeight;
  1534. /* readonly */
  1535. bool fixedSize;
  1536. /* readonly */
  1537. bool fixedWidth;
  1538. bool focus;
  1539. FocusMode focusMode;
  1540. int height;
  1541. HorizontalAlignment horizontalAlignment;
  1542. IntVector2 hoverOffset;
  1543. /* readonly */
  1544. bool hovering;
  1545. IntRect imageBorder;
  1546. IntRect imageRect;
  1547. int indent;
  1548. int indentSpacing;
  1549. /* readonly */
  1550. int indentWidth;
  1551. bool internal;
  1552. IntRect layoutBorder;
  1553. Vector2 layoutFlexScale;
  1554. LayoutMode layoutMode;
  1555. int layoutSpacing;
  1556. Vector2 maxAnchor;
  1557. int maxHeight;
  1558. IntVector2 maxOffset;
  1559. IntVector2 maxSize;
  1560. int maxWidth;
  1561. Vector2 minAnchor;
  1562. int minHeight;
  1563. IntVector2 minOffset;
  1564. IntVector2 minSize;
  1565. int minWidth;
  1566. String name;
  1567. /* readonly */
  1568. uint numAllChildren;
  1569. /* readonly */
  1570. uint numAttributes;
  1571. /* readonly */
  1572. uint numChildren;
  1573. ObjectAnimation objectAnimation;
  1574. float opacity;
  1575. UIElement parent;
  1576. Vector2 pivot;
  1577. IntVector2 position;
  1578. int priority;
  1579. /* readonly */
  1580. int refs;
  1581. /* readonly */
  1582. UIElement root;
  1583. /* readonly */
  1584. IntVector2 screenPosition;
  1585. bool selected;
  1586. IntVector2 size;
  1587. bool sortChildren;
  1588. String style;
  1589. /* readonly */
  1590. Array<String> tags;
  1591. bool temporary;
  1592. Texture texture;
  1593. bool tiled;
  1594. TraversalMode traversalMode;
  1595. /* readonly */
  1596. StringHash type;
  1597. /* readonly */
  1598. String typeName;
  1599. bool useDerivedOpacity;
  1600. /* readonly */
  1601. VariantMap vars;
  1602. VerticalAlignment verticalAlignment;
  1603. bool visible;
  1604. /* readonly */
  1605. bool visibleEffective;
  1606. /* readonly */
  1607. int weakRefs;
  1608. int width;
  1609. };
  1610. class CollisionBox2D
  1611. {
  1612. public:
  1613. // Methods:
  1614. void ApplyAttributes();
  1615. void DrawDebugGeometry(DebugRenderer, bool);
  1616. Variant GetAttribute(const String&) const;
  1617. ValueAnimation GetAttributeAnimation(const String&) const;
  1618. float GetAttributeAnimationSpeed(const String&) const;
  1619. float GetAttributeAnimationTime(const String&) const;
  1620. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1621. Variant GetAttributeDefault(const String&) const;
  1622. bool GetInterceptNetworkUpdate(const String&) const;
  1623. bool HasSubscribedToEvent(Object, const String&);
  1624. bool HasSubscribedToEvent(const String&);
  1625. bool Load(File, bool = false);
  1626. bool Load(VectorBuffer&, bool = false);
  1627. bool LoadJSON(const JSONValue&, bool = false);
  1628. bool LoadXML(const XMLElement&, bool = false);
  1629. void MarkNetworkUpdate() const;
  1630. void Remove();
  1631. void RemoveAttributeAnimation(const String&);
  1632. void RemoveInstanceDefault();
  1633. void RemoveObjectAnimation();
  1634. void ResetToDefault();
  1635. bool Save(File) const;
  1636. bool Save(VectorBuffer&) const;
  1637. bool SaveJSON(JSONValue&) const;
  1638. bool SaveXML(XMLElement&) const;
  1639. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1640. void SetAnimationTime(float);
  1641. bool SetAttribute(const String&, const Variant&);
  1642. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1643. void SetAttributeAnimationSpeed(const String&, float);
  1644. void SetAttributeAnimationTime(const String&, float);
  1645. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1646. void SetCenter(float, float);
  1647. void SetInterceptNetworkUpdate(const String&, bool);
  1648. void SetSize(float, float);
  1649. // Properties:
  1650. float angle;
  1651. bool animationEnabled;
  1652. /* readonly */
  1653. Array<Variant> attributeDefaults;
  1654. /* readonly */
  1655. Array<AttributeInfo> attributeInfos;
  1656. Array<Variant> attributes;
  1657. /* readonly */
  1658. String category;
  1659. int categoryBits;
  1660. Vector2 center;
  1661. float density;
  1662. bool enabled;
  1663. /* readonly */
  1664. bool enabledEffective;
  1665. float friction;
  1666. int groupIndex;
  1667. /* readonly */
  1668. uint id;
  1669. /* readonly */
  1670. float inertia;
  1671. int maskBits;
  1672. /* readonly */
  1673. float mass;
  1674. /* readonly */
  1675. Vector2 massCenter;
  1676. /* readonly */
  1677. Node node;
  1678. /* readonly */
  1679. uint numAttributes;
  1680. ObjectAnimation objectAnimation;
  1681. /* readonly */
  1682. int refs;
  1683. float restitution;
  1684. Vector2 size;
  1685. bool temporary;
  1686. bool trigger;
  1687. /* readonly */
  1688. StringHash type;
  1689. /* readonly */
  1690. String typeName;
  1691. /* readonly */
  1692. int weakRefs;
  1693. };
  1694. class CollisionChain2D
  1695. {
  1696. public:
  1697. // Methods:
  1698. void ApplyAttributes();
  1699. void DrawDebugGeometry(DebugRenderer, bool);
  1700. Variant GetAttribute(const String&) const;
  1701. ValueAnimation GetAttributeAnimation(const String&) const;
  1702. float GetAttributeAnimationSpeed(const String&) const;
  1703. float GetAttributeAnimationTime(const String&) const;
  1704. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1705. Variant GetAttributeDefault(const String&) const;
  1706. bool GetInterceptNetworkUpdate(const String&) const;
  1707. Array<Vector2> GetVertices() const;
  1708. bool HasSubscribedToEvent(Object, const String&);
  1709. bool HasSubscribedToEvent(const String&);
  1710. bool Load(File, bool = false);
  1711. bool Load(VectorBuffer&, bool = false);
  1712. bool LoadJSON(const JSONValue&, bool = false);
  1713. bool LoadXML(const XMLElement&, bool = false);
  1714. void MarkNetworkUpdate() const;
  1715. void Remove();
  1716. void RemoveAttributeAnimation(const String&);
  1717. void RemoveInstanceDefault();
  1718. void RemoveObjectAnimation();
  1719. void ResetToDefault();
  1720. bool Save(File) const;
  1721. bool Save(VectorBuffer&) const;
  1722. bool SaveJSON(JSONValue&) const;
  1723. bool SaveXML(XMLElement&) const;
  1724. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1725. void SetAnimationTime(float);
  1726. bool SetAttribute(const String&, const Variant&);
  1727. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1728. void SetAttributeAnimationSpeed(const String&, float);
  1729. void SetAttributeAnimationTime(const String&, float);
  1730. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1731. void SetInterceptNetworkUpdate(const String&, bool);
  1732. void SetVertex(uint, const Vector2&);
  1733. void SetVertices(Array<Vector2>);
  1734. const Vector2& GetVertex(uint) const;
  1735. // Properties:
  1736. bool animationEnabled;
  1737. /* readonly */
  1738. Array<Variant> attributeDefaults;
  1739. /* readonly */
  1740. Array<AttributeInfo> attributeInfos;
  1741. Array<Variant> attributes;
  1742. /* readonly */
  1743. String category;
  1744. int categoryBits;
  1745. float density;
  1746. bool enabled;
  1747. /* readonly */
  1748. bool enabledEffective;
  1749. float friction;
  1750. int groupIndex;
  1751. /* readonly */
  1752. uint id;
  1753. /* readonly */
  1754. float inertia;
  1755. bool loop;
  1756. int maskBits;
  1757. /* readonly */
  1758. float mass;
  1759. /* readonly */
  1760. Vector2 massCenter;
  1761. /* readonly */
  1762. Node node;
  1763. /* readonly */
  1764. uint numAttributes;
  1765. ObjectAnimation objectAnimation;
  1766. /* readonly */
  1767. int refs;
  1768. float restitution;
  1769. bool temporary;
  1770. bool trigger;
  1771. /* readonly */
  1772. StringHash type;
  1773. /* readonly */
  1774. String typeName;
  1775. uint vertexCount;
  1776. /* readonly */
  1777. int weakRefs;
  1778. };
  1779. class CollisionCircle2D
  1780. {
  1781. public:
  1782. // Methods:
  1783. void ApplyAttributes();
  1784. void DrawDebugGeometry(DebugRenderer, bool);
  1785. Variant GetAttribute(const String&) const;
  1786. ValueAnimation GetAttributeAnimation(const String&) const;
  1787. float GetAttributeAnimationSpeed(const String&) const;
  1788. float GetAttributeAnimationTime(const String&) const;
  1789. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1790. Variant GetAttributeDefault(const String&) const;
  1791. bool GetInterceptNetworkUpdate(const String&) const;
  1792. bool HasSubscribedToEvent(Object, const String&);
  1793. bool HasSubscribedToEvent(const String&);
  1794. bool Load(File, bool = false);
  1795. bool Load(VectorBuffer&, bool = false);
  1796. bool LoadJSON(const JSONValue&, bool = false);
  1797. bool LoadXML(const XMLElement&, bool = false);
  1798. void MarkNetworkUpdate() const;
  1799. void Remove();
  1800. void RemoveAttributeAnimation(const String&);
  1801. void RemoveInstanceDefault();
  1802. void RemoveObjectAnimation();
  1803. void ResetToDefault();
  1804. bool Save(File) const;
  1805. bool Save(VectorBuffer&) const;
  1806. bool SaveJSON(JSONValue&) const;
  1807. bool SaveXML(XMLElement&) const;
  1808. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1809. void SetAnimationTime(float);
  1810. bool SetAttribute(const String&, const Variant&);
  1811. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1812. void SetAttributeAnimationSpeed(const String&, float);
  1813. void SetAttributeAnimationTime(const String&, float);
  1814. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1815. void SetCenter(float, float);
  1816. void SetInterceptNetworkUpdate(const String&, bool);
  1817. // Properties:
  1818. bool animationEnabled;
  1819. /* readonly */
  1820. Array<Variant> attributeDefaults;
  1821. /* readonly */
  1822. Array<AttributeInfo> attributeInfos;
  1823. Array<Variant> attributes;
  1824. /* readonly */
  1825. String category;
  1826. int categoryBits;
  1827. Vector2 center;
  1828. float density;
  1829. bool enabled;
  1830. /* readonly */
  1831. bool enabledEffective;
  1832. float friction;
  1833. int groupIndex;
  1834. /* readonly */
  1835. uint id;
  1836. /* readonly */
  1837. float inertia;
  1838. int maskBits;
  1839. /* readonly */
  1840. float mass;
  1841. /* readonly */
  1842. Vector2 massCenter;
  1843. /* readonly */
  1844. Node node;
  1845. /* readonly */
  1846. uint numAttributes;
  1847. ObjectAnimation objectAnimation;
  1848. float radius;
  1849. /* readonly */
  1850. int refs;
  1851. float restitution;
  1852. bool temporary;
  1853. bool trigger;
  1854. /* readonly */
  1855. StringHash type;
  1856. /* readonly */
  1857. String typeName;
  1858. /* readonly */
  1859. int weakRefs;
  1860. };
  1861. class CollisionEdge2D
  1862. {
  1863. public:
  1864. // Methods:
  1865. void ApplyAttributes();
  1866. void DrawDebugGeometry(DebugRenderer, bool);
  1867. Variant GetAttribute(const String&) const;
  1868. ValueAnimation GetAttributeAnimation(const String&) const;
  1869. float GetAttributeAnimationSpeed(const String&) const;
  1870. float GetAttributeAnimationTime(const String&) const;
  1871. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1872. Variant GetAttributeDefault(const String&) const;
  1873. bool GetInterceptNetworkUpdate(const String&) const;
  1874. bool HasSubscribedToEvent(Object, const String&);
  1875. bool HasSubscribedToEvent(const String&);
  1876. bool Load(File, bool = false);
  1877. bool Load(VectorBuffer&, bool = false);
  1878. bool LoadJSON(const JSONValue&, bool = false);
  1879. bool LoadXML(const XMLElement&, bool = false);
  1880. void MarkNetworkUpdate() const;
  1881. void Remove();
  1882. void RemoveAttributeAnimation(const String&);
  1883. void RemoveInstanceDefault();
  1884. void RemoveObjectAnimation();
  1885. void ResetToDefault();
  1886. bool Save(File) const;
  1887. bool Save(VectorBuffer&) const;
  1888. bool SaveJSON(JSONValue&) const;
  1889. bool SaveXML(XMLElement&) const;
  1890. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1891. void SetAnimationTime(float);
  1892. bool SetAttribute(const String&, const Variant&);
  1893. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1894. void SetAttributeAnimationSpeed(const String&, float);
  1895. void SetAttributeAnimationTime(const String&, float);
  1896. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1897. void SetInterceptNetworkUpdate(const String&, bool);
  1898. void SetVertices(const Vector2&, const Vector2&);
  1899. // Properties:
  1900. bool animationEnabled;
  1901. /* readonly */
  1902. Array<Variant> attributeDefaults;
  1903. /* readonly */
  1904. Array<AttributeInfo> attributeInfos;
  1905. Array<Variant> attributes;
  1906. /* readonly */
  1907. String category;
  1908. int categoryBits;
  1909. float density;
  1910. bool enabled;
  1911. /* readonly */
  1912. bool enabledEffective;
  1913. float friction;
  1914. int groupIndex;
  1915. /* readonly */
  1916. uint id;
  1917. /* readonly */
  1918. float inertia;
  1919. int maskBits;
  1920. /* readonly */
  1921. float mass;
  1922. /* readonly */
  1923. Vector2 massCenter;
  1924. /* readonly */
  1925. Node node;
  1926. /* readonly */
  1927. uint numAttributes;
  1928. ObjectAnimation objectAnimation;
  1929. /* readonly */
  1930. int refs;
  1931. float restitution;
  1932. bool temporary;
  1933. bool trigger;
  1934. /* readonly */
  1935. StringHash type;
  1936. /* readonly */
  1937. String typeName;
  1938. Vector2 vertex1;
  1939. Vector2 vertex2;
  1940. /* readonly */
  1941. int weakRefs;
  1942. };
  1943. class CollisionPolygon2D
  1944. {
  1945. public:
  1946. // Methods:
  1947. void ApplyAttributes();
  1948. void DrawDebugGeometry(DebugRenderer, bool);
  1949. Variant GetAttribute(const String&) const;
  1950. ValueAnimation GetAttributeAnimation(const String&) const;
  1951. float GetAttributeAnimationSpeed(const String&) const;
  1952. float GetAttributeAnimationTime(const String&) const;
  1953. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  1954. Variant GetAttributeDefault(const String&) const;
  1955. bool GetInterceptNetworkUpdate(const String&) const;
  1956. Array<Vector2> GetVertices() const;
  1957. bool HasSubscribedToEvent(Object, const String&);
  1958. bool HasSubscribedToEvent(const String&);
  1959. bool Load(File, bool = false);
  1960. bool Load(VectorBuffer&, bool = false);
  1961. bool LoadJSON(const JSONValue&, bool = false);
  1962. bool LoadXML(const XMLElement&, bool = false);
  1963. void MarkNetworkUpdate() const;
  1964. void Remove();
  1965. void RemoveAttributeAnimation(const String&);
  1966. void RemoveInstanceDefault();
  1967. void RemoveObjectAnimation();
  1968. void ResetToDefault();
  1969. bool Save(File) const;
  1970. bool Save(VectorBuffer&) const;
  1971. bool SaveJSON(JSONValue&) const;
  1972. bool SaveXML(XMLElement&) const;
  1973. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  1974. void SetAnimationTime(float);
  1975. bool SetAttribute(const String&, const Variant&);
  1976. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  1977. void SetAttributeAnimationSpeed(const String&, float);
  1978. void SetAttributeAnimationTime(const String&, float);
  1979. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  1980. void SetInterceptNetworkUpdate(const String&, bool);
  1981. void SetVertex(uint, const Vector2&);
  1982. void SetVertices(Array<Vector2>);
  1983. const Vector2& GetVertex(uint) const;
  1984. // Properties:
  1985. bool animationEnabled;
  1986. /* readonly */
  1987. Array<Variant> attributeDefaults;
  1988. /* readonly */
  1989. Array<AttributeInfo> attributeInfos;
  1990. Array<Variant> attributes;
  1991. /* readonly */
  1992. String category;
  1993. int categoryBits;
  1994. float density;
  1995. bool enabled;
  1996. /* readonly */
  1997. bool enabledEffective;
  1998. float friction;
  1999. int groupIndex;
  2000. /* readonly */
  2001. uint id;
  2002. /* readonly */
  2003. float inertia;
  2004. int maskBits;
  2005. /* readonly */
  2006. float mass;
  2007. /* readonly */
  2008. Vector2 massCenter;
  2009. /* readonly */
  2010. Node node;
  2011. /* readonly */
  2012. uint numAttributes;
  2013. ObjectAnimation objectAnimation;
  2014. /* readonly */
  2015. int refs;
  2016. float restitution;
  2017. bool temporary;
  2018. bool trigger;
  2019. /* readonly */
  2020. StringHash type;
  2021. /* readonly */
  2022. String typeName;
  2023. uint vertexCount;
  2024. /* readonly */
  2025. int weakRefs;
  2026. };
  2027. class CollisionShape
  2028. {
  2029. public:
  2030. // Methods:
  2031. void ApplyAttributes();
  2032. void DrawDebugGeometry(DebugRenderer, bool);
  2033. Variant GetAttribute(const String&) const;
  2034. ValueAnimation GetAttributeAnimation(const String&) const;
  2035. float GetAttributeAnimationSpeed(const String&) const;
  2036. float GetAttributeAnimationTime(const String&) const;
  2037. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2038. Variant GetAttributeDefault(const String&) const;
  2039. bool GetInterceptNetworkUpdate(const String&) const;
  2040. bool HasSubscribedToEvent(Object, const String&);
  2041. bool HasSubscribedToEvent(const String&);
  2042. bool Load(File, bool = false);
  2043. bool Load(VectorBuffer&, bool = false);
  2044. bool LoadJSON(const JSONValue&, bool = false);
  2045. bool LoadXML(const XMLElement&, bool = false);
  2046. void MarkNetworkUpdate() const;
  2047. void Remove();
  2048. void RemoveAttributeAnimation(const String&);
  2049. void RemoveInstanceDefault();
  2050. void RemoveObjectAnimation();
  2051. void ResetToDefault();
  2052. bool Save(File) const;
  2053. bool Save(VectorBuffer&) const;
  2054. bool SaveJSON(JSONValue&) const;
  2055. bool SaveXML(XMLElement&) const;
  2056. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2057. void SetAnimationTime(float);
  2058. bool SetAttribute(const String&, const Variant&);
  2059. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2060. void SetAttributeAnimationSpeed(const String&, float);
  2061. void SetAttributeAnimationTime(const String&, float);
  2062. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2063. void SetBox(const Vector3&, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2064. void SetCapsule(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2065. void SetCone(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2066. void SetConvexHull(Model, uint = 0, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2067. void SetCustomConvexHull(CustomGeometry, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2068. void SetCustomTriangleMesh(CustomGeometry, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2069. void SetCylinder(float, float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2070. void SetInterceptNetworkUpdate(const String&, bool);
  2071. void SetSphere(float, const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2072. void SetStaticPlane(const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2073. void SetTerrain(uint = 0);
  2074. void SetTransform(const Vector3&, const Quaternion&);
  2075. void SetTriangleMesh(Model, uint = 0, const Vector3& = Vector3 ( 1 , 1 , 1 ), const Vector3& = Vector3 ( ), const Quaternion& = Quaternion ( ));
  2076. // Properties:
  2077. bool animationEnabled;
  2078. /* readonly */
  2079. Array<Variant> attributeDefaults;
  2080. /* readonly */
  2081. Array<AttributeInfo> attributeInfos;
  2082. Array<Variant> attributes;
  2083. /* readonly */
  2084. String category;
  2085. bool enabled;
  2086. /* readonly */
  2087. bool enabledEffective;
  2088. /* readonly */
  2089. uint id;
  2090. uint lodLevel;
  2091. float margin;
  2092. Model model;
  2093. /* readonly */
  2094. Node node;
  2095. /* readonly */
  2096. uint numAttributes;
  2097. ObjectAnimation objectAnimation;
  2098. Vector3 position;
  2099. /* readonly */
  2100. int refs;
  2101. Quaternion rotation;
  2102. ShapeType shapeType;
  2103. Vector3 size;
  2104. bool temporary;
  2105. /* readonly */
  2106. StringHash type;
  2107. /* readonly */
  2108. String typeName;
  2109. /* readonly */
  2110. int weakRefs;
  2111. /* readonly */
  2112. BoundingBox worldBoundingBox;
  2113. };
  2114. class CollisionShape2D
  2115. {
  2116. public:
  2117. // Methods:
  2118. void ApplyAttributes();
  2119. void DrawDebugGeometry(DebugRenderer, bool);
  2120. Variant GetAttribute(const String&) const;
  2121. ValueAnimation GetAttributeAnimation(const String&) const;
  2122. float GetAttributeAnimationSpeed(const String&) const;
  2123. float GetAttributeAnimationTime(const String&) const;
  2124. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2125. Variant GetAttributeDefault(const String&) const;
  2126. bool GetInterceptNetworkUpdate(const String&) const;
  2127. bool HasSubscribedToEvent(Object, const String&);
  2128. bool HasSubscribedToEvent(const String&);
  2129. bool Load(File, bool = false);
  2130. bool Load(VectorBuffer&, bool = false);
  2131. bool LoadJSON(const JSONValue&, bool = false);
  2132. bool LoadXML(const XMLElement&, bool = false);
  2133. void MarkNetworkUpdate() const;
  2134. void Remove();
  2135. void RemoveAttributeAnimation(const String&);
  2136. void RemoveInstanceDefault();
  2137. void RemoveObjectAnimation();
  2138. void ResetToDefault();
  2139. bool Save(File) const;
  2140. bool Save(VectorBuffer&) const;
  2141. bool SaveJSON(JSONValue&) const;
  2142. bool SaveXML(XMLElement&) const;
  2143. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2144. void SetAnimationTime(float);
  2145. bool SetAttribute(const String&, const Variant&);
  2146. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2147. void SetAttributeAnimationSpeed(const String&, float);
  2148. void SetAttributeAnimationTime(const String&, float);
  2149. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2150. void SetInterceptNetworkUpdate(const String&, bool);
  2151. // Properties:
  2152. bool animationEnabled;
  2153. /* readonly */
  2154. Array<Variant> attributeDefaults;
  2155. /* readonly */
  2156. Array<AttributeInfo> attributeInfos;
  2157. Array<Variant> attributes;
  2158. /* readonly */
  2159. String category;
  2160. int categoryBits;
  2161. float density;
  2162. bool enabled;
  2163. /* readonly */
  2164. bool enabledEffective;
  2165. float friction;
  2166. int groupIndex;
  2167. /* readonly */
  2168. uint id;
  2169. /* readonly */
  2170. float inertia;
  2171. int maskBits;
  2172. /* readonly */
  2173. float mass;
  2174. /* readonly */
  2175. Vector2 massCenter;
  2176. /* readonly */
  2177. Node node;
  2178. /* readonly */
  2179. uint numAttributes;
  2180. ObjectAnimation objectAnimation;
  2181. /* readonly */
  2182. int refs;
  2183. float restitution;
  2184. bool temporary;
  2185. bool trigger;
  2186. /* readonly */
  2187. StringHash type;
  2188. /* readonly */
  2189. String typeName;
  2190. /* readonly */
  2191. int weakRefs;
  2192. };
  2193. class Color
  2194. {
  2195. public:
  2196. Color();
  2197. Color(const Color&in);
  2198. Color(float, float, float, float);
  2199. Color(float, float, float);
  2200. Color(float[]&inout);
  2201. // Methods:
  2202. Color Abs() const;
  2203. float Average() const;
  2204. float Chroma() const;
  2205. void Clip(bool);
  2206. bool Equals() const;
  2207. void FromHSL(float, float, float, float);
  2208. void FromHSV(float, float, float, float);
  2209. float Hue() const;
  2210. void Invert(bool);
  2211. Color Lerp(const Color&, float) const;
  2212. float Lightness() const;
  2213. float Luma() const;
  2214. float MaxRGB() const;
  2215. float MinRGB() const;
  2216. float Range() const;
  2217. float SaturationHSL() const;
  2218. float SaturationHSV() const;
  2219. float SumRGB() const;
  2220. Vector3 ToHSL() const;
  2221. Vector3 ToHSV() const;
  2222. String ToString() const;
  2223. uint ToUInt() const;
  2224. float Value() const;
  2225. // Properties:
  2226. float a;
  2227. float b;
  2228. /* readonly */
  2229. Array<float> data;
  2230. float g;
  2231. float r;
  2232. /* readonly */
  2233. Vector3 rgb;
  2234. /* readonly */
  2235. Vector4 rgba;
  2236. };
  2237. class ColorFrame
  2238. {
  2239. public:
  2240. // Properties:
  2241. Color color;
  2242. float time;
  2243. };
  2244. class Component
  2245. {
  2246. public:
  2247. // Methods:
  2248. void ApplyAttributes();
  2249. void DrawDebugGeometry(DebugRenderer, bool);
  2250. Variant GetAttribute(const String&) const;
  2251. ValueAnimation GetAttributeAnimation(const String&) const;
  2252. float GetAttributeAnimationSpeed(const String&) const;
  2253. float GetAttributeAnimationTime(const String&) const;
  2254. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2255. Variant GetAttributeDefault(const String&) const;
  2256. bool GetInterceptNetworkUpdate(const String&) const;
  2257. bool HasSubscribedToEvent(Object, const String&);
  2258. bool HasSubscribedToEvent(const String&);
  2259. bool Load(File, bool = false);
  2260. bool Load(VectorBuffer&, bool = false);
  2261. bool LoadJSON(const JSONValue&, bool = false);
  2262. bool LoadXML(const XMLElement&, bool = false);
  2263. void MarkNetworkUpdate() const;
  2264. void Remove();
  2265. void RemoveAttributeAnimation(const String&);
  2266. void RemoveInstanceDefault();
  2267. void RemoveObjectAnimation();
  2268. void ResetToDefault();
  2269. bool Save(File) const;
  2270. bool Save(VectorBuffer&) const;
  2271. bool SaveJSON(JSONValue&) const;
  2272. bool SaveXML(XMLElement&) const;
  2273. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2274. void SetAnimationTime(float);
  2275. bool SetAttribute(const String&, const Variant&);
  2276. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2277. void SetAttributeAnimationSpeed(const String&, float);
  2278. void SetAttributeAnimationTime(const String&, float);
  2279. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2280. void SetInterceptNetworkUpdate(const String&, bool);
  2281. // Properties:
  2282. bool animationEnabled;
  2283. /* readonly */
  2284. Array<Variant> attributeDefaults;
  2285. /* readonly */
  2286. Array<AttributeInfo> attributeInfos;
  2287. Array<Variant> attributes;
  2288. /* readonly */
  2289. String category;
  2290. bool enabled;
  2291. /* readonly */
  2292. bool enabledEffective;
  2293. /* readonly */
  2294. uint id;
  2295. /* readonly */
  2296. Node node;
  2297. /* readonly */
  2298. uint numAttributes;
  2299. ObjectAnimation objectAnimation;
  2300. /* readonly */
  2301. int refs;
  2302. bool temporary;
  2303. /* readonly */
  2304. StringHash type;
  2305. /* readonly */
  2306. String typeName;
  2307. /* readonly */
  2308. int weakRefs;
  2309. };
  2310. class Connection
  2311. {
  2312. public:
  2313. // Methods:
  2314. void Disconnect(int = 0);
  2315. bool HasSubscribedToEvent(Object, const String&);
  2316. bool HasSubscribedToEvent(const String&);
  2317. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2318. void SendMessage(int, bool, bool, const VectorBuffer&, uint = 0);
  2319. void SendPackageToClient(PackageFile);
  2320. void SendRemoteEvent(Node, const String&, bool, const VariantMap& = VariantMap ( ));
  2321. void SendRemoteEvent(const String&, bool, const VariantMap& = VariantMap ( ));
  2322. String ToString() const;
  2323. // Properties:
  2324. /* readonly */
  2325. String address;
  2326. /* readonly */
  2327. float bytesInPerSec;
  2328. /* readonly */
  2329. float bytesOutPerSec;
  2330. /* readonly */
  2331. String category;
  2332. /* readonly */
  2333. bool client;
  2334. /* readonly */
  2335. bool connectPending;
  2336. /* readonly */
  2337. bool connected;
  2338. Controls controls;
  2339. /* readonly */
  2340. String downloadName;
  2341. /* readonly */
  2342. float downloadProgress;
  2343. VariantMap identity;
  2344. /* readonly */
  2345. float lastHeardTime;
  2346. bool logStatistics;
  2347. /* readonly */
  2348. uint numDownloads;
  2349. /* readonly */
  2350. float packetsInPerSec;
  2351. /* readonly */
  2352. float packetsOutPerSec;
  2353. /* readonly */
  2354. uint16 port;
  2355. Vector3 position;
  2356. /* readonly */
  2357. int refs;
  2358. Quaternion rotation;
  2359. /* readonly */
  2360. float roundTripTime;
  2361. Scene scene;
  2362. /* readonly */
  2363. bool sceneLoaded;
  2364. uint8 timeStamp;
  2365. /* readonly */
  2366. StringHash type;
  2367. /* readonly */
  2368. String typeName;
  2369. /* readonly */
  2370. int weakRefs;
  2371. };
  2372. class Console
  2373. {
  2374. public:
  2375. // Methods:
  2376. void AddAutoComplete(const String&);
  2377. void CopySelectedRows() const;
  2378. bool HasSubscribedToEvent(Object, const String&);
  2379. bool HasSubscribedToEvent(const String&);
  2380. void RemoveAutoComplete(const String&);
  2381. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2382. void Toggle();
  2383. void UpdateElements();
  2384. // Properties:
  2385. bool autoVisibleOnError;
  2386. /* readonly */
  2387. BorderImage background;
  2388. /* readonly */
  2389. String category;
  2390. /* readonly */
  2391. Button closeButton;
  2392. String commandInterpreter;
  2393. XMLFile defaultStyle;
  2394. bool focusOnShow;
  2395. /* readonly */
  2396. uint historyPosition;
  2397. /* readonly */
  2398. Array<String> historyRow;
  2399. /* readonly */
  2400. LineEdit lineEdit;
  2401. uint numBufferedRows;
  2402. uint numHistoryRows;
  2403. uint numRows;
  2404. /* readonly */
  2405. int refs;
  2406. /* readonly */
  2407. StringHash type;
  2408. /* readonly */
  2409. String typeName;
  2410. bool visible;
  2411. /* readonly */
  2412. int weakRefs;
  2413. };
  2414. class Constraint
  2415. {
  2416. public:
  2417. // Methods:
  2418. void ApplyAttributes();
  2419. void DrawDebugGeometry(DebugRenderer, bool);
  2420. Variant GetAttribute(const String&) const;
  2421. ValueAnimation GetAttributeAnimation(const String&) const;
  2422. float GetAttributeAnimationSpeed(const String&) const;
  2423. float GetAttributeAnimationTime(const String&) const;
  2424. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2425. Variant GetAttributeDefault(const String&) const;
  2426. bool GetInterceptNetworkUpdate(const String&) const;
  2427. bool HasSubscribedToEvent(Object, const String&);
  2428. bool HasSubscribedToEvent(const String&);
  2429. bool Load(File, bool = false);
  2430. bool Load(VectorBuffer&, bool = false);
  2431. bool LoadJSON(const JSONValue&, bool = false);
  2432. bool LoadXML(const XMLElement&, bool = false);
  2433. void MarkNetworkUpdate() const;
  2434. void Remove();
  2435. void RemoveAttributeAnimation(const String&);
  2436. void RemoveInstanceDefault();
  2437. void RemoveObjectAnimation();
  2438. void ResetToDefault();
  2439. bool Save(File) const;
  2440. bool Save(VectorBuffer&) const;
  2441. bool SaveJSON(JSONValue&) const;
  2442. bool SaveXML(XMLElement&) const;
  2443. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2444. void SetAnimationTime(float);
  2445. bool SetAttribute(const String&, const Variant&);
  2446. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2447. void SetAttributeAnimationSpeed(const String&, float);
  2448. void SetAttributeAnimationTime(const String&, float);
  2449. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2450. void SetInterceptNetworkUpdate(const String&, bool);
  2451. // Properties:
  2452. bool animationEnabled;
  2453. /* readonly */
  2454. Array<Variant> attributeDefaults;
  2455. /* readonly */
  2456. Array<AttributeInfo> attributeInfos;
  2457. Array<Variant> attributes;
  2458. /* writeonly */
  2459. Vector3 axis;
  2460. /* readonly */
  2461. String category;
  2462. float cfm;
  2463. ConstraintType constraintType;
  2464. bool disableCollision;
  2465. bool enabled;
  2466. /* readonly */
  2467. bool enabledEffective;
  2468. float erp;
  2469. Vector2 highLimit;
  2470. /* readonly */
  2471. uint id;
  2472. Vector2 lowLimit;
  2473. /* readonly */
  2474. Node node;
  2475. /* readonly */
  2476. uint numAttributes;
  2477. ObjectAnimation objectAnimation;
  2478. /* writeonly */
  2479. Vector3 otherAxis;
  2480. RigidBody otherBody;
  2481. Vector3 otherPosition;
  2482. Quaternion otherRotation;
  2483. /* readonly */
  2484. RigidBody ownBody;
  2485. Vector3 position;
  2486. /* readonly */
  2487. int refs;
  2488. Quaternion rotation;
  2489. bool temporary;
  2490. /* readonly */
  2491. StringHash type;
  2492. /* readonly */
  2493. String typeName;
  2494. /* readonly */
  2495. int weakRefs;
  2496. Vector3 worldPosition;
  2497. };
  2498. class Constraint2D
  2499. {
  2500. public:
  2501. // Methods:
  2502. void ApplyAttributes();
  2503. void DrawDebugGeometry(DebugRenderer, bool);
  2504. Variant GetAttribute(const String&) const;
  2505. ValueAnimation GetAttributeAnimation(const String&) const;
  2506. float GetAttributeAnimationSpeed(const String&) const;
  2507. float GetAttributeAnimationTime(const String&) const;
  2508. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2509. Variant GetAttributeDefault(const String&) const;
  2510. bool GetInterceptNetworkUpdate(const String&) const;
  2511. bool HasSubscribedToEvent(Object, const String&);
  2512. bool HasSubscribedToEvent(const String&);
  2513. bool Load(File, bool = false);
  2514. bool Load(VectorBuffer&, bool = false);
  2515. bool LoadJSON(const JSONValue&, bool = false);
  2516. bool LoadXML(const XMLElement&, bool = false);
  2517. void MarkNetworkUpdate() const;
  2518. void Remove();
  2519. void RemoveAttributeAnimation(const String&);
  2520. void RemoveInstanceDefault();
  2521. void RemoveObjectAnimation();
  2522. void ResetToDefault();
  2523. bool Save(File) const;
  2524. bool Save(VectorBuffer&) const;
  2525. bool SaveJSON(JSONValue&) const;
  2526. bool SaveXML(XMLElement&) const;
  2527. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2528. void SetAnimationTime(float);
  2529. bool SetAttribute(const String&, const Variant&);
  2530. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2531. void SetAttributeAnimationSpeed(const String&, float);
  2532. void SetAttributeAnimationTime(const String&, float);
  2533. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2534. void SetInterceptNetworkUpdate(const String&, bool);
  2535. // Properties:
  2536. bool animationEnabled;
  2537. /* readonly */
  2538. Array<Variant> attributeDefaults;
  2539. /* readonly */
  2540. Array<AttributeInfo> attributeInfos;
  2541. Array<Variant> attributes;
  2542. /* readonly */
  2543. String category;
  2544. bool collideConnected;
  2545. bool enabled;
  2546. /* readonly */
  2547. bool enabledEffective;
  2548. /* readonly */
  2549. uint id;
  2550. /* readonly */
  2551. Node node;
  2552. /* readonly */
  2553. uint numAttributes;
  2554. ObjectAnimation objectAnimation;
  2555. RigidBody2D otherBody;
  2556. /* readonly */
  2557. RigidBody2D ownerBody;
  2558. /* readonly */
  2559. int refs;
  2560. bool temporary;
  2561. /* readonly */
  2562. StringHash type;
  2563. /* readonly */
  2564. String typeName;
  2565. /* readonly */
  2566. int weakRefs;
  2567. };
  2568. class ConstraintDistance2D
  2569. {
  2570. public:
  2571. // Methods:
  2572. void ApplyAttributes();
  2573. void DrawDebugGeometry(DebugRenderer, bool);
  2574. Variant GetAttribute(const String&) const;
  2575. ValueAnimation GetAttributeAnimation(const String&) const;
  2576. float GetAttributeAnimationSpeed(const String&) const;
  2577. float GetAttributeAnimationTime(const String&) const;
  2578. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2579. Variant GetAttributeDefault(const String&) const;
  2580. bool GetInterceptNetworkUpdate(const String&) const;
  2581. bool HasSubscribedToEvent(Object, const String&);
  2582. bool HasSubscribedToEvent(const String&);
  2583. bool Load(File, bool = false);
  2584. bool Load(VectorBuffer&, bool = false);
  2585. bool LoadJSON(const JSONValue&, bool = false);
  2586. bool LoadXML(const XMLElement&, bool = false);
  2587. void MarkNetworkUpdate() const;
  2588. void Remove();
  2589. void RemoveAttributeAnimation(const String&);
  2590. void RemoveInstanceDefault();
  2591. void RemoveObjectAnimation();
  2592. void ResetToDefault();
  2593. bool Save(File) const;
  2594. bool Save(VectorBuffer&) const;
  2595. bool SaveJSON(JSONValue&) const;
  2596. bool SaveXML(XMLElement&) const;
  2597. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2598. void SetAnimationTime(float);
  2599. bool SetAttribute(const String&, const Variant&);
  2600. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2601. void SetAttributeAnimationSpeed(const String&, float);
  2602. void SetAttributeAnimationTime(const String&, float);
  2603. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2604. void SetInterceptNetworkUpdate(const String&, bool);
  2605. // Properties:
  2606. bool animationEnabled;
  2607. /* readonly */
  2608. Array<Variant> attributeDefaults;
  2609. /* readonly */
  2610. Array<AttributeInfo> attributeInfos;
  2611. Array<Variant> attributes;
  2612. /* readonly */
  2613. String category;
  2614. bool collideConnected;
  2615. float dampingRatio;
  2616. bool enabled;
  2617. /* readonly */
  2618. bool enabledEffective;
  2619. float frequencyHz;
  2620. /* readonly */
  2621. uint id;
  2622. float length;
  2623. /* readonly */
  2624. Node node;
  2625. /* readonly */
  2626. uint numAttributes;
  2627. ObjectAnimation objectAnimation;
  2628. RigidBody2D otherBody;
  2629. Vector2 otherBodyAnchor;
  2630. /* readonly */
  2631. RigidBody2D ownerBody;
  2632. Vector2 ownerBodyAnchor;
  2633. /* readonly */
  2634. int refs;
  2635. bool temporary;
  2636. /* readonly */
  2637. StringHash type;
  2638. /* readonly */
  2639. String typeName;
  2640. /* readonly */
  2641. int weakRefs;
  2642. };
  2643. class ConstraintFriction2D
  2644. {
  2645. public:
  2646. // Methods:
  2647. void ApplyAttributes();
  2648. void DrawDebugGeometry(DebugRenderer, bool);
  2649. Variant GetAttribute(const String&) const;
  2650. ValueAnimation GetAttributeAnimation(const String&) const;
  2651. float GetAttributeAnimationSpeed(const String&) const;
  2652. float GetAttributeAnimationTime(const String&) const;
  2653. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2654. Variant GetAttributeDefault(const String&) const;
  2655. bool GetInterceptNetworkUpdate(const String&) const;
  2656. bool HasSubscribedToEvent(Object, const String&);
  2657. bool HasSubscribedToEvent(const String&);
  2658. bool Load(File, bool = false);
  2659. bool Load(VectorBuffer&, bool = false);
  2660. bool LoadJSON(const JSONValue&, bool = false);
  2661. bool LoadXML(const XMLElement&, bool = false);
  2662. void MarkNetworkUpdate() const;
  2663. void Remove();
  2664. void RemoveAttributeAnimation(const String&);
  2665. void RemoveInstanceDefault();
  2666. void RemoveObjectAnimation();
  2667. void ResetToDefault();
  2668. bool Save(File) const;
  2669. bool Save(VectorBuffer&) const;
  2670. bool SaveJSON(JSONValue&) const;
  2671. bool SaveXML(XMLElement&) const;
  2672. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2673. void SetAnimationTime(float);
  2674. bool SetAttribute(const String&, const Variant&);
  2675. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2676. void SetAttributeAnimationSpeed(const String&, float);
  2677. void SetAttributeAnimationTime(const String&, float);
  2678. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2679. void SetInterceptNetworkUpdate(const String&, bool);
  2680. // Properties:
  2681. Vector2 anchor;
  2682. bool animationEnabled;
  2683. /* readonly */
  2684. Array<Variant> attributeDefaults;
  2685. /* readonly */
  2686. Array<AttributeInfo> attributeInfos;
  2687. Array<Variant> attributes;
  2688. /* readonly */
  2689. String category;
  2690. bool collideConnected;
  2691. bool enabled;
  2692. /* readonly */
  2693. bool enabledEffective;
  2694. /* readonly */
  2695. uint id;
  2696. float maxForce;
  2697. float maxTorque;
  2698. /* readonly */
  2699. Node node;
  2700. /* readonly */
  2701. uint numAttributes;
  2702. ObjectAnimation objectAnimation;
  2703. RigidBody2D otherBody;
  2704. /* readonly */
  2705. RigidBody2D ownerBody;
  2706. /* readonly */
  2707. int refs;
  2708. bool temporary;
  2709. /* readonly */
  2710. StringHash type;
  2711. /* readonly */
  2712. String typeName;
  2713. /* readonly */
  2714. int weakRefs;
  2715. };
  2716. class ConstraintGear2D
  2717. {
  2718. public:
  2719. // Methods:
  2720. void ApplyAttributes();
  2721. void DrawDebugGeometry(DebugRenderer, bool);
  2722. Variant GetAttribute(const String&) const;
  2723. ValueAnimation GetAttributeAnimation(const String&) const;
  2724. float GetAttributeAnimationSpeed(const String&) const;
  2725. float GetAttributeAnimationTime(const String&) const;
  2726. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2727. Variant GetAttributeDefault(const String&) const;
  2728. bool GetInterceptNetworkUpdate(const String&) const;
  2729. bool HasSubscribedToEvent(Object, const String&);
  2730. bool HasSubscribedToEvent(const String&);
  2731. bool Load(File, bool = false);
  2732. bool Load(VectorBuffer&, bool = false);
  2733. bool LoadJSON(const JSONValue&, bool = false);
  2734. bool LoadXML(const XMLElement&, bool = false);
  2735. void MarkNetworkUpdate() const;
  2736. void Remove();
  2737. void RemoveAttributeAnimation(const String&);
  2738. void RemoveInstanceDefault();
  2739. void RemoveObjectAnimation();
  2740. void ResetToDefault();
  2741. bool Save(File) const;
  2742. bool Save(VectorBuffer&) const;
  2743. bool SaveJSON(JSONValue&) const;
  2744. bool SaveXML(XMLElement&) const;
  2745. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2746. void SetAnimationTime(float);
  2747. bool SetAttribute(const String&, const Variant&);
  2748. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2749. void SetAttributeAnimationSpeed(const String&, float);
  2750. void SetAttributeAnimationTime(const String&, float);
  2751. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2752. void SetInterceptNetworkUpdate(const String&, bool);
  2753. // Properties:
  2754. bool animationEnabled;
  2755. /* readonly */
  2756. Array<Variant> attributeDefaults;
  2757. /* readonly */
  2758. Array<AttributeInfo> attributeInfos;
  2759. Array<Variant> attributes;
  2760. /* readonly */
  2761. String category;
  2762. bool collideConnected;
  2763. bool enabled;
  2764. /* readonly */
  2765. bool enabledEffective;
  2766. /* readonly */
  2767. uint id;
  2768. /* readonly */
  2769. Node node;
  2770. /* readonly */
  2771. uint numAttributes;
  2772. ObjectAnimation objectAnimation;
  2773. RigidBody2D otherBody;
  2774. Constraint2D otherConstraint;
  2775. /* readonly */
  2776. RigidBody2D ownerBody;
  2777. Constraint2D ownerConstraint;
  2778. float ratio;
  2779. /* readonly */
  2780. int refs;
  2781. bool temporary;
  2782. /* readonly */
  2783. StringHash type;
  2784. /* readonly */
  2785. String typeName;
  2786. /* readonly */
  2787. int weakRefs;
  2788. };
  2789. class ConstraintMotor2D
  2790. {
  2791. public:
  2792. // Methods:
  2793. void ApplyAttributes();
  2794. void DrawDebugGeometry(DebugRenderer, bool);
  2795. Variant GetAttribute(const String&) const;
  2796. ValueAnimation GetAttributeAnimation(const String&) const;
  2797. float GetAttributeAnimationSpeed(const String&) const;
  2798. float GetAttributeAnimationTime(const String&) const;
  2799. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2800. Variant GetAttributeDefault(const String&) const;
  2801. bool GetInterceptNetworkUpdate(const String&) const;
  2802. bool HasSubscribedToEvent(Object, const String&);
  2803. bool HasSubscribedToEvent(const String&);
  2804. bool Load(File, bool = false);
  2805. bool Load(VectorBuffer&, bool = false);
  2806. bool LoadJSON(const JSONValue&, bool = false);
  2807. bool LoadXML(const XMLElement&, bool = false);
  2808. void MarkNetworkUpdate() const;
  2809. void Remove();
  2810. void RemoveAttributeAnimation(const String&);
  2811. void RemoveInstanceDefault();
  2812. void RemoveObjectAnimation();
  2813. void ResetToDefault();
  2814. bool Save(File) const;
  2815. bool Save(VectorBuffer&) const;
  2816. bool SaveJSON(JSONValue&) const;
  2817. bool SaveXML(XMLElement&) const;
  2818. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2819. void SetAnimationTime(float);
  2820. bool SetAttribute(const String&, const Variant&);
  2821. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2822. void SetAttributeAnimationSpeed(const String&, float);
  2823. void SetAttributeAnimationTime(const String&, float);
  2824. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2825. void SetInterceptNetworkUpdate(const String&, bool);
  2826. // Properties:
  2827. float angularOffset;
  2828. bool animationEnabled;
  2829. /* readonly */
  2830. Array<Variant> attributeDefaults;
  2831. /* readonly */
  2832. Array<AttributeInfo> attributeInfos;
  2833. Array<Variant> attributes;
  2834. /* readonly */
  2835. String category;
  2836. bool collideConnected;
  2837. float correctionFactor;
  2838. bool enabled;
  2839. /* readonly */
  2840. bool enabledEffective;
  2841. /* readonly */
  2842. uint id;
  2843. Vector2 linearOffset;
  2844. float maxForce;
  2845. float maxTorque;
  2846. /* readonly */
  2847. Node node;
  2848. /* readonly */
  2849. uint numAttributes;
  2850. ObjectAnimation objectAnimation;
  2851. RigidBody2D otherBody;
  2852. /* readonly */
  2853. RigidBody2D ownerBody;
  2854. /* readonly */
  2855. int refs;
  2856. bool temporary;
  2857. /* readonly */
  2858. StringHash type;
  2859. /* readonly */
  2860. String typeName;
  2861. /* readonly */
  2862. int weakRefs;
  2863. };
  2864. class ConstraintMouse2D
  2865. {
  2866. public:
  2867. // Methods:
  2868. void ApplyAttributes();
  2869. void DrawDebugGeometry(DebugRenderer, bool);
  2870. Variant GetAttribute(const String&) const;
  2871. ValueAnimation GetAttributeAnimation(const String&) const;
  2872. float GetAttributeAnimationSpeed(const String&) const;
  2873. float GetAttributeAnimationTime(const String&) const;
  2874. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2875. Variant GetAttributeDefault(const String&) const;
  2876. bool GetInterceptNetworkUpdate(const String&) const;
  2877. bool HasSubscribedToEvent(Object, const String&);
  2878. bool HasSubscribedToEvent(const String&);
  2879. bool Load(File, bool = false);
  2880. bool Load(VectorBuffer&, bool = false);
  2881. bool LoadJSON(const JSONValue&, bool = false);
  2882. bool LoadXML(const XMLElement&, bool = false);
  2883. void MarkNetworkUpdate() const;
  2884. void Remove();
  2885. void RemoveAttributeAnimation(const String&);
  2886. void RemoveInstanceDefault();
  2887. void RemoveObjectAnimation();
  2888. void ResetToDefault();
  2889. bool Save(File) const;
  2890. bool Save(VectorBuffer&) const;
  2891. bool SaveJSON(JSONValue&) const;
  2892. bool SaveXML(XMLElement&) const;
  2893. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2894. void SetAnimationTime(float);
  2895. bool SetAttribute(const String&, const Variant&);
  2896. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2897. void SetAttributeAnimationSpeed(const String&, float);
  2898. void SetAttributeAnimationTime(const String&, float);
  2899. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2900. void SetInterceptNetworkUpdate(const String&, bool);
  2901. // Properties:
  2902. bool animationEnabled;
  2903. /* readonly */
  2904. Array<Variant> attributeDefaults;
  2905. /* readonly */
  2906. Array<AttributeInfo> attributeInfos;
  2907. Array<Variant> attributes;
  2908. /* readonly */
  2909. String category;
  2910. bool collideConnected;
  2911. float dampingRatio;
  2912. bool enabled;
  2913. /* readonly */
  2914. bool enabledEffective;
  2915. float frequencyHz;
  2916. /* readonly */
  2917. uint id;
  2918. float maxForce;
  2919. /* readonly */
  2920. Node node;
  2921. /* readonly */
  2922. uint numAttributes;
  2923. ObjectAnimation objectAnimation;
  2924. RigidBody2D otherBody;
  2925. /* readonly */
  2926. RigidBody2D ownerBody;
  2927. /* readonly */
  2928. int refs;
  2929. Vector2 target;
  2930. bool temporary;
  2931. /* readonly */
  2932. StringHash type;
  2933. /* readonly */
  2934. String typeName;
  2935. /* readonly */
  2936. int weakRefs;
  2937. };
  2938. class ConstraintPrismatic2D
  2939. {
  2940. public:
  2941. // Methods:
  2942. void ApplyAttributes();
  2943. void DrawDebugGeometry(DebugRenderer, bool);
  2944. Variant GetAttribute(const String&) const;
  2945. ValueAnimation GetAttributeAnimation(const String&) const;
  2946. float GetAttributeAnimationSpeed(const String&) const;
  2947. float GetAttributeAnimationTime(const String&) const;
  2948. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  2949. Variant GetAttributeDefault(const String&) const;
  2950. bool GetInterceptNetworkUpdate(const String&) const;
  2951. bool HasSubscribedToEvent(Object, const String&);
  2952. bool HasSubscribedToEvent(const String&);
  2953. bool Load(File, bool = false);
  2954. bool Load(VectorBuffer&, bool = false);
  2955. bool LoadJSON(const JSONValue&, bool = false);
  2956. bool LoadXML(const XMLElement&, bool = false);
  2957. void MarkNetworkUpdate() const;
  2958. void Remove();
  2959. void RemoveAttributeAnimation(const String&);
  2960. void RemoveInstanceDefault();
  2961. void RemoveObjectAnimation();
  2962. void ResetToDefault();
  2963. bool Save(File) const;
  2964. bool Save(VectorBuffer&) const;
  2965. bool SaveJSON(JSONValue&) const;
  2966. bool SaveXML(XMLElement&) const;
  2967. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  2968. void SetAnimationTime(float);
  2969. bool SetAttribute(const String&, const Variant&);
  2970. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  2971. void SetAttributeAnimationSpeed(const String&, float);
  2972. void SetAttributeAnimationTime(const String&, float);
  2973. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  2974. void SetInterceptNetworkUpdate(const String&, bool);
  2975. // Properties:
  2976. Vector2 anchor;
  2977. bool animationEnabled;
  2978. /* readonly */
  2979. Array<Variant> attributeDefaults;
  2980. /* readonly */
  2981. Array<AttributeInfo> attributeInfos;
  2982. Array<Variant> attributes;
  2983. Vector2 axis;
  2984. /* readonly */
  2985. String category;
  2986. bool collideConnected;
  2987. bool enableLimit;
  2988. bool enableMotor;
  2989. bool enabled;
  2990. /* readonly */
  2991. bool enabledEffective;
  2992. /* readonly */
  2993. uint id;
  2994. float lowerTranslation;
  2995. float maxMotorForce;
  2996. float motorSpeed;
  2997. /* readonly */
  2998. Node node;
  2999. /* readonly */
  3000. uint numAttributes;
  3001. ObjectAnimation objectAnimation;
  3002. RigidBody2D otherBody;
  3003. /* readonly */
  3004. RigidBody2D ownerBody;
  3005. /* readonly */
  3006. int refs;
  3007. bool temporary;
  3008. /* readonly */
  3009. StringHash type;
  3010. /* readonly */
  3011. String typeName;
  3012. float upperTranslation;
  3013. /* readonly */
  3014. int weakRefs;
  3015. };
  3016. class ConstraintPulley2D
  3017. {
  3018. public:
  3019. // Methods:
  3020. void ApplyAttributes();
  3021. void DrawDebugGeometry(DebugRenderer, bool);
  3022. Variant GetAttribute(const String&) const;
  3023. ValueAnimation GetAttributeAnimation(const String&) const;
  3024. float GetAttributeAnimationSpeed(const String&) const;
  3025. float GetAttributeAnimationTime(const String&) const;
  3026. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3027. Variant GetAttributeDefault(const String&) const;
  3028. bool GetInterceptNetworkUpdate(const String&) const;
  3029. bool HasSubscribedToEvent(Object, const String&);
  3030. bool HasSubscribedToEvent(const String&);
  3031. bool Load(File, bool = false);
  3032. bool Load(VectorBuffer&, bool = false);
  3033. bool LoadJSON(const JSONValue&, bool = false);
  3034. bool LoadXML(const XMLElement&, bool = false);
  3035. void MarkNetworkUpdate() const;
  3036. void Remove();
  3037. void RemoveAttributeAnimation(const String&);
  3038. void RemoveInstanceDefault();
  3039. void RemoveObjectAnimation();
  3040. void ResetToDefault();
  3041. bool Save(File) const;
  3042. bool Save(VectorBuffer&) const;
  3043. bool SaveJSON(JSONValue&) const;
  3044. bool SaveXML(XMLElement&) const;
  3045. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3046. void SetAnimationTime(float);
  3047. bool SetAttribute(const String&, const Variant&);
  3048. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3049. void SetAttributeAnimationSpeed(const String&, float);
  3050. void SetAttributeAnimationTime(const String&, float);
  3051. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3052. void SetInterceptNetworkUpdate(const String&, bool);
  3053. // Properties:
  3054. bool animationEnabled;
  3055. /* readonly */
  3056. Array<Variant> attributeDefaults;
  3057. /* readonly */
  3058. Array<AttributeInfo> attributeInfos;
  3059. Array<Variant> attributes;
  3060. /* readonly */
  3061. String category;
  3062. bool collideConnected;
  3063. bool enabled;
  3064. /* readonly */
  3065. bool enabledEffective;
  3066. /* readonly */
  3067. uint id;
  3068. /* readonly */
  3069. Node node;
  3070. /* readonly */
  3071. uint numAttributes;
  3072. ObjectAnimation objectAnimation;
  3073. RigidBody2D otherBody;
  3074. Vector2 otherBodyAnchor;
  3075. Vector2 otherBodyGroundAnchor;
  3076. /* readonly */
  3077. RigidBody2D ownerBody;
  3078. Vector2 ownerBodyAnchor;
  3079. Vector2 ownerBodyGroundAnchor;
  3080. float ratio;
  3081. /* readonly */
  3082. int refs;
  3083. bool temporary;
  3084. /* readonly */
  3085. StringHash type;
  3086. /* readonly */
  3087. String typeName;
  3088. /* readonly */
  3089. int weakRefs;
  3090. };
  3091. class ConstraintRevolute2D
  3092. {
  3093. public:
  3094. // Methods:
  3095. void ApplyAttributes();
  3096. void DrawDebugGeometry(DebugRenderer, bool);
  3097. Variant GetAttribute(const String&) const;
  3098. ValueAnimation GetAttributeAnimation(const String&) const;
  3099. float GetAttributeAnimationSpeed(const String&) const;
  3100. float GetAttributeAnimationTime(const String&) const;
  3101. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3102. Variant GetAttributeDefault(const String&) const;
  3103. bool GetInterceptNetworkUpdate(const String&) const;
  3104. bool HasSubscribedToEvent(Object, const String&);
  3105. bool HasSubscribedToEvent(const String&);
  3106. bool Load(File, bool = false);
  3107. bool Load(VectorBuffer&, bool = false);
  3108. bool LoadJSON(const JSONValue&, bool = false);
  3109. bool LoadXML(const XMLElement&, bool = false);
  3110. void MarkNetworkUpdate() const;
  3111. void Remove();
  3112. void RemoveAttributeAnimation(const String&);
  3113. void RemoveInstanceDefault();
  3114. void RemoveObjectAnimation();
  3115. void ResetToDefault();
  3116. bool Save(File) const;
  3117. bool Save(VectorBuffer&) const;
  3118. bool SaveJSON(JSONValue&) const;
  3119. bool SaveXML(XMLElement&) const;
  3120. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3121. void SetAnimationTime(float);
  3122. bool SetAttribute(const String&, const Variant&);
  3123. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3124. void SetAttributeAnimationSpeed(const String&, float);
  3125. void SetAttributeAnimationTime(const String&, float);
  3126. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3127. void SetInterceptNetworkUpdate(const String&, bool);
  3128. // Properties:
  3129. Vector2 anchor;
  3130. bool animationEnabled;
  3131. /* readonly */
  3132. Array<Variant> attributeDefaults;
  3133. /* readonly */
  3134. Array<AttributeInfo> attributeInfos;
  3135. Array<Variant> attributes;
  3136. /* readonly */
  3137. String category;
  3138. bool collideConnected;
  3139. bool enableLimit;
  3140. bool enableMotor;
  3141. bool enabled;
  3142. /* readonly */
  3143. bool enabledEffective;
  3144. /* readonly */
  3145. uint id;
  3146. float lowerAngle;
  3147. float maxMotorTorque;
  3148. float motorSpeed;
  3149. /* readonly */
  3150. Node node;
  3151. /* readonly */
  3152. uint numAttributes;
  3153. ObjectAnimation objectAnimation;
  3154. RigidBody2D otherBody;
  3155. /* readonly */
  3156. RigidBody2D ownerBody;
  3157. /* readonly */
  3158. int refs;
  3159. bool temporary;
  3160. /* readonly */
  3161. StringHash type;
  3162. /* readonly */
  3163. String typeName;
  3164. float upperAngle;
  3165. /* readonly */
  3166. int weakRefs;
  3167. };
  3168. class ConstraintRope2D
  3169. {
  3170. public:
  3171. // Methods:
  3172. void ApplyAttributes();
  3173. void DrawDebugGeometry(DebugRenderer, bool);
  3174. Variant GetAttribute(const String&) const;
  3175. ValueAnimation GetAttributeAnimation(const String&) const;
  3176. float GetAttributeAnimationSpeed(const String&) const;
  3177. float GetAttributeAnimationTime(const String&) const;
  3178. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3179. Variant GetAttributeDefault(const String&) const;
  3180. bool GetInterceptNetworkUpdate(const String&) const;
  3181. bool HasSubscribedToEvent(Object, const String&);
  3182. bool HasSubscribedToEvent(const String&);
  3183. bool Load(File, bool = false);
  3184. bool Load(VectorBuffer&, bool = false);
  3185. bool LoadJSON(const JSONValue&, bool = false);
  3186. bool LoadXML(const XMLElement&, bool = false);
  3187. void MarkNetworkUpdate() const;
  3188. void Remove();
  3189. void RemoveAttributeAnimation(const String&);
  3190. void RemoveInstanceDefault();
  3191. void RemoveObjectAnimation();
  3192. void ResetToDefault();
  3193. bool Save(File) const;
  3194. bool Save(VectorBuffer&) const;
  3195. bool SaveJSON(JSONValue&) const;
  3196. bool SaveXML(XMLElement&) const;
  3197. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3198. void SetAnimationTime(float);
  3199. bool SetAttribute(const String&, const Variant&);
  3200. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3201. void SetAttributeAnimationSpeed(const String&, float);
  3202. void SetAttributeAnimationTime(const String&, float);
  3203. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3204. void SetInterceptNetworkUpdate(const String&, bool);
  3205. // Properties:
  3206. bool animationEnabled;
  3207. /* readonly */
  3208. Array<Variant> attributeDefaults;
  3209. /* readonly */
  3210. Array<AttributeInfo> attributeInfos;
  3211. Array<Variant> attributes;
  3212. /* readonly */
  3213. String category;
  3214. bool collideConnected;
  3215. bool enabled;
  3216. /* readonly */
  3217. bool enabledEffective;
  3218. /* readonly */
  3219. uint id;
  3220. float maxLength;
  3221. /* readonly */
  3222. Node node;
  3223. /* readonly */
  3224. uint numAttributes;
  3225. ObjectAnimation objectAnimation;
  3226. RigidBody2D otherBody;
  3227. Vector2 otherBodyAnchor;
  3228. /* readonly */
  3229. RigidBody2D ownerBody;
  3230. Vector2 ownerBodyAnchor;
  3231. /* readonly */
  3232. int refs;
  3233. bool temporary;
  3234. /* readonly */
  3235. StringHash type;
  3236. /* readonly */
  3237. String typeName;
  3238. /* readonly */
  3239. int weakRefs;
  3240. };
  3241. class ConstraintWeld2D
  3242. {
  3243. public:
  3244. // Methods:
  3245. void ApplyAttributes();
  3246. void DrawDebugGeometry(DebugRenderer, bool);
  3247. Variant GetAttribute(const String&) const;
  3248. ValueAnimation GetAttributeAnimation(const String&) const;
  3249. float GetAttributeAnimationSpeed(const String&) const;
  3250. float GetAttributeAnimationTime(const String&) const;
  3251. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3252. Variant GetAttributeDefault(const String&) const;
  3253. bool GetInterceptNetworkUpdate(const String&) const;
  3254. bool HasSubscribedToEvent(Object, const String&);
  3255. bool HasSubscribedToEvent(const String&);
  3256. bool Load(File, bool = false);
  3257. bool Load(VectorBuffer&, bool = false);
  3258. bool LoadJSON(const JSONValue&, bool = false);
  3259. bool LoadXML(const XMLElement&, bool = false);
  3260. void MarkNetworkUpdate() const;
  3261. void Remove();
  3262. void RemoveAttributeAnimation(const String&);
  3263. void RemoveInstanceDefault();
  3264. void RemoveObjectAnimation();
  3265. void ResetToDefault();
  3266. bool Save(File) const;
  3267. bool Save(VectorBuffer&) const;
  3268. bool SaveJSON(JSONValue&) const;
  3269. bool SaveXML(XMLElement&) const;
  3270. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3271. void SetAnimationTime(float);
  3272. bool SetAttribute(const String&, const Variant&);
  3273. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3274. void SetAttributeAnimationSpeed(const String&, float);
  3275. void SetAttributeAnimationTime(const String&, float);
  3276. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3277. void SetInterceptNetworkUpdate(const String&, bool);
  3278. // Properties:
  3279. Vector2 anchor;
  3280. bool animationEnabled;
  3281. /* readonly */
  3282. Array<Variant> attributeDefaults;
  3283. /* readonly */
  3284. Array<AttributeInfo> attributeInfos;
  3285. Array<Variant> attributes;
  3286. /* readonly */
  3287. String category;
  3288. bool collideConnected;
  3289. float dampingRatio;
  3290. bool enabled;
  3291. /* readonly */
  3292. bool enabledEffective;
  3293. float frequencyHz;
  3294. /* readonly */
  3295. uint id;
  3296. /* readonly */
  3297. Node node;
  3298. /* readonly */
  3299. uint numAttributes;
  3300. ObjectAnimation objectAnimation;
  3301. RigidBody2D otherBody;
  3302. /* readonly */
  3303. RigidBody2D ownerBody;
  3304. /* readonly */
  3305. int refs;
  3306. bool temporary;
  3307. /* readonly */
  3308. StringHash type;
  3309. /* readonly */
  3310. String typeName;
  3311. /* readonly */
  3312. int weakRefs;
  3313. };
  3314. class ConstraintWheel2D
  3315. {
  3316. public:
  3317. // Methods:
  3318. void ApplyAttributes();
  3319. void DrawDebugGeometry(DebugRenderer, bool);
  3320. Variant GetAttribute(const String&) const;
  3321. ValueAnimation GetAttributeAnimation(const String&) const;
  3322. float GetAttributeAnimationSpeed(const String&) const;
  3323. float GetAttributeAnimationTime(const String&) const;
  3324. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3325. Variant GetAttributeDefault(const String&) const;
  3326. bool GetInterceptNetworkUpdate(const String&) const;
  3327. bool HasSubscribedToEvent(Object, const String&);
  3328. bool HasSubscribedToEvent(const String&);
  3329. bool Load(File, bool = false);
  3330. bool Load(VectorBuffer&, bool = false);
  3331. bool LoadJSON(const JSONValue&, bool = false);
  3332. bool LoadXML(const XMLElement&, bool = false);
  3333. void MarkNetworkUpdate() const;
  3334. void Remove();
  3335. void RemoveAttributeAnimation(const String&);
  3336. void RemoveInstanceDefault();
  3337. void RemoveObjectAnimation();
  3338. void ResetToDefault();
  3339. bool Save(File) const;
  3340. bool Save(VectorBuffer&) const;
  3341. bool SaveJSON(JSONValue&) const;
  3342. bool SaveXML(XMLElement&) const;
  3343. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3344. void SetAnimationTime(float);
  3345. bool SetAttribute(const String&, const Variant&);
  3346. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3347. void SetAttributeAnimationSpeed(const String&, float);
  3348. void SetAttributeAnimationTime(const String&, float);
  3349. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3350. void SetInterceptNetworkUpdate(const String&, bool);
  3351. // Properties:
  3352. Vector2 anchor;
  3353. bool animationEnabled;
  3354. /* readonly */
  3355. Array<Variant> attributeDefaults;
  3356. /* readonly */
  3357. Array<AttributeInfo> attributeInfos;
  3358. Array<Variant> attributes;
  3359. Vector2 axis;
  3360. /* readonly */
  3361. String category;
  3362. bool collideConnected;
  3363. float dampingRatio;
  3364. bool enableMotor;
  3365. bool enabled;
  3366. /* readonly */
  3367. bool enabledEffective;
  3368. float frequencyHz;
  3369. /* readonly */
  3370. uint id;
  3371. float maxMotorTorque;
  3372. float motorSpeed;
  3373. /* readonly */
  3374. Node node;
  3375. /* readonly */
  3376. uint numAttributes;
  3377. ObjectAnimation objectAnimation;
  3378. RigidBody2D otherBody;
  3379. /* readonly */
  3380. RigidBody2D ownerBody;
  3381. /* readonly */
  3382. int refs;
  3383. bool temporary;
  3384. /* readonly */
  3385. StringHash type;
  3386. /* readonly */
  3387. String typeName;
  3388. /* readonly */
  3389. int weakRefs;
  3390. };
  3391. class Controls
  3392. {
  3393. public:
  3394. ~Controls();
  3395. Controls();
  3396. Controls(const Controls&in);
  3397. // Methods:
  3398. bool IsDown(uint) const;
  3399. bool IsPressed(uint, const Controls&) const;
  3400. void Reset();
  3401. void Set(uint, bool);
  3402. // Properties:
  3403. uint buttons;
  3404. VariantMap extraData;
  3405. float pitch;
  3406. float yaw;
  3407. };
  3408. class CrowdAgent
  3409. {
  3410. public:
  3411. // Methods:
  3412. void ApplyAttributes();
  3413. void DrawDebugGeometry(DebugRenderer, bool);
  3414. void DrawDebugGeometry(bool);
  3415. Variant GetAttribute(const String&) const;
  3416. ValueAnimation GetAttributeAnimation(const String&) const;
  3417. float GetAttributeAnimationSpeed(const String&) const;
  3418. float GetAttributeAnimationTime(const String&) const;
  3419. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3420. Variant GetAttributeDefault(const String&) const;
  3421. bool GetInterceptNetworkUpdate(const String&) const;
  3422. bool HasSubscribedToEvent(Object, const String&);
  3423. bool HasSubscribedToEvent(const String&);
  3424. bool Load(File, bool = false);
  3425. bool Load(VectorBuffer&, bool = false);
  3426. bool LoadJSON(const JSONValue&, bool = false);
  3427. bool LoadXML(const XMLElement&, bool = false);
  3428. void MarkNetworkUpdate() const;
  3429. void Remove();
  3430. void RemoveAttributeAnimation(const String&);
  3431. void RemoveInstanceDefault();
  3432. void RemoveObjectAnimation();
  3433. void ResetTarget();
  3434. void ResetToDefault();
  3435. bool Save(File) const;
  3436. bool Save(VectorBuffer&) const;
  3437. bool SaveJSON(JSONValue&) const;
  3438. bool SaveXML(XMLElement&) const;
  3439. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3440. void SetAnimationTime(float);
  3441. bool SetAttribute(const String&, const Variant&);
  3442. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3443. void SetAttributeAnimationSpeed(const String&, float);
  3444. void SetAttributeAnimationTime(const String&, float);
  3445. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3446. void SetInterceptNetworkUpdate(const String&, bool);
  3447. // Properties:
  3448. /* readonly */
  3449. Vector3 actualVelocity;
  3450. /* readonly */
  3451. CrowdAgentState agentState;
  3452. bool animationEnabled;
  3453. /* readonly */
  3454. bool arrived;
  3455. /* readonly */
  3456. Array<Variant> attributeDefaults;
  3457. /* readonly */
  3458. Array<AttributeInfo> attributeInfos;
  3459. Array<Variant> attributes;
  3460. /* readonly */
  3461. String category;
  3462. /* readonly */
  3463. Vector3 desiredVelocity;
  3464. bool enabled;
  3465. /* readonly */
  3466. bool enabledEffective;
  3467. float height;
  3468. /* readonly */
  3469. uint id;
  3470. /* readonly */
  3471. bool inCrowd;
  3472. float maxAccel;
  3473. float maxSpeed;
  3474. NavigationPushiness navigationPushiness;
  3475. NavigationQuality navigationQuality;
  3476. /* readonly */
  3477. Node node;
  3478. /* readonly */
  3479. uint numAttributes;
  3480. ObjectAnimation objectAnimation;
  3481. uint obstacleAvoidanceType;
  3482. /* readonly */
  3483. Vector3 position;
  3484. uint queryFilterType;
  3485. float radius;
  3486. /* readonly */
  3487. int refs;
  3488. /* readonly */
  3489. bool requestedTarget;
  3490. /* readonly */
  3491. CrowdAgentRequestedTarget requestedTargetType;
  3492. Vector3 targetPosition;
  3493. /* readonly */
  3494. CrowdAgentTargetState targetState;
  3495. Vector3 targetVelocity;
  3496. bool temporary;
  3497. /* readonly */
  3498. StringHash type;
  3499. /* readonly */
  3500. String typeName;
  3501. bool updateNodePosition;
  3502. /* readonly */
  3503. int weakRefs;
  3504. };
  3505. class CrowdManager
  3506. {
  3507. public:
  3508. // Methods:
  3509. void ApplyAttributes();
  3510. const CrowdObstacleAvoidanceParams& GetObstacleAvoidanceParams(uint);
  3511. void DrawDebugGeometry(DebugRenderer, bool);
  3512. void DrawDebugGeometry(bool);
  3513. Vector3 FindNearestPoint(const Vector3&, int);
  3514. Array<CrowdAgent> GetAgents(Node = null, bool = true);
  3515. float GetAreaCost(uint, uint);
  3516. Variant GetAttribute(const String&) const;
  3517. ValueAnimation GetAttributeAnimation(const String&) const;
  3518. float GetAttributeAnimationSpeed(const String&) const;
  3519. float GetAttributeAnimationTime(const String&) const;
  3520. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3521. Variant GetAttributeDefault(const String&) const;
  3522. float GetDistanceToWall(const Vector3&, float, int);
  3523. uint16 GetExcludeFlags(uint);
  3524. uint16 GetIncludeFlags(uint);
  3525. bool GetInterceptNetworkUpdate(const String&) const;
  3526. Vector3 GetRandomPoint(int);
  3527. Vector3 GetRandomPointInCircle(const Vector3&, float, int);
  3528. bool HasSubscribedToEvent(Object, const String&);
  3529. bool HasSubscribedToEvent(const String&);
  3530. bool Load(File, bool = false);
  3531. bool Load(VectorBuffer&, bool = false);
  3532. bool LoadJSON(const JSONValue&, bool = false);
  3533. bool LoadXML(const XMLElement&, bool = false);
  3534. void MarkNetworkUpdate() const;
  3535. Vector3 MoveAlongSurface(const Vector3&, const Vector3&, int, uint = 3);
  3536. Vector3 Raycast(const Vector3&, const Vector3&, int);
  3537. void Remove();
  3538. void RemoveAttributeAnimation(const String&);
  3539. void RemoveInstanceDefault();
  3540. void RemoveObjectAnimation();
  3541. void ResetCrowdTarget(Node = null);
  3542. void ResetToDefault();
  3543. bool Save(File) const;
  3544. bool Save(VectorBuffer&) const;
  3545. bool SaveJSON(JSONValue&) const;
  3546. bool SaveXML(XMLElement&) const;
  3547. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3548. void SetAnimationTime(float);
  3549. void SetAreaCost(uint, uint, float);
  3550. bool SetAttribute(const String&, const Variant&);
  3551. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3552. void SetAttributeAnimationSpeed(const String&, float);
  3553. void SetAttributeAnimationTime(const String&, float);
  3554. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3555. void SetCrowdTarget(const Vector3&, Node = null);
  3556. void SetCrowdVelocity(const Vector3&, Node = null);
  3557. void SetExcludeFlags(uint, uint16);
  3558. void SetIncludeFlags(uint, uint16);
  3559. void SetInterceptNetworkUpdate(const String&, bool);
  3560. void SetObstacleAvoidanceParams(uint, const CrowdObstacleAvoidanceParams&);
  3561. // Properties:
  3562. bool animationEnabled;
  3563. /* readonly */
  3564. Array<Variant> attributeDefaults;
  3565. /* readonly */
  3566. Array<AttributeInfo> attributeInfos;
  3567. Array<Variant> attributes;
  3568. /* readonly */
  3569. String category;
  3570. bool enabled;
  3571. /* readonly */
  3572. bool enabledEffective;
  3573. /* readonly */
  3574. uint id;
  3575. float maxAgentRadius;
  3576. int maxAgents;
  3577. NavigationMesh navMesh;
  3578. /* readonly */
  3579. Node node;
  3580. /* readonly */
  3581. Array<uint> numAreas;
  3582. /* readonly */
  3583. uint numAttributes;
  3584. /* readonly */
  3585. uint numObstacleAvoidanceTypes;
  3586. /* readonly */
  3587. uint numQueryFilterTypes;
  3588. ObjectAnimation objectAnimation;
  3589. /* readonly */
  3590. int refs;
  3591. bool temporary;
  3592. /* readonly */
  3593. StringHash type;
  3594. /* readonly */
  3595. String typeName;
  3596. /* readonly */
  3597. int weakRefs;
  3598. };
  3599. class CrowdObstacleAvoidanceParams
  3600. {
  3601. public:
  3602. // Properties:
  3603. uint8 adaptiveDepth;
  3604. uint8 adaptiveDivs;
  3605. uint8 adaptiveRings;
  3606. uint8 gridSize;
  3607. float horizTime;
  3608. float velBias;
  3609. float weightCurVel;
  3610. float weightDesVel;
  3611. float weightSide;
  3612. float weightToi;
  3613. };
  3614. class Cursor
  3615. {
  3616. public:
  3617. Cursor();
  3618. Cursor(const String&in);
  3619. // Methods:
  3620. void AddChild(UIElement);
  3621. void AddTag(const String&);
  3622. void AddTags(const String&, int8 = ';');
  3623. void ApplyAttributes();
  3624. void BringToFront();
  3625. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  3626. void DefineShape(CursorShape, Texture, const IntRect&, const IntVector2&);
  3627. void DefineShape(const String&, Texture, const IntRect&, const IntVector2&);
  3628. void DisableLayoutUpdate();
  3629. IntVector2 ElementToScreen(const IntVector2&);
  3630. void EnableLayoutUpdate();
  3631. uint FindChild(UIElement) const;
  3632. Variant GetAttribute(const String&) const;
  3633. ValueAnimation GetAttributeAnimation(const String&) const;
  3634. float GetAttributeAnimationSpeed(const String&) const;
  3635. float GetAttributeAnimationTime(const String&) const;
  3636. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3637. Variant GetAttributeDefault(const String&) const;
  3638. UIElement GetChild(const String&, bool = false) const;
  3639. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  3640. Array<UIElement> GetChildren(bool = false) const;
  3641. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  3642. UIElement GetElementEventSender() const;
  3643. bool GetInterceptNetworkUpdate(const String&) const;
  3644. uint GetNumChildren(bool) const;
  3645. bool HasSubscribedToEvent(Object, const String&);
  3646. bool HasSubscribedToEvent(const String&);
  3647. bool HasTag(const String&) const;
  3648. void InsertChild(uint, UIElement);
  3649. bool IsInside(IntVector2, bool);
  3650. bool IsInsideCombined(IntVector2, bool);
  3651. bool Load(File, bool = false);
  3652. bool Load(VectorBuffer&, bool = false);
  3653. UIElement LoadChildXML(XMLFile, XMLFile = null);
  3654. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  3655. bool LoadJSON(const JSONValue&, bool = false);
  3656. bool LoadXML(File);
  3657. bool LoadXML(VectorBuffer&);
  3658. bool LoadXML(XMLFile, XMLFile);
  3659. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  3660. bool LoadXML(const XMLElement&, bool = false);
  3661. void MarkNetworkUpdate() const;
  3662. void Remove();
  3663. void RemoveAllChildren();
  3664. void RemoveAllTags();
  3665. void RemoveAttributeAnimation(const String&);
  3666. void RemoveChild(UIElement, uint = 0);
  3667. void RemoveChild(uint);
  3668. void RemoveInstanceDefault();
  3669. void RemoveObjectAnimation();
  3670. bool RemoveTag(const String&);
  3671. void ResetDeepEnabled();
  3672. void ResetToDefault();
  3673. bool Save(File) const;
  3674. bool Save(VectorBuffer&) const;
  3675. bool SaveJSON(JSONValue&) const;
  3676. bool SaveXML(File, const String& = "\t");
  3677. bool SaveXML(VectorBuffer&, const String& = "\t");
  3678. bool SaveXML(XMLElement&) const;
  3679. IntVector2 ScreenToElement(const IntVector2&);
  3680. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3681. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  3682. void SetAnimationTime(float);
  3683. bool SetAttribute(const String&, const Variant&);
  3684. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3685. void SetAttributeAnimationSpeed(const String&, float);
  3686. void SetAttributeAnimationTime(const String&, float);
  3687. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3688. void SetDeepEnabled(bool);
  3689. void SetEnabledRecursive(bool);
  3690. void SetFixedHeight(int);
  3691. void SetFixedSize(int, int);
  3692. void SetFixedWidth(int);
  3693. void SetFullImageRect();
  3694. void SetHoverOffset(int, int);
  3695. void SetInterceptNetworkUpdate(const String&, bool);
  3696. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  3697. void SetMaxAnchor(float, float);
  3698. void SetMaxSize(int, int);
  3699. void SetMinAnchor(float, float);
  3700. void SetMinSize(int, int);
  3701. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  3702. void SetPivot(float, float);
  3703. void SetPosition(int, int);
  3704. void SetShape(CursorShape);
  3705. void SetShape(const String&);
  3706. void SetSize(int, int);
  3707. bool SetStyle(const String&, XMLFile = null);
  3708. bool SetStyle(const XMLElement&);
  3709. bool SetStyleAuto(XMLFile = null);
  3710. void UpdateLayout();
  3711. const Variant& GetVar(const StringHash&);
  3712. // Properties:
  3713. bool animationEnabled;
  3714. /* readonly */
  3715. Array<Variant> attributeDefaults;
  3716. /* readonly */
  3717. Array<AttributeInfo> attributeInfos;
  3718. Array<Variant> attributes;
  3719. BlendMode blendMode;
  3720. IntRect border;
  3721. bool bringToBack;
  3722. bool bringToFront;
  3723. /* readonly */
  3724. String category;
  3725. /* readonly */
  3726. IntVector2 childOffset;
  3727. /* readonly */
  3728. Array<UIElement> children;
  3729. IntRect clipBorder;
  3730. bool clipChildren;
  3731. /* writeonly */
  3732. Color color;
  3733. /* readonly */
  3734. bool colorGradient;
  3735. Array<Color> colors;
  3736. /* readonly */
  3737. IntRect combinedScreenRect;
  3738. XMLFile defaultStyle;
  3739. /* readonly */
  3740. float derivedOpacity;
  3741. /* readonly */
  3742. uint dragButtonCombo;
  3743. /* readonly */
  3744. int dragButtonCount;
  3745. uint dragDropMode;
  3746. bool editable;
  3747. bool elementEventSender;
  3748. bool enableAnchor;
  3749. bool enabled;
  3750. /* readonly */
  3751. bool enabledSelf;
  3752. /* readonly */
  3753. bool fixedHeight;
  3754. /* readonly */
  3755. bool fixedSize;
  3756. /* readonly */
  3757. bool fixedWidth;
  3758. bool focus;
  3759. FocusMode focusMode;
  3760. int height;
  3761. HorizontalAlignment horizontalAlignment;
  3762. IntVector2 hoverOffset;
  3763. /* readonly */
  3764. bool hovering;
  3765. IntRect imageBorder;
  3766. IntRect imageRect;
  3767. int indent;
  3768. int indentSpacing;
  3769. /* readonly */
  3770. int indentWidth;
  3771. bool internal;
  3772. IntRect layoutBorder;
  3773. Vector2 layoutFlexScale;
  3774. LayoutMode layoutMode;
  3775. int layoutSpacing;
  3776. Vector2 maxAnchor;
  3777. int maxHeight;
  3778. IntVector2 maxOffset;
  3779. IntVector2 maxSize;
  3780. int maxWidth;
  3781. Vector2 minAnchor;
  3782. int minHeight;
  3783. IntVector2 minOffset;
  3784. IntVector2 minSize;
  3785. int minWidth;
  3786. String name;
  3787. /* readonly */
  3788. uint numAllChildren;
  3789. /* readonly */
  3790. uint numAttributes;
  3791. /* readonly */
  3792. uint numChildren;
  3793. ObjectAnimation objectAnimation;
  3794. float opacity;
  3795. UIElement parent;
  3796. Vector2 pivot;
  3797. IntVector2 position;
  3798. int priority;
  3799. /* readonly */
  3800. int refs;
  3801. /* readonly */
  3802. UIElement root;
  3803. /* readonly */
  3804. IntVector2 screenPosition;
  3805. bool selected;
  3806. String shape;
  3807. IntVector2 size;
  3808. bool sortChildren;
  3809. String style;
  3810. /* readonly */
  3811. Array<String> tags;
  3812. bool temporary;
  3813. Texture texture;
  3814. bool tiled;
  3815. TraversalMode traversalMode;
  3816. /* readonly */
  3817. StringHash type;
  3818. /* readonly */
  3819. String typeName;
  3820. bool useDerivedOpacity;
  3821. bool useSystemShapes;
  3822. /* readonly */
  3823. VariantMap vars;
  3824. VerticalAlignment verticalAlignment;
  3825. bool visible;
  3826. /* readonly */
  3827. bool visibleEffective;
  3828. /* readonly */
  3829. int weakRefs;
  3830. int width;
  3831. };
  3832. class CustomGeometry
  3833. {
  3834. public:
  3835. // Methods:
  3836. void ApplyAttributes();
  3837. void BeginGeometry(uint, PrimitiveType);
  3838. void Clear();
  3839. void Commit();
  3840. void DefineColor(const Color&);
  3841. void DefineGeometry(uint, PrimitiveType, uint, bool, bool, bool, bool);
  3842. void DefineNormal(const Vector3&);
  3843. void DefineTangent(const Vector4&);
  3844. void DefineTexCoord(const Vector2&);
  3845. void DefineVertex(const Vector3&);
  3846. void DrawDebugGeometry(DebugRenderer, bool);
  3847. Variant GetAttribute(const String&) const;
  3848. ValueAnimation GetAttributeAnimation(const String&) const;
  3849. float GetAttributeAnimationSpeed(const String&) const;
  3850. float GetAttributeAnimationTime(const String&) const;
  3851. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  3852. Variant GetAttributeDefault(const String&) const;
  3853. bool GetInterceptNetworkUpdate(const String&) const;
  3854. CustomGeometryVertex GetVertex(uint, uint);
  3855. bool HasSubscribedToEvent(Object, const String&);
  3856. bool HasSubscribedToEvent(const String&);
  3857. bool IsInView(Camera) const;
  3858. bool Load(File, bool = false);
  3859. bool Load(VectorBuffer&, bool = false);
  3860. bool LoadJSON(const JSONValue&, bool = false);
  3861. bool LoadXML(const XMLElement&, bool = false);
  3862. void MarkNetworkUpdate() const;
  3863. void Remove();
  3864. void RemoveAttributeAnimation(const String&);
  3865. void RemoveInstanceDefault();
  3866. void RemoveObjectAnimation();
  3867. void ResetToDefault();
  3868. bool Save(File) const;
  3869. bool Save(VectorBuffer&) const;
  3870. bool SaveJSON(JSONValue&) const;
  3871. bool SaveXML(XMLElement&) const;
  3872. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3873. void SetAnimationTime(float);
  3874. bool SetAttribute(const String&, const Variant&);
  3875. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  3876. void SetAttributeAnimationSpeed(const String&, float);
  3877. void SetAttributeAnimationTime(const String&, float);
  3878. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  3879. void SetInterceptNetworkUpdate(const String&, bool);
  3880. // Properties:
  3881. bool animationEnabled;
  3882. /* readonly */
  3883. Array<Variant> attributeDefaults;
  3884. /* readonly */
  3885. Array<AttributeInfo> attributeInfos;
  3886. Array<Variant> attributes;
  3887. /* readonly */
  3888. BoundingBox boundingBox;
  3889. bool castShadows;
  3890. /* readonly */
  3891. String category;
  3892. float drawDistance;
  3893. bool dynamic;
  3894. bool enabled;
  3895. /* readonly */
  3896. bool enabledEffective;
  3897. /* readonly */
  3898. uint id;
  3899. /* readonly */
  3900. bool inView;
  3901. uint lightMask;
  3902. float lodBias;
  3903. /* writeonly */
  3904. Material material;
  3905. Array<Material> materials;
  3906. uint maxLights;
  3907. /* readonly */
  3908. Node node;
  3909. /* readonly */
  3910. uint numAttributes;
  3911. uint numGeometries;
  3912. /* readonly */
  3913. Array<uint> numVertices;
  3914. ObjectAnimation objectAnimation;
  3915. bool occludee;
  3916. bool occluder;
  3917. /* readonly */
  3918. int refs;
  3919. float shadowDistance;
  3920. uint shadowMask;
  3921. bool temporary;
  3922. /* readonly */
  3923. StringHash type;
  3924. /* readonly */
  3925. String typeName;
  3926. uint viewMask;
  3927. /* readonly */
  3928. int weakRefs;
  3929. /* readonly */
  3930. BoundingBox worldBoundingBox;
  3931. /* readonly */
  3932. Zone zone;
  3933. uint zoneMask;
  3934. };
  3935. class CustomGeometryVertex
  3936. {
  3937. public:
  3938. // Properties:
  3939. uint color;
  3940. Vector3 normal;
  3941. Vector3 position;
  3942. Vector4 tangent;
  3943. Vector2 texCoord;
  3944. };
  3945. class Database
  3946. {
  3947. public:
  3948. // Methods:
  3949. DbConnection Connect(const String&);
  3950. void Disconnect(DbConnection);
  3951. bool HasSubscribedToEvent(Object, const String&);
  3952. bool HasSubscribedToEvent(const String&);
  3953. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3954. // Properties:
  3955. /* readonly */
  3956. String category;
  3957. uint poolSize;
  3958. /* readonly */
  3959. bool pooling;
  3960. /* readonly */
  3961. int refs;
  3962. /* readonly */
  3963. StringHash type;
  3964. /* readonly */
  3965. String typeName;
  3966. /* readonly */
  3967. int weakRefs;
  3968. };
  3969. class DbConnection
  3970. {
  3971. public:
  3972. // Methods:
  3973. DbResult Execute(const String&, bool = false);
  3974. bool HasSubscribedToEvent(Object, const String&);
  3975. bool HasSubscribedToEvent(const String&);
  3976. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  3977. // Properties:
  3978. /* readonly */
  3979. String category;
  3980. /* readonly */
  3981. bool connected;
  3982. /* readonly */
  3983. String connectionString;
  3984. /* readonly */
  3985. int refs;
  3986. /* readonly */
  3987. StringHash type;
  3988. /* readonly */
  3989. String typeName;
  3990. /* readonly */
  3991. int weakRefs;
  3992. };
  3993. class DbResult
  3994. {
  3995. public:
  3996. ~DbResult();
  3997. DbResult();
  3998. DbResult(const DbResult&in);
  3999. // Properties:
  4000. /* readonly */
  4001. Array<String> columns;
  4002. /* readonly */
  4003. int64 numAffectedRows;
  4004. /* readonly */
  4005. uint numColumns;
  4006. /* readonly */
  4007. uint numRows;
  4008. /* readonly */
  4009. Array<Array<Variant>> row;
  4010. };
  4011. class DebugHud
  4012. {
  4013. public:
  4014. // Methods:
  4015. void ClearAppStats();
  4016. bool HasSubscribedToEvent(Object, const String&);
  4017. bool HasSubscribedToEvent(const String&);
  4018. void ResetAppStats(const String&);
  4019. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4020. void SetAppStats(const String&, const String&);
  4021. void SetAppStats(const String&, const Variant&);
  4022. void Toggle(uint);
  4023. void ToggleAll();
  4024. void Update();
  4025. // Properties:
  4026. /* readonly */
  4027. String category;
  4028. XMLFile defaultStyle;
  4029. /* readonly */
  4030. Text memoryText;
  4031. uint mode;
  4032. /* readonly */
  4033. Text modeText;
  4034. float profilerInterval;
  4035. uint profilerMaxDepth;
  4036. /* readonly */
  4037. Text profilerText;
  4038. /* readonly */
  4039. int refs;
  4040. /* readonly */
  4041. Text statsText;
  4042. /* readonly */
  4043. StringHash type;
  4044. /* readonly */
  4045. String typeName;
  4046. bool useRendererStats;
  4047. /* readonly */
  4048. int weakRefs;
  4049. };
  4050. class DebugRenderer
  4051. {
  4052. public:
  4053. // Methods:
  4054. void AddBoundingBox(const BoundingBox&, const Color&, bool = true, bool = false);
  4055. void AddCircle(const Vector3&, const Vector3&, float, const Color&, int = 64, bool = true);
  4056. void AddCross(const Vector3&, float, const Color&, bool = true);
  4057. void AddFrustum(const Frustum&, const Color&, bool = true);
  4058. void AddLine(const Vector3&, const Vector3&, const Color&, bool = true);
  4059. void AddNode(Node, float = 1.0, bool = true);
  4060. void AddPolygon(const Vector3&, const Vector3&, const Vector3&, const Vector3&, const Color&, bool = true);
  4061. void AddPolyhedron(const Polyhedron&, const Color&, bool = true);
  4062. void AddQuad(const Vector3&, float, float, const Color&, bool = true);
  4063. void AddSkeleton(Skeleton, const Color&, bool = true);
  4064. void AddSphere(const Sphere&, const Color&, bool = true);
  4065. void AddTriangle(const Vector3&, const Vector3&, const Vector3&, const Color&, bool = true);
  4066. void ApplyAttributes();
  4067. void DrawDebugGeometry(DebugRenderer, bool);
  4068. Variant GetAttribute(const String&) const;
  4069. ValueAnimation GetAttributeAnimation(const String&) const;
  4070. float GetAttributeAnimationSpeed(const String&) const;
  4071. float GetAttributeAnimationTime(const String&) const;
  4072. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4073. Variant GetAttributeDefault(const String&) const;
  4074. bool GetInterceptNetworkUpdate(const String&) const;
  4075. bool HasSubscribedToEvent(Object, const String&);
  4076. bool HasSubscribedToEvent(const String&);
  4077. bool Load(File, bool = false);
  4078. bool Load(VectorBuffer&, bool = false);
  4079. bool LoadJSON(const JSONValue&, bool = false);
  4080. bool LoadXML(const XMLElement&, bool = false);
  4081. void MarkNetworkUpdate() const;
  4082. void Remove();
  4083. void RemoveAttributeAnimation(const String&);
  4084. void RemoveInstanceDefault();
  4085. void RemoveObjectAnimation();
  4086. void ResetToDefault();
  4087. bool Save(File) const;
  4088. bool Save(VectorBuffer&) const;
  4089. bool SaveJSON(JSONValue&) const;
  4090. bool SaveXML(XMLElement&) const;
  4091. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4092. void SetAnimationTime(float);
  4093. bool SetAttribute(const String&, const Variant&);
  4094. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4095. void SetAttributeAnimationSpeed(const String&, float);
  4096. void SetAttributeAnimationTime(const String&, float);
  4097. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4098. void SetInterceptNetworkUpdate(const String&, bool);
  4099. // Properties:
  4100. bool animationEnabled;
  4101. /* readonly */
  4102. Array<Variant> attributeDefaults;
  4103. /* readonly */
  4104. Array<AttributeInfo> attributeInfos;
  4105. Array<Variant> attributes;
  4106. /* readonly */
  4107. String category;
  4108. bool enabled;
  4109. /* readonly */
  4110. bool enabledEffective;
  4111. /* readonly */
  4112. uint id;
  4113. bool lineAntiAlias;
  4114. /* readonly */
  4115. Node node;
  4116. /* readonly */
  4117. uint numAttributes;
  4118. ObjectAnimation objectAnimation;
  4119. /* readonly */
  4120. int refs;
  4121. bool temporary;
  4122. /* readonly */
  4123. StringHash type;
  4124. /* readonly */
  4125. String typeName;
  4126. /* readonly */
  4127. int weakRefs;
  4128. };
  4129. class DecalSet
  4130. {
  4131. public:
  4132. // Methods:
  4133. bool AddDecal(Drawable, const Vector3&, const Quaternion&, float, float, float, const Vector2&, const Vector2&, float = 0.0, float = 0.1, uint = 0xffffffff);
  4134. void ApplyAttributes();
  4135. void DrawDebugGeometry(DebugRenderer, bool);
  4136. Variant GetAttribute(const String&) const;
  4137. ValueAnimation GetAttributeAnimation(const String&) const;
  4138. float GetAttributeAnimationSpeed(const String&) const;
  4139. float GetAttributeAnimationTime(const String&) const;
  4140. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4141. Variant GetAttributeDefault(const String&) const;
  4142. bool GetInterceptNetworkUpdate(const String&) const;
  4143. bool HasSubscribedToEvent(Object, const String&);
  4144. bool HasSubscribedToEvent(const String&);
  4145. bool IsInView(Camera) const;
  4146. bool Load(File, bool = false);
  4147. bool Load(VectorBuffer&, bool = false);
  4148. bool LoadJSON(const JSONValue&, bool = false);
  4149. bool LoadXML(const XMLElement&, bool = false);
  4150. void MarkNetworkUpdate() const;
  4151. void Remove();
  4152. void RemoveAllDecals();
  4153. void RemoveAttributeAnimation(const String&);
  4154. void RemoveDecals(uint);
  4155. void RemoveInstanceDefault();
  4156. void RemoveObjectAnimation();
  4157. void ResetToDefault();
  4158. bool Save(File) const;
  4159. bool Save(VectorBuffer&) const;
  4160. bool SaveJSON(JSONValue&) const;
  4161. bool SaveXML(XMLElement&) const;
  4162. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4163. void SetAnimationTime(float);
  4164. bool SetAttribute(const String&, const Variant&);
  4165. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4166. void SetAttributeAnimationSpeed(const String&, float);
  4167. void SetAttributeAnimationTime(const String&, float);
  4168. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4169. void SetInterceptNetworkUpdate(const String&, bool);
  4170. // Properties:
  4171. bool animationEnabled;
  4172. /* readonly */
  4173. Array<Variant> attributeDefaults;
  4174. /* readonly */
  4175. Array<AttributeInfo> attributeInfos;
  4176. Array<Variant> attributes;
  4177. /* readonly */
  4178. BoundingBox boundingBox;
  4179. bool castShadows;
  4180. /* readonly */
  4181. String category;
  4182. float drawDistance;
  4183. bool enabled;
  4184. /* readonly */
  4185. bool enabledEffective;
  4186. /* readonly */
  4187. uint id;
  4188. /* readonly */
  4189. bool inView;
  4190. uint lightMask;
  4191. float lodBias;
  4192. Material material;
  4193. uint maxIndices;
  4194. uint maxLights;
  4195. uint maxVertices;
  4196. /* readonly */
  4197. Node node;
  4198. /* readonly */
  4199. uint numAttributes;
  4200. /* readonly */
  4201. uint numDecals;
  4202. /* readonly */
  4203. uint numIndices;
  4204. /* readonly */
  4205. uint numVertices;
  4206. ObjectAnimation objectAnimation;
  4207. bool occludee;
  4208. bool occluder;
  4209. bool optimizeBufferSize;
  4210. /* readonly */
  4211. int refs;
  4212. float shadowDistance;
  4213. uint shadowMask;
  4214. bool temporary;
  4215. /* readonly */
  4216. StringHash type;
  4217. /* readonly */
  4218. String typeName;
  4219. uint viewMask;
  4220. /* readonly */
  4221. int weakRefs;
  4222. /* readonly */
  4223. BoundingBox worldBoundingBox;
  4224. /* readonly */
  4225. Zone zone;
  4226. uint zoneMask;
  4227. };
  4228. class Deserializer
  4229. {
  4230. public:
  4231. // Methods:
  4232. Array<uint8> Read(uint);
  4233. bool ReadBool();
  4234. BoundingBox ReadBoundingBox();
  4235. int8 ReadByte();
  4236. Color ReadColor();
  4237. double ReadDouble();
  4238. String ReadFileID();
  4239. float ReadFloat();
  4240. int ReadInt();
  4241. int64 ReadInt64();
  4242. IntRect ReadIntRect();
  4243. IntVector2 ReadIntVector2();
  4244. String ReadLine();
  4245. Matrix3 ReadMatrix3();
  4246. Matrix3x4 ReadMatrix3x4();
  4247. Matrix4 ReadMatrix4();
  4248. uint ReadNetID();
  4249. Quaternion ReadPackedQuaternion();
  4250. Vector3 ReadPackedVector3(float);
  4251. Quaternion ReadQuaternion();
  4252. int16 ReadShort();
  4253. String ReadString();
  4254. StringHash ReadStringHash();
  4255. uint8 ReadUByte();
  4256. uint ReadUInt();
  4257. uint64 ReadUInt64();
  4258. uint16 ReadUShort();
  4259. uint ReadVLE();
  4260. Variant ReadVariant();
  4261. VariantMap ReadVariantMap();
  4262. Vector2 ReadVector2();
  4263. Vector3 ReadVector3();
  4264. Vector4 ReadVector4();
  4265. VectorBuffer ReadVectorBuffer(uint);
  4266. uint Seek(uint);
  4267. // Properties:
  4268. /* readonly */
  4269. uint checksum;
  4270. /* readonly */
  4271. bool eof;
  4272. /* readonly */
  4273. String name;
  4274. /* readonly */
  4275. uint position;
  4276. /* readonly */
  4277. uint size;
  4278. };
  4279. class Dictionary
  4280. {
  4281. public:
  4282. Dictionary();
  4283. // Methods:
  4284. void Clear();
  4285. void Erase(const String&);
  4286. bool Exists(const String&) const;
  4287. bool Get(const String&, void*) const;
  4288. bool Get(const String&, double&) const;
  4289. bool Get(const String&, int64&) const;
  4290. void Set(const String&, const void*);
  4291. void Set(const String&, const double&);
  4292. void Set(const String&, const int64&);
  4293. // Properties:
  4294. /* readonly */
  4295. bool empty;
  4296. /* readonly */
  4297. Array<String> keys;
  4298. /* readonly */
  4299. uint length;
  4300. };
  4301. class DictionaryValue
  4302. {
  4303. public:
  4304. ~DictionaryValue();
  4305. DictionaryValue();
  4306. };
  4307. class Drawable
  4308. {
  4309. public:
  4310. // Methods:
  4311. void ApplyAttributes();
  4312. void DrawDebugGeometry(DebugRenderer, bool);
  4313. Variant GetAttribute(const String&) const;
  4314. ValueAnimation GetAttributeAnimation(const String&) const;
  4315. float GetAttributeAnimationSpeed(const String&) const;
  4316. float GetAttributeAnimationTime(const String&) const;
  4317. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4318. Variant GetAttributeDefault(const String&) const;
  4319. bool GetInterceptNetworkUpdate(const String&) const;
  4320. bool HasSubscribedToEvent(Object, const String&);
  4321. bool HasSubscribedToEvent(const String&);
  4322. bool IsInView(Camera) const;
  4323. bool Load(File, bool = false);
  4324. bool Load(VectorBuffer&, bool = false);
  4325. bool LoadJSON(const JSONValue&, bool = false);
  4326. bool LoadXML(const XMLElement&, bool = false);
  4327. void MarkNetworkUpdate() const;
  4328. void Remove();
  4329. void RemoveAttributeAnimation(const String&);
  4330. void RemoveInstanceDefault();
  4331. void RemoveObjectAnimation();
  4332. void ResetToDefault();
  4333. bool Save(File) const;
  4334. bool Save(VectorBuffer&) const;
  4335. bool SaveJSON(JSONValue&) const;
  4336. bool SaveXML(XMLElement&) const;
  4337. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4338. void SetAnimationTime(float);
  4339. bool SetAttribute(const String&, const Variant&);
  4340. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4341. void SetAttributeAnimationSpeed(const String&, float);
  4342. void SetAttributeAnimationTime(const String&, float);
  4343. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4344. void SetInterceptNetworkUpdate(const String&, bool);
  4345. // Properties:
  4346. bool animationEnabled;
  4347. /* readonly */
  4348. Array<Variant> attributeDefaults;
  4349. /* readonly */
  4350. Array<AttributeInfo> attributeInfos;
  4351. Array<Variant> attributes;
  4352. /* readonly */
  4353. BoundingBox boundingBox;
  4354. bool castShadows;
  4355. /* readonly */
  4356. String category;
  4357. float drawDistance;
  4358. bool enabled;
  4359. /* readonly */
  4360. bool enabledEffective;
  4361. /* readonly */
  4362. uint id;
  4363. /* readonly */
  4364. bool inView;
  4365. uint lightMask;
  4366. float lodBias;
  4367. uint maxLights;
  4368. /* readonly */
  4369. Node node;
  4370. /* readonly */
  4371. uint numAttributes;
  4372. ObjectAnimation objectAnimation;
  4373. bool occludee;
  4374. bool occluder;
  4375. /* readonly */
  4376. int refs;
  4377. float shadowDistance;
  4378. uint shadowMask;
  4379. bool temporary;
  4380. /* readonly */
  4381. StringHash type;
  4382. /* readonly */
  4383. String typeName;
  4384. uint viewMask;
  4385. /* readonly */
  4386. int weakRefs;
  4387. /* readonly */
  4388. BoundingBox worldBoundingBox;
  4389. uint zoneMask;
  4390. };
  4391. class Drawable2D
  4392. {
  4393. public:
  4394. // Methods:
  4395. void ApplyAttributes();
  4396. void DrawDebugGeometry(DebugRenderer, bool);
  4397. Variant GetAttribute(const String&) const;
  4398. ValueAnimation GetAttributeAnimation(const String&) const;
  4399. float GetAttributeAnimationSpeed(const String&) const;
  4400. float GetAttributeAnimationTime(const String&) const;
  4401. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4402. Variant GetAttributeDefault(const String&) const;
  4403. bool GetInterceptNetworkUpdate(const String&) const;
  4404. bool HasSubscribedToEvent(Object, const String&);
  4405. bool HasSubscribedToEvent(const String&);
  4406. bool IsInView(Camera) const;
  4407. bool Load(File, bool = false);
  4408. bool Load(VectorBuffer&, bool = false);
  4409. bool LoadJSON(const JSONValue&, bool = false);
  4410. bool LoadXML(const XMLElement&, bool = false);
  4411. void MarkNetworkUpdate() const;
  4412. void Remove();
  4413. void RemoveAttributeAnimation(const String&);
  4414. void RemoveInstanceDefault();
  4415. void RemoveObjectAnimation();
  4416. void ResetToDefault();
  4417. bool Save(File) const;
  4418. bool Save(VectorBuffer&) const;
  4419. bool SaveJSON(JSONValue&) const;
  4420. bool SaveXML(XMLElement&) const;
  4421. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4422. void SetAnimationTime(float);
  4423. bool SetAttribute(const String&, const Variant&);
  4424. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4425. void SetAttributeAnimationSpeed(const String&, float);
  4426. void SetAttributeAnimationTime(const String&, float);
  4427. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4428. void SetInterceptNetworkUpdate(const String&, bool);
  4429. // Properties:
  4430. bool animationEnabled;
  4431. /* readonly */
  4432. Array<Variant> attributeDefaults;
  4433. /* readonly */
  4434. Array<AttributeInfo> attributeInfos;
  4435. Array<Variant> attributes;
  4436. /* readonly */
  4437. BoundingBox boundingBox;
  4438. bool castShadows;
  4439. /* readonly */
  4440. String category;
  4441. float drawDistance;
  4442. bool enabled;
  4443. /* readonly */
  4444. bool enabledEffective;
  4445. /* readonly */
  4446. uint id;
  4447. /* readonly */
  4448. bool inView;
  4449. int layer;
  4450. uint lightMask;
  4451. float lodBias;
  4452. uint maxLights;
  4453. /* readonly */
  4454. Node node;
  4455. /* readonly */
  4456. uint numAttributes;
  4457. ObjectAnimation objectAnimation;
  4458. bool occludee;
  4459. bool occluder;
  4460. int orderInLayer;
  4461. /* readonly */
  4462. int refs;
  4463. float shadowDistance;
  4464. uint shadowMask;
  4465. bool temporary;
  4466. /* readonly */
  4467. StringHash type;
  4468. /* readonly */
  4469. String typeName;
  4470. uint viewMask;
  4471. /* readonly */
  4472. int weakRefs;
  4473. /* readonly */
  4474. BoundingBox worldBoundingBox;
  4475. uint zoneMask;
  4476. };
  4477. class DropDownList
  4478. {
  4479. public:
  4480. DropDownList();
  4481. DropDownList(const String&in);
  4482. // Methods:
  4483. void AddChild(UIElement);
  4484. void AddItem(UIElement);
  4485. void AddTag(const String&);
  4486. void AddTags(const String&, int8 = ';');
  4487. void ApplyAttributes();
  4488. void BringToFront();
  4489. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  4490. void DisableLayoutUpdate();
  4491. IntVector2 ElementToScreen(const IntVector2&);
  4492. void EnableLayoutUpdate();
  4493. uint FindChild(UIElement) const;
  4494. Variant GetAttribute(const String&) const;
  4495. ValueAnimation GetAttributeAnimation(const String&) const;
  4496. float GetAttributeAnimationSpeed(const String&) const;
  4497. float GetAttributeAnimationTime(const String&) const;
  4498. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4499. Variant GetAttributeDefault(const String&) const;
  4500. UIElement GetChild(const String&, bool = false) const;
  4501. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  4502. Array<UIElement> GetChildren(bool = false) const;
  4503. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  4504. UIElement GetElementEventSender() const;
  4505. bool GetInterceptNetworkUpdate(const String&) const;
  4506. Array<UIElement> GetItems() const;
  4507. uint GetNumChildren(bool) const;
  4508. bool HasSubscribedToEvent(Object, const String&);
  4509. bool HasSubscribedToEvent(const String&);
  4510. bool HasTag(const String&) const;
  4511. void InsertChild(uint, UIElement);
  4512. void InsertItem(uint, UIElement);
  4513. bool IsInside(IntVector2, bool);
  4514. bool IsInsideCombined(IntVector2, bool);
  4515. bool Load(File, bool = false);
  4516. bool Load(VectorBuffer&, bool = false);
  4517. UIElement LoadChildXML(XMLFile, XMLFile = null);
  4518. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  4519. bool LoadJSON(const JSONValue&, bool = false);
  4520. bool LoadXML(File);
  4521. bool LoadXML(VectorBuffer&);
  4522. bool LoadXML(XMLFile, XMLFile);
  4523. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  4524. bool LoadXML(const XMLElement&, bool = false);
  4525. void MarkNetworkUpdate() const;
  4526. void Remove();
  4527. void RemoveAllChildren();
  4528. void RemoveAllItems();
  4529. void RemoveAllTags();
  4530. void RemoveAttributeAnimation(const String&);
  4531. void RemoveChild(UIElement, uint = 0);
  4532. void RemoveChild(uint);
  4533. void RemoveInstanceDefault();
  4534. void RemoveItem(UIElement);
  4535. void RemoveItem(uint);
  4536. void RemoveObjectAnimation();
  4537. bool RemoveTag(const String&);
  4538. void ResetDeepEnabled();
  4539. void ResetToDefault();
  4540. bool Save(File) const;
  4541. bool Save(VectorBuffer&) const;
  4542. bool SaveJSON(JSONValue&) const;
  4543. bool SaveXML(File, const String& = "\t");
  4544. bool SaveXML(VectorBuffer&, const String& = "\t");
  4545. bool SaveXML(XMLElement&) const;
  4546. IntVector2 ScreenToElement(const IntVector2&);
  4547. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4548. void SetAccelerator(int, int);
  4549. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  4550. void SetAnimationTime(float);
  4551. bool SetAttribute(const String&, const Variant&);
  4552. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4553. void SetAttributeAnimationSpeed(const String&, float);
  4554. void SetAttributeAnimationTime(const String&, float);
  4555. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4556. void SetDeepEnabled(bool);
  4557. void SetEnabledRecursive(bool);
  4558. void SetFixedHeight(int);
  4559. void SetFixedSize(int, int);
  4560. void SetFixedWidth(int);
  4561. void SetFullImageRect();
  4562. void SetHoverOffset(int, int);
  4563. void SetInterceptNetworkUpdate(const String&, bool);
  4564. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  4565. void SetMaxAnchor(float, float);
  4566. void SetMaxSize(int, int);
  4567. void SetMinAnchor(float, float);
  4568. void SetMinSize(int, int);
  4569. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  4570. void SetPivot(float, float);
  4571. void SetPosition(int, int);
  4572. void SetPressedChildOffset(int, int);
  4573. void SetPressedOffset(int, int);
  4574. void SetRepeat(float, float);
  4575. void SetSize(int, int);
  4576. bool SetStyle(const String&, XMLFile = null);
  4577. bool SetStyle(const XMLElement&);
  4578. bool SetStyleAuto(XMLFile = null);
  4579. void UpdateLayout();
  4580. const Variant& GetVar(const StringHash&);
  4581. UIElement getPopup() const;
  4582. // Properties:
  4583. /* readonly */
  4584. int acceleratorKey;
  4585. /* readonly */
  4586. int acceleratorQualifiers;
  4587. bool animationEnabled;
  4588. /* readonly */
  4589. Array<Variant> attributeDefaults;
  4590. /* readonly */
  4591. Array<AttributeInfo> attributeInfos;
  4592. Array<Variant> attributes;
  4593. BlendMode blendMode;
  4594. IntRect border;
  4595. bool bringToBack;
  4596. bool bringToFront;
  4597. /* readonly */
  4598. String category;
  4599. /* readonly */
  4600. IntVector2 childOffset;
  4601. /* readonly */
  4602. Array<UIElement> children;
  4603. IntRect clipBorder;
  4604. bool clipChildren;
  4605. /* writeonly */
  4606. Color color;
  4607. /* readonly */
  4608. bool colorGradient;
  4609. Array<Color> colors;
  4610. /* readonly */
  4611. IntRect combinedScreenRect;
  4612. XMLFile defaultStyle;
  4613. /* readonly */
  4614. float derivedOpacity;
  4615. /* readonly */
  4616. uint dragButtonCombo;
  4617. /* readonly */
  4618. int dragButtonCount;
  4619. uint dragDropMode;
  4620. bool editable;
  4621. bool elementEventSender;
  4622. bool enableAnchor;
  4623. bool enabled;
  4624. /* readonly */
  4625. bool enabledSelf;
  4626. /* readonly */
  4627. bool fixedHeight;
  4628. /* readonly */
  4629. bool fixedSize;
  4630. /* readonly */
  4631. bool fixedWidth;
  4632. bool focus;
  4633. FocusMode focusMode;
  4634. int height;
  4635. HorizontalAlignment horizontalAlignment;
  4636. IntVector2 hoverOffset;
  4637. /* readonly */
  4638. bool hovering;
  4639. IntRect imageBorder;
  4640. IntRect imageRect;
  4641. int indent;
  4642. int indentSpacing;
  4643. /* readonly */
  4644. int indentWidth;
  4645. bool internal;
  4646. /* readonly */
  4647. Array<UIElement> items;
  4648. IntRect layoutBorder;
  4649. Vector2 layoutFlexScale;
  4650. LayoutMode layoutMode;
  4651. int layoutSpacing;
  4652. /* readonly */
  4653. ListView listView;
  4654. Vector2 maxAnchor;
  4655. int maxHeight;
  4656. IntVector2 maxOffset;
  4657. IntVector2 maxSize;
  4658. int maxWidth;
  4659. Vector2 minAnchor;
  4660. int minHeight;
  4661. IntVector2 minOffset;
  4662. IntVector2 minSize;
  4663. int minWidth;
  4664. String name;
  4665. /* readonly */
  4666. uint numAllChildren;
  4667. /* readonly */
  4668. uint numAttributes;
  4669. /* readonly */
  4670. uint numChildren;
  4671. /* readonly */
  4672. uint numItems;
  4673. ObjectAnimation objectAnimation;
  4674. float opacity;
  4675. UIElement parent;
  4676. Vector2 pivot;
  4677. /* readonly */
  4678. UIElement placeholder;
  4679. String placeholderText;
  4680. IntVector2 position;
  4681. /* readonly */
  4682. bool pressed;
  4683. IntVector2 pressedChildOffset;
  4684. IntVector2 pressedOffset;
  4685. int priority;
  4686. /* readonly */
  4687. int refs;
  4688. float repeatDelay;
  4689. float repeatRate;
  4690. bool resizePopup;
  4691. /* readonly */
  4692. UIElement root;
  4693. /* readonly */
  4694. IntVector2 screenPosition;
  4695. bool selected;
  4696. /* readonly */
  4697. UIElement selectedItem;
  4698. uint selection;
  4699. bool showPopup;
  4700. IntVector2 size;
  4701. bool sortChildren;
  4702. String style;
  4703. /* readonly */
  4704. Array<String> tags;
  4705. bool temporary;
  4706. Texture texture;
  4707. bool tiled;
  4708. TraversalMode traversalMode;
  4709. /* readonly */
  4710. StringHash type;
  4711. /* readonly */
  4712. String typeName;
  4713. bool useDerivedOpacity;
  4714. /* readonly */
  4715. VariantMap vars;
  4716. VerticalAlignment verticalAlignment;
  4717. bool visible;
  4718. /* readonly */
  4719. bool visibleEffective;
  4720. /* readonly */
  4721. int weakRefs;
  4722. int width;
  4723. };
  4724. class DynamicNavigationMesh
  4725. {
  4726. public:
  4727. // Methods:
  4728. void ApplyAttributes();
  4729. bool Build();
  4730. bool Build(const BoundingBox&);
  4731. void DrawDebugGeometry(DebugRenderer, bool);
  4732. void DrawDebugGeometry(bool);
  4733. Vector3 FindNearestPoint(const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  4734. Array<Vector3> FindPath(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  4735. float GetAreaCost(uint) const;
  4736. Variant GetAttribute(const String&) const;
  4737. ValueAnimation GetAttributeAnimation(const String&) const;
  4738. float GetAttributeAnimationSpeed(const String&) const;
  4739. float GetAttributeAnimationTime(const String&) const;
  4740. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  4741. Variant GetAttributeDefault(const String&) const;
  4742. float GetDistanceToWall(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  4743. bool GetInterceptNetworkUpdate(const String&) const;
  4744. Vector3 GetRandomPoint();
  4745. Vector3 GetRandomPointInCircle(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  4746. bool HasSubscribedToEvent(Object, const String&);
  4747. bool HasSubscribedToEvent(const String&);
  4748. bool Load(File, bool = false);
  4749. bool Load(VectorBuffer&, bool = false);
  4750. bool LoadJSON(const JSONValue&, bool = false);
  4751. bool LoadXML(const XMLElement&, bool = false);
  4752. void MarkNetworkUpdate() const;
  4753. Vector3 MoveAlongSurface(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ), int = 3);
  4754. Vector3 Raycast(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  4755. void Remove();
  4756. void RemoveAttributeAnimation(const String&);
  4757. void RemoveInstanceDefault();
  4758. void RemoveObjectAnimation();
  4759. void ResetToDefault();
  4760. bool Save(File) const;
  4761. bool Save(VectorBuffer&) const;
  4762. bool SaveJSON(JSONValue&) const;
  4763. bool SaveXML(XMLElement&) const;
  4764. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4765. void SetAnimationTime(float);
  4766. void SetAreaCost(uint, float);
  4767. bool SetAttribute(const String&, const Variant&);
  4768. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  4769. void SetAttributeAnimationSpeed(const String&, float);
  4770. void SetAttributeAnimationTime(const String&, float);
  4771. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  4772. void SetInterceptNetworkUpdate(const String&, bool);
  4773. // Properties:
  4774. float agentHeight;
  4775. float agentMaxClimb;
  4776. float agentMaxSlope;
  4777. float agentRadius;
  4778. bool animationEnabled;
  4779. /* readonly */
  4780. Array<Variant> attributeDefaults;
  4781. /* readonly */
  4782. Array<AttributeInfo> attributeInfos;
  4783. Array<Variant> attributes;
  4784. /* readonly */
  4785. BoundingBox boundingBox;
  4786. /* readonly */
  4787. String category;
  4788. float cellHeight;
  4789. float cellSize;
  4790. float detailSampleDistance;
  4791. float detailSampleMaxError;
  4792. bool drawNavAreas;
  4793. bool drawObstacles;
  4794. bool drawOffMeshConnections;
  4795. float edgeMaxError;
  4796. float edgeMaxLength;
  4797. bool enabled;
  4798. /* readonly */
  4799. bool enabledEffective;
  4800. /* readonly */
  4801. uint id;
  4802. /* readonly */
  4803. bool initialized;
  4804. bool maxLayers;
  4805. uint maxObstacles;
  4806. /* readonly */
  4807. Node node;
  4808. /* readonly */
  4809. uint numAttributes;
  4810. /* readonly */
  4811. IntVector2 numTiles;
  4812. ObjectAnimation objectAnimation;
  4813. Vector3 padding;
  4814. NavmeshPartitionType partitionType;
  4815. /* readonly */
  4816. int refs;
  4817. float regionMergeSize;
  4818. float regionMinSize;
  4819. bool temporary;
  4820. int tileSize;
  4821. /* readonly */
  4822. StringHash type;
  4823. /* readonly */
  4824. String typeName;
  4825. /* readonly */
  4826. int weakRefs;
  4827. /* readonly */
  4828. BoundingBox worldBoundingBox;
  4829. };
  4830. class Engine
  4831. {
  4832. public:
  4833. // Methods:
  4834. Console CreateConsole();
  4835. DebugHud CreateDebugHud();
  4836. void DumpMemory();
  4837. void DumpProfiler();
  4838. void DumpResources(bool = false);
  4839. void Exit();
  4840. bool HasSubscribedToEvent(Object, const String&);
  4841. bool HasSubscribedToEvent(const String&);
  4842. void RunFrame();
  4843. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4844. // Properties:
  4845. bool autoExit;
  4846. /* readonly */
  4847. String category;
  4848. /* readonly */
  4849. bool exiting;
  4850. /* readonly */
  4851. bool headless;
  4852. /* readonly */
  4853. bool initialized;
  4854. int maxFps;
  4855. int maxInactiveFps;
  4856. int minFps;
  4857. bool pauseMinimized;
  4858. /* readonly */
  4859. int refs;
  4860. int timeStepSmoothing;
  4861. /* readonly */
  4862. StringHash type;
  4863. /* readonly */
  4864. String typeName;
  4865. /* readonly */
  4866. int weakRefs;
  4867. };
  4868. class File
  4869. {
  4870. public:
  4871. File();
  4872. File(const String&in, FileMode mode = FILE_READ);
  4873. // Methods:
  4874. void Close();
  4875. bool HasSubscribedToEvent(Object, const String&);
  4876. bool HasSubscribedToEvent(const String&);
  4877. bool Open(const String&, FileMode = FILE_READ);
  4878. Array<uint8> Read(uint);
  4879. bool ReadBool();
  4880. BoundingBox ReadBoundingBox();
  4881. int8 ReadByte();
  4882. Color ReadColor();
  4883. double ReadDouble();
  4884. String ReadFileID();
  4885. float ReadFloat();
  4886. int ReadInt();
  4887. int64 ReadInt64();
  4888. IntRect ReadIntRect();
  4889. IntVector2 ReadIntVector2();
  4890. String ReadLine();
  4891. Matrix3 ReadMatrix3();
  4892. Matrix3x4 ReadMatrix3x4();
  4893. Matrix4 ReadMatrix4();
  4894. uint ReadNetID();
  4895. Quaternion ReadPackedQuaternion();
  4896. Vector3 ReadPackedVector3(float);
  4897. Quaternion ReadQuaternion();
  4898. int16 ReadShort();
  4899. String ReadString();
  4900. StringHash ReadStringHash();
  4901. uint8 ReadUByte();
  4902. uint ReadUInt();
  4903. uint64 ReadUInt64();
  4904. uint16 ReadUShort();
  4905. uint ReadVLE();
  4906. Variant ReadVariant();
  4907. VariantMap ReadVariantMap();
  4908. Vector2 ReadVector2();
  4909. Vector3 ReadVector3();
  4910. Vector4 ReadVector4();
  4911. VectorBuffer ReadVectorBuffer(uint);
  4912. uint Seek(uint);
  4913. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4914. uint Write(Array<uint8>);
  4915. bool WriteBool(bool);
  4916. bool WriteBoundingBox(const BoundingBox&);
  4917. bool WriteByte(int8);
  4918. bool WriteColor(const Color&);
  4919. bool WriteDouble(double);
  4920. bool WriteFileID(const String&);
  4921. bool WriteFloat(float);
  4922. bool WriteInt(int);
  4923. bool WriteInt64(int64);
  4924. bool WriteIntRect(const IntRect&);
  4925. bool WriteIntVector2(const IntVector2&);
  4926. bool WriteLine(const String&);
  4927. bool WriteMatrix3(const Matrix3&);
  4928. bool WriteMatrix3x4(const Matrix3x4&);
  4929. bool WriteMatrix4(const Matrix4&);
  4930. bool WriteNetID(uint);
  4931. bool WritePackedQuaternion(const Quaternion&);
  4932. bool WritePackedVector3(const Vector3&, float);
  4933. bool WriteQuaternion(const Quaternion&);
  4934. bool WriteShort(int16);
  4935. bool WriteString(const String&);
  4936. bool WriteStringHash(const StringHash&);
  4937. bool WriteUByte(uint8);
  4938. bool WriteUInt(uint);
  4939. bool WriteUInt64(uint64);
  4940. bool WriteUShort(uint16);
  4941. bool WriteVLE(uint);
  4942. bool WriteVariant(const Variant&);
  4943. bool WriteVariantMap(const VariantMap&);
  4944. bool WriteVector2(const Vector2&);
  4945. bool WriteVector3(const Vector3&);
  4946. bool WriteVector4(const Vector4&);
  4947. bool WriteVectorBuffer(const VectorBuffer&);
  4948. // Properties:
  4949. /* readonly */
  4950. String category;
  4951. /* readonly */
  4952. uint checksum;
  4953. /* readonly */
  4954. bool eof;
  4955. /* readonly */
  4956. FileMode mode;
  4957. /* readonly */
  4958. String name;
  4959. /* readonly */
  4960. bool open;
  4961. /* readonly */
  4962. bool packaged;
  4963. /* readonly */
  4964. uint position;
  4965. /* readonly */
  4966. int refs;
  4967. /* readonly */
  4968. uint size;
  4969. /* readonly */
  4970. StringHash type;
  4971. /* readonly */
  4972. String typeName;
  4973. /* readonly */
  4974. int weakRefs;
  4975. };
  4976. class FileSelector
  4977. {
  4978. public:
  4979. FileSelector();
  4980. // Methods:
  4981. bool HasSubscribedToEvent(Object, const String&);
  4982. bool HasSubscribedToEvent(const String&);
  4983. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  4984. void SetButtonTexts(const String&, const String&);
  4985. void SetFilters(Array<String>, uint);
  4986. void UpdateElements();
  4987. // Properties:
  4988. /* readonly */
  4989. Button cancelButton;
  4990. /* readonly */
  4991. String category;
  4992. XMLFile defaultStyle;
  4993. bool directoryMode;
  4994. /* readonly */
  4995. ListView fileList;
  4996. String fileName;
  4997. /* readonly */
  4998. LineEdit fileNameEdit;
  4999. /* readonly */
  5000. String filter;
  5001. /* readonly */
  5002. uint filterIndex;
  5003. /* readonly */
  5004. DropDownList filterList;
  5005. /* readonly */
  5006. Button okButton;
  5007. String path;
  5008. /* readonly */
  5009. LineEdit pathEdit;
  5010. /* readonly */
  5011. int refs;
  5012. String title;
  5013. /* readonly */
  5014. Text titleText;
  5015. /* readonly */
  5016. StringHash type;
  5017. /* readonly */
  5018. String typeName;
  5019. /* readonly */
  5020. int weakRefs;
  5021. /* readonly */
  5022. Window window;
  5023. };
  5024. class FileSystem
  5025. {
  5026. public:
  5027. // Methods:
  5028. bool Copy(const String&, const String&);
  5029. bool CreateDir(const String&);
  5030. bool Delete(const String&);
  5031. bool DirExists(const String&) const;
  5032. bool FileExists(const String&) const;
  5033. String GetAppPreferencesDir(const String&, const String&) const;
  5034. uint GetLastModifiedTime(const String&) const;
  5035. bool HasSubscribedToEvent(Object, const String&);
  5036. bool HasSubscribedToEvent(const String&);
  5037. bool Rename(const String&, const String&);
  5038. Array<String> ScanDir(const String&, const String&, uint, bool) const;
  5039. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5040. bool SetLastModifiedTime(const String&, uint);
  5041. int SystemCommand(const String&, bool = false);
  5042. uint SystemCommandAsync(const String&);
  5043. bool SystemOpen(const String&, const String&);
  5044. int SystemRun(const String&, Array<String>);
  5045. uint SystemRunAsync(const String&, Array<String>);
  5046. // Properties:
  5047. /* readonly */
  5048. String category;
  5049. String currentDir;
  5050. bool executeConsoleCommands;
  5051. /* readonly */
  5052. String programDir;
  5053. /* readonly */
  5054. int refs;
  5055. /* readonly */
  5056. StringHash type;
  5057. /* readonly */
  5058. String typeName;
  5059. /* readonly */
  5060. String userDocumentsDir;
  5061. /* readonly */
  5062. int weakRefs;
  5063. };
  5064. class FocusParameters
  5065. {
  5066. public:
  5067. FocusParameters();
  5068. FocusParameters(const FocusParameters&in);
  5069. FocusParameters(bool, bool, bool, float, float);
  5070. // Properties:
  5071. bool autoSize;
  5072. bool focus;
  5073. float minView;
  5074. bool nonUniform;
  5075. float quantize;
  5076. };
  5077. class Font
  5078. {
  5079. public:
  5080. Font();
  5081. Font(const String&in);
  5082. // Methods:
  5083. IntVector2 GetTotalGlyphOffset(int) const;
  5084. bool HasSubscribedToEvent(Object, const String&);
  5085. bool HasSubscribedToEvent(const String&);
  5086. bool Load(File);
  5087. bool Load(VectorBuffer&);
  5088. bool Load(const String&);
  5089. bool Save(File) const;
  5090. bool Save(VectorBuffer&) const;
  5091. bool Save(const String&) const;
  5092. bool SaveXML(File, int, bool = false, const String& = "\t");
  5093. bool SaveXML(VectorBuffer&, int, bool = false, const String& = "\t");
  5094. bool SaveXML(const String&, int, bool = false, const String& = "\t");
  5095. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5096. // Properties:
  5097. IntVector2 absoluteGlyphOffset;
  5098. /* readonly */
  5099. String category;
  5100. /* readonly */
  5101. FontType fontType;
  5102. /* readonly */
  5103. uint memoryUse;
  5104. String name;
  5105. /* readonly */
  5106. int refs;
  5107. Vector2 scaledGlyphOffset;
  5108. /* readonly */
  5109. StringHash type;
  5110. /* readonly */
  5111. String typeName;
  5112. /* readonly */
  5113. uint useTimer;
  5114. /* readonly */
  5115. int weakRefs;
  5116. };
  5117. class Frustum
  5118. {
  5119. public:
  5120. ~Frustum();
  5121. Frustum();
  5122. Frustum(const Frustum&in);
  5123. // Methods:
  5124. void Define(const BoundingBox&, const Matrix3x4&);
  5125. void Define(const Matrix4&);
  5126. void Define(const Vector3&, const Vector3&, const Matrix3x4&);
  5127. void Define(float, float, float, float, float, const Matrix3x4&);
  5128. void DefineOrtho(float, float, float, float, float, const Matrix3x4&);
  5129. void DefineSplit(const Matrix4&, float, float);
  5130. float Distance(const Vector3&) const;
  5131. Intersection IsInside(const BoundingBox&);
  5132. Intersection IsInside(const Sphere&);
  5133. Intersection IsInside(const Vector3&);
  5134. Intersection IsInsideFast(const BoundingBox&) const;
  5135. Intersection IsInsideFast(const Sphere&) const;
  5136. void Transform(const Matrix3&);
  5137. void Transform(const Matrix3x4&);
  5138. Frustum Transformed(const Matrix3&) const;
  5139. Frustum Transformed(const Matrix3x4&) const;
  5140. // Properties:
  5141. /* readonly */
  5142. Array<Vector3> vertices;
  5143. };
  5144. class Geometry
  5145. {
  5146. public:
  5147. Geometry();
  5148. // Methods:
  5149. bool HasSubscribedToEvent(Object, const String&);
  5150. bool HasSubscribedToEvent(const String&);
  5151. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5152. bool SetDrawRange(PrimitiveType, uint, uint, bool = true);
  5153. bool SetDrawRange(PrimitiveType, uint, uint, uint, uint, bool = true);
  5154. void SetIndexBuffer(IndexBuffer);
  5155. bool SetVertexBuffer(uint, VertexBuffer);
  5156. // Properties:
  5157. /* readonly */
  5158. String category;
  5159. /* readonly */
  5160. bool empty;
  5161. IndexBuffer indexBuffer;
  5162. /* readonly */
  5163. uint indexCount;
  5164. /* readonly */
  5165. uint indexStart;
  5166. float lodDistance;
  5167. uint numVertexBuffers;
  5168. /* readonly */
  5169. PrimitiveType primitiveType;
  5170. /* readonly */
  5171. int refs;
  5172. /* readonly */
  5173. StringHash type;
  5174. /* readonly */
  5175. String typeName;
  5176. /* readonly */
  5177. Array<VertexBuffer> vertexBuffers;
  5178. /* readonly */
  5179. uint vertexCount;
  5180. /* readonly */
  5181. uint vertexStart;
  5182. /* readonly */
  5183. int weakRefs;
  5184. };
  5185. class Graphics
  5186. {
  5187. public:
  5188. // Methods:
  5189. void BeginDumpShaders(const String&);
  5190. void Close();
  5191. void EndDumpShaders();
  5192. bool HasSubscribedToEvent(Object, const String&);
  5193. bool HasSubscribedToEvent(const String&);
  5194. void Maximize();
  5195. void Minimize();
  5196. void PrecacheShaders(File);
  5197. void PrecacheShaders(VectorBuffer&);
  5198. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5199. bool SetMode(int, int);
  5200. bool SetMode(int, int, bool, bool, bool, bool, bool, bool, int, int, int);
  5201. void SetWindowPosition(int, int);
  5202. bool TakeScreenShot(Image);
  5203. bool ToggleFullscreen();
  5204. // Properties:
  5205. /* readonly */
  5206. String apiName;
  5207. /* readonly */
  5208. bool borderless;
  5209. /* readonly */
  5210. String category;
  5211. /* readonly */
  5212. bool deferredSupport;
  5213. /* readonly */
  5214. Array<IntVector2> desktopResolution;
  5215. /* readonly */
  5216. bool deviceLost;
  5217. bool dither;
  5218. bool flushGPU;
  5219. /* readonly */
  5220. bool fullscreen;
  5221. /* readonly */
  5222. bool hardwareShadowSupport;
  5223. /* readonly */
  5224. int height;
  5225. /* readonly */
  5226. bool initialized;
  5227. /* readonly */
  5228. bool instancingSupport;
  5229. /* readonly */
  5230. bool lightPrepassSupport;
  5231. /* readonly */
  5232. int monitorCount;
  5233. /* readonly */
  5234. int multiSample;
  5235. /* readonly */
  5236. Array<int> multiSampleLevels;
  5237. /* readonly */
  5238. uint numBatches;
  5239. /* readonly */
  5240. uint numPrimitives;
  5241. String orientations;
  5242. /* readonly */
  5243. bool readableDepthSupport;
  5244. /* readonly */
  5245. int refs;
  5246. /* readonly */
  5247. bool resizable;
  5248. /* readonly */
  5249. Array<Array<IntVector3>> resolutions;
  5250. bool sRGB;
  5251. /* readonly */
  5252. bool sRGBSupport;
  5253. /* readonly */
  5254. bool sRGBWriteSupport;
  5255. String shaderCacheDir;
  5256. /* readonly */
  5257. IntVector2 size;
  5258. /* readonly */
  5259. bool tripleBuffer;
  5260. /* readonly */
  5261. StringHash type;
  5262. /* readonly */
  5263. String typeName;
  5264. /* readonly */
  5265. bool vsync;
  5266. /* readonly */
  5267. int weakRefs;
  5268. /* readonly */
  5269. int width;
  5270. /* writeonly */
  5271. Image windowIcon;
  5272. IntVector2 windowPosition;
  5273. String windowTitle;
  5274. };
  5275. class HttpRequest
  5276. {
  5277. public:
  5278. // Methods:
  5279. Array<uint8> Read(uint);
  5280. bool ReadBool();
  5281. BoundingBox ReadBoundingBox();
  5282. int8 ReadByte();
  5283. Color ReadColor();
  5284. double ReadDouble();
  5285. String ReadFileID();
  5286. float ReadFloat();
  5287. int ReadInt();
  5288. int64 ReadInt64();
  5289. IntRect ReadIntRect();
  5290. IntVector2 ReadIntVector2();
  5291. String ReadLine();
  5292. Matrix3 ReadMatrix3();
  5293. Matrix3x4 ReadMatrix3x4();
  5294. Matrix4 ReadMatrix4();
  5295. uint ReadNetID();
  5296. Quaternion ReadPackedQuaternion();
  5297. Vector3 ReadPackedVector3(float);
  5298. Quaternion ReadQuaternion();
  5299. int16 ReadShort();
  5300. String ReadString();
  5301. StringHash ReadStringHash();
  5302. uint8 ReadUByte();
  5303. uint ReadUInt();
  5304. uint64 ReadUInt64();
  5305. uint16 ReadUShort();
  5306. uint ReadVLE();
  5307. Variant ReadVariant();
  5308. VariantMap ReadVariantMap();
  5309. Vector2 ReadVector2();
  5310. Vector3 ReadVector3();
  5311. Vector4 ReadVector4();
  5312. VectorBuffer ReadVectorBuffer(uint);
  5313. uint Seek(uint);
  5314. // Properties:
  5315. /* readonly */
  5316. uint availableSize;
  5317. /* readonly */
  5318. uint checksum;
  5319. /* readonly */
  5320. bool eof;
  5321. /* readonly */
  5322. String error;
  5323. /* readonly */
  5324. String name;
  5325. /* readonly */
  5326. bool open;
  5327. /* readonly */
  5328. uint position;
  5329. /* readonly */
  5330. int refs;
  5331. /* readonly */
  5332. uint size;
  5333. /* readonly */
  5334. HttpRequestState state;
  5335. /* readonly */
  5336. String url;
  5337. /* readonly */
  5338. String verb;
  5339. /* readonly */
  5340. int weakRefs;
  5341. };
  5342. class IKConstraint
  5343. {
  5344. public:
  5345. // Methods:
  5346. void ApplyAttributes();
  5347. void DrawDebugGeometry(DebugRenderer, bool);
  5348. Variant GetAttribute(const String&) const;
  5349. ValueAnimation GetAttributeAnimation(const String&) const;
  5350. float GetAttributeAnimationSpeed(const String&) const;
  5351. float GetAttributeAnimationTime(const String&) const;
  5352. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5353. Variant GetAttributeDefault(const String&) const;
  5354. bool GetInterceptNetworkUpdate(const String&) const;
  5355. bool HasSubscribedToEvent(Object, const String&);
  5356. bool HasSubscribedToEvent(const String&);
  5357. bool Load(File, bool = false);
  5358. bool Load(VectorBuffer&, bool = false);
  5359. bool LoadJSON(const JSONValue&, bool = false);
  5360. bool LoadXML(const XMLElement&, bool = false);
  5361. void MarkNetworkUpdate() const;
  5362. void Remove();
  5363. void RemoveAttributeAnimation(const String&);
  5364. void RemoveInstanceDefault();
  5365. void RemoveObjectAnimation();
  5366. void ResetToDefault();
  5367. bool Save(File) const;
  5368. bool Save(VectorBuffer&) const;
  5369. bool SaveJSON(JSONValue&) const;
  5370. bool SaveXML(XMLElement&) const;
  5371. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5372. void SetAnimationTime(float);
  5373. bool SetAttribute(const String&, const Variant&);
  5374. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5375. void SetAttributeAnimationSpeed(const String&, float);
  5376. void SetAttributeAnimationTime(const String&, float);
  5377. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5378. void SetInterceptNetworkUpdate(const String&, bool);
  5379. // Properties:
  5380. bool animationEnabled;
  5381. /* readonly */
  5382. Array<Variant> attributeDefaults;
  5383. /* readonly */
  5384. Array<AttributeInfo> attributeInfos;
  5385. Array<Variant> attributes;
  5386. /* readonly */
  5387. String category;
  5388. bool enabled;
  5389. /* readonly */
  5390. bool enabledEffective;
  5391. /* readonly */
  5392. uint id;
  5393. /* readonly */
  5394. Node node;
  5395. /* readonly */
  5396. uint numAttributes;
  5397. ObjectAnimation objectAnimation;
  5398. /* readonly */
  5399. int refs;
  5400. bool temporary;
  5401. /* readonly */
  5402. StringHash type;
  5403. /* readonly */
  5404. String typeName;
  5405. /* readonly */
  5406. int weakRefs;
  5407. };
  5408. class IKEffector
  5409. {
  5410. public:
  5411. // Methods:
  5412. void ApplyAttributes();
  5413. void DrawDebugGeometry(DebugRenderer, bool);
  5414. void DrawDebugGeometry(bool);
  5415. Variant GetAttribute(const String&) const;
  5416. ValueAnimation GetAttributeAnimation(const String&) const;
  5417. float GetAttributeAnimationSpeed(const String&) const;
  5418. float GetAttributeAnimationTime(const String&) const;
  5419. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5420. Variant GetAttributeDefault(const String&) const;
  5421. bool GetInterceptNetworkUpdate(const String&) const;
  5422. bool HasSubscribedToEvent(Object, const String&);
  5423. bool HasSubscribedToEvent(const String&);
  5424. bool Load(File, bool = false);
  5425. bool Load(VectorBuffer&, bool = false);
  5426. bool LoadJSON(const JSONValue&, bool = false);
  5427. bool LoadXML(const XMLElement&, bool = false);
  5428. void MarkNetworkUpdate() const;
  5429. void Remove();
  5430. void RemoveAttributeAnimation(const String&);
  5431. void RemoveInstanceDefault();
  5432. void RemoveObjectAnimation();
  5433. void ResetToDefault();
  5434. bool Save(File) const;
  5435. bool Save(VectorBuffer&) const;
  5436. bool SaveJSON(JSONValue&) const;
  5437. bool SaveXML(XMLElement&) const;
  5438. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5439. void SetAnimationTime(float);
  5440. bool SetAttribute(const String&, const Variant&);
  5441. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5442. void SetAttributeAnimationSpeed(const String&, float);
  5443. void SetAttributeAnimationTime(const String&, float);
  5444. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5445. void SetInterceptNetworkUpdate(const String&, bool);
  5446. // Properties:
  5447. bool animationEnabled;
  5448. /* readonly */
  5449. Array<Variant> attributeDefaults;
  5450. /* readonly */
  5451. Array<AttributeInfo> attributeInfos;
  5452. Array<Variant> attributes;
  5453. /* readonly */
  5454. String category;
  5455. uint chainLength;
  5456. bool enabled;
  5457. /* readonly */
  5458. bool enabledEffective;
  5459. /* readonly */
  5460. uint id;
  5461. bool inheritParentRotation;
  5462. /* readonly */
  5463. Node node;
  5464. /* readonly */
  5465. uint numAttributes;
  5466. ObjectAnimation objectAnimation;
  5467. /* readonly */
  5468. int refs;
  5469. float rotationDecay;
  5470. float rotationWeight;
  5471. String targetName;
  5472. Node targetNode;
  5473. Vector3 targetPosition;
  5474. Quaternion targetRotation;
  5475. bool temporary;
  5476. /* readonly */
  5477. StringHash type;
  5478. /* readonly */
  5479. String typeName;
  5480. /* readonly */
  5481. int weakRefs;
  5482. float weight;
  5483. bool weightedNlerp;
  5484. };
  5485. class IKSolver
  5486. {
  5487. public:
  5488. // Methods:
  5489. void ApplyAttributes();
  5490. void DrawDebugGeometry(DebugRenderer, bool);
  5491. void DrawDebugGeometry(bool);
  5492. Variant GetAttribute(const String&) const;
  5493. ValueAnimation GetAttributeAnimation(const String&) const;
  5494. float GetAttributeAnimationSpeed(const String&) const;
  5495. float GetAttributeAnimationTime(const String&) const;
  5496. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5497. Variant GetAttributeDefault(const String&) const;
  5498. bool GetInterceptNetworkUpdate(const String&) const;
  5499. bool HasSubscribedToEvent(Object, const String&);
  5500. bool HasSubscribedToEvent(const String&);
  5501. bool Load(File, bool = false);
  5502. bool Load(VectorBuffer&, bool = false);
  5503. bool LoadJSON(const JSONValue&, bool = false);
  5504. bool LoadXML(const XMLElement&, bool = false);
  5505. void MarkNetworkUpdate() const;
  5506. void Remove();
  5507. void RemoveAttributeAnimation(const String&);
  5508. void RemoveInstanceDefault();
  5509. void RemoveObjectAnimation();
  5510. void ResetToDefault();
  5511. void ResetToInitialPose();
  5512. bool Save(File) const;
  5513. bool Save(VectorBuffer&) const;
  5514. bool SaveJSON(JSONValue&) const;
  5515. bool SaveXML(XMLElement&) const;
  5516. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5517. void SetAnimationTime(float);
  5518. bool SetAttribute(const String&, const Variant&);
  5519. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5520. void SetAttributeAnimationSpeed(const String&, float);
  5521. void SetAttributeAnimationTime(const String&, float);
  5522. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  5523. void SetInterceptNetworkUpdate(const String&, bool);
  5524. void Solve();
  5525. void UpdateInitialPose();
  5526. // Properties:
  5527. IKAlgorithm algorithm;
  5528. bool animationEnabled;
  5529. /* readonly */
  5530. Array<Variant> attributeDefaults;
  5531. /* readonly */
  5532. Array<AttributeInfo> attributeInfos;
  5533. Array<Variant> attributes;
  5534. bool autoSolve;
  5535. bool boneRotations;
  5536. /* readonly */
  5537. String category;
  5538. bool continuousSolving;
  5539. bool enabled;
  5540. /* readonly */
  5541. bool enabledEffective;
  5542. /* readonly */
  5543. uint id;
  5544. uint maximumIterations;
  5545. /* readonly */
  5546. Node node;
  5547. /* readonly */
  5548. uint numAttributes;
  5549. ObjectAnimation objectAnimation;
  5550. /* readonly */
  5551. int refs;
  5552. bool targetRotation;
  5553. bool temporary;
  5554. float tolerance;
  5555. /* readonly */
  5556. StringHash type;
  5557. /* readonly */
  5558. String typeName;
  5559. bool updatePose;
  5560. /* readonly */
  5561. int weakRefs;
  5562. };
  5563. class Image
  5564. {
  5565. public:
  5566. Image();
  5567. Image(const String&in);
  5568. // Methods:
  5569. void Clear(const Color&);
  5570. void ClearInt(uint);
  5571. bool FlipHorizontal();
  5572. bool FlipVertical();
  5573. Color GetPixel(int, int) const;
  5574. Color GetPixel(int, int, int) const;
  5575. Color GetPixelBilinear(float, float) const;
  5576. uint GetPixelInt(int, int) const;
  5577. uint GetPixelInt(int, int, int) const;
  5578. Color GetPixelTrilinear(float, float, float) const;
  5579. Image GetSubimage(const IntRect&) const;
  5580. bool HasSubscribedToEvent(Object, const String&);
  5581. bool HasSubscribedToEvent(const String&);
  5582. bool Load(File);
  5583. bool Load(VectorBuffer&);
  5584. bool Load(const String&);
  5585. bool LoadColorLUT(File);
  5586. bool LoadColorLUT(VectorBuffer&);
  5587. bool Resize(int, int);
  5588. bool Save(File) const;
  5589. bool Save(VectorBuffer&) const;
  5590. bool Save(const String&) const;
  5591. bool SaveBMP(const String&) const;
  5592. bool SaveDDS(const String&) const;
  5593. bool SaveJPG(const String&, int) const;
  5594. bool SavePNG(const String&) const;
  5595. bool SaveTGA(const String&) const;
  5596. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5597. void SetPixel(int, int, const Color&);
  5598. void SetPixel(int, int, int, const Color&);
  5599. void SetPixelInt(int, int, int, uint);
  5600. void SetPixelInt(int, int, uint);
  5601. bool SetSize(int, int, int, uint);
  5602. bool SetSize(int, int, uint);
  5603. // Properties:
  5604. /* readonly */
  5605. bool array;
  5606. /* readonly */
  5607. String category;
  5608. /* readonly */
  5609. uint components;
  5610. /* readonly */
  5611. bool compressed;
  5612. /* readonly */
  5613. CompressedFormat compressedFormat;
  5614. /* readonly */
  5615. bool cubemap;
  5616. /* readonly */
  5617. int depth;
  5618. /* readonly */
  5619. int height;
  5620. /* readonly */
  5621. uint memoryUse;
  5622. String name;
  5623. /* readonly */
  5624. uint numCompressedLevels;
  5625. /* readonly */
  5626. int refs;
  5627. /* readonly */
  5628. bool sRGB;
  5629. /* readonly */
  5630. StringHash type;
  5631. /* readonly */
  5632. String typeName;
  5633. /* readonly */
  5634. uint useTimer;
  5635. /* readonly */
  5636. int weakRefs;
  5637. /* readonly */
  5638. int width;
  5639. };
  5640. class IndexBuffer
  5641. {
  5642. public:
  5643. IndexBuffer();
  5644. // Methods:
  5645. VectorBuffer GetData();
  5646. bool HasSubscribedToEvent(Object, const String&);
  5647. bool HasSubscribedToEvent(const String&);
  5648. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5649. bool SetData(VectorBuffer&);
  5650. bool SetDataRange(VectorBuffer&, uint, uint, bool = false);
  5651. void SetSize(uint, bool, bool = false);
  5652. // Properties:
  5653. /* readonly */
  5654. String category;
  5655. /* readonly */
  5656. bool dynamic;
  5657. /* readonly */
  5658. uint indexCount;
  5659. /* readonly */
  5660. uint indexSize;
  5661. /* readonly */
  5662. int refs;
  5663. bool shadowed;
  5664. /* readonly */
  5665. StringHash type;
  5666. /* readonly */
  5667. String typeName;
  5668. /* readonly */
  5669. int weakRefs;
  5670. };
  5671. class Input
  5672. {
  5673. public:
  5674. // Methods:
  5675. int AddScreenJoystick(XMLFile = null, XMLFile = null);
  5676. void CenterMousePosition();
  5677. int GetKeyFromName(const String&) const;
  5678. int GetKeyFromScancode(int) const;
  5679. String GetKeyName(int) const;
  5680. int GetScancodeFromKey(int) const;
  5681. int GetScancodeFromName(const String&) const;
  5682. String GetScancodeName(int) const;
  5683. bool HasSubscribedToEvent(Object, const String&);
  5684. bool HasSubscribedToEvent(const String&);
  5685. uint LoadGestures(File);
  5686. uint LoadGestures(VectorBuffer&);
  5687. bool RecordGesture();
  5688. void RemoveAllGestures();
  5689. bool RemoveGesture(uint);
  5690. bool RemoveScreenJoystick(int);
  5691. void ResetMouseGrabbed();
  5692. void ResetMouseMode();
  5693. void ResetMouseVisible();
  5694. bool SaveGesture(File, uint);
  5695. bool SaveGesture(VectorBuffer&, uint);
  5696. bool SaveGestures(File);
  5697. bool SaveGestures(VectorBuffer&);
  5698. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5699. void SetMouseGrabbed(bool, bool = false);
  5700. void SetMouseMode(MouseMode, bool = false);
  5701. void SetMouseVisible(bool, bool = false);
  5702. // Properties:
  5703. /* readonly */
  5704. String category;
  5705. /* readonly */
  5706. bool focus;
  5707. /* readonly */
  5708. Vector2 inputScale;
  5709. /* readonly */
  5710. Array<JoystickState> joysticks;
  5711. /* readonly */
  5712. Array<JoystickState> joysticksByIndex;
  5713. /* readonly */
  5714. Array<JoystickState> joysticksByName;
  5715. /* readonly */
  5716. Array<bool> keyDown;
  5717. /* readonly */
  5718. Array<bool> keyPress;
  5719. /* readonly */
  5720. bool minimized;
  5721. /* readonly */
  5722. Array<bool> mouseButtonDown;
  5723. /* readonly */
  5724. Array<bool> mouseButtonPress;
  5725. bool mouseGrabbed;
  5726. /* readonly */
  5727. bool mouseLocked;
  5728. MouseMode mouseMode;
  5729. /* readonly */
  5730. IntVector2 mouseMove;
  5731. /* readonly */
  5732. int mouseMoveWheel;
  5733. /* readonly */
  5734. int mouseMoveX;
  5735. /* readonly */
  5736. int mouseMoveY;
  5737. IntVector2 mousePosition;
  5738. bool mouseVisible;
  5739. /* readonly */
  5740. uint numJoysticks;
  5741. /* readonly */
  5742. uint numTouches;
  5743. /* readonly */
  5744. Array<bool> qualifierDown;
  5745. /* readonly */
  5746. Array<bool> qualifierPress;
  5747. /* readonly */
  5748. int qualifiers;
  5749. /* readonly */
  5750. int refs;
  5751. /* readonly */
  5752. Array<bool> scancodeDown;
  5753. /* readonly */
  5754. Array<bool> scancodePress;
  5755. Array<bool> screenJoystickVisible;
  5756. /* readonly */
  5757. bool screenKeyboardSupport;
  5758. bool screenKeyboardVisible;
  5759. bool toggleFullscreen;
  5760. bool touchEmulation;
  5761. /* readonly */
  5762. Array<TouchState> touches;
  5763. /* readonly */
  5764. StringHash type;
  5765. /* readonly */
  5766. String typeName;
  5767. /* readonly */
  5768. int weakRefs;
  5769. };
  5770. class IntRect
  5771. {
  5772. public:
  5773. IntRect();
  5774. IntRect(const IntRect&in);
  5775. IntRect(int, int, int, int);
  5776. IntRect(int[]&inout);
  5777. // Methods:
  5778. Intersection IsInside(const IntVector2&) const;
  5779. // Properties:
  5780. int bottom;
  5781. /* readonly */
  5782. Array<int> data;
  5783. /* readonly */
  5784. int height;
  5785. int left;
  5786. int right;
  5787. /* readonly */
  5788. IntVector2 size;
  5789. int top;
  5790. /* readonly */
  5791. int width;
  5792. };
  5793. class IntVector2
  5794. {
  5795. public:
  5796. IntVector2();
  5797. IntVector2(const IntVector2&in);
  5798. IntVector2(int, int);
  5799. IntVector2(int[]&inout);
  5800. // Methods:
  5801. float Length() const;
  5802. uint ToHash() const;
  5803. String ToString() const;
  5804. // Properties:
  5805. /* readonly */
  5806. Array<int> data;
  5807. int x;
  5808. int y;
  5809. // Constants:
  5810. static const IntVector2 DOWN;
  5811. static const IntVector2 LEFT;
  5812. static const IntVector2 ONE;
  5813. static const IntVector2 RIGHT;
  5814. static const IntVector2 UP;
  5815. static const IntVector2 ZERO;
  5816. };
  5817. class IntVector3
  5818. {
  5819. public:
  5820. IntVector3();
  5821. IntVector3(const IntVector3&in);
  5822. IntVector3(int, int, int);
  5823. IntVector3(int[]&inout);
  5824. // Methods:
  5825. float Length() const;
  5826. uint ToHash() const;
  5827. String ToString() const;
  5828. // Properties:
  5829. /* readonly */
  5830. Array<int> data;
  5831. int x;
  5832. int y;
  5833. int z;
  5834. // Constants:
  5835. static const IntVector3 BACK;
  5836. static const IntVector3 DOWN;
  5837. static const IntVector3 FORWARD;
  5838. static const IntVector3 LEFT;
  5839. static const IntVector3 ONE;
  5840. static const IntVector3 RIGHT;
  5841. static const IntVector3 UP;
  5842. static const IntVector3 ZERO;
  5843. };
  5844. class JSONFile
  5845. {
  5846. public:
  5847. JSONFile();
  5848. JSONFile(const String&in);
  5849. // Methods:
  5850. bool FromString(const String&);
  5851. JSONValue& GetRoot();
  5852. bool HasSubscribedToEvent(Object, const String&);
  5853. bool HasSubscribedToEvent(const String&);
  5854. bool Load(File);
  5855. bool Load(VectorBuffer&);
  5856. bool Load(const String&);
  5857. bool Save(File) const;
  5858. bool Save(File, const String&) const;
  5859. bool Save(VectorBuffer&) const;
  5860. bool Save(const String&) const;
  5861. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5862. // Properties:
  5863. /* readonly */
  5864. String category;
  5865. /* readonly */
  5866. uint memoryUse;
  5867. String name;
  5868. /* readonly */
  5869. int refs;
  5870. /* readonly */
  5871. JSONValue root;
  5872. /* readonly */
  5873. StringHash type;
  5874. /* readonly */
  5875. String typeName;
  5876. /* readonly */
  5877. uint useTimer;
  5878. /* readonly */
  5879. int weakRefs;
  5880. };
  5881. class JSONValue
  5882. {
  5883. public:
  5884. ~JSONValue();
  5885. JSONValue();
  5886. JSONValue(bool);
  5887. JSONValue(int);
  5888. JSONValue(uint);
  5889. JSONValue(float);
  5890. JSONValue(double);
  5891. JSONValue(const String&in);
  5892. JSONValue(const JSONValue&in);
  5893. // Methods:
  5894. void Clear();
  5895. bool Contains(const String&) const;
  5896. void Erase(const String&);
  5897. void Erase(uint, uint = 1);
  5898. bool GetBool() const;
  5899. double GetDouble() const;
  5900. float GetFloat() const;
  5901. int GetInt() const;
  5902. uint GetUInt() const;
  5903. Variant GetVariant() const;
  5904. VariantMap GetVariantMap() const;
  5905. void Insert(uint, const JSONValue&);
  5906. const JSONValue& Get(const String&) const;
  5907. void Pop();
  5908. void Push(const JSONValue&);
  5909. void Resize(uint);
  5910. void Set(const String&, const JSONValue&);
  5911. void SetVariant(const Variant&);
  5912. void SetVariantMap(const VariantMap&);
  5913. const String& GetString() const;
  5914. // Properties:
  5915. /* readonly */
  5916. bool isArray;
  5917. /* readonly */
  5918. bool isBool;
  5919. /* readonly */
  5920. bool isNull;
  5921. /* readonly */
  5922. bool isNumber;
  5923. /* readonly */
  5924. bool isObject;
  5925. /* readonly */
  5926. bool isString;
  5927. /* readonly */
  5928. Array<String> keys;
  5929. /* readonly */
  5930. JSONNumberType numberType;
  5931. /* readonly */
  5932. String numberTypeName;
  5933. /* readonly */
  5934. uint size;
  5935. /* readonly */
  5936. JSONValueType valueType;
  5937. /* readonly */
  5938. String valueTypeName;
  5939. /* readonly */
  5940. Array<JSONValue> values;
  5941. };
  5942. class JoystickState
  5943. {
  5944. public:
  5945. // Properties:
  5946. /* readonly */
  5947. Array<float> axisPosition;
  5948. /* readonly */
  5949. Array<bool> buttonDown;
  5950. /* readonly */
  5951. Array<bool> buttonPress;
  5952. /* readonly */
  5953. bool controller;
  5954. /* readonly */
  5955. Array<int> hatPosition;
  5956. int joystickID;
  5957. String name;
  5958. /* readonly */
  5959. uint numAxes;
  5960. /* readonly */
  5961. uint numButtons;
  5962. /* readonly */
  5963. uint numHats;
  5964. };
  5965. class Light
  5966. {
  5967. public:
  5968. // Methods:
  5969. void ApplyAttributes();
  5970. void DrawDebugGeometry(DebugRenderer, bool);
  5971. Variant GetAttribute(const String&) const;
  5972. ValueAnimation GetAttributeAnimation(const String&) const;
  5973. float GetAttributeAnimationSpeed(const String&) const;
  5974. float GetAttributeAnimationTime(const String&) const;
  5975. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  5976. Variant GetAttributeDefault(const String&) const;
  5977. bool GetInterceptNetworkUpdate(const String&) const;
  5978. bool HasSubscribedToEvent(Object, const String&);
  5979. bool HasSubscribedToEvent(const String&);
  5980. bool IsInView(Camera) const;
  5981. bool Load(File, bool = false);
  5982. bool Load(VectorBuffer&, bool = false);
  5983. bool LoadJSON(const JSONValue&, bool = false);
  5984. bool LoadXML(const XMLElement&, bool = false);
  5985. void MarkNetworkUpdate() const;
  5986. void Remove();
  5987. void RemoveAttributeAnimation(const String&);
  5988. void RemoveInstanceDefault();
  5989. void RemoveObjectAnimation();
  5990. void ResetToDefault();
  5991. bool Save(File) const;
  5992. bool Save(VectorBuffer&) const;
  5993. bool SaveJSON(JSONValue&) const;
  5994. bool SaveXML(XMLElement&) const;
  5995. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  5996. void SetAnimationTime(float);
  5997. bool SetAttribute(const String&, const Variant&);
  5998. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  5999. void SetAttributeAnimationSpeed(const String&, float);
  6000. void SetAttributeAnimationTime(const String&, float);
  6001. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6002. void SetInterceptNetworkUpdate(const String&, bool);
  6003. // Properties:
  6004. bool animationEnabled;
  6005. float aspectRatio;
  6006. /* readonly */
  6007. Array<Variant> attributeDefaults;
  6008. /* readonly */
  6009. Array<AttributeInfo> attributeInfos;
  6010. Array<Variant> attributes;
  6011. /* readonly */
  6012. BoundingBox boundingBox;
  6013. float brightness;
  6014. bool castShadows;
  6015. /* readonly */
  6016. String category;
  6017. Color color;
  6018. /* readonly */
  6019. Color colorFromTemperature;
  6020. float drawDistance;
  6021. /* readonly */
  6022. Color effectiveColor;
  6023. /* readonly */
  6024. float effectiveSpecularIntensity;
  6025. bool enabled;
  6026. /* readonly */
  6027. bool enabledEffective;
  6028. float fadeDistance;
  6029. float fov;
  6030. /* readonly */
  6031. Frustum frustum;
  6032. /* readonly */
  6033. uint id;
  6034. /* readonly */
  6035. bool inView;
  6036. float length;
  6037. uint lightMask;
  6038. LightType lightType;
  6039. float lodBias;
  6040. uint maxLights;
  6041. /* readonly */
  6042. bool negative;
  6043. /* readonly */
  6044. Node node;
  6045. /* readonly */
  6046. uint numAttributes;
  6047. /* readonly */
  6048. int numShadowSplits;
  6049. ObjectAnimation objectAnimation;
  6050. bool occludee;
  6051. bool occluder;
  6052. bool perVertex;
  6053. float radius;
  6054. Texture rampTexture;
  6055. float range;
  6056. /* readonly */
  6057. int refs;
  6058. BiasParameters shadowBias;
  6059. CascadeParameters shadowCascade;
  6060. float shadowDistance;
  6061. float shadowFadeDistance;
  6062. FocusParameters shadowFocus;
  6063. float shadowIntensity;
  6064. uint shadowMask;
  6065. float shadowMaxExtrusion;
  6066. float shadowNearFarRatio;
  6067. float shadowResolution;
  6068. Texture shapeTexture;
  6069. float specularIntensity;
  6070. float temperature;
  6071. bool temporary;
  6072. /* readonly */
  6073. StringHash type;
  6074. /* readonly */
  6075. String typeName;
  6076. bool usePhysicalValues;
  6077. uint viewMask;
  6078. /* readonly */
  6079. int weakRefs;
  6080. /* readonly */
  6081. BoundingBox worldBoundingBox;
  6082. uint zoneMask;
  6083. };
  6084. class LineEdit
  6085. {
  6086. public:
  6087. LineEdit();
  6088. LineEdit(const String&in);
  6089. // Methods:
  6090. void AddChild(UIElement);
  6091. void AddTag(const String&);
  6092. void AddTags(const String&, int8 = ';');
  6093. void ApplyAttributes();
  6094. void BringToFront();
  6095. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6096. void DisableLayoutUpdate();
  6097. IntVector2 ElementToScreen(const IntVector2&);
  6098. void EnableLayoutUpdate();
  6099. uint FindChild(UIElement) const;
  6100. Variant GetAttribute(const String&) const;
  6101. ValueAnimation GetAttributeAnimation(const String&) const;
  6102. float GetAttributeAnimationSpeed(const String&) const;
  6103. float GetAttributeAnimationTime(const String&) const;
  6104. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6105. Variant GetAttributeDefault(const String&) const;
  6106. UIElement GetChild(const String&, bool = false) const;
  6107. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  6108. Array<UIElement> GetChildren(bool = false) const;
  6109. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  6110. UIElement GetElementEventSender() const;
  6111. bool GetInterceptNetworkUpdate(const String&) const;
  6112. uint GetNumChildren(bool) const;
  6113. bool HasSubscribedToEvent(Object, const String&);
  6114. bool HasSubscribedToEvent(const String&);
  6115. bool HasTag(const String&) const;
  6116. void InsertChild(uint, UIElement);
  6117. bool IsInside(IntVector2, bool);
  6118. bool IsInsideCombined(IntVector2, bool);
  6119. bool Load(File, bool = false);
  6120. bool Load(VectorBuffer&, bool = false);
  6121. UIElement LoadChildXML(XMLFile, XMLFile = null);
  6122. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6123. bool LoadJSON(const JSONValue&, bool = false);
  6124. bool LoadXML(File);
  6125. bool LoadXML(VectorBuffer&);
  6126. bool LoadXML(XMLFile, XMLFile);
  6127. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6128. bool LoadXML(const XMLElement&, bool = false);
  6129. void MarkNetworkUpdate() const;
  6130. void Remove();
  6131. void RemoveAllChildren();
  6132. void RemoveAllTags();
  6133. void RemoveAttributeAnimation(const String&);
  6134. void RemoveChild(UIElement, uint = 0);
  6135. void RemoveChild(uint);
  6136. void RemoveInstanceDefault();
  6137. void RemoveObjectAnimation();
  6138. bool RemoveTag(const String&);
  6139. void ResetDeepEnabled();
  6140. void ResetToDefault();
  6141. bool Save(File) const;
  6142. bool Save(VectorBuffer&) const;
  6143. bool SaveJSON(JSONValue&) const;
  6144. bool SaveXML(File, const String& = "\t");
  6145. bool SaveXML(VectorBuffer&, const String& = "\t");
  6146. bool SaveXML(XMLElement&) const;
  6147. IntVector2 ScreenToElement(const IntVector2&);
  6148. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6149. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6150. void SetAnimationTime(float);
  6151. bool SetAttribute(const String&, const Variant&);
  6152. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6153. void SetAttributeAnimationSpeed(const String&, float);
  6154. void SetAttributeAnimationTime(const String&, float);
  6155. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6156. void SetDeepEnabled(bool);
  6157. void SetEnabledRecursive(bool);
  6158. void SetFixedHeight(int);
  6159. void SetFixedSize(int, int);
  6160. void SetFixedWidth(int);
  6161. void SetFullImageRect();
  6162. void SetHoverOffset(int, int);
  6163. void SetInterceptNetworkUpdate(const String&, bool);
  6164. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6165. void SetMaxAnchor(float, float);
  6166. void SetMaxSize(int, int);
  6167. void SetMinAnchor(float, float);
  6168. void SetMinSize(int, int);
  6169. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6170. void SetPivot(float, float);
  6171. void SetPosition(int, int);
  6172. void SetSize(int, int);
  6173. bool SetStyle(const String&, XMLFile = null);
  6174. bool SetStyle(const XMLElement&);
  6175. bool SetStyleAuto(XMLFile = null);
  6176. void UpdateLayout();
  6177. const Variant& GetVar(const StringHash&);
  6178. // Properties:
  6179. bool animationEnabled;
  6180. /* readonly */
  6181. Array<Variant> attributeDefaults;
  6182. /* readonly */
  6183. Array<AttributeInfo> attributeInfos;
  6184. Array<Variant> attributes;
  6185. BlendMode blendMode;
  6186. IntRect border;
  6187. bool bringToBack;
  6188. bool bringToFront;
  6189. /* readonly */
  6190. String category;
  6191. /* readonly */
  6192. IntVector2 childOffset;
  6193. /* readonly */
  6194. Array<UIElement> children;
  6195. IntRect clipBorder;
  6196. bool clipChildren;
  6197. /* writeonly */
  6198. Color color;
  6199. /* readonly */
  6200. bool colorGradient;
  6201. Array<Color> colors;
  6202. /* readonly */
  6203. IntRect combinedScreenRect;
  6204. /* readonly */
  6205. BorderImage cursor;
  6206. float cursorBlinkRate;
  6207. bool cursorMovable;
  6208. uint cursorPosition;
  6209. XMLFile defaultStyle;
  6210. /* readonly */
  6211. float derivedOpacity;
  6212. /* readonly */
  6213. uint dragButtonCombo;
  6214. /* readonly */
  6215. int dragButtonCount;
  6216. uint dragDropMode;
  6217. uint echoCharacter;
  6218. bool editable;
  6219. bool elementEventSender;
  6220. bool enableAnchor;
  6221. bool enabled;
  6222. /* readonly */
  6223. bool enabledSelf;
  6224. /* readonly */
  6225. bool fixedHeight;
  6226. /* readonly */
  6227. bool fixedSize;
  6228. /* readonly */
  6229. bool fixedWidth;
  6230. bool focus;
  6231. FocusMode focusMode;
  6232. int height;
  6233. HorizontalAlignment horizontalAlignment;
  6234. IntVector2 hoverOffset;
  6235. /* readonly */
  6236. bool hovering;
  6237. IntRect imageBorder;
  6238. IntRect imageRect;
  6239. int indent;
  6240. int indentSpacing;
  6241. /* readonly */
  6242. int indentWidth;
  6243. bool internal;
  6244. IntRect layoutBorder;
  6245. Vector2 layoutFlexScale;
  6246. LayoutMode layoutMode;
  6247. int layoutSpacing;
  6248. Vector2 maxAnchor;
  6249. int maxHeight;
  6250. uint maxLength;
  6251. IntVector2 maxOffset;
  6252. IntVector2 maxSize;
  6253. int maxWidth;
  6254. Vector2 minAnchor;
  6255. int minHeight;
  6256. IntVector2 minOffset;
  6257. IntVector2 minSize;
  6258. int minWidth;
  6259. String name;
  6260. /* readonly */
  6261. uint numAllChildren;
  6262. /* readonly */
  6263. uint numAttributes;
  6264. /* readonly */
  6265. uint numChildren;
  6266. ObjectAnimation objectAnimation;
  6267. float opacity;
  6268. UIElement parent;
  6269. Vector2 pivot;
  6270. IntVector2 position;
  6271. int priority;
  6272. /* readonly */
  6273. int refs;
  6274. /* readonly */
  6275. UIElement root;
  6276. /* readonly */
  6277. IntVector2 screenPosition;
  6278. bool selected;
  6279. IntVector2 size;
  6280. bool sortChildren;
  6281. String style;
  6282. /* readonly */
  6283. Array<String> tags;
  6284. bool temporary;
  6285. String text;
  6286. bool textCopyable;
  6287. /* readonly */
  6288. Text textElement;
  6289. bool textSelectable;
  6290. Texture texture;
  6291. bool tiled;
  6292. TraversalMode traversalMode;
  6293. /* readonly */
  6294. StringHash type;
  6295. /* readonly */
  6296. String typeName;
  6297. bool useDerivedOpacity;
  6298. /* readonly */
  6299. VariantMap vars;
  6300. VerticalAlignment verticalAlignment;
  6301. bool visible;
  6302. /* readonly */
  6303. bool visibleEffective;
  6304. /* readonly */
  6305. int weakRefs;
  6306. int width;
  6307. };
  6308. class ListView
  6309. {
  6310. public:
  6311. ListView();
  6312. ListView(const String&in);
  6313. // Methods:
  6314. void AddChild(UIElement);
  6315. void AddItem(UIElement);
  6316. void AddSelection(uint);
  6317. void AddTag(const String&);
  6318. void AddTags(const String&, int8 = ';');
  6319. void ApplyAttributes();
  6320. void BringToFront();
  6321. void ChangeSelection(int, bool);
  6322. void ClearSelection();
  6323. void CopySelectedItemsToClipboard();
  6324. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6325. void DisableLayoutUpdate();
  6326. IntVector2 ElementToScreen(const IntVector2&);
  6327. void EnableLayoutUpdate();
  6328. void Expand(uint, bool, bool = false);
  6329. uint FindChild(UIElement) const;
  6330. uint FindItem(UIElement);
  6331. Variant GetAttribute(const String&) const;
  6332. ValueAnimation GetAttributeAnimation(const String&) const;
  6333. float GetAttributeAnimationSpeed(const String&) const;
  6334. float GetAttributeAnimationTime(const String&) const;
  6335. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6336. Variant GetAttributeDefault(const String&) const;
  6337. UIElement GetChild(const String&, bool = false) const;
  6338. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  6339. Array<UIElement> GetChildren(bool = false) const;
  6340. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  6341. UIElement GetElementEventSender() const;
  6342. bool GetInterceptNetworkUpdate(const String&) const;
  6343. Array<UIElement> GetItems() const;
  6344. uint GetNumChildren(bool) const;
  6345. bool HasSubscribedToEvent(Object, const String&);
  6346. bool HasSubscribedToEvent(const String&);
  6347. bool HasTag(const String&) const;
  6348. void InsertChild(uint, UIElement);
  6349. void InsertItem(uint, UIElement, UIElement = null);
  6350. bool IsExpanded(uint) const;
  6351. bool IsInside(IntVector2, bool);
  6352. bool IsInsideCombined(IntVector2, bool);
  6353. bool IsSelected(uint) const;
  6354. bool Load(File, bool = false);
  6355. bool Load(VectorBuffer&, bool = false);
  6356. UIElement LoadChildXML(XMLFile, XMLFile = null);
  6357. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6358. bool LoadJSON(const JSONValue&, bool = false);
  6359. bool LoadXML(File);
  6360. bool LoadXML(VectorBuffer&);
  6361. bool LoadXML(XMLFile, XMLFile);
  6362. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6363. bool LoadXML(const XMLElement&, bool = false);
  6364. void MarkNetworkUpdate() const;
  6365. void Remove();
  6366. void RemoveAllChildren();
  6367. void RemoveAllItems();
  6368. void RemoveAllTags();
  6369. void RemoveAttributeAnimation(const String&);
  6370. void RemoveChild(UIElement, uint = 0);
  6371. void RemoveChild(uint);
  6372. void RemoveInstanceDefault();
  6373. void RemoveItem(UIElement, uint = 0);
  6374. void RemoveItem(uint);
  6375. void RemoveObjectAnimation();
  6376. void RemoveSelection(uint);
  6377. bool RemoveTag(const String&);
  6378. void ResetDeepEnabled();
  6379. void ResetToDefault();
  6380. bool Save(File) const;
  6381. bool Save(VectorBuffer&) const;
  6382. bool SaveJSON(JSONValue&) const;
  6383. bool SaveXML(File, const String& = "\t");
  6384. bool SaveXML(VectorBuffer&, const String& = "\t");
  6385. bool SaveXML(XMLElement&) const;
  6386. IntVector2 ScreenToElement(const IntVector2&);
  6387. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6388. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6389. void SetAnimationTime(float);
  6390. bool SetAttribute(const String&, const Variant&);
  6391. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6392. void SetAttributeAnimationSpeed(const String&, float);
  6393. void SetAttributeAnimationTime(const String&, float);
  6394. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6395. void SetDeepEnabled(bool);
  6396. void SetEnabledRecursive(bool);
  6397. void SetFixedHeight(int);
  6398. void SetFixedSize(int, int);
  6399. void SetFixedWidth(int);
  6400. void SetInterceptNetworkUpdate(const String&, bool);
  6401. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6402. void SetMaxAnchor(float, float);
  6403. void SetMaxSize(int, int);
  6404. void SetMinAnchor(float, float);
  6405. void SetMinSize(int, int);
  6406. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6407. void SetPivot(float, float);
  6408. void SetPosition(int, int);
  6409. void SetScrollBarsVisible(bool, bool);
  6410. void SetSelections(Array<uint>);
  6411. void SetSize(int, int);
  6412. bool SetStyle(const String&, XMLFile = null);
  6413. bool SetStyle(const XMLElement&);
  6414. bool SetStyleAuto(XMLFile = null);
  6415. void SetViewPosition(int, int);
  6416. void ToggleExpand(uint, bool = false);
  6417. void ToggleSelection(uint);
  6418. void UpdateLayout();
  6419. const Variant& GetVar(const StringHash&);
  6420. // Properties:
  6421. bool animationEnabled;
  6422. /* readonly */
  6423. Array<Variant> attributeDefaults;
  6424. /* readonly */
  6425. Array<AttributeInfo> attributeInfos;
  6426. Array<Variant> attributes;
  6427. bool autoDisableChildren;
  6428. float autoDisableThreshold;
  6429. int baseIndent;
  6430. bool bringToBack;
  6431. bool bringToFront;
  6432. /* readonly */
  6433. String category;
  6434. /* readonly */
  6435. IntVector2 childOffset;
  6436. /* readonly */
  6437. Array<UIElement> children;
  6438. bool clearSelectionOnDefocus;
  6439. IntRect clipBorder;
  6440. bool clipChildren;
  6441. /* writeonly */
  6442. Color color;
  6443. /* readonly */
  6444. bool colorGradient;
  6445. Array<Color> colors;
  6446. /* readonly */
  6447. IntRect combinedScreenRect;
  6448. /* readonly */
  6449. UIElement contentElement;
  6450. XMLFile defaultStyle;
  6451. /* readonly */
  6452. float derivedOpacity;
  6453. /* readonly */
  6454. uint dragButtonCombo;
  6455. /* readonly */
  6456. int dragButtonCount;
  6457. uint dragDropMode;
  6458. bool editable;
  6459. bool elementEventSender;
  6460. bool enableAnchor;
  6461. bool enabled;
  6462. /* readonly */
  6463. bool enabledSelf;
  6464. /* readonly */
  6465. bool fixedHeight;
  6466. /* readonly */
  6467. bool fixedSize;
  6468. /* readonly */
  6469. bool fixedWidth;
  6470. bool focus;
  6471. FocusMode focusMode;
  6472. int height;
  6473. bool hierarchyMode;
  6474. HighlightMode highlightMode;
  6475. HorizontalAlignment horizontalAlignment;
  6476. /* readonly */
  6477. ScrollBar horizontalScrollBar;
  6478. /* readonly */
  6479. bool hovering;
  6480. int indent;
  6481. int indentSpacing;
  6482. /* readonly */
  6483. int indentWidth;
  6484. bool internal;
  6485. /* readonly */
  6486. Array<UIElement> items;
  6487. IntRect layoutBorder;
  6488. Vector2 layoutFlexScale;
  6489. LayoutMode layoutMode;
  6490. int layoutSpacing;
  6491. Vector2 maxAnchor;
  6492. int maxHeight;
  6493. IntVector2 maxOffset;
  6494. IntVector2 maxSize;
  6495. int maxWidth;
  6496. Vector2 minAnchor;
  6497. int minHeight;
  6498. IntVector2 minOffset;
  6499. IntVector2 minSize;
  6500. int minWidth;
  6501. bool multiselect;
  6502. String name;
  6503. /* readonly */
  6504. uint numAllChildren;
  6505. /* readonly */
  6506. uint numAttributes;
  6507. /* readonly */
  6508. uint numChildren;
  6509. /* readonly */
  6510. uint numItems;
  6511. ObjectAnimation objectAnimation;
  6512. float opacity;
  6513. float pageStep;
  6514. UIElement parent;
  6515. Vector2 pivot;
  6516. IntVector2 position;
  6517. int priority;
  6518. /* readonly */
  6519. int refs;
  6520. /* readonly */
  6521. UIElement root;
  6522. /* readonly */
  6523. IntVector2 screenPosition;
  6524. bool scrollBarsAutoVisible;
  6525. float scrollDeceleration;
  6526. /* readonly */
  6527. BorderImage scrollPanel;
  6528. float scrollSnapEpsilon;
  6529. float scrollStep;
  6530. bool selectOnClickEnd;
  6531. bool selected;
  6532. /* readonly */
  6533. UIElement selectedItem;
  6534. /* readonly */
  6535. Array<UIElement> selectedItems;
  6536. uint selection;
  6537. /* readonly */
  6538. Array<uint> selections;
  6539. IntVector2 size;
  6540. bool sortChildren;
  6541. String style;
  6542. /* readonly */
  6543. Array<String> tags;
  6544. bool temporary;
  6545. TraversalMode traversalMode;
  6546. /* readonly */
  6547. StringHash type;
  6548. /* readonly */
  6549. String typeName;
  6550. bool useDerivedOpacity;
  6551. /* readonly */
  6552. VariantMap vars;
  6553. VerticalAlignment verticalAlignment;
  6554. /* readonly */
  6555. ScrollBar verticalScrollBar;
  6556. IntVector2 viewPosition;
  6557. bool visible;
  6558. /* readonly */
  6559. bool visibleEffective;
  6560. /* readonly */
  6561. int weakRefs;
  6562. int width;
  6563. };
  6564. class Localization
  6565. {
  6566. public:
  6567. // Methods:
  6568. String Get(const String&);
  6569. String GetLanguage(int);
  6570. int GetLanguageIndex(const String&);
  6571. bool HasSubscribedToEvent(Object, const String&);
  6572. bool HasSubscribedToEvent(const String&);
  6573. void LoadJSON(const JSONValue&);
  6574. void LoadJSONFile(const String&);
  6575. void Reset();
  6576. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6577. void SetLanguage(const String&);
  6578. void SetLanguage(int);
  6579. // Properties:
  6580. /* readonly */
  6581. String category;
  6582. /* readonly */
  6583. String language;
  6584. /* readonly */
  6585. int languageIndex;
  6586. /* readonly */
  6587. int numLanguages;
  6588. /* readonly */
  6589. int refs;
  6590. /* readonly */
  6591. StringHash type;
  6592. /* readonly */
  6593. String typeName;
  6594. /* readonly */
  6595. int weakRefs;
  6596. };
  6597. class Log
  6598. {
  6599. public:
  6600. // Methods:
  6601. void Close();
  6602. void Debug(const String&);
  6603. void Error(const String&);
  6604. bool HasSubscribedToEvent(Object, const String&);
  6605. bool HasSubscribedToEvent(const String&);
  6606. void Info(const String&);
  6607. void Open(const String&);
  6608. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6609. void Warning(const String&);
  6610. void Write(const String&, bool = false);
  6611. // Properties:
  6612. /* readonly */
  6613. String category;
  6614. /* readonly */
  6615. String lastMessage;
  6616. int level;
  6617. bool quiet;
  6618. /* readonly */
  6619. int refs;
  6620. bool timeStamp;
  6621. /* readonly */
  6622. StringHash type;
  6623. /* readonly */
  6624. String typeName;
  6625. /* readonly */
  6626. int weakRefs;
  6627. };
  6628. class Material
  6629. {
  6630. public:
  6631. Material();
  6632. Material(const String&in);
  6633. // Methods:
  6634. Material Clone(const String& = String ( )) const;
  6635. Pass GetPass(uint, const String&);
  6636. ValueAnimation GetShaderParameterAnimation(const String&) const;
  6637. float GetShaderParameterAnimationSpeed(const String&) const;
  6638. WrapMode GetShaderParameterAnimationWrapMode(const String&) const;
  6639. bool HasSubscribedToEvent(Object, const String&);
  6640. bool HasSubscribedToEvent(const String&);
  6641. bool Load(File);
  6642. bool Load(VectorBuffer&);
  6643. bool Load(const JSONValue&);
  6644. bool Load(const String&);
  6645. bool Load(const XMLElement&);
  6646. void RemoveShaderParameter(const String&);
  6647. bool Save(File) const;
  6648. bool Save(JSONValue&) const;
  6649. bool Save(VectorBuffer&) const;
  6650. bool Save(XMLElement&) const;
  6651. bool Save(const String&) const;
  6652. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6653. void SetShaderParameterAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6654. void SetShaderParameterAnimationSpeed(const String&, float);
  6655. void SetShaderParameterAnimationWrapMode(const String&, WrapMode);
  6656. void SetTechnique(uint, Technique, uint = 0, float = 0.0);
  6657. void SetUVTransform(const Vector2&, float, const Vector2&);
  6658. void SetUVTransform(const Vector2&, float, float);
  6659. void SortTechniques();
  6660. // Properties:
  6661. bool alphaToCoverage;
  6662. /* readonly */
  6663. String category;
  6664. CullMode cullMode;
  6665. BiasParameters depthBias;
  6666. FillMode fillMode;
  6667. bool lineAntiAlias;
  6668. /* readonly */
  6669. uint memoryUse;
  6670. String name;
  6671. uint numTechniques;
  6672. bool occlusion;
  6673. String pixelShaderDefines;
  6674. /* readonly */
  6675. int refs;
  6676. uint8 renderOrder;
  6677. Scene scene;
  6678. /* readonly */
  6679. Array<String> shaderParameterNames;
  6680. Array<Variant> shaderParameters;
  6681. CullMode shadowCullMode;
  6682. /* readonly */
  6683. Array<TechniqueEntry> techniqueEntries;
  6684. /* readonly */
  6685. Array<Technique> techniques;
  6686. Array<Texture> textures;
  6687. /* readonly */
  6688. StringHash type;
  6689. /* readonly */
  6690. String typeName;
  6691. /* readonly */
  6692. uint useTimer;
  6693. String vertexShaderDefines;
  6694. /* readonly */
  6695. int weakRefs;
  6696. };
  6697. class Matrix2
  6698. {
  6699. public:
  6700. Matrix2();
  6701. Matrix2(const Matrix2&in);
  6702. Matrix2(float, float, float, float);
  6703. // Methods:
  6704. bool Equals(const Matrix2&) const;
  6705. Matrix2 Inverse() const;
  6706. Vector2 Scale() const;
  6707. Matrix2 Scaled(const Vector2&) const;
  6708. void SetScale(const Vector2&);
  6709. void SetScale(float);
  6710. String ToString() const;
  6711. Matrix2 Transpose() const;
  6712. // Properties:
  6713. float m00;
  6714. float m01;
  6715. float m10;
  6716. float m11;
  6717. };
  6718. class Matrix3
  6719. {
  6720. public:
  6721. Matrix3();
  6722. Matrix3(const Matrix3&in);
  6723. Matrix3(float, float, float, float, float, float, float, float, float);
  6724. // Methods:
  6725. bool Equals(const Matrix3&) const;
  6726. Matrix3 Inverse() const;
  6727. Vector3 Scale() const;
  6728. Matrix3 Scaled(const Vector3&) const;
  6729. void SetScale(const Vector3&);
  6730. void SetScale(float);
  6731. String ToString() const;
  6732. Matrix3 Transpose() const;
  6733. // Properties:
  6734. float m00;
  6735. float m01;
  6736. float m02;
  6737. float m10;
  6738. float m11;
  6739. float m12;
  6740. float m20;
  6741. float m21;
  6742. float m22;
  6743. };
  6744. class Matrix3x4
  6745. {
  6746. public:
  6747. Matrix3x4();
  6748. Matrix3x4(const Matrix3x4&in);
  6749. Matrix3x4(const Matrix3&in);
  6750. Matrix3x4(const Matrix4&in);
  6751. Matrix3x4(float, float, float, float, float, float, float, float, float, float, float, float);
  6752. Matrix3x4(const Vector3&in, const Quaternion&in, const Vector3&in);
  6753. Matrix3x4(const Vector3&in, const Quaternion&in, float);
  6754. // Methods:
  6755. void Decompose(Vector3&, Quaternion&, Vector3&) const;
  6756. bool Equals(const Matrix3x4&) const;
  6757. Matrix3x4 Inverse() const;
  6758. Quaternion Rotation() const;
  6759. Matrix3 RotationMatrix() const;
  6760. Vector3 Scale() const;
  6761. void SetRotation(const Matrix3&);
  6762. void SetScale(const Vector3&);
  6763. void SetScale(float);
  6764. void SetTranslation(const Vector3&);
  6765. Matrix3 ToMatrix3() const;
  6766. Matrix4 ToMatrix4() const;
  6767. String ToString() const;
  6768. Vector3 Translation() const;
  6769. // Properties:
  6770. float m00;
  6771. float m01;
  6772. float m02;
  6773. float m03;
  6774. float m10;
  6775. float m11;
  6776. float m12;
  6777. float m13;
  6778. float m20;
  6779. float m21;
  6780. float m22;
  6781. float m23;
  6782. };
  6783. class Matrix4
  6784. {
  6785. public:
  6786. Matrix4();
  6787. Matrix4(const Matrix4&in);
  6788. Matrix4(const Matrix3&in);
  6789. Matrix4(float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float);
  6790. // Methods:
  6791. void Decompose(Vector3&, Quaternion&, Vector3&) const;
  6792. bool Equals(const Matrix4&) const;
  6793. Matrix4 Inverse() const;
  6794. Quaternion Rotation() const;
  6795. Matrix3 RotationMatrix() const;
  6796. Vector3 Scale() const;
  6797. void SetRotation(const Matrix3&);
  6798. void SetScale(const Vector3&);
  6799. void SetScale(float);
  6800. void SetTranslation(const Vector3&);
  6801. Matrix3 ToMatrix3() const;
  6802. String ToString() const;
  6803. Vector3 Translation() const;
  6804. Matrix4 Transpose() const;
  6805. // Properties:
  6806. float m00;
  6807. float m01;
  6808. float m02;
  6809. float m03;
  6810. float m10;
  6811. float m11;
  6812. float m12;
  6813. float m13;
  6814. float m20;
  6815. float m21;
  6816. float m22;
  6817. float m23;
  6818. float m30;
  6819. float m31;
  6820. float m32;
  6821. float m33;
  6822. };
  6823. class Menu
  6824. {
  6825. public:
  6826. Menu();
  6827. Menu(const String&in);
  6828. // Methods:
  6829. void AddChild(UIElement);
  6830. void AddTag(const String&);
  6831. void AddTags(const String&, int8 = ';');
  6832. void ApplyAttributes();
  6833. void BringToFront();
  6834. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  6835. void DisableLayoutUpdate();
  6836. IntVector2 ElementToScreen(const IntVector2&);
  6837. void EnableLayoutUpdate();
  6838. uint FindChild(UIElement) const;
  6839. Variant GetAttribute(const String&) const;
  6840. ValueAnimation GetAttributeAnimation(const String&) const;
  6841. float GetAttributeAnimationSpeed(const String&) const;
  6842. float GetAttributeAnimationTime(const String&) const;
  6843. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  6844. Variant GetAttributeDefault(const String&) const;
  6845. UIElement GetChild(const String&, bool = false) const;
  6846. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  6847. Array<UIElement> GetChildren(bool = false) const;
  6848. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  6849. UIElement GetElementEventSender() const;
  6850. bool GetInterceptNetworkUpdate(const String&) const;
  6851. uint GetNumChildren(bool) const;
  6852. bool HasSubscribedToEvent(Object, const String&);
  6853. bool HasSubscribedToEvent(const String&);
  6854. bool HasTag(const String&) const;
  6855. void InsertChild(uint, UIElement);
  6856. bool IsInside(IntVector2, bool);
  6857. bool IsInsideCombined(IntVector2, bool);
  6858. bool Load(File, bool = false);
  6859. bool Load(VectorBuffer&, bool = false);
  6860. UIElement LoadChildXML(XMLFile, XMLFile = null);
  6861. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  6862. bool LoadJSON(const JSONValue&, bool = false);
  6863. bool LoadXML(File);
  6864. bool LoadXML(VectorBuffer&);
  6865. bool LoadXML(XMLFile, XMLFile);
  6866. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  6867. bool LoadXML(const XMLElement&, bool = false);
  6868. void MarkNetworkUpdate() const;
  6869. void Remove();
  6870. void RemoveAllChildren();
  6871. void RemoveAllTags();
  6872. void RemoveAttributeAnimation(const String&);
  6873. void RemoveChild(UIElement, uint = 0);
  6874. void RemoveChild(uint);
  6875. void RemoveInstanceDefault();
  6876. void RemoveObjectAnimation();
  6877. bool RemoveTag(const String&);
  6878. void ResetDeepEnabled();
  6879. void ResetToDefault();
  6880. bool Save(File) const;
  6881. bool Save(VectorBuffer&) const;
  6882. bool SaveJSON(JSONValue&) const;
  6883. bool SaveXML(File, const String& = "\t");
  6884. bool SaveXML(VectorBuffer&, const String& = "\t");
  6885. bool SaveXML(XMLElement&) const;
  6886. IntVector2 ScreenToElement(const IntVector2&);
  6887. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  6888. void SetAccelerator(int, int);
  6889. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  6890. void SetAnimationTime(float);
  6891. bool SetAttribute(const String&, const Variant&);
  6892. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  6893. void SetAttributeAnimationSpeed(const String&, float);
  6894. void SetAttributeAnimationTime(const String&, float);
  6895. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  6896. void SetDeepEnabled(bool);
  6897. void SetEnabledRecursive(bool);
  6898. void SetFixedHeight(int);
  6899. void SetFixedSize(int, int);
  6900. void SetFixedWidth(int);
  6901. void SetFullImageRect();
  6902. void SetHoverOffset(int, int);
  6903. void SetInterceptNetworkUpdate(const String&, bool);
  6904. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  6905. void SetMaxAnchor(float, float);
  6906. void SetMaxSize(int, int);
  6907. void SetMinAnchor(float, float);
  6908. void SetMinSize(int, int);
  6909. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  6910. void SetPivot(float, float);
  6911. void SetPopupOffset(int, int);
  6912. void SetPosition(int, int);
  6913. void SetPressedChildOffset(int, int);
  6914. void SetPressedOffset(int, int);
  6915. void SetRepeat(float, float);
  6916. void SetSize(int, int);
  6917. bool SetStyle(const String&, XMLFile = null);
  6918. bool SetStyle(const XMLElement&);
  6919. bool SetStyleAuto(XMLFile = null);
  6920. void UpdateLayout();
  6921. const Variant& GetVar(const StringHash&);
  6922. // Properties:
  6923. /* readonly */
  6924. int acceleratorKey;
  6925. /* readonly */
  6926. int acceleratorQualifiers;
  6927. bool animationEnabled;
  6928. /* readonly */
  6929. Array<Variant> attributeDefaults;
  6930. /* readonly */
  6931. Array<AttributeInfo> attributeInfos;
  6932. Array<Variant> attributes;
  6933. BlendMode blendMode;
  6934. IntRect border;
  6935. bool bringToBack;
  6936. bool bringToFront;
  6937. /* readonly */
  6938. String category;
  6939. /* readonly */
  6940. IntVector2 childOffset;
  6941. /* readonly */
  6942. Array<UIElement> children;
  6943. IntRect clipBorder;
  6944. bool clipChildren;
  6945. /* writeonly */
  6946. Color color;
  6947. /* readonly */
  6948. bool colorGradient;
  6949. Array<Color> colors;
  6950. /* readonly */
  6951. IntRect combinedScreenRect;
  6952. XMLFile defaultStyle;
  6953. /* readonly */
  6954. float derivedOpacity;
  6955. /* readonly */
  6956. uint dragButtonCombo;
  6957. /* readonly */
  6958. int dragButtonCount;
  6959. uint dragDropMode;
  6960. bool editable;
  6961. bool elementEventSender;
  6962. bool enableAnchor;
  6963. bool enabled;
  6964. /* readonly */
  6965. bool enabledSelf;
  6966. /* readonly */
  6967. bool fixedHeight;
  6968. /* readonly */
  6969. bool fixedSize;
  6970. /* readonly */
  6971. bool fixedWidth;
  6972. bool focus;
  6973. FocusMode focusMode;
  6974. int height;
  6975. HorizontalAlignment horizontalAlignment;
  6976. IntVector2 hoverOffset;
  6977. /* readonly */
  6978. bool hovering;
  6979. IntRect imageBorder;
  6980. IntRect imageRect;
  6981. int indent;
  6982. int indentSpacing;
  6983. /* readonly */
  6984. int indentWidth;
  6985. bool internal;
  6986. IntRect layoutBorder;
  6987. Vector2 layoutFlexScale;
  6988. LayoutMode layoutMode;
  6989. int layoutSpacing;
  6990. Vector2 maxAnchor;
  6991. int maxHeight;
  6992. IntVector2 maxOffset;
  6993. IntVector2 maxSize;
  6994. int maxWidth;
  6995. Vector2 minAnchor;
  6996. int minHeight;
  6997. IntVector2 minOffset;
  6998. IntVector2 minSize;
  6999. int minWidth;
  7000. String name;
  7001. /* readonly */
  7002. uint numAllChildren;
  7003. /* readonly */
  7004. uint numAttributes;
  7005. /* readonly */
  7006. uint numChildren;
  7007. ObjectAnimation objectAnimation;
  7008. float opacity;
  7009. UIElement parent;
  7010. Vector2 pivot;
  7011. UIElement popup;
  7012. IntVector2 popupOffset;
  7013. IntVector2 position;
  7014. /* readonly */
  7015. bool pressed;
  7016. IntVector2 pressedChildOffset;
  7017. IntVector2 pressedOffset;
  7018. int priority;
  7019. /* readonly */
  7020. int refs;
  7021. float repeatDelay;
  7022. float repeatRate;
  7023. /* readonly */
  7024. UIElement root;
  7025. /* readonly */
  7026. IntVector2 screenPosition;
  7027. bool selected;
  7028. bool showPopup;
  7029. IntVector2 size;
  7030. bool sortChildren;
  7031. String style;
  7032. /* readonly */
  7033. Array<String> tags;
  7034. bool temporary;
  7035. Texture texture;
  7036. bool tiled;
  7037. TraversalMode traversalMode;
  7038. /* readonly */
  7039. StringHash type;
  7040. /* readonly */
  7041. String typeName;
  7042. bool useDerivedOpacity;
  7043. /* readonly */
  7044. VariantMap vars;
  7045. VerticalAlignment verticalAlignment;
  7046. bool visible;
  7047. /* readonly */
  7048. bool visibleEffective;
  7049. /* readonly */
  7050. int weakRefs;
  7051. int width;
  7052. };
  7053. class MessageBox
  7054. {
  7055. public:
  7056. MessageBox(const String&in messageString = String ( ), const String&in titleString = String ( ), XMLFile& layoutFile = null, XMLFile& styleFile = null);
  7057. // Methods:
  7058. bool HasSubscribedToEvent(Object, const String&);
  7059. bool HasSubscribedToEvent(const String&);
  7060. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7061. // Properties:
  7062. /* readonly */
  7063. String category;
  7064. String message;
  7065. /* readonly */
  7066. int refs;
  7067. String title;
  7068. /* readonly */
  7069. StringHash type;
  7070. /* readonly */
  7071. String typeName;
  7072. /* readonly */
  7073. int weakRefs;
  7074. /* readonly */
  7075. UIElement window;
  7076. };
  7077. class Model
  7078. {
  7079. public:
  7080. Model();
  7081. Model(const String&in);
  7082. // Methods:
  7083. Model Clone(const String& = String ( )) const;
  7084. Geometry GetGeometry(uint, uint) const;
  7085. bool HasSubscribedToEvent(Object, const String&);
  7086. bool HasSubscribedToEvent(const String&);
  7087. bool Load(File);
  7088. bool Load(VectorBuffer&);
  7089. bool Load(const String&);
  7090. bool Save(File) const;
  7091. bool Save(VectorBuffer&) const;
  7092. bool Save(const String&) const;
  7093. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7094. bool SetGeometry(uint, uint, Geometry);
  7095. bool SetIndexBuffers(Array<IndexBuffer>);
  7096. bool SetVertexBuffers(Array<Array<Array<VertexBuffer>, uint>, uint>);
  7097. // Properties:
  7098. BoundingBox boundingBox;
  7099. /* readonly */
  7100. String category;
  7101. Array<Vector3> geometryCenters;
  7102. /* readonly */
  7103. uint memoryUse;
  7104. String name;
  7105. uint numGeometries;
  7106. Array<uint> numGeometryLodLevels;
  7107. /* readonly */
  7108. uint numMorphs;
  7109. /* readonly */
  7110. int refs;
  7111. /* readonly */
  7112. Skeleton skeleton;
  7113. /* readonly */
  7114. StringHash type;
  7115. /* readonly */
  7116. String typeName;
  7117. /* readonly */
  7118. uint useTimer;
  7119. /* readonly */
  7120. int weakRefs;
  7121. };
  7122. class NamedPipe
  7123. {
  7124. public:
  7125. NamedPipe();
  7126. NamedPipe(const String&in, bool);
  7127. // Methods:
  7128. void Close();
  7129. bool HasSubscribedToEvent(Object, const String&);
  7130. bool HasSubscribedToEvent(const String&);
  7131. bool Open(const String&, bool);
  7132. Array<uint8> Read(uint);
  7133. bool ReadBool();
  7134. BoundingBox ReadBoundingBox();
  7135. int8 ReadByte();
  7136. Color ReadColor();
  7137. double ReadDouble();
  7138. String ReadFileID();
  7139. float ReadFloat();
  7140. int ReadInt();
  7141. int64 ReadInt64();
  7142. IntRect ReadIntRect();
  7143. IntVector2 ReadIntVector2();
  7144. String ReadLine();
  7145. Matrix3 ReadMatrix3();
  7146. Matrix3x4 ReadMatrix3x4();
  7147. Matrix4 ReadMatrix4();
  7148. uint ReadNetID();
  7149. Quaternion ReadPackedQuaternion();
  7150. Vector3 ReadPackedVector3(float);
  7151. Quaternion ReadQuaternion();
  7152. int16 ReadShort();
  7153. String ReadString();
  7154. StringHash ReadStringHash();
  7155. uint8 ReadUByte();
  7156. uint ReadUInt();
  7157. uint64 ReadUInt64();
  7158. uint16 ReadUShort();
  7159. uint ReadVLE();
  7160. Variant ReadVariant();
  7161. VariantMap ReadVariantMap();
  7162. Vector2 ReadVector2();
  7163. Vector3 ReadVector3();
  7164. Vector4 ReadVector4();
  7165. VectorBuffer ReadVectorBuffer(uint);
  7166. uint Seek(uint);
  7167. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7168. uint Write(Array<uint8>);
  7169. bool WriteBool(bool);
  7170. bool WriteBoundingBox(const BoundingBox&);
  7171. bool WriteByte(int8);
  7172. bool WriteColor(const Color&);
  7173. bool WriteDouble(double);
  7174. bool WriteFileID(const String&);
  7175. bool WriteFloat(float);
  7176. bool WriteInt(int);
  7177. bool WriteInt64(int64);
  7178. bool WriteIntRect(const IntRect&);
  7179. bool WriteIntVector2(const IntVector2&);
  7180. bool WriteLine(const String&);
  7181. bool WriteMatrix3(const Matrix3&);
  7182. bool WriteMatrix3x4(const Matrix3x4&);
  7183. bool WriteMatrix4(const Matrix4&);
  7184. bool WriteNetID(uint);
  7185. bool WritePackedQuaternion(const Quaternion&);
  7186. bool WritePackedVector3(const Vector3&, float);
  7187. bool WriteQuaternion(const Quaternion&);
  7188. bool WriteShort(int16);
  7189. bool WriteString(const String&);
  7190. bool WriteStringHash(const StringHash&);
  7191. bool WriteUByte(uint8);
  7192. bool WriteUInt(uint);
  7193. bool WriteUInt64(uint64);
  7194. bool WriteUShort(uint16);
  7195. bool WriteVLE(uint);
  7196. bool WriteVariant(const Variant&);
  7197. bool WriteVariantMap(const VariantMap&);
  7198. bool WriteVector2(const Vector2&);
  7199. bool WriteVector3(const Vector3&);
  7200. bool WriteVector4(const Vector4&);
  7201. bool WriteVectorBuffer(const VectorBuffer&);
  7202. // Properties:
  7203. /* readonly */
  7204. String category;
  7205. /* readonly */
  7206. uint checksum;
  7207. /* readonly */
  7208. bool eof;
  7209. /* readonly */
  7210. String name;
  7211. /* readonly */
  7212. bool open;
  7213. /* readonly */
  7214. uint position;
  7215. /* readonly */
  7216. int refs;
  7217. /* readonly */
  7218. bool server;
  7219. /* readonly */
  7220. uint size;
  7221. /* readonly */
  7222. StringHash type;
  7223. /* readonly */
  7224. String typeName;
  7225. /* readonly */
  7226. int weakRefs;
  7227. };
  7228. class NavArea
  7229. {
  7230. public:
  7231. // Methods:
  7232. void ApplyAttributes();
  7233. void DrawDebugGeometry(DebugRenderer, bool);
  7234. Variant GetAttribute(const String&) const;
  7235. ValueAnimation GetAttributeAnimation(const String&) const;
  7236. float GetAttributeAnimationSpeed(const String&) const;
  7237. float GetAttributeAnimationTime(const String&) const;
  7238. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7239. Variant GetAttributeDefault(const String&) const;
  7240. bool GetInterceptNetworkUpdate(const String&) const;
  7241. bool HasSubscribedToEvent(Object, const String&);
  7242. bool HasSubscribedToEvent(const String&);
  7243. bool Load(File, bool = false);
  7244. bool Load(VectorBuffer&, bool = false);
  7245. bool LoadJSON(const JSONValue&, bool = false);
  7246. bool LoadXML(const XMLElement&, bool = false);
  7247. void MarkNetworkUpdate() const;
  7248. void Remove();
  7249. void RemoveAttributeAnimation(const String&);
  7250. void RemoveInstanceDefault();
  7251. void RemoveObjectAnimation();
  7252. void ResetToDefault();
  7253. bool Save(File) const;
  7254. bool Save(VectorBuffer&) const;
  7255. bool SaveJSON(JSONValue&) const;
  7256. bool SaveXML(XMLElement&) const;
  7257. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7258. void SetAnimationTime(float);
  7259. bool SetAttribute(const String&, const Variant&);
  7260. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7261. void SetAttributeAnimationSpeed(const String&, float);
  7262. void SetAttributeAnimationTime(const String&, float);
  7263. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7264. void SetInterceptNetworkUpdate(const String&, bool);
  7265. // Properties:
  7266. bool animationEnabled;
  7267. uint areaID;
  7268. /* readonly */
  7269. Array<Variant> attributeDefaults;
  7270. /* readonly */
  7271. Array<AttributeInfo> attributeInfos;
  7272. Array<Variant> attributes;
  7273. BoundingBox boundingBox;
  7274. /* readonly */
  7275. String category;
  7276. bool enabled;
  7277. /* readonly */
  7278. bool enabledEffective;
  7279. /* readonly */
  7280. uint id;
  7281. /* readonly */
  7282. Node node;
  7283. /* readonly */
  7284. uint numAttributes;
  7285. ObjectAnimation objectAnimation;
  7286. /* readonly */
  7287. int refs;
  7288. bool temporary;
  7289. /* readonly */
  7290. StringHash type;
  7291. /* readonly */
  7292. String typeName;
  7293. /* readonly */
  7294. int weakRefs;
  7295. /* readonly */
  7296. BoundingBox worldBoundingBox;
  7297. };
  7298. class Navigable
  7299. {
  7300. public:
  7301. // Methods:
  7302. void ApplyAttributes();
  7303. void DrawDebugGeometry(DebugRenderer, bool);
  7304. Variant GetAttribute(const String&) const;
  7305. ValueAnimation GetAttributeAnimation(const String&) const;
  7306. float GetAttributeAnimationSpeed(const String&) const;
  7307. float GetAttributeAnimationTime(const String&) const;
  7308. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7309. Variant GetAttributeDefault(const String&) const;
  7310. bool GetInterceptNetworkUpdate(const String&) const;
  7311. bool HasSubscribedToEvent(Object, const String&);
  7312. bool HasSubscribedToEvent(const String&);
  7313. bool Load(File, bool = false);
  7314. bool Load(VectorBuffer&, bool = false);
  7315. bool LoadJSON(const JSONValue&, bool = false);
  7316. bool LoadXML(const XMLElement&, bool = false);
  7317. void MarkNetworkUpdate() const;
  7318. void Remove();
  7319. void RemoveAttributeAnimation(const String&);
  7320. void RemoveInstanceDefault();
  7321. void RemoveObjectAnimation();
  7322. void ResetToDefault();
  7323. bool Save(File) const;
  7324. bool Save(VectorBuffer&) const;
  7325. bool SaveJSON(JSONValue&) const;
  7326. bool SaveXML(XMLElement&) const;
  7327. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7328. void SetAnimationTime(float);
  7329. bool SetAttribute(const String&, const Variant&);
  7330. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7331. void SetAttributeAnimationSpeed(const String&, float);
  7332. void SetAttributeAnimationTime(const String&, float);
  7333. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7334. void SetInterceptNetworkUpdate(const String&, bool);
  7335. // Properties:
  7336. bool animationEnabled;
  7337. /* readonly */
  7338. Array<Variant> attributeDefaults;
  7339. /* readonly */
  7340. Array<AttributeInfo> attributeInfos;
  7341. Array<Variant> attributes;
  7342. /* readonly */
  7343. String category;
  7344. bool enabled;
  7345. /* readonly */
  7346. bool enabledEffective;
  7347. /* readonly */
  7348. uint id;
  7349. /* readonly */
  7350. Node node;
  7351. /* readonly */
  7352. uint numAttributes;
  7353. ObjectAnimation objectAnimation;
  7354. bool recursive;
  7355. /* readonly */
  7356. int refs;
  7357. bool temporary;
  7358. /* readonly */
  7359. StringHash type;
  7360. /* readonly */
  7361. String typeName;
  7362. /* readonly */
  7363. int weakRefs;
  7364. };
  7365. class NavigationMesh
  7366. {
  7367. public:
  7368. // Methods:
  7369. void ApplyAttributes();
  7370. bool Build();
  7371. bool Build(const BoundingBox&);
  7372. void DrawDebugGeometry(DebugRenderer, bool);
  7373. void DrawDebugGeometry(bool);
  7374. Vector3 FindNearestPoint(const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7375. Array<Vector3> FindPath(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7376. float GetAreaCost(uint) const;
  7377. Variant GetAttribute(const String&) const;
  7378. ValueAnimation GetAttributeAnimation(const String&) const;
  7379. float GetAttributeAnimationSpeed(const String&) const;
  7380. float GetAttributeAnimationTime(const String&) const;
  7381. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7382. Variant GetAttributeDefault(const String&) const;
  7383. float GetDistanceToWall(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7384. bool GetInterceptNetworkUpdate(const String&) const;
  7385. Vector3 GetRandomPoint();
  7386. Vector3 GetRandomPointInCircle(const Vector3&, float, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7387. bool HasSubscribedToEvent(Object, const String&);
  7388. bool HasSubscribedToEvent(const String&);
  7389. bool Load(File, bool = false);
  7390. bool Load(VectorBuffer&, bool = false);
  7391. bool LoadJSON(const JSONValue&, bool = false);
  7392. bool LoadXML(const XMLElement&, bool = false);
  7393. void MarkNetworkUpdate() const;
  7394. Vector3 MoveAlongSurface(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ), int = 3);
  7395. Vector3 Raycast(const Vector3&, const Vector3&, const Vector3& = Vector3 ( 1.0 , 1.0 , 1.0 ));
  7396. void Remove();
  7397. void RemoveAttributeAnimation(const String&);
  7398. void RemoveInstanceDefault();
  7399. void RemoveObjectAnimation();
  7400. void ResetToDefault();
  7401. bool Save(File) const;
  7402. bool Save(VectorBuffer&) const;
  7403. bool SaveJSON(JSONValue&) const;
  7404. bool SaveXML(XMLElement&) const;
  7405. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7406. void SetAnimationTime(float);
  7407. void SetAreaCost(uint, float);
  7408. bool SetAttribute(const String&, const Variant&);
  7409. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7410. void SetAttributeAnimationSpeed(const String&, float);
  7411. void SetAttributeAnimationTime(const String&, float);
  7412. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7413. void SetInterceptNetworkUpdate(const String&, bool);
  7414. // Properties:
  7415. float agentHeight;
  7416. float agentMaxClimb;
  7417. float agentMaxSlope;
  7418. float agentRadius;
  7419. bool animationEnabled;
  7420. /* readonly */
  7421. Array<Variant> attributeDefaults;
  7422. /* readonly */
  7423. Array<AttributeInfo> attributeInfos;
  7424. Array<Variant> attributes;
  7425. /* readonly */
  7426. BoundingBox boundingBox;
  7427. /* readonly */
  7428. String category;
  7429. float cellHeight;
  7430. float cellSize;
  7431. float detailSampleDistance;
  7432. float detailSampleMaxError;
  7433. bool drawNavAreas;
  7434. bool drawOffMeshConnections;
  7435. float edgeMaxError;
  7436. float edgeMaxLength;
  7437. bool enabled;
  7438. /* readonly */
  7439. bool enabledEffective;
  7440. /* readonly */
  7441. uint id;
  7442. /* readonly */
  7443. bool initialized;
  7444. /* readonly */
  7445. Node node;
  7446. /* readonly */
  7447. uint numAttributes;
  7448. /* readonly */
  7449. IntVector2 numTiles;
  7450. ObjectAnimation objectAnimation;
  7451. Vector3 padding;
  7452. NavmeshPartitionType partitionType;
  7453. /* readonly */
  7454. int refs;
  7455. float regionMergeSize;
  7456. float regionMinSize;
  7457. bool temporary;
  7458. int tileSize;
  7459. /* readonly */
  7460. StringHash type;
  7461. /* readonly */
  7462. String typeName;
  7463. /* readonly */
  7464. int weakRefs;
  7465. /* readonly */
  7466. BoundingBox worldBoundingBox;
  7467. };
  7468. class Network
  7469. {
  7470. public:
  7471. // Methods:
  7472. void BroadcastMessage(int, bool, bool, const VectorBuffer&, uint = 0);
  7473. void BroadcastRemoteEvent(Node, const String&, bool, const VariantMap& = VariantMap ( ));
  7474. void BroadcastRemoteEvent(Scene, const String&, bool, const VariantMap& = VariantMap ( ));
  7475. void BroadcastRemoteEvent(const String&, bool, const VariantMap& = VariantMap ( ));
  7476. bool CheckRemoteEvent(const String&) const;
  7477. bool Connect(const String&, uint16, Scene, const VariantMap& = VariantMap ( ));
  7478. void Disconnect(int = 0);
  7479. bool HasSubscribedToEvent(Object, const String&);
  7480. bool HasSubscribedToEvent(const String&);
  7481. HttpRequest MakeHttpRequest(const String&, const String& = String ( ), Array<String> = null, const String& = String ( ));
  7482. void RegisterRemoteEvent(const String&) const;
  7483. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7484. void SendPackageToClients(Scene, PackageFile);
  7485. bool StartServer(uint16);
  7486. void StopServer();
  7487. void UnregisterAllRemoteEvents();
  7488. void UnregisterRemoteEvent(const String&) const;
  7489. // Properties:
  7490. /* readonly */
  7491. String category;
  7492. /* readonly */
  7493. Array<Connection> clientConnections;
  7494. String packageCacheDir;
  7495. /* readonly */
  7496. int refs;
  7497. /* readonly */
  7498. Connection serverConnection;
  7499. /* readonly */
  7500. bool serverRunning;
  7501. int simulatedLatency;
  7502. float simulatedPacketLoss;
  7503. /* readonly */
  7504. StringHash type;
  7505. /* readonly */
  7506. String typeName;
  7507. int updateFps;
  7508. /* readonly */
  7509. int weakRefs;
  7510. };
  7511. class NetworkPriority
  7512. {
  7513. public:
  7514. // Methods:
  7515. void ApplyAttributes();
  7516. void DrawDebugGeometry(DebugRenderer, bool);
  7517. Variant GetAttribute(const String&) const;
  7518. ValueAnimation GetAttributeAnimation(const String&) const;
  7519. float GetAttributeAnimationSpeed(const String&) const;
  7520. float GetAttributeAnimationTime(const String&) const;
  7521. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7522. Variant GetAttributeDefault(const String&) const;
  7523. bool GetInterceptNetworkUpdate(const String&) const;
  7524. bool HasSubscribedToEvent(Object, const String&);
  7525. bool HasSubscribedToEvent(const String&);
  7526. bool Load(File, bool = false);
  7527. bool Load(VectorBuffer&, bool = false);
  7528. bool LoadJSON(const JSONValue&, bool = false);
  7529. bool LoadXML(const XMLElement&, bool = false);
  7530. void MarkNetworkUpdate() const;
  7531. void Remove();
  7532. void RemoveAttributeAnimation(const String&);
  7533. void RemoveInstanceDefault();
  7534. void RemoveObjectAnimation();
  7535. void ResetToDefault();
  7536. bool Save(File) const;
  7537. bool Save(VectorBuffer&) const;
  7538. bool SaveJSON(JSONValue&) const;
  7539. bool SaveXML(XMLElement&) const;
  7540. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7541. void SetAnimationTime(float);
  7542. bool SetAttribute(const String&, const Variant&);
  7543. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7544. void SetAttributeAnimationSpeed(const String&, float);
  7545. void SetAttributeAnimationTime(const String&, float);
  7546. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7547. void SetInterceptNetworkUpdate(const String&, bool);
  7548. // Properties:
  7549. bool alwaysUpdateOwner;
  7550. bool animationEnabled;
  7551. /* readonly */
  7552. Array<Variant> attributeDefaults;
  7553. /* readonly */
  7554. Array<AttributeInfo> attributeInfos;
  7555. Array<Variant> attributes;
  7556. float basePriority;
  7557. /* readonly */
  7558. String category;
  7559. float distanceFactor;
  7560. bool enabled;
  7561. /* readonly */
  7562. bool enabledEffective;
  7563. /* readonly */
  7564. uint id;
  7565. float minPriority;
  7566. /* readonly */
  7567. Node node;
  7568. /* readonly */
  7569. uint numAttributes;
  7570. ObjectAnimation objectAnimation;
  7571. /* readonly */
  7572. int refs;
  7573. bool temporary;
  7574. /* readonly */
  7575. StringHash type;
  7576. /* readonly */
  7577. String typeName;
  7578. /* readonly */
  7579. int weakRefs;
  7580. };
  7581. class Node
  7582. {
  7583. public:
  7584. Node();
  7585. Node(const String&in);
  7586. // Methods:
  7587. void AddChild(Node, uint = M_MAX_UNSIGNED);
  7588. void AddTag(const String&);
  7589. void AddTags(const String&, int8 = ';');
  7590. void ApplyAttributes();
  7591. Node Clone(CreateMode = REPLICATED);
  7592. Component CloneComponent(Component, CreateMode, uint = 0);
  7593. Component CloneComponent(Component, uint = 0);
  7594. Node CreateChild(const String& = String ( ), CreateMode = REPLICATED, uint = 0, bool = false);
  7595. Component CreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  7596. ScriptObject CreateScriptObject(ScriptFile, const String&, CreateMode = REPLICATED);
  7597. ScriptObject CreateScriptObject(const String&, const String&, CreateMode = REPLICATED);
  7598. Node CreateTemporaryChild(const String& = String ( ), CreateMode = REPLICATED, uint = 0);
  7599. Variant GetAttribute(const String&) const;
  7600. ValueAnimation GetAttributeAnimation(const String&) const;
  7601. float GetAttributeAnimationSpeed(const String&) const;
  7602. float GetAttributeAnimationTime(const String&) const;
  7603. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7604. Variant GetAttributeDefault(const String&) const;
  7605. Node GetChild(const String&, bool = false) const;
  7606. Array<Node> GetChildren(bool = false) const;
  7607. Array<Node> GetChildrenWithComponent(const String&, bool = false) const;
  7608. Array<Node> GetChildrenWithScript(bool = false) const;
  7609. Array<Node> GetChildrenWithScript(const String&, bool = false) const;
  7610. Array<Node> GetChildrenWithTag(const String&, bool = false) const;
  7611. Component GetComponent(const String&, bool = false) const;
  7612. Array<Component> GetComponents() const;
  7613. Array<Component> GetComponents(const String&, bool = false) const;
  7614. bool GetInterceptNetworkUpdate(const String&) const;
  7615. Component GetOrCreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  7616. Component GetParentComponent(const String&, bool = false) const;
  7617. ScriptObject GetScriptObject() const;
  7618. ScriptObject GetScriptObject(const String&) const;
  7619. bool HasComponent(const String&) const;
  7620. bool HasSubscribedToEvent(Object, const String&);
  7621. bool HasSubscribedToEvent(const String&);
  7622. bool HasTag(const String&);
  7623. bool IsChildOf(Node) const;
  7624. bool Load(File, bool = false);
  7625. bool Load(VectorBuffer&, bool = false);
  7626. bool LoadJSON(const JSONValue&, bool = false);
  7627. bool LoadXML(const XMLElement&, bool = false);
  7628. Vector3 LocalToWorld(const Vector3&) const;
  7629. Vector3 LocalToWorld(const Vector4&) const;
  7630. Vector2 LocalToWorld2D(const Vector2&) const;
  7631. bool LookAt(const Vector3&, const Vector3& = Vector3 ( 0 , 1 , 0 ), TransformSpace = TS_WORLD);
  7632. void MarkDirty();
  7633. void MarkNetworkUpdate() const;
  7634. void Pitch(float, TransformSpace = TS_LOCAL);
  7635. void Remove();
  7636. void RemoveAllChildren();
  7637. void RemoveAllComponents();
  7638. void RemoveAllTags();
  7639. void RemoveAttributeAnimation(const String&);
  7640. void RemoveChild(Node);
  7641. void RemoveChildren(bool, bool, bool);
  7642. void RemoveComponent(Component);
  7643. void RemoveComponent(const String&);
  7644. void RemoveComponents(bool, bool);
  7645. void RemoveComponents(const String&);
  7646. void RemoveInstanceDefault();
  7647. void RemoveObjectAnimation();
  7648. bool RemoveTag(const String&);
  7649. void ReorderComponent(Component, uint);
  7650. void ResetDeepEnabled();
  7651. void ResetToDefault();
  7652. void Roll(float, TransformSpace = TS_LOCAL);
  7653. void Rotate(const Quaternion&, TransformSpace = TS_LOCAL);
  7654. void Rotate2D(float, TransformSpace = TS_LOCAL);
  7655. void RotateAround(const Vector3&, const Quaternion&, TransformSpace = TS_LOCAL);
  7656. void RotateAround2D(const Vector2&, float, TransformSpace = TS_LOCAL);
  7657. bool Save(File) const;
  7658. bool Save(VectorBuffer&) const;
  7659. bool SaveJSON(File);
  7660. bool SaveJSON(JSONValue&) const;
  7661. bool SaveJSON(VectorBuffer&);
  7662. bool SaveXML(File, const String& = "\t");
  7663. bool SaveXML(VectorBuffer&, const String& = "\t");
  7664. bool SaveXML(XMLElement&) const;
  7665. void Scale(const Vector3&);
  7666. void Scale(float);
  7667. void Scale2D(const Vector2&);
  7668. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7669. void SetAnimationTime(float);
  7670. bool SetAttribute(const String&, const Variant&);
  7671. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7672. void SetAttributeAnimationSpeed(const String&, float);
  7673. void SetAttributeAnimationTime(const String&, float);
  7674. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7675. void SetDeepEnabled(bool);
  7676. void SetEnabledRecursive(bool);
  7677. void SetInterceptNetworkUpdate(const String&, bool);
  7678. void SetPosition2D(float, float);
  7679. void SetScale(float);
  7680. void SetScale2D(float, float);
  7681. void SetTransform(const Matrix3x4&);
  7682. void SetTransform(const Vector3&, const Quaternion&);
  7683. void SetTransform(const Vector3&, const Quaternion&, const Vector3&);
  7684. void SetTransform(const Vector3&, const Quaternion&, float);
  7685. void SetTransform2D(const Vector2&, float);
  7686. void SetTransform2D(const Vector2&, float, const Vector2&);
  7687. void SetTransform2D(const Vector2&, float, float);
  7688. void SetWorldTransform(const Vector3&, const Quaternion&);
  7689. void SetWorldTransform(const Vector3&, const Quaternion&, const Vector3&);
  7690. void SetWorldTransform(const Vector3&, const Quaternion&, float);
  7691. void SetWorldTransform2D(const Vector2&, float);
  7692. void SetWorldTransform2D(const Vector2&, float, const Vector2&);
  7693. void SetWorldTransform2D(const Vector2&, float, float);
  7694. void Translate(const Vector3&, TransformSpace = TS_LOCAL);
  7695. void Translate2D(const Vector2&, TransformSpace = TS_LOCAL);
  7696. Vector3 WorldToLocal(const Vector3&) const;
  7697. Vector3 WorldToLocal(const Vector4&) const;
  7698. Vector2 WorldToLocal2D(const Vector2&) const;
  7699. void Yaw(float, TransformSpace = TS_LOCAL);
  7700. // Properties:
  7701. bool animationEnabled;
  7702. /* readonly */
  7703. Array<Variant> attributeDefaults;
  7704. /* readonly */
  7705. Array<AttributeInfo> attributeInfos;
  7706. Array<Variant> attributes;
  7707. /* readonly */
  7708. String category;
  7709. /* readonly */
  7710. Array<Node> children;
  7711. /* readonly */
  7712. Array<Component> components;
  7713. Vector3 direction;
  7714. bool enabled;
  7715. /* readonly */
  7716. bool enabledSelf;
  7717. uint id;
  7718. String name;
  7719. /* readonly */
  7720. uint numAllChildren;
  7721. /* readonly */
  7722. uint numAttributes;
  7723. /* readonly */
  7724. uint numChildren;
  7725. /* readonly */
  7726. uint numComponents;
  7727. ObjectAnimation objectAnimation;
  7728. Connection owner;
  7729. Node parent;
  7730. Vector3 position;
  7731. Vector2 position2D;
  7732. /* readonly */
  7733. int refs;
  7734. /* readonly */
  7735. Vector3 right;
  7736. Quaternion rotation;
  7737. float rotation2D;
  7738. Vector3 scale;
  7739. Vector2 scale2D;
  7740. /* readonly */
  7741. Scene scene;
  7742. /* readonly */
  7743. ScriptObject scriptObject;
  7744. /* readonly */
  7745. Vector3 signedWorldScale;
  7746. /* readonly */
  7747. Array<String> tags;
  7748. bool temporary;
  7749. /* readonly */
  7750. Matrix3x4 transform;
  7751. /* readonly */
  7752. StringHash type;
  7753. /* readonly */
  7754. String typeName;
  7755. /* readonly */
  7756. Vector3 up;
  7757. /* readonly */
  7758. VariantMap vars;
  7759. /* readonly */
  7760. int weakRefs;
  7761. Vector3 worldDirection;
  7762. Vector3 worldPosition;
  7763. Vector2 worldPosition2D;
  7764. /* readonly */
  7765. Vector3 worldRight;
  7766. Quaternion worldRotation;
  7767. float worldRotation2D;
  7768. Vector3 worldScale;
  7769. Vector2 worldScale2D;
  7770. /* readonly */
  7771. Matrix3x4 worldTransform;
  7772. /* readonly */
  7773. Vector3 worldUp;
  7774. };
  7775. class Object
  7776. {
  7777. public:
  7778. // Methods:
  7779. bool HasSubscribedToEvent(Object, const String&);
  7780. bool HasSubscribedToEvent(const String&);
  7781. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7782. // Properties:
  7783. /* readonly */
  7784. String category;
  7785. /* readonly */
  7786. int refs;
  7787. /* readonly */
  7788. StringHash type;
  7789. /* readonly */
  7790. String typeName;
  7791. /* readonly */
  7792. int weakRefs;
  7793. };
  7794. class ObjectAnimation
  7795. {
  7796. public:
  7797. ObjectAnimation();
  7798. ObjectAnimation(const String&in);
  7799. // Methods:
  7800. void AddAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7801. ValueAnimation GetAttributeAnimation(const String&) const;
  7802. float GetAttributeAnimationSpeed(const String&) const;
  7803. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7804. bool HasSubscribedToEvent(Object, const String&);
  7805. bool HasSubscribedToEvent(const String&);
  7806. bool Load(File);
  7807. bool Load(VectorBuffer&);
  7808. bool Load(const String&);
  7809. void RemoveAttributeAnimation(ValueAnimation);
  7810. void RemoveAttributeAnimation(const String&);
  7811. bool Save(File) const;
  7812. bool Save(VectorBuffer&) const;
  7813. bool Save(const String&) const;
  7814. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7815. // Properties:
  7816. /* readonly */
  7817. Array<Variant> attributeAnimations;
  7818. /* readonly */
  7819. String category;
  7820. /* readonly */
  7821. uint memoryUse;
  7822. String name;
  7823. /* readonly */
  7824. int refs;
  7825. /* readonly */
  7826. Array<Variant> speeds;
  7827. /* readonly */
  7828. StringHash type;
  7829. /* readonly */
  7830. String typeName;
  7831. /* readonly */
  7832. uint useTimer;
  7833. /* readonly */
  7834. int weakRefs;
  7835. /* readonly */
  7836. Array<Variant> wrapModes;
  7837. };
  7838. class Obstacle
  7839. {
  7840. public:
  7841. // Methods:
  7842. void ApplyAttributes();
  7843. void DrawDebugGeometry(DebugRenderer, bool);
  7844. void DrawDebugGeometry(bool);
  7845. Variant GetAttribute(const String&) const;
  7846. ValueAnimation GetAttributeAnimation(const String&) const;
  7847. float GetAttributeAnimationSpeed(const String&) const;
  7848. float GetAttributeAnimationTime(const String&) const;
  7849. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7850. Variant GetAttributeDefault(const String&) const;
  7851. bool GetInterceptNetworkUpdate(const String&) const;
  7852. bool HasSubscribedToEvent(Object, const String&);
  7853. bool HasSubscribedToEvent(const String&);
  7854. bool Load(File, bool = false);
  7855. bool Load(VectorBuffer&, bool = false);
  7856. bool LoadJSON(const JSONValue&, bool = false);
  7857. bool LoadXML(const XMLElement&, bool = false);
  7858. void MarkNetworkUpdate() const;
  7859. void Remove();
  7860. void RemoveAttributeAnimation(const String&);
  7861. void RemoveInstanceDefault();
  7862. void RemoveObjectAnimation();
  7863. void ResetToDefault();
  7864. bool Save(File) const;
  7865. bool Save(VectorBuffer&) const;
  7866. bool SaveJSON(JSONValue&) const;
  7867. bool SaveXML(XMLElement&) const;
  7868. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7869. void SetAnimationTime(float);
  7870. bool SetAttribute(const String&, const Variant&);
  7871. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7872. void SetAttributeAnimationSpeed(const String&, float);
  7873. void SetAttributeAnimationTime(const String&, float);
  7874. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7875. void SetInterceptNetworkUpdate(const String&, bool);
  7876. // Properties:
  7877. bool animationEnabled;
  7878. /* readonly */
  7879. Array<Variant> attributeDefaults;
  7880. /* readonly */
  7881. Array<AttributeInfo> attributeInfos;
  7882. Array<Variant> attributes;
  7883. /* readonly */
  7884. String category;
  7885. bool enabled;
  7886. /* readonly */
  7887. bool enabledEffective;
  7888. float height;
  7889. /* readonly */
  7890. uint id;
  7891. /* readonly */
  7892. Node node;
  7893. /* readonly */
  7894. uint numAttributes;
  7895. ObjectAnimation objectAnimation;
  7896. /* readonly */
  7897. uint obstacleId;
  7898. float radius;
  7899. /* readonly */
  7900. int refs;
  7901. bool temporary;
  7902. /* readonly */
  7903. StringHash type;
  7904. /* readonly */
  7905. String typeName;
  7906. /* readonly */
  7907. int weakRefs;
  7908. };
  7909. class Octree
  7910. {
  7911. public:
  7912. // Methods:
  7913. void AddManualDrawable(Drawable);
  7914. void ApplyAttributes();
  7915. void DrawDebugGeometry(DebugRenderer, bool);
  7916. void DrawDebugGeometry(bool) const;
  7917. Array<Drawable> GetAllDrawables(uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  7918. Variant GetAttribute(const String&) const;
  7919. ValueAnimation GetAttributeAnimation(const String&) const;
  7920. float GetAttributeAnimationSpeed(const String&) const;
  7921. float GetAttributeAnimationTime(const String&) const;
  7922. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  7923. Variant GetAttributeDefault(const String&) const;
  7924. Array<Drawable> GetDrawables(const BoundingBox&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  7925. Array<Drawable> GetDrawables(const Frustum&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  7926. Array<Drawable> GetDrawables(const Sphere&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  7927. Array<Drawable> GetDrawables(const Vector3&, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK);
  7928. bool GetInterceptNetworkUpdate(const String&) const;
  7929. bool HasSubscribedToEvent(Object, const String&);
  7930. bool HasSubscribedToEvent(const String&);
  7931. bool Load(File, bool = false);
  7932. bool Load(VectorBuffer&, bool = false);
  7933. bool LoadJSON(const JSONValue&, bool = false);
  7934. bool LoadXML(const XMLElement&, bool = false);
  7935. void MarkNetworkUpdate() const;
  7936. Array<RayQueryResult> Raycast(const Ray&, RayQueryLevel = RAY_TRIANGLE, float = M_INFINITY, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK) const;
  7937. RayQueryResult RaycastSingle(const Ray&, RayQueryLevel = RAY_TRIANGLE, float = M_INFINITY, uint8 = DRAWABLE_ANY, uint = DEFAULT_VIEWMASK) const;
  7938. void Remove();
  7939. void RemoveAttributeAnimation(const String&);
  7940. void RemoveInstanceDefault();
  7941. void RemoveManualDrawable(Drawable);
  7942. void RemoveObjectAnimation();
  7943. void ResetToDefault();
  7944. bool Save(File) const;
  7945. bool Save(VectorBuffer&) const;
  7946. bool SaveJSON(JSONValue&) const;
  7947. bool SaveXML(XMLElement&) const;
  7948. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  7949. void SetAnimationTime(float);
  7950. bool SetAttribute(const String&, const Variant&);
  7951. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  7952. void SetAttributeAnimationSpeed(const String&, float);
  7953. void SetAttributeAnimationTime(const String&, float);
  7954. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  7955. void SetInterceptNetworkUpdate(const String&, bool);
  7956. void SetSize(const BoundingBox&, uint);
  7957. // Properties:
  7958. bool animationEnabled;
  7959. /* readonly */
  7960. Array<Variant> attributeDefaults;
  7961. /* readonly */
  7962. Array<AttributeInfo> attributeInfos;
  7963. Array<Variant> attributes;
  7964. /* readonly */
  7965. String category;
  7966. bool enabled;
  7967. /* readonly */
  7968. bool enabledEffective;
  7969. /* readonly */
  7970. uint id;
  7971. /* readonly */
  7972. Node node;
  7973. /* readonly */
  7974. uint numAttributes;
  7975. /* readonly */
  7976. uint numLevels;
  7977. ObjectAnimation objectAnimation;
  7978. /* readonly */
  7979. int refs;
  7980. bool temporary;
  7981. /* readonly */
  7982. StringHash type;
  7983. /* readonly */
  7984. String typeName;
  7985. /* readonly */
  7986. int weakRefs;
  7987. /* readonly */
  7988. BoundingBox worldBoundingBox;
  7989. };
  7990. class OffMeshConnection
  7991. {
  7992. public:
  7993. // Methods:
  7994. void ApplyAttributes();
  7995. void DrawDebugGeometry(DebugRenderer, bool);
  7996. Variant GetAttribute(const String&) const;
  7997. ValueAnimation GetAttributeAnimation(const String&) const;
  7998. float GetAttributeAnimationSpeed(const String&) const;
  7999. float GetAttributeAnimationTime(const String&) const;
  8000. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8001. Variant GetAttributeDefault(const String&) const;
  8002. bool GetInterceptNetworkUpdate(const String&) const;
  8003. bool HasSubscribedToEvent(Object, const String&);
  8004. bool HasSubscribedToEvent(const String&);
  8005. bool Load(File, bool = false);
  8006. bool Load(VectorBuffer&, bool = false);
  8007. bool LoadJSON(const JSONValue&, bool = false);
  8008. bool LoadXML(const XMLElement&, bool = false);
  8009. void MarkNetworkUpdate() const;
  8010. void Remove();
  8011. void RemoveAttributeAnimation(const String&);
  8012. void RemoveInstanceDefault();
  8013. void RemoveObjectAnimation();
  8014. void ResetToDefault();
  8015. bool Save(File) const;
  8016. bool Save(VectorBuffer&) const;
  8017. bool SaveJSON(JSONValue&) const;
  8018. bool SaveXML(XMLElement&) const;
  8019. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8020. void SetAnimationTime(float);
  8021. bool SetAttribute(const String&, const Variant&);
  8022. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8023. void SetAttributeAnimationSpeed(const String&, float);
  8024. void SetAttributeAnimationTime(const String&, float);
  8025. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8026. void SetInterceptNetworkUpdate(const String&, bool);
  8027. // Properties:
  8028. bool animationEnabled;
  8029. uint areaID;
  8030. /* readonly */
  8031. Array<Variant> attributeDefaults;
  8032. /* readonly */
  8033. Array<AttributeInfo> attributeInfos;
  8034. Array<Variant> attributes;
  8035. bool bidirectional;
  8036. /* readonly */
  8037. String category;
  8038. bool enabled;
  8039. /* readonly */
  8040. bool enabledEffective;
  8041. Node endPoint;
  8042. /* readonly */
  8043. uint id;
  8044. uint mask;
  8045. /* readonly */
  8046. Node node;
  8047. /* readonly */
  8048. uint numAttributes;
  8049. ObjectAnimation objectAnimation;
  8050. float radius;
  8051. /* readonly */
  8052. int refs;
  8053. bool temporary;
  8054. /* readonly */
  8055. StringHash type;
  8056. /* readonly */
  8057. String typeName;
  8058. /* readonly */
  8059. int weakRefs;
  8060. };
  8061. class PackageFile
  8062. {
  8063. public:
  8064. PackageFile();
  8065. PackageFile(const String&in, uint startOffset = 0);
  8066. // Methods:
  8067. bool Exists(const String&) const;
  8068. Array<String> GetEntryNames() const;
  8069. bool HasSubscribedToEvent(Object, const String&);
  8070. bool HasSubscribedToEvent(const String&);
  8071. bool Open(const String&, uint = 0) const;
  8072. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8073. bool compressed() const;
  8074. // Properties:
  8075. /* readonly */
  8076. String category;
  8077. /* readonly */
  8078. uint checksum;
  8079. /* readonly */
  8080. String name;
  8081. /* readonly */
  8082. uint numFiles;
  8083. /* readonly */
  8084. int refs;
  8085. /* readonly */
  8086. uint totalDataSize;
  8087. /* readonly */
  8088. uint totalSize;
  8089. /* readonly */
  8090. StringHash type;
  8091. /* readonly */
  8092. String typeName;
  8093. /* readonly */
  8094. int weakRefs;
  8095. };
  8096. class ParticleEffect
  8097. {
  8098. public:
  8099. ParticleEffect();
  8100. ParticleEffect(const String&in);
  8101. // Methods:
  8102. void AddColorFrame(ColorFrame);
  8103. void AddColorTime(Color&, float);
  8104. void AddTextureFrame(TextureFrame);
  8105. void AddTextureTime(Rect&, float);
  8106. ParticleEffect Clone(const String& = String ( )) const;
  8107. ColorFrame GetColorFrame(uint) const;
  8108. TextureFrame GetTextureFrame(uint) const;
  8109. bool HasSubscribedToEvent(Object, const String&);
  8110. bool HasSubscribedToEvent(const String&);
  8111. bool Load(File);
  8112. bool Load(VectorBuffer&);
  8113. bool Load(const String&);
  8114. bool Load(const XMLElement&);
  8115. void RemoveColorFrame(uint);
  8116. void RemoveTextureFrame(uint);
  8117. bool Save(File) const;
  8118. bool Save(VectorBuffer&) const;
  8119. bool Save(XMLElement&) const;
  8120. bool Save(const String&) const;
  8121. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8122. void SetColorFrame(uint, ColorFrame);
  8123. void SetTextureFrame(uint, TextureFrame);
  8124. void SortColorFrames();
  8125. void SortTextureFrames();
  8126. // Properties:
  8127. float activeTime;
  8128. float animationLodBias;
  8129. /* readonly */
  8130. String category;
  8131. Vector3 constantForce;
  8132. float dampingForce;
  8133. Vector3 emitterSize;
  8134. EmitterType emitterType;
  8135. FaceCameraMode faceCameraMode;
  8136. bool fixedScreenSize;
  8137. float inactiveTime;
  8138. Material material;
  8139. Vector3 maxDirection;
  8140. float maxEmissionRate;
  8141. Vector2 maxParticleSize;
  8142. float maxRotation;
  8143. float maxRotationSpeed;
  8144. float maxTimeToLive;
  8145. float maxVelocity;
  8146. /* readonly */
  8147. uint memoryUse;
  8148. Vector3 minDirection;
  8149. float minEmissionRate;
  8150. Vector2 minParticleSize;
  8151. float minRotation;
  8152. float minRotationSpeed;
  8153. float minTimeToLive;
  8154. float minVelocity;
  8155. String name;
  8156. uint numColorFrames;
  8157. uint numParticles;
  8158. uint numTextureFrames;
  8159. /* readonly */
  8160. int refs;
  8161. bool relative;
  8162. bool scaled;
  8163. float sizeAdd;
  8164. float sizeMul;
  8165. bool sorted;
  8166. /* readonly */
  8167. StringHash type;
  8168. /* readonly */
  8169. String typeName;
  8170. bool updateInvisible;
  8171. /* readonly */
  8172. uint useTimer;
  8173. /* readonly */
  8174. int weakRefs;
  8175. };
  8176. class ParticleEffect2D
  8177. {
  8178. public:
  8179. ParticleEffect2D();
  8180. ParticleEffect2D(const String&in);
  8181. // Methods:
  8182. ParticleEffect2D Clone(const String& = String ( )) const;
  8183. bool HasSubscribedToEvent(Object, const String&);
  8184. bool HasSubscribedToEvent(const String&);
  8185. bool Load(File);
  8186. bool Load(VectorBuffer&);
  8187. bool Load(const String&);
  8188. bool Save(File) const;
  8189. bool Save(VectorBuffer&) const;
  8190. bool Save(const String&) const;
  8191. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8192. // Properties:
  8193. /* readonly */
  8194. String category;
  8195. /* readonly */
  8196. uint memoryUse;
  8197. String name;
  8198. /* readonly */
  8199. int refs;
  8200. /* readonly */
  8201. StringHash type;
  8202. /* readonly */
  8203. String typeName;
  8204. /* readonly */
  8205. uint useTimer;
  8206. /* readonly */
  8207. int weakRefs;
  8208. };
  8209. class ParticleEmitter
  8210. {
  8211. public:
  8212. // Methods:
  8213. void ApplyAttributes();
  8214. void ApplyEffect();
  8215. void Commit();
  8216. void DrawDebugGeometry(DebugRenderer, bool);
  8217. Variant GetAttribute(const String&) const;
  8218. ValueAnimation GetAttributeAnimation(const String&) const;
  8219. float GetAttributeAnimationSpeed(const String&) const;
  8220. float GetAttributeAnimationTime(const String&) const;
  8221. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8222. Variant GetAttributeDefault(const String&) const;
  8223. bool GetInterceptNetworkUpdate(const String&) const;
  8224. bool HasSubscribedToEvent(Object, const String&);
  8225. bool HasSubscribedToEvent(const String&);
  8226. bool IsInView(Camera) const;
  8227. bool Load(File, bool = false);
  8228. bool Load(VectorBuffer&, bool = false);
  8229. bool LoadJSON(const JSONValue&, bool = false);
  8230. bool LoadXML(const XMLElement&, bool = false);
  8231. void MarkNetworkUpdate() const;
  8232. void Remove();
  8233. void RemoveAllParticles();
  8234. void RemoveAttributeAnimation(const String&);
  8235. void RemoveInstanceDefault();
  8236. void RemoveObjectAnimation();
  8237. void Reset();
  8238. void ResetEmissionTimer();
  8239. void ResetToDefault();
  8240. bool Save(File) const;
  8241. bool Save(VectorBuffer&) const;
  8242. bool SaveJSON(JSONValue&) const;
  8243. bool SaveXML(XMLElement&) const;
  8244. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8245. void SetAnimationTime(float);
  8246. bool SetAttribute(const String&, const Variant&);
  8247. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8248. void SetAttributeAnimationSpeed(const String&, float);
  8249. void SetAttributeAnimationTime(const String&, float);
  8250. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8251. void SetInterceptNetworkUpdate(const String&, bool);
  8252. // Properties:
  8253. bool animationEnabled;
  8254. float animationLodBias;
  8255. /* readonly */
  8256. Array<Variant> attributeDefaults;
  8257. /* readonly */
  8258. Array<AttributeInfo> attributeInfos;
  8259. Array<Variant> attributes;
  8260. AutoRemoveMode autoRemoveMode;
  8261. /* readonly */
  8262. Array<Billboard> billboards;
  8263. /* readonly */
  8264. BoundingBox boundingBox;
  8265. bool castShadows;
  8266. /* readonly */
  8267. String category;
  8268. float drawDistance;
  8269. ParticleEffect effect;
  8270. bool emitting;
  8271. bool enabled;
  8272. /* readonly */
  8273. bool enabledEffective;
  8274. FaceCameraMode faceCameraMode;
  8275. bool fixedScreenSize;
  8276. /* readonly */
  8277. uint id;
  8278. /* readonly */
  8279. bool inView;
  8280. uint lightMask;
  8281. float lodBias;
  8282. Material material;
  8283. uint maxLights;
  8284. /* readonly */
  8285. Node node;
  8286. /* readonly */
  8287. uint numAttributes;
  8288. uint numBillboards;
  8289. uint numParticles;
  8290. ObjectAnimation objectAnimation;
  8291. bool occludee;
  8292. bool occluder;
  8293. /* readonly */
  8294. int refs;
  8295. bool relative;
  8296. bool scaled;
  8297. bool serializeParticles;
  8298. float shadowDistance;
  8299. uint shadowMask;
  8300. bool sorted;
  8301. bool temporary;
  8302. /* readonly */
  8303. StringHash type;
  8304. /* readonly */
  8305. String typeName;
  8306. uint viewMask;
  8307. /* readonly */
  8308. int weakRefs;
  8309. /* readonly */
  8310. BoundingBox worldBoundingBox;
  8311. /* readonly */
  8312. Zone zone;
  8313. uint zoneMask;
  8314. };
  8315. class ParticleEmitter2D
  8316. {
  8317. public:
  8318. // Methods:
  8319. void ApplyAttributes();
  8320. void DrawDebugGeometry(DebugRenderer, bool);
  8321. Variant GetAttribute(const String&) const;
  8322. ValueAnimation GetAttributeAnimation(const String&) const;
  8323. float GetAttributeAnimationSpeed(const String&) const;
  8324. float GetAttributeAnimationTime(const String&) const;
  8325. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8326. Variant GetAttributeDefault(const String&) const;
  8327. bool GetInterceptNetworkUpdate(const String&) const;
  8328. bool HasSubscribedToEvent(Object, const String&);
  8329. bool HasSubscribedToEvent(const String&);
  8330. bool IsInView(Camera) const;
  8331. bool Load(File, bool = false);
  8332. bool Load(VectorBuffer&, bool = false);
  8333. bool LoadJSON(const JSONValue&, bool = false);
  8334. bool LoadXML(const XMLElement&, bool = false);
  8335. void MarkNetworkUpdate() const;
  8336. void Remove();
  8337. void RemoveAttributeAnimation(const String&);
  8338. void RemoveInstanceDefault();
  8339. void RemoveObjectAnimation();
  8340. void ResetToDefault();
  8341. bool Save(File) const;
  8342. bool Save(VectorBuffer&) const;
  8343. bool SaveJSON(JSONValue&) const;
  8344. bool SaveXML(XMLElement&) const;
  8345. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8346. void SetAnimationTime(float);
  8347. bool SetAttribute(const String&, const Variant&);
  8348. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8349. void SetAttributeAnimationSpeed(const String&, float);
  8350. void SetAttributeAnimationTime(const String&, float);
  8351. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8352. void SetInterceptNetworkUpdate(const String&, bool);
  8353. // Properties:
  8354. bool animationEnabled;
  8355. /* readonly */
  8356. Array<Variant> attributeDefaults;
  8357. /* readonly */
  8358. Array<AttributeInfo> attributeInfos;
  8359. Array<Variant> attributes;
  8360. BlendMode blendMode;
  8361. /* readonly */
  8362. BoundingBox boundingBox;
  8363. bool castShadows;
  8364. /* readonly */
  8365. String category;
  8366. float drawDistance;
  8367. ParticleEffect2D effect;
  8368. bool enabled;
  8369. /* readonly */
  8370. bool enabledEffective;
  8371. /* readonly */
  8372. uint id;
  8373. /* readonly */
  8374. bool inView;
  8375. int layer;
  8376. uint lightMask;
  8377. float lodBias;
  8378. uint maxLights;
  8379. /* readonly */
  8380. Node node;
  8381. /* readonly */
  8382. uint numAttributes;
  8383. ObjectAnimation objectAnimation;
  8384. bool occludee;
  8385. bool occluder;
  8386. int orderInLayer;
  8387. /* readonly */
  8388. int refs;
  8389. float shadowDistance;
  8390. uint shadowMask;
  8391. Sprite2D sprite;
  8392. bool temporary;
  8393. /* readonly */
  8394. StringHash type;
  8395. /* readonly */
  8396. String typeName;
  8397. uint viewMask;
  8398. /* readonly */
  8399. int weakRefs;
  8400. /* readonly */
  8401. BoundingBox worldBoundingBox;
  8402. uint zoneMask;
  8403. };
  8404. class Pass
  8405. {
  8406. public:
  8407. // Properties:
  8408. bool alphaToCoverage;
  8409. BlendMode blendMode;
  8410. CullMode cullMode;
  8411. CompareMode depthTestMode;
  8412. bool depthWrite;
  8413. bool desktop;
  8414. PassLightingMode lightingMode;
  8415. String pixelShader;
  8416. String pixelShaderDefineExcludes;
  8417. String pixelShaderDefines;
  8418. /* readonly */
  8419. int refs;
  8420. String vertexShader;
  8421. String vertexShaderDefineExcludes;
  8422. String vertexShaderDefines;
  8423. /* readonly */
  8424. int weakRefs;
  8425. };
  8426. class PhysicsRaycastResult
  8427. {
  8428. public:
  8429. ~PhysicsRaycastResult();
  8430. PhysicsRaycastResult();
  8431. // Properties:
  8432. /* readonly */
  8433. RigidBody body;
  8434. float distance;
  8435. float hitFraction;
  8436. Vector3 normal;
  8437. Vector3 position;
  8438. };
  8439. class PhysicsRaycastResult2D
  8440. {
  8441. public:
  8442. ~PhysicsRaycastResult2D();
  8443. PhysicsRaycastResult2D();
  8444. // Properties:
  8445. /* readonly */
  8446. RigidBody2D body;
  8447. float distance;
  8448. Vector2 normal;
  8449. Vector2 position;
  8450. };
  8451. class PhysicsWorld
  8452. {
  8453. public:
  8454. // Methods:
  8455. void ApplyAttributes();
  8456. PhysicsRaycastResult ConvexCast(CollisionShape, const Vector3&, const Quaternion&, const Vector3&, const Quaternion&, uint = 0xffff);
  8457. void DrawDebugGeometry(DebugRenderer, bool);
  8458. void DrawDebugGeometry(bool);
  8459. Variant GetAttribute(const String&) const;
  8460. ValueAnimation GetAttributeAnimation(const String&) const;
  8461. float GetAttributeAnimationSpeed(const String&) const;
  8462. float GetAttributeAnimationTime(const String&) const;
  8463. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8464. Variant GetAttributeDefault(const String&) const;
  8465. Array<RigidBody> GetCollidingBodies(RigidBody);
  8466. bool GetInterceptNetworkUpdate(const String&) const;
  8467. Array<RigidBody> GetRigidBodies(RigidBody);
  8468. Array<RigidBody> GetRigidBodies(const BoundingBox&, uint = 0xffff);
  8469. Array<RigidBody> GetRigidBodies(const Sphere&, uint = 0xffff);
  8470. bool HasSubscribedToEvent(Object, const String&);
  8471. bool HasSubscribedToEvent(const String&);
  8472. bool Load(File, bool = false);
  8473. bool Load(VectorBuffer&, bool = false);
  8474. bool LoadJSON(const JSONValue&, bool = false);
  8475. bool LoadXML(const XMLElement&, bool = false);
  8476. void MarkNetworkUpdate() const;
  8477. Array<PhysicsRaycastResult> Raycast(const Ray&, float, uint = 0xffff);
  8478. PhysicsRaycastResult RaycastSingle(const Ray&, float, uint = 0xffff);
  8479. PhysicsRaycastResult RaycastSingleSegmented(const Ray&, float, float, uint = 0xffff);
  8480. void Remove();
  8481. void RemoveAttributeAnimation(const String&);
  8482. void RemoveCachedGeometry(Model);
  8483. void RemoveInstanceDefault();
  8484. void RemoveObjectAnimation();
  8485. void ResetToDefault();
  8486. bool Save(File) const;
  8487. bool Save(VectorBuffer&) const;
  8488. bool SaveJSON(JSONValue&) const;
  8489. bool SaveXML(XMLElement&) const;
  8490. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8491. void SetAnimationTime(float);
  8492. bool SetAttribute(const String&, const Variant&);
  8493. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8494. void SetAttributeAnimationSpeed(const String&, float);
  8495. void SetAttributeAnimationTime(const String&, float);
  8496. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8497. void SetInterceptNetworkUpdate(const String&, bool);
  8498. PhysicsRaycastResult SphereCast(const Ray&, float, float, uint = 0xffff);
  8499. void Update(float);
  8500. void UpdateCollisions();
  8501. // Properties:
  8502. bool animationEnabled;
  8503. /* readonly */
  8504. Array<Variant> attributeDefaults;
  8505. /* readonly */
  8506. Array<AttributeInfo> attributeInfos;
  8507. Array<Variant> attributes;
  8508. /* readonly */
  8509. String category;
  8510. bool enabled;
  8511. /* readonly */
  8512. bool enabledEffective;
  8513. int fps;
  8514. Vector3 gravity;
  8515. /* readonly */
  8516. uint id;
  8517. bool internalEdge;
  8518. bool interpolation;
  8519. int maxSubSteps;
  8520. /* readonly */
  8521. Node node;
  8522. /* readonly */
  8523. uint numAttributes;
  8524. int numIterations;
  8525. ObjectAnimation objectAnimation;
  8526. /* readonly */
  8527. int refs;
  8528. bool splitImpulse;
  8529. bool temporary;
  8530. /* readonly */
  8531. StringHash type;
  8532. /* readonly */
  8533. String typeName;
  8534. bool updateEnabled;
  8535. /* readonly */
  8536. int weakRefs;
  8537. };
  8538. class PhysicsWorld2D
  8539. {
  8540. public:
  8541. // Methods:
  8542. void ApplyAttributes();
  8543. void DrawDebugGeometry() const;
  8544. void DrawDebugGeometry(DebugRenderer, bool);
  8545. Variant GetAttribute(const String&) const;
  8546. ValueAnimation GetAttributeAnimation(const String&) const;
  8547. float GetAttributeAnimationSpeed(const String&) const;
  8548. float GetAttributeAnimationTime(const String&) const;
  8549. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8550. Variant GetAttributeDefault(const String&) const;
  8551. bool GetInterceptNetworkUpdate(const String&) const;
  8552. Array<RigidBody2D> GetRigidBodies(const Rect&, uint = 0xffff);
  8553. RigidBody2D GetRigidBody(const Vector2&, uint = 0xffff);
  8554. RigidBody2D GetRigidBody(int, int, uint = 0xffff);
  8555. bool HasSubscribedToEvent(Object, const String&);
  8556. bool HasSubscribedToEvent(const String&);
  8557. bool Load(File, bool = false);
  8558. bool Load(VectorBuffer&, bool = false);
  8559. bool LoadJSON(const JSONValue&, bool = false);
  8560. bool LoadXML(const XMLElement&, bool = false);
  8561. void MarkNetworkUpdate() const;
  8562. Array<PhysicsRaycastResult2D> Raycast(const Vector2&, const Vector2&, uint = 0xffff);
  8563. PhysicsRaycastResult2D RaycastSingle(const Vector2&, const Vector2&, uint = 0xffff);
  8564. void Remove();
  8565. void RemoveAttributeAnimation(const String&);
  8566. void RemoveInstanceDefault();
  8567. void RemoveObjectAnimation();
  8568. void ResetToDefault();
  8569. bool Save(File) const;
  8570. bool Save(VectorBuffer&) const;
  8571. bool SaveJSON(JSONValue&) const;
  8572. bool SaveXML(XMLElement&) const;
  8573. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8574. void SetAnimationTime(float);
  8575. bool SetAttribute(const String&, const Variant&);
  8576. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8577. void SetAttributeAnimationSpeed(const String&, float);
  8578. void SetAttributeAnimationTime(const String&, float);
  8579. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8580. void SetInterceptNetworkUpdate(const String&, bool);
  8581. // Properties:
  8582. bool allowSleeping;
  8583. bool animationEnabled;
  8584. /* readonly */
  8585. Array<Variant> attributeDefaults;
  8586. /* readonly */
  8587. Array<AttributeInfo> attributeInfos;
  8588. Array<Variant> attributes;
  8589. bool autoClearForces;
  8590. /* readonly */
  8591. String category;
  8592. bool continuousPhysics;
  8593. bool drawAabb;
  8594. bool drawCenterOfMass;
  8595. bool drawJoint;
  8596. bool drawPair;
  8597. bool drawShape;
  8598. bool enabled;
  8599. /* readonly */
  8600. bool enabledEffective;
  8601. Vector2 gravity;
  8602. /* readonly */
  8603. uint id;
  8604. /* readonly */
  8605. Node node;
  8606. /* readonly */
  8607. uint numAttributes;
  8608. ObjectAnimation objectAnimation;
  8609. uint positionIterations;
  8610. /* readonly */
  8611. int refs;
  8612. bool subStepping;
  8613. bool temporary;
  8614. /* readonly */
  8615. StringHash type;
  8616. /* readonly */
  8617. String typeName;
  8618. bool updateEnabled;
  8619. uint velocityIterations;
  8620. bool warmStarting;
  8621. /* readonly */
  8622. int weakRefs;
  8623. };
  8624. class Plane
  8625. {
  8626. public:
  8627. Plane();
  8628. Plane(const Plane&in);
  8629. Plane(const Vector3&in, const Vector3&in, const Vector3&in);
  8630. Plane(const Vector3&in, const Vector3&in);
  8631. Plane(const Vector4&in);
  8632. // Methods:
  8633. void Define(const Vector3&, const Vector3&);
  8634. void Define(const Vector3&, const Vector3&, const Vector3&);
  8635. void Define(const Vector4&);
  8636. float Distance(const Vector3&) const;
  8637. Vector3 Project(const Vector3&) const;
  8638. Vector3 Reflect(const Vector3&) const;
  8639. Vector4 ToVector4() const;
  8640. void Transform(const Matrix3&);
  8641. void Transform(const Matrix3x4&);
  8642. void Transform(const Matrix4&);
  8643. Plane Transformed(const Matrix3&) const;
  8644. Plane Transformed(const Matrix3x4&) const;
  8645. Plane Transformed(const Matrix4&) const;
  8646. // Properties:
  8647. Vector3 absNormal;
  8648. float d;
  8649. Vector3 normal;
  8650. /* readonly */
  8651. Matrix3x4 reflectionMatrix;
  8652. };
  8653. class Polyhedron
  8654. {
  8655. public:
  8656. ~Polyhedron();
  8657. Polyhedron();
  8658. Polyhedron(const Polyhedron&in);
  8659. Polyhedron(const BoundingBox&in);
  8660. Polyhedron(const Frustum&in);
  8661. // Methods:
  8662. void AddFace(const Vector3&, const Vector3&, const Vector3&);
  8663. void AddFace(const Vector3&, const Vector3&, const Vector3&, const Vector3&);
  8664. void AddFace(const Array<Vector3>);
  8665. void Clear();
  8666. void Clip(const BoundingBox&);
  8667. void Clip(const Frustum&);
  8668. void Define(const BoundingBox&);
  8669. void Define(const Frustum&);
  8670. void Transform(const Matrix3&);
  8671. void Transform(const Matrix3x4&);
  8672. Polyhedron Transformed(const Matrix3&) const;
  8673. Polyhedron Transformed(const Matrix3x4&) const;
  8674. // Properties:
  8675. /* readonly */
  8676. Array<Array<Vector3>> face;
  8677. /* readonly */
  8678. uint numFaces;
  8679. };
  8680. class ProgressBar
  8681. {
  8682. public:
  8683. // Methods:
  8684. void ChangeValue(float);
  8685. bool HasSubscribedToEvent(Object, const String&);
  8686. bool HasSubscribedToEvent(const String&);
  8687. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8688. void SetLoadingPercentStyle(const String&);
  8689. // Properties:
  8690. /* readonly */
  8691. String category;
  8692. /* readonly */
  8693. BorderImage knob;
  8694. Orientation orientation;
  8695. float range;
  8696. /* readonly */
  8697. int refs;
  8698. bool showPercentText;
  8699. /* readonly */
  8700. StringHash type;
  8701. /* readonly */
  8702. String typeName;
  8703. float value;
  8704. /* readonly */
  8705. int weakRefs;
  8706. };
  8707. class PropertySet2D
  8708. {
  8709. public:
  8710. // Methods:
  8711. bool HasProperty(const String&) const;
  8712. const String& GetProperty(const String&) const;
  8713. // Properties:
  8714. /* readonly */
  8715. int refs;
  8716. /* readonly */
  8717. int weakRefs;
  8718. };
  8719. class Quaternion
  8720. {
  8721. public:
  8722. Quaternion();
  8723. Quaternion(const Quaternion&in);
  8724. Quaternion(float, float, float, float);
  8725. Quaternion(float, const Vector3&in);
  8726. Quaternion(float);
  8727. Quaternion(float, float, float);
  8728. Quaternion(const Vector3&in);
  8729. Quaternion(const Vector3&in, const Vector3&in);
  8730. Quaternion(const Vector3&in, const Vector3&in, const Vector3&in);
  8731. Quaternion(const Matrix3&in);
  8732. // Methods:
  8733. Quaternion Conjugate() const;
  8734. float DotProduct(const Quaternion&) const;
  8735. bool Equals(const Quaternion&) const;
  8736. void FromAngleAxis(float, const Vector3&);
  8737. void FromAxes(const Vector3&, const Vector3&, const Vector3&);
  8738. void FromEulerAngles(float, float, float);
  8739. bool FromLookRotation(const Vector3&, const Vector3& = Vector3 ( 0.0 , 1.0 , 0.0 ));
  8740. void FromRotationMatrix(const Matrix3&);
  8741. void FromRotationTo(const Vector3&, const Vector3&);
  8742. Quaternion Inverse() const;
  8743. bool IsNaN() const;
  8744. float LengthSquared() const;
  8745. Quaternion Nlerp(const Quaternion&, float, bool) const;
  8746. void Normalize();
  8747. Quaternion Normalized() const;
  8748. Quaternion Slerp(const Quaternion&, float) const;
  8749. String ToString() const;
  8750. // Properties:
  8751. /* readonly */
  8752. float angle;
  8753. /* readonly */
  8754. Vector3 axis;
  8755. /* readonly */
  8756. Vector3 eulerAngles;
  8757. /* readonly */
  8758. float pitch;
  8759. /* readonly */
  8760. float roll;
  8761. /* readonly */
  8762. Matrix3 rotationMatrix;
  8763. float w;
  8764. float x;
  8765. float y;
  8766. /* readonly */
  8767. float yaw;
  8768. float z;
  8769. };
  8770. class Ray
  8771. {
  8772. public:
  8773. Ray();
  8774. Ray(const Ray&in);
  8775. Ray(const Vector3&in, const Vector3&in);
  8776. // Methods:
  8777. Vector3 ClosestPoint(const Ray&) const;
  8778. void Define(const Vector3&, const Vector3&);
  8779. float Distance(const Vector3&) const;
  8780. float HitDistance(const BoundingBox&) const;
  8781. float HitDistance(const Frustum&, bool = true) const;
  8782. float HitDistance(const Plane&) const;
  8783. float HitDistance(const Sphere&) const;
  8784. float HitDistance(const Vector3&, const Vector3&, const Vector3&) const;
  8785. Vector3 Project(const Vector3&) const;
  8786. Ray Transformed(const Matrix3x4&) const;
  8787. // Properties:
  8788. Vector3 direction;
  8789. Vector3 origin;
  8790. };
  8791. class RayQueryResult
  8792. {
  8793. public:
  8794. RayQueryResult();
  8795. // Properties:
  8796. float distance;
  8797. /* readonly */
  8798. Drawable drawable;
  8799. /* readonly */
  8800. Node node;
  8801. Vector3 normal;
  8802. Vector3 position;
  8803. uint subObject;
  8804. Vector2 textureUV;
  8805. };
  8806. class RaycastVehicle
  8807. {
  8808. public:
  8809. // Methods:
  8810. void AddWheel(Node, Vector3, Vector3, float, float, bool);
  8811. void ApplyAttributes();
  8812. void DrawDebugGeometry(DebugRenderer, bool);
  8813. Variant GetAttribute(const String&) const;
  8814. ValueAnimation GetAttributeAnimation(const String&) const;
  8815. float GetAttributeAnimationSpeed(const String&) const;
  8816. float GetAttributeAnimationTime(const String&) const;
  8817. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  8818. Variant GetAttributeDefault(const String&) const;
  8819. float GetBrake(int);
  8820. Vector3 GetContactNormal(int);
  8821. Vector3 GetContactPosition(int);
  8822. float GetEngineForce(int);
  8823. bool GetInterceptNetworkUpdate(const String&) const;
  8824. float GetMaxSuspensionTravel(int);
  8825. float GetSteeringValue(int);
  8826. Vector3 GetWheelAxle(int);
  8827. Vector3 GetWheelConnectionPoint(int);
  8828. float GetWheelDampingCompression(int);
  8829. float GetWheelDampingRelaxation(int);
  8830. Vector3 GetWheelDirection(int);
  8831. float GetWheelFrictionSlip(int);
  8832. Node GetWheelNode(int);
  8833. Vector3 GetWheelPosition(int);
  8834. float GetWheelRadius(int);
  8835. float GetWheelRestLength(int);
  8836. float GetWheelRollInfluence(int);
  8837. Vector3 GetWheelRotation(int);
  8838. float GetWheelSideSlipSpeed(int);
  8839. float GetWheelSkidInfo(int);
  8840. float GetWheelSkidInfoCumulative(int);
  8841. float GetWheelSuspensionStiffness(int);
  8842. bool HasSubscribedToEvent(Object, const String&);
  8843. bool HasSubscribedToEvent(const String&);
  8844. void Init();
  8845. bool IsFrontWheel(int);
  8846. bool Load(File, bool = false);
  8847. bool Load(VectorBuffer&, bool = false);
  8848. bool LoadJSON(const JSONValue&, bool = false);
  8849. bool LoadXML(const XMLElement&, bool = false);
  8850. void MarkNetworkUpdate() const;
  8851. void Remove();
  8852. void RemoveAttributeAnimation(const String&);
  8853. void RemoveInstanceDefault();
  8854. void RemoveObjectAnimation();
  8855. void ResetSuspension();
  8856. void ResetToDefault();
  8857. void ResetWheels();
  8858. bool Save(File) const;
  8859. bool Save(VectorBuffer&) const;
  8860. bool SaveJSON(JSONValue&) const;
  8861. bool SaveXML(XMLElement&) const;
  8862. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  8863. void SetAnimationTime(float);
  8864. bool SetAttribute(const String&, const Variant&);
  8865. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  8866. void SetAttributeAnimationSpeed(const String&, float);
  8867. void SetAttributeAnimationTime(const String&, float);
  8868. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  8869. void SetBrake(int, float);
  8870. void SetEngineForce(int, float);
  8871. void SetInterceptNetworkUpdate(const String&, bool);
  8872. void SetMaxSuspensionTravel(int, float);
  8873. void SetSteeringValue(int, float);
  8874. void SetWheelAxle(int, Vector3);
  8875. void SetWheelDampingCompression(int, float);
  8876. void SetWheelDampingRelaxation(int, float);
  8877. void SetWheelDirection(int, Vector3);
  8878. void SetWheelFrictionSlip(int, float);
  8879. void SetWheelRadius(int, float);
  8880. void SetWheelRestLength(int, float);
  8881. void SetWheelRollInfluence(int, float);
  8882. void SetWheelSkidInfo(int, float);
  8883. void SetWheelSkidInfoCumulative(int, float);
  8884. void SetWheelSuspensionStiffness(int, float);
  8885. void UpdateWheelTransform(int, bool);
  8886. bool WheelIsGrounded(int);
  8887. // Properties:
  8888. bool animationEnabled;
  8889. /* readonly */
  8890. Array<Variant> attributeDefaults;
  8891. /* readonly */
  8892. Array<AttributeInfo> attributeInfos;
  8893. Array<Variant> attributes;
  8894. /* readonly */
  8895. String category;
  8896. bool enabled;
  8897. /* readonly */
  8898. bool enabledEffective;
  8899. /* readonly */
  8900. uint id;
  8901. float inAirRPM;
  8902. float maxSideSlipSpeed;
  8903. /* readonly */
  8904. Node node;
  8905. /* readonly */
  8906. uint numAttributes;
  8907. /* readonly */
  8908. int numWheels;
  8909. ObjectAnimation objectAnimation;
  8910. /* readonly */
  8911. int refs;
  8912. bool temporary;
  8913. /* readonly */
  8914. StringHash type;
  8915. /* readonly */
  8916. String typeName;
  8917. /* readonly */
  8918. int weakRefs;
  8919. };
  8920. class Rect
  8921. {
  8922. public:
  8923. Rect();
  8924. Rect(const Rect&in);
  8925. Rect(float, float, float, float);
  8926. Rect(const Vector2&in, const Vector2&in);
  8927. Rect(const Vector4&in);
  8928. // Methods:
  8929. void Clear();
  8930. void Clip(const Rect&);
  8931. void Define(const Vector2&);
  8932. void Define(const Vector2&, const Vector2&);
  8933. bool Defined() const;
  8934. bool Equals(const Rect&) const;
  8935. Intersection IsInside(const Rect&) const;
  8936. Intersection IsInside(const Vector2&) const;
  8937. void Merge(const Rect&);
  8938. void Merge(const Vector2&);
  8939. Vector4 ToVector4() const;
  8940. // Properties:
  8941. float bottom;
  8942. /* readonly */
  8943. Vector2 center;
  8944. /* readonly */
  8945. Vector2 halfSize;
  8946. float left;
  8947. Vector2 max;
  8948. Vector2 min;
  8949. float right;
  8950. /* readonly */
  8951. Vector2 size;
  8952. float top;
  8953. };
  8954. class RefCounted
  8955. {
  8956. public:
  8957. // Properties:
  8958. /* readonly */
  8959. int refs;
  8960. /* readonly */
  8961. int weakRefs;
  8962. };
  8963. class RenderPath
  8964. {
  8965. public:
  8966. RenderPath();
  8967. // Methods:
  8968. void AddCommand(const RenderPathCommand&);
  8969. void AddRenderTarget(const RenderTargetInfo&);
  8970. bool Append(XMLFile);
  8971. RenderPath Clone();
  8972. void InsertCommand(uint, const RenderPathCommand&);
  8973. bool Load(XMLFile);
  8974. void RemoveCommand(uint);
  8975. void RemoveCommands(const String&);
  8976. void RemoveRenderTarget(const String&);
  8977. void RemoveRenderTarget(uint);
  8978. void RemoveRenderTargts(const String&);
  8979. void SetEnabled(const String&, bool);
  8980. void ToggleEnabled(const String&);
  8981. // Properties:
  8982. Array<RenderPathCommand> commands;
  8983. /* readonly */
  8984. uint numCommands;
  8985. /* readonly */
  8986. uint numRenderTargets;
  8987. /* readonly */
  8988. int refs;
  8989. Array<RenderTargetInfo> renderTargets;
  8990. Array<Variant> shaderParameters;
  8991. /* readonly */
  8992. int weakRefs;
  8993. };
  8994. class RenderPathCommand
  8995. {
  8996. public:
  8997. ~RenderPathCommand();
  8998. RenderPathCommand();
  8999. RenderPathCommand(const RenderPathCommand&in);
  9000. // Methods:
  9001. void RemoveShaderParameter(const String&);
  9002. void SetOutput(uint, const String&, CubeMapFace = FACE_POSITIVE_X);
  9003. // Properties:
  9004. BlendMode blendMode;
  9005. Color clearColor;
  9006. float clearDepth;
  9007. uint clearFlags;
  9008. uint clearStencil;
  9009. String depthStencilName;
  9010. bool enabled;
  9011. String eventName;
  9012. bool markToStencil;
  9013. String metadata;
  9014. uint numOutputs;
  9015. Array<CubeMapFace> outputFaces;
  9016. Array<String> outputNames;
  9017. String pass;
  9018. String pixelShaderDefines;
  9019. String pixelShaderName;
  9020. Array<Variant> shaderParameters;
  9021. RenderCommandSortMode sortMode;
  9022. String tag;
  9023. Array<String> textureNames;
  9024. RenderCommandType type;
  9025. bool useFogColor;
  9026. bool useLitBase;
  9027. bool vertexLights;
  9028. String vertexShaderDefines;
  9029. String vertexShaderName;
  9030. };
  9031. class RenderSurface
  9032. {
  9033. public:
  9034. // Methods:
  9035. void QueueUpdate();
  9036. // Properties:
  9037. /* readonly */
  9038. int height;
  9039. RenderSurface linkedDepthStencil;
  9040. RenderSurface linkedRenderTarget;
  9041. uint numViewports;
  9042. /* readonly */
  9043. Texture parentTexture;
  9044. /* readonly */
  9045. bool resolveDirty;
  9046. RenderSurfaceUpdateMode updateMode;
  9047. /* readonly */
  9048. TextureUsage usage;
  9049. Array<Viewport> viewports;
  9050. /* readonly */
  9051. int width;
  9052. };
  9053. class RenderTargetInfo
  9054. {
  9055. public:
  9056. ~RenderTargetInfo();
  9057. RenderTargetInfo();
  9058. RenderTargetInfo(const RenderTargetInfo&in);
  9059. // Properties:
  9060. bool autoResolve;
  9061. bool cubemap;
  9062. bool enabled;
  9063. bool filtered;
  9064. uint format;
  9065. int multiSample;
  9066. String name;
  9067. bool persistent;
  9068. bool sRGB;
  9069. Vector2 size;
  9070. RenderTargetSizeMode sizeMode;
  9071. String tag;
  9072. };
  9073. class Renderer
  9074. {
  9075. public:
  9076. // Methods:
  9077. void DrawDebugGeometry(bool) const;
  9078. bool HasSubscribedToEvent(Object, const String&);
  9079. bool HasSubscribedToEvent(const String&);
  9080. void ReloadShaders() const;
  9081. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9082. void SetDefaultRenderPath(XMLFile);
  9083. void SetVSMShadowParameters(float, float);
  9084. // Properties:
  9085. /* readonly */
  9086. String category;
  9087. /* readonly */
  9088. Material defaultLightRamp;
  9089. /* readonly */
  9090. Material defaultLightSpot;
  9091. /* readonly */
  9092. Material defaultMaterial;
  9093. RenderPath defaultRenderPath;
  9094. Technique defaultTechnique;
  9095. /* readonly */
  9096. Zone defaultZone;
  9097. bool drawShadows;
  9098. bool dynamicInstancing;
  9099. bool hdrRendering;
  9100. int materialQuality;
  9101. int maxOccluderTriangles;
  9102. int maxShadowMaps;
  9103. int maxSortedInstances;
  9104. int minInstances;
  9105. float mobileNormalOffsetMul;
  9106. float mobileShadowBiasAdd;
  9107. float mobileShadowBiasMul;
  9108. /* readonly */
  9109. uint numBatches;
  9110. int numExtraInstancingBufferElements;
  9111. /* readonly */
  9112. Array<uint> numGeometries;
  9113. /* readonly */
  9114. Array<uint> numLights;
  9115. /* readonly */
  9116. Array<uint> numOccluders;
  9117. /* readonly */
  9118. uint numPrimitives;
  9119. /* readonly */
  9120. Array<uint> numShadowMaps;
  9121. uint numViewports;
  9122. /* readonly */
  9123. uint numViews;
  9124. float occluderSizeThreshold;
  9125. int occlusionBufferSize;
  9126. /* readonly */
  9127. int refs;
  9128. bool reuseShadowMaps;
  9129. int shadowMapSize;
  9130. ShadowQuality shadowQuality;
  9131. float shadowSoftness;
  9132. bool specularLighting;
  9133. int textureAnisotropy;
  9134. TextureFilterMode textureFilterMode;
  9135. int textureQuality;
  9136. bool threadedOcclusion;
  9137. /* readonly */
  9138. StringHash type;
  9139. /* readonly */
  9140. String typeName;
  9141. Array<Viewport> viewports;
  9142. int vsmMultiSample;
  9143. Vector2 vsmShadowParameters;
  9144. /* readonly */
  9145. int weakRefs;
  9146. };
  9147. class Resource
  9148. {
  9149. public:
  9150. // Methods:
  9151. bool HasSubscribedToEvent(Object, const String&);
  9152. bool HasSubscribedToEvent(const String&);
  9153. bool Load(File);
  9154. bool Load(VectorBuffer&);
  9155. bool Load(const String&);
  9156. bool Save(File) const;
  9157. bool Save(VectorBuffer&) const;
  9158. bool Save(const String&) const;
  9159. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9160. // Properties:
  9161. /* readonly */
  9162. String category;
  9163. /* readonly */
  9164. uint memoryUse;
  9165. String name;
  9166. /* readonly */
  9167. int refs;
  9168. /* readonly */
  9169. StringHash type;
  9170. /* readonly */
  9171. String typeName;
  9172. /* readonly */
  9173. uint useTimer;
  9174. /* readonly */
  9175. int weakRefs;
  9176. };
  9177. class ResourceCache
  9178. {
  9179. public:
  9180. // Methods:
  9181. bool AddManualResource(Resource);
  9182. bool AddPackageFile(PackageFile, uint = M_MAX_UNSIGNED);
  9183. bool AddPackageFile(const String&, uint = M_MAX_UNSIGNED);
  9184. bool AddResourceDir(const String&, uint = M_MAX_UNSIGNED);
  9185. bool BackgroundLoadResource(const String&, const String&, bool = true);
  9186. bool Exists(const String&) const;
  9187. Resource GetExistingResource(StringHash, const String&);
  9188. Resource GetExistingResource(const String&, const String&);
  9189. File GetFile(const String&);
  9190. String GetPreferredResourceDir(const String&) const;
  9191. Resource GetResource(StringHash, const String&, bool = true);
  9192. Resource GetResource(const String&, const String&, bool = true);
  9193. String GetResourceFileName(const String&) const;
  9194. Array<Resource> GetResources(StringHash);
  9195. Array<Resource> GetResources(const String&);
  9196. bool HasSubscribedToEvent(Object, const String&);
  9197. bool HasSubscribedToEvent(const String&);
  9198. void ReleaseAllResources(bool = false);
  9199. void ReleaseResource(const String&, const String&, bool = false);
  9200. void ReleaseResources(StringHash, bool = false);
  9201. void ReleaseResources(const String&, bool = false);
  9202. void ReleaseResources(const String&, const String&, bool = false);
  9203. bool ReloadResource(Resource);
  9204. void ReloadResourceWithDependencies(const String&);
  9205. void RemovePackageFile(PackageFile, bool = true, bool = false);
  9206. void RemovePackageFile(const String&, bool = true, bool = false);
  9207. void RemoveResourceDir(const String&);
  9208. String SanitateResourceDirName(const String&) const;
  9209. String SanitateResourceName(const String&) const;
  9210. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9211. // Properties:
  9212. bool autoReloadResources;
  9213. /* readonly */
  9214. String category;
  9215. int finishBackgroundResourcesMs;
  9216. Array<uint64> memoryBudget;
  9217. /* readonly */
  9218. Array<uint64> memoryUse;
  9219. /* readonly */
  9220. uint numBackgroundLoadResources;
  9221. /* readonly */
  9222. Array<PackageFile> packageFiles;
  9223. /* readonly */
  9224. int refs;
  9225. /* readonly */
  9226. Array<String> resourceDirs;
  9227. bool returnFailedResources;
  9228. /* readonly */
  9229. bool seachPackagesFirst;
  9230. /* writeonly */
  9231. bool searchPackagesFirst;
  9232. /* readonly */
  9233. uint64 totalMemoryUse;
  9234. /* readonly */
  9235. StringHash type;
  9236. /* readonly */
  9237. String typeName;
  9238. /* readonly */
  9239. int weakRefs;
  9240. };
  9241. class ResourceRef
  9242. {
  9243. public:
  9244. ~ResourceRef();
  9245. ResourceRef();
  9246. ResourceRef(const ResourceRef&in);
  9247. ResourceRef(const String&in, const String&in);
  9248. // Properties:
  9249. String name;
  9250. StringHash type;
  9251. };
  9252. class ResourceRefList
  9253. {
  9254. public:
  9255. ~ResourceRefList();
  9256. ResourceRefList();
  9257. ResourceRefList(const ResourceRefList&in);
  9258. // Methods:
  9259. void Resize(uint);
  9260. // Properties:
  9261. /* readonly */
  9262. bool empty;
  9263. /* readonly */
  9264. uint length;
  9265. Array<String> names;
  9266. StringHash type;
  9267. };
  9268. class RibbonTrail
  9269. {
  9270. public:
  9271. // Methods:
  9272. void ApplyAttributes();
  9273. void Commit();
  9274. void DrawDebugGeometry(DebugRenderer, bool);
  9275. Variant GetAttribute(const String&) const;
  9276. ValueAnimation GetAttributeAnimation(const String&) const;
  9277. float GetAttributeAnimationSpeed(const String&) const;
  9278. float GetAttributeAnimationTime(const String&) const;
  9279. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9280. Variant GetAttributeDefault(const String&) const;
  9281. bool GetInterceptNetworkUpdate(const String&) const;
  9282. bool HasSubscribedToEvent(Object, const String&);
  9283. bool HasSubscribedToEvent(const String&);
  9284. bool IsInView(Camera) const;
  9285. bool Load(File, bool = false);
  9286. bool Load(VectorBuffer&, bool = false);
  9287. bool LoadJSON(const JSONValue&, bool = false);
  9288. bool LoadXML(const XMLElement&, bool = false);
  9289. void MarkNetworkUpdate() const;
  9290. void Remove();
  9291. void RemoveAttributeAnimation(const String&);
  9292. void RemoveInstanceDefault();
  9293. void RemoveObjectAnimation();
  9294. void ResetToDefault();
  9295. bool Save(File) const;
  9296. bool Save(VectorBuffer&) const;
  9297. bool SaveJSON(JSONValue&) const;
  9298. bool SaveXML(XMLElement&) const;
  9299. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9300. void SetAnimationTime(float);
  9301. bool SetAttribute(const String&, const Variant&);
  9302. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9303. void SetAttributeAnimationSpeed(const String&, float);
  9304. void SetAttributeAnimationTime(const String&, float);
  9305. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9306. void SetInterceptNetworkUpdate(const String&, bool);
  9307. // Properties:
  9308. bool animationEnabled;
  9309. float animationLodBias;
  9310. /* readonly */
  9311. Array<Variant> attributeDefaults;
  9312. /* readonly */
  9313. Array<AttributeInfo> attributeInfos;
  9314. Array<Variant> attributes;
  9315. /* readonly */
  9316. BoundingBox boundingBox;
  9317. bool castShadows;
  9318. /* readonly */
  9319. String category;
  9320. float drawDistance;
  9321. bool emitting;
  9322. bool enabled;
  9323. /* readonly */
  9324. bool enabledEffective;
  9325. Color endColor;
  9326. float endScale;
  9327. /* readonly */
  9328. uint id;
  9329. /* readonly */
  9330. bool inView;
  9331. float lifetime;
  9332. uint lightMask;
  9333. float lodBias;
  9334. Material material;
  9335. uint maxLights;
  9336. /* readonly */
  9337. Node node;
  9338. /* readonly */
  9339. uint numAttributes;
  9340. ObjectAnimation objectAnimation;
  9341. bool occludee;
  9342. bool occluder;
  9343. /* readonly */
  9344. int refs;
  9345. float shadowDistance;
  9346. uint shadowMask;
  9347. bool sorted;
  9348. Color startColor;
  9349. float startScale;
  9350. uint tailColumn;
  9351. bool temporary;
  9352. TrailType trailType;
  9353. /* readonly */
  9354. StringHash type;
  9355. /* readonly */
  9356. String typeName;
  9357. bool updateInvisible;
  9358. float vertexDistance;
  9359. uint viewMask;
  9360. /* readonly */
  9361. int weakRefs;
  9362. float width;
  9363. /* readonly */
  9364. BoundingBox worldBoundingBox;
  9365. /* readonly */
  9366. Zone zone;
  9367. uint zoneMask;
  9368. };
  9369. class RigidBody
  9370. {
  9371. public:
  9372. // Methods:
  9373. void Activate();
  9374. void ApplyAttributes();
  9375. void ApplyForce(const Vector3&);
  9376. void ApplyForce(const Vector3&, const Vector3&);
  9377. void ApplyImpulse(const Vector3&);
  9378. void ApplyImpulse(const Vector3&, const Vector3&);
  9379. void ApplyTorque(const Vector3&);
  9380. void ApplyTorqueImpulse(const Vector3&);
  9381. void DisableMassUpdate();
  9382. void DrawDebugGeometry(DebugRenderer, bool);
  9383. void EnableMassUpdate();
  9384. Variant GetAttribute(const String&) const;
  9385. ValueAnimation GetAttributeAnimation(const String&) const;
  9386. float GetAttributeAnimationSpeed(const String&) const;
  9387. float GetAttributeAnimationTime(const String&) const;
  9388. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9389. Variant GetAttributeDefault(const String&) const;
  9390. bool GetInterceptNetworkUpdate(const String&) const;
  9391. Vector3 GetVelocityAtPoint(const Vector3&) const;
  9392. bool HasSubscribedToEvent(Object, const String&);
  9393. bool HasSubscribedToEvent(const String&);
  9394. bool Load(File, bool = false);
  9395. bool Load(VectorBuffer&, bool = false);
  9396. bool LoadJSON(const JSONValue&, bool = false);
  9397. bool LoadXML(const XMLElement&, bool = false);
  9398. void MarkNetworkUpdate() const;
  9399. void ReAddBodyToWorld();
  9400. void Remove();
  9401. void RemoveAttributeAnimation(const String&);
  9402. void RemoveInstanceDefault();
  9403. void RemoveObjectAnimation();
  9404. void ResetForces();
  9405. void ResetToDefault();
  9406. bool Save(File) const;
  9407. bool Save(VectorBuffer&) const;
  9408. bool SaveJSON(JSONValue&) const;
  9409. bool SaveXML(XMLElement&) const;
  9410. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9411. void SetAnimationTime(float);
  9412. bool SetAttribute(const String&, const Variant&);
  9413. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9414. void SetAttributeAnimationSpeed(const String&, float);
  9415. void SetAttributeAnimationTime(const String&, float);
  9416. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9417. void SetCollisionLayerAndMask(uint, uint);
  9418. void SetInterceptNetworkUpdate(const String&, bool);
  9419. void SetTransform(const Vector3&, const Quaternion&);
  9420. // Properties:
  9421. /* readonly */
  9422. bool active;
  9423. float angularDamping;
  9424. Vector3 angularFactor;
  9425. float angularRestThreshold;
  9426. Vector3 angularVelocity;
  9427. bool animationEnabled;
  9428. Vector3 anisotropicFriction;
  9429. /* readonly */
  9430. Array<Variant> attributeDefaults;
  9431. /* readonly */
  9432. Array<AttributeInfo> attributeInfos;
  9433. Array<Variant> attributes;
  9434. /* readonly */
  9435. String category;
  9436. float ccdMotionThreshold;
  9437. float ccdRadius;
  9438. /* readonly */
  9439. Vector3 centerOfMass;
  9440. /* readonly */
  9441. Array<RigidBody> collidingBodies;
  9442. CollisionEventMode collisionEventMode;
  9443. uint collisionLayer;
  9444. uint collisionMask;
  9445. float contactProcessingThreshold;
  9446. bool enabled;
  9447. /* readonly */
  9448. bool enabledEffective;
  9449. float friction;
  9450. Vector3 gravityOverride;
  9451. /* readonly */
  9452. uint id;
  9453. bool kinematic;
  9454. float linearDamping;
  9455. Vector3 linearFactor;
  9456. float linearRestThreshold;
  9457. Vector3 linearVelocity;
  9458. float mass;
  9459. /* readonly */
  9460. Node node;
  9461. /* readonly */
  9462. uint numAttributes;
  9463. ObjectAnimation objectAnimation;
  9464. Vector3 position;
  9465. /* readonly */
  9466. int refs;
  9467. float restitution;
  9468. float rollingFriction;
  9469. Quaternion rotation;
  9470. bool temporary;
  9471. bool trigger;
  9472. /* readonly */
  9473. StringHash type;
  9474. /* readonly */
  9475. String typeName;
  9476. bool useGravity;
  9477. /* readonly */
  9478. int weakRefs;
  9479. };
  9480. class RigidBody2D
  9481. {
  9482. public:
  9483. // Methods:
  9484. void ApplyAngularImpulse(float, bool);
  9485. void ApplyAttributes();
  9486. void ApplyForce(const Vector2&, const Vector2&, bool);
  9487. void ApplyForceToCenter(const Vector2&, bool);
  9488. void ApplyLinearImpulse(const Vector2&, const Vector2&, bool);
  9489. void ApplyLinearImpulseToCenter(const Vector2&, bool);
  9490. void ApplyTorque(float, bool);
  9491. void DrawDebugGeometry(DebugRenderer, bool);
  9492. Variant GetAttribute(const String&) const;
  9493. ValueAnimation GetAttributeAnimation(const String&) const;
  9494. float GetAttributeAnimationSpeed(const String&) const;
  9495. float GetAttributeAnimationTime(const String&) const;
  9496. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9497. Variant GetAttributeDefault(const String&) const;
  9498. bool GetInterceptNetworkUpdate(const String&) const;
  9499. bool HasSubscribedToEvent(Object, const String&);
  9500. bool HasSubscribedToEvent(const String&);
  9501. bool Load(File, bool = false);
  9502. bool Load(VectorBuffer&, bool = false);
  9503. bool LoadJSON(const JSONValue&, bool = false);
  9504. bool LoadXML(const XMLElement&, bool = false);
  9505. void MarkNetworkUpdate() const;
  9506. void Remove();
  9507. void RemoveAttributeAnimation(const String&);
  9508. void RemoveInstanceDefault();
  9509. void RemoveObjectAnimation();
  9510. void ResetToDefault();
  9511. bool Save(File) const;
  9512. bool Save(VectorBuffer&) const;
  9513. bool SaveJSON(JSONValue&) const;
  9514. bool SaveXML(XMLElement&) const;
  9515. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9516. void SetAnimationTime(float);
  9517. bool SetAttribute(const String&, const Variant&);
  9518. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9519. void SetAttributeAnimationSpeed(const String&, float);
  9520. void SetAttributeAnimationTime(const String&, float);
  9521. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9522. void SetInterceptNetworkUpdate(const String&, bool);
  9523. // Properties:
  9524. bool allowSleep;
  9525. float angularDamping;
  9526. bool animationEnabled;
  9527. /* readonly */
  9528. Array<Variant> attributeDefaults;
  9529. /* readonly */
  9530. Array<AttributeInfo> attributeInfos;
  9531. Array<Variant> attributes;
  9532. bool awake;
  9533. BodyType2D bodyType;
  9534. bool bullet;
  9535. /* readonly */
  9536. String category;
  9537. bool enabled;
  9538. /* readonly */
  9539. bool enabledEffective;
  9540. bool fixedRotation;
  9541. float gravityScale;
  9542. /* readonly */
  9543. uint id;
  9544. float inertia;
  9545. float linearDamping;
  9546. Vector2 linearVelocity;
  9547. float mass;
  9548. Vector2 massCenter;
  9549. /* readonly */
  9550. Node node;
  9551. /* readonly */
  9552. uint numAttributes;
  9553. ObjectAnimation objectAnimation;
  9554. /* readonly */
  9555. int refs;
  9556. bool temporary;
  9557. /* readonly */
  9558. StringHash type;
  9559. /* readonly */
  9560. String typeName;
  9561. bool useFixtureMass;
  9562. /* readonly */
  9563. int weakRefs;
  9564. };
  9565. class Scene
  9566. {
  9567. public:
  9568. Scene();
  9569. Scene(const String&in);
  9570. // Methods:
  9571. void AddChild(Node, uint = M_MAX_UNSIGNED);
  9572. void AddRequiredPackageFile(PackageFile);
  9573. void AddTag(const String&);
  9574. void AddTags(const String&, int8 = ';');
  9575. void ApplyAttributes();
  9576. void Clear(bool = true, bool = true);
  9577. void ClearRequiredPackageFiles();
  9578. Component CloneComponent(Component, CreateMode, uint = 0);
  9579. Component CloneComponent(Component, uint = 0);
  9580. Node CreateChild(const String& = String ( ), CreateMode = REPLICATED, uint = 0, bool = false);
  9581. Component CreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  9582. ScriptObject CreateScriptObject(ScriptFile, const String&, CreateMode = REPLICATED);
  9583. ScriptObject CreateScriptObject(const String&, const String&, CreateMode = REPLICATED);
  9584. Node CreateTemporaryChild(const String& = String ( ), CreateMode = REPLICATED, uint = 0);
  9585. Variant GetAttribute(const String&) const;
  9586. ValueAnimation GetAttributeAnimation(const String&) const;
  9587. float GetAttributeAnimationSpeed(const String&) const;
  9588. float GetAttributeAnimationTime(const String&) const;
  9589. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9590. Variant GetAttributeDefault(const String&) const;
  9591. Node GetChild(const String&, bool = false) const;
  9592. Array<Node> GetChildren(bool = false) const;
  9593. Array<Node> GetChildrenWithComponent(const String&, bool = false) const;
  9594. Array<Node> GetChildrenWithScript(bool = false) const;
  9595. Array<Node> GetChildrenWithScript(const String&, bool = false) const;
  9596. Array<Node> GetChildrenWithTag(const String&, bool = false) const;
  9597. Component GetComponent(const String&, bool = false) const;
  9598. Component GetComponent(uint) const;
  9599. Array<Component> GetComponents() const;
  9600. Array<Component> GetComponents(const String&, bool = false) const;
  9601. bool GetInterceptNetworkUpdate(const String&) const;
  9602. Node GetNode(uint) const;
  9603. Array<Node> GetNodesWithTag(const String&) const;
  9604. Component GetOrCreateComponent(const String&, CreateMode = REPLICATED, uint = 0);
  9605. Component GetParentComponent(const String&, bool = false) const;
  9606. ScriptObject GetScriptObject() const;
  9607. ScriptObject GetScriptObject(const String&) const;
  9608. bool HasComponent(const String&) const;
  9609. bool HasSubscribedToEvent(Object, const String&);
  9610. bool HasSubscribedToEvent(const String&);
  9611. bool HasTag(const String&);
  9612. Node Instantiate(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9613. Node Instantiate(VectorBuffer&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9614. Node InstantiateJSON(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9615. Node InstantiateJSON(JSONFile, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9616. Node InstantiateJSON(VectorBuffer&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9617. Node InstantiateJSON(const JSONValue&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9618. Node InstantiateXML(File, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9619. Node InstantiateXML(VectorBuffer&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9620. Node InstantiateXML(XMLFile, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9621. Node InstantiateXML(const XMLElement&, const Vector3&, const Quaternion&, CreateMode = REPLICATED);
  9622. bool IsChildOf(Node) const;
  9623. bool Load(File, bool = false);
  9624. bool Load(VectorBuffer&, bool = false);
  9625. bool LoadAsync(File, LoadMode = LOAD_SCENE_AND_RESOURCES);
  9626. bool LoadAsyncXML(File, LoadMode = LOAD_SCENE_AND_RESOURCES);
  9627. bool LoadJSON(File);
  9628. bool LoadJSON(VectorBuffer&);
  9629. bool LoadJSON(const JSONValue&, bool = false);
  9630. bool LoadXML(File);
  9631. bool LoadXML(VectorBuffer&);
  9632. bool LoadXML(const XMLElement&, bool = false);
  9633. Vector3 LocalToWorld(const Vector3&) const;
  9634. Vector3 LocalToWorld(const Vector4&) const;
  9635. Vector2 LocalToWorld2D(const Vector2&) const;
  9636. bool LookAt(const Vector3&, const Vector3& = Vector3 ( 0 , 1 , 0 ), TransformSpace = TS_WORLD);
  9637. void MarkNetworkUpdate() const;
  9638. void Pitch(float, TransformSpace = TS_LOCAL);
  9639. void RegisterVar(const String&);
  9640. void Remove();
  9641. void RemoveAllChildren();
  9642. void RemoveAllComponents();
  9643. void RemoveAllTags();
  9644. void RemoveAttributeAnimation(const String&);
  9645. void RemoveChild(Node);
  9646. void RemoveChildren(bool, bool, bool);
  9647. void RemoveComponent(Component);
  9648. void RemoveComponent(const String&);
  9649. void RemoveComponents(bool, bool);
  9650. void RemoveComponents(const String&);
  9651. void RemoveInstanceDefault();
  9652. void RemoveObjectAnimation();
  9653. bool RemoveTag(const String&);
  9654. void ReorderComponent(Component, uint);
  9655. void ResetToDefault();
  9656. void Roll(float, TransformSpace = TS_LOCAL);
  9657. void Rotate(const Quaternion&, TransformSpace = TS_LOCAL);
  9658. void Rotate2D(float, TransformSpace = TS_LOCAL);
  9659. void RotateAround(const Vector3&, const Quaternion&, TransformSpace = TS_LOCAL);
  9660. void RotateAround2D(const Vector2&, float, TransformSpace = TS_LOCAL);
  9661. bool Save(File) const;
  9662. bool Save(VectorBuffer&) const;
  9663. bool SaveJSON(File, const String& = "\t");
  9664. bool SaveJSON(JSONValue&) const;
  9665. bool SaveJSON(VectorBuffer&, const String& = "\t");
  9666. bool SaveXML(File, const String& = "\t");
  9667. bool SaveXML(VectorBuffer&, const String& = "\t");
  9668. bool SaveXML(XMLElement&) const;
  9669. void Scale(const Vector3&);
  9670. void Scale(float);
  9671. void Scale2D(const Vector2&);
  9672. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9673. void SetAnimationTime(float);
  9674. bool SetAttribute(const String&, const Variant&);
  9675. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9676. void SetAttributeAnimationSpeed(const String&, float);
  9677. void SetAttributeAnimationTime(const String&, float);
  9678. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9679. void SetInterceptNetworkUpdate(const String&, bool);
  9680. void SetPosition2D(float, float);
  9681. void SetScale(float);
  9682. void SetScale2D(float, float);
  9683. void SetTransform(const Matrix3x4&);
  9684. void SetTransform(const Vector3&, const Quaternion&);
  9685. void SetTransform(const Vector3&, const Quaternion&, const Vector3&);
  9686. void SetTransform(const Vector3&, const Quaternion&, float);
  9687. void SetTransform2D(const Vector2&, float);
  9688. void SetTransform2D(const Vector2&, float, const Vector2&);
  9689. void SetTransform2D(const Vector2&, float, float);
  9690. void SetWorldTransform(const Vector3&, const Quaternion&);
  9691. void SetWorldTransform(const Vector3&, const Quaternion&, const Vector3&);
  9692. void SetWorldTransform(const Vector3&, const Quaternion&, float);
  9693. void SetWorldTransform2D(const Vector2&, float);
  9694. void SetWorldTransform2D(const Vector2&, float, const Vector2&);
  9695. void SetWorldTransform2D(const Vector2&, float, float);
  9696. void StopAsyncLoading();
  9697. const String& GetVarName(StringHash) const;
  9698. void Translate(const Vector3&, TransformSpace = TS_LOCAL);
  9699. void Translate2D(const Vector2&, TransformSpace = TS_LOCAL);
  9700. void UnregisterAllVars(const String&);
  9701. void UnregisterVar(const String&);
  9702. void Update(float);
  9703. Vector3 WorldToLocal(const Vector3&) const;
  9704. Vector3 WorldToLocal(const Vector4&) const;
  9705. Vector2 WorldToLocal2D(const Vector2&) const;
  9706. void Yaw(float, TransformSpace = TS_LOCAL);
  9707. // Properties:
  9708. bool animationEnabled;
  9709. /* readonly */
  9710. LoadMode asyncLoadMode;
  9711. /* readonly */
  9712. bool asyncLoading;
  9713. int asyncLoadingMs;
  9714. /* readonly */
  9715. float asyncProgress;
  9716. /* readonly */
  9717. Array<Variant> attributeDefaults;
  9718. /* readonly */
  9719. Array<AttributeInfo> attributeInfos;
  9720. Array<Variant> attributes;
  9721. /* readonly */
  9722. String category;
  9723. /* readonly */
  9724. uint checksum;
  9725. /* readonly */
  9726. Array<Node> children;
  9727. /* readonly */
  9728. Array<Component> components;
  9729. /* readonly */
  9730. DebugRenderer debugRenderer;
  9731. Vector3 direction;
  9732. float elapsedTime;
  9733. /* readonly */
  9734. String fileName;
  9735. uint id;
  9736. String name;
  9737. /* readonly */
  9738. uint numAllChildren;
  9739. /* readonly */
  9740. uint numAttributes;
  9741. /* readonly */
  9742. uint numChildren;
  9743. /* readonly */
  9744. uint numComponents;
  9745. ObjectAnimation objectAnimation;
  9746. /* readonly */
  9747. Octree octree;
  9748. Node parent;
  9749. /* readonly */
  9750. PhysicsWorld physicsWorld;
  9751. /* readonly */
  9752. PhysicsWorld2D physicsWorld2D;
  9753. Vector3 position;
  9754. Vector2 position2D;
  9755. /* readonly */
  9756. int refs;
  9757. /* readonly */
  9758. Array<PackageFile> requiredPackageFiles;
  9759. /* readonly */
  9760. Vector3 right;
  9761. Quaternion rotation;
  9762. float rotation2D;
  9763. Vector3 scale;
  9764. Vector2 scale2D;
  9765. /* readonly */
  9766. ScriptObject scriptObject;
  9767. /* readonly */
  9768. Vector3 signedWorldScale;
  9769. float smoothingConstant;
  9770. float snapThreshold;
  9771. /* readonly */
  9772. Array<String> tags;
  9773. bool temporary;
  9774. float timeScale;
  9775. /* readonly */
  9776. Matrix3x4 transform;
  9777. /* readonly */
  9778. StringHash type;
  9779. /* readonly */
  9780. String typeName;
  9781. /* readonly */
  9782. Vector3 up;
  9783. bool updateEnabled;
  9784. /* readonly */
  9785. VariantMap vars;
  9786. /* readonly */
  9787. int weakRefs;
  9788. Vector3 worldDirection;
  9789. Vector3 worldPosition;
  9790. Vector2 worldPosition2D;
  9791. /* readonly */
  9792. Vector3 worldRight;
  9793. Quaternion worldRotation;
  9794. float worldRotation2D;
  9795. Vector3 worldScale;
  9796. Vector2 worldScale2D;
  9797. /* readonly */
  9798. Matrix3x4 worldTransform;
  9799. /* readonly */
  9800. Vector3 worldUp;
  9801. };
  9802. class Script
  9803. {
  9804. public:
  9805. // Methods:
  9806. void DumpAPI(DumpMode = DOXYGEN, const String& = String ( ));
  9807. bool Execute(const String&);
  9808. bool HasSubscribedToEvent(Object, const String&);
  9809. bool HasSubscribedToEvent(const String&);
  9810. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9811. // Properties:
  9812. /* readonly */
  9813. String category;
  9814. Scene defaultScene;
  9815. ScriptFile defaultScriptFile;
  9816. bool executeConsoleCommands;
  9817. /* readonly */
  9818. int refs;
  9819. /* readonly */
  9820. StringHash type;
  9821. /* readonly */
  9822. String typeName;
  9823. /* readonly */
  9824. int weakRefs;
  9825. };
  9826. class ScriptFile
  9827. {
  9828. public:
  9829. ScriptFile();
  9830. ScriptFile(const String&in);
  9831. // Methods:
  9832. void ClearDelayedExecute(const String& = String ( ));
  9833. void DelayedExecute(float, bool, const String&, const Array<Variant> = null);
  9834. bool Execute(const String&, const Array<Variant> = null);
  9835. bool HasSubscribedToEvent(Object, const String&);
  9836. bool HasSubscribedToEvent(const String&);
  9837. bool Load(File);
  9838. bool Load(VectorBuffer&);
  9839. bool Load(const String&);
  9840. bool Save(File) const;
  9841. bool Save(VectorBuffer&) const;
  9842. bool Save(const String&) const;
  9843. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9844. // Properties:
  9845. /* readonly */
  9846. String category;
  9847. /* readonly */
  9848. bool compiled;
  9849. /* readonly */
  9850. uint memoryUse;
  9851. String name;
  9852. /* readonly */
  9853. int refs;
  9854. /* readonly */
  9855. StringHash type;
  9856. /* readonly */
  9857. String typeName;
  9858. /* readonly */
  9859. uint useTimer;
  9860. /* readonly */
  9861. int weakRefs;
  9862. };
  9863. class ScriptInstance
  9864. {
  9865. public:
  9866. // Methods:
  9867. void ApplyAttributes();
  9868. void ClearDelayedExecute(const String& = String ( ));
  9869. bool CreateObject(ScriptFile, const String&);
  9870. void DelayedExecute(float, bool, const String&, const Array<Variant> = null);
  9871. void DrawDebugGeometry(DebugRenderer, bool);
  9872. bool Execute(const String&, const Array<Variant> = null);
  9873. Variant GetAttribute(const String&) const;
  9874. ValueAnimation GetAttributeAnimation(const String&) const;
  9875. float GetAttributeAnimationSpeed(const String&) const;
  9876. float GetAttributeAnimationTime(const String&) const;
  9877. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9878. Variant GetAttributeDefault(const String&) const;
  9879. bool GetInterceptNetworkUpdate(const String&) const;
  9880. bool HasMethod(const String&) const;
  9881. bool HasSubscribedToEvent(Object, const String&);
  9882. bool HasSubscribedToEvent(const String&);
  9883. bool IsA(const String&) const;
  9884. bool Load(File, bool = false);
  9885. bool Load(VectorBuffer&, bool = false);
  9886. bool LoadJSON(const JSONValue&, bool = false);
  9887. bool LoadXML(const XMLElement&, bool = false);
  9888. void MarkNetworkUpdate() const;
  9889. void Remove();
  9890. void RemoveAttributeAnimation(const String&);
  9891. void RemoveInstanceDefault();
  9892. void RemoveObjectAnimation();
  9893. void ResetToDefault();
  9894. bool Save(File) const;
  9895. bool Save(VectorBuffer&) const;
  9896. bool SaveJSON(JSONValue&) const;
  9897. bool SaveXML(XMLElement&) const;
  9898. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  9899. void SetAnimationTime(float);
  9900. bool SetAttribute(const String&, const Variant&);
  9901. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  9902. void SetAttributeAnimationSpeed(const String&, float);
  9903. void SetAttributeAnimationTime(const String&, float);
  9904. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  9905. void SetInterceptNetworkUpdate(const String&, bool);
  9906. // Properties:
  9907. bool animationEnabled;
  9908. /* readonly */
  9909. Array<Variant> attributeDefaults;
  9910. /* readonly */
  9911. Array<AttributeInfo> attributeInfos;
  9912. Array<Variant> attributes;
  9913. /* readonly */
  9914. String category;
  9915. String className;
  9916. bool enabled;
  9917. /* readonly */
  9918. bool enabledEffective;
  9919. /* readonly */
  9920. uint id;
  9921. /* readonly */
  9922. Node node;
  9923. /* readonly */
  9924. uint numAttributes;
  9925. ObjectAnimation objectAnimation;
  9926. /* readonly */
  9927. int refs;
  9928. ScriptFile scriptFile;
  9929. /* readonly */
  9930. ScriptObject scriptObject;
  9931. bool temporary;
  9932. /* readonly */
  9933. StringHash type;
  9934. /* readonly */
  9935. String typeName;
  9936. /* readonly */
  9937. int weakRefs;
  9938. };
  9939. class ScriptObject
  9940. {
  9941. public:
  9942. };
  9943. class ScrollBar
  9944. {
  9945. public:
  9946. ScrollBar();
  9947. ScrollBar(const String&in);
  9948. // Methods:
  9949. void AddChild(UIElement);
  9950. void AddTag(const String&);
  9951. void AddTags(const String&, int8 = ';');
  9952. void ApplyAttributes();
  9953. void BringToFront();
  9954. void ChangeValue(float);
  9955. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  9956. void DisableLayoutUpdate();
  9957. IntVector2 ElementToScreen(const IntVector2&);
  9958. void EnableLayoutUpdate();
  9959. uint FindChild(UIElement) const;
  9960. Variant GetAttribute(const String&) const;
  9961. ValueAnimation GetAttributeAnimation(const String&) const;
  9962. float GetAttributeAnimationSpeed(const String&) const;
  9963. float GetAttributeAnimationTime(const String&) const;
  9964. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  9965. Variant GetAttributeDefault(const String&) const;
  9966. UIElement GetChild(const String&, bool = false) const;
  9967. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  9968. Array<UIElement> GetChildren(bool = false) const;
  9969. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  9970. UIElement GetElementEventSender() const;
  9971. bool GetInterceptNetworkUpdate(const String&) const;
  9972. uint GetNumChildren(bool) const;
  9973. bool HasSubscribedToEvent(Object, const String&);
  9974. bool HasSubscribedToEvent(const String&);
  9975. bool HasTag(const String&) const;
  9976. void InsertChild(uint, UIElement);
  9977. bool IsInside(IntVector2, bool);
  9978. bool IsInsideCombined(IntVector2, bool);
  9979. bool Load(File, bool = false);
  9980. bool Load(VectorBuffer&, bool = false);
  9981. UIElement LoadChildXML(XMLFile, XMLFile = null);
  9982. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  9983. bool LoadJSON(const JSONValue&, bool = false);
  9984. bool LoadXML(File);
  9985. bool LoadXML(VectorBuffer&);
  9986. bool LoadXML(XMLFile, XMLFile);
  9987. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  9988. bool LoadXML(const XMLElement&, bool = false);
  9989. void MarkNetworkUpdate() const;
  9990. void Remove();
  9991. void RemoveAllChildren();
  9992. void RemoveAllTags();
  9993. void RemoveAttributeAnimation(const String&);
  9994. void RemoveChild(UIElement, uint = 0);
  9995. void RemoveChild(uint);
  9996. void RemoveInstanceDefault();
  9997. void RemoveObjectAnimation();
  9998. bool RemoveTag(const String&);
  9999. void ResetDeepEnabled();
  10000. void ResetToDefault();
  10001. bool Save(File) const;
  10002. bool Save(VectorBuffer&) const;
  10003. bool SaveJSON(JSONValue&) const;
  10004. bool SaveXML(File, const String& = "\t");
  10005. bool SaveXML(VectorBuffer&, const String& = "\t");
  10006. bool SaveXML(XMLElement&) const;
  10007. IntVector2 ScreenToElement(const IntVector2&);
  10008. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10009. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  10010. void SetAnimationTime(float);
  10011. bool SetAttribute(const String&, const Variant&);
  10012. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10013. void SetAttributeAnimationSpeed(const String&, float);
  10014. void SetAttributeAnimationTime(const String&, float);
  10015. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10016. void SetDeepEnabled(bool);
  10017. void SetEnabledRecursive(bool);
  10018. void SetFixedHeight(int);
  10019. void SetFixedSize(int, int);
  10020. void SetFixedWidth(int);
  10021. void SetInterceptNetworkUpdate(const String&, bool);
  10022. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  10023. void SetMaxAnchor(float, float);
  10024. void SetMaxSize(int, int);
  10025. void SetMinAnchor(float, float);
  10026. void SetMinSize(int, int);
  10027. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  10028. void SetPivot(float, float);
  10029. void SetPosition(int, int);
  10030. void SetSize(int, int);
  10031. bool SetStyle(const String&, XMLFile = null);
  10032. bool SetStyle(const XMLElement&);
  10033. bool SetStyleAuto(XMLFile = null);
  10034. void StepBack();
  10035. void StepForward();
  10036. void UpdateLayout();
  10037. const Variant& GetVar(const StringHash&);
  10038. // Properties:
  10039. bool animationEnabled;
  10040. /* readonly */
  10041. Array<Variant> attributeDefaults;
  10042. /* readonly */
  10043. Array<AttributeInfo> attributeInfos;
  10044. Array<Variant> attributes;
  10045. /* readonly */
  10046. Button backButton;
  10047. bool bringToBack;
  10048. bool bringToFront;
  10049. /* readonly */
  10050. String category;
  10051. /* readonly */
  10052. IntVector2 childOffset;
  10053. /* readonly */
  10054. Array<UIElement> children;
  10055. IntRect clipBorder;
  10056. bool clipChildren;
  10057. /* writeonly */
  10058. Color color;
  10059. /* readonly */
  10060. bool colorGradient;
  10061. Array<Color> colors;
  10062. /* readonly */
  10063. IntRect combinedScreenRect;
  10064. XMLFile defaultStyle;
  10065. /* readonly */
  10066. float derivedOpacity;
  10067. /* readonly */
  10068. uint dragButtonCombo;
  10069. /* readonly */
  10070. int dragButtonCount;
  10071. uint dragDropMode;
  10072. bool editable;
  10073. /* readonly */
  10074. float effectiveScrollStep;
  10075. bool elementEventSender;
  10076. bool enableAnchor;
  10077. bool enabled;
  10078. /* readonly */
  10079. bool enabledSelf;
  10080. /* readonly */
  10081. bool fixedHeight;
  10082. /* readonly */
  10083. bool fixedSize;
  10084. /* readonly */
  10085. bool fixedWidth;
  10086. bool focus;
  10087. FocusMode focusMode;
  10088. /* readonly */
  10089. Button forwardButton;
  10090. int height;
  10091. HorizontalAlignment horizontalAlignment;
  10092. /* readonly */
  10093. bool hovering;
  10094. int indent;
  10095. int indentSpacing;
  10096. /* readonly */
  10097. int indentWidth;
  10098. bool internal;
  10099. IntRect layoutBorder;
  10100. Vector2 layoutFlexScale;
  10101. LayoutMode layoutMode;
  10102. int layoutSpacing;
  10103. Vector2 maxAnchor;
  10104. int maxHeight;
  10105. IntVector2 maxOffset;
  10106. IntVector2 maxSize;
  10107. int maxWidth;
  10108. Vector2 minAnchor;
  10109. int minHeight;
  10110. IntVector2 minOffset;
  10111. IntVector2 minSize;
  10112. int minWidth;
  10113. String name;
  10114. /* readonly */
  10115. uint numAllChildren;
  10116. /* readonly */
  10117. uint numAttributes;
  10118. /* readonly */
  10119. uint numChildren;
  10120. ObjectAnimation objectAnimation;
  10121. float opacity;
  10122. Orientation orientation;
  10123. UIElement parent;
  10124. Vector2 pivot;
  10125. IntVector2 position;
  10126. int priority;
  10127. float range;
  10128. /* readonly */
  10129. int refs;
  10130. /* readonly */
  10131. UIElement root;
  10132. /* readonly */
  10133. IntVector2 screenPosition;
  10134. float scrollStep;
  10135. bool selected;
  10136. IntVector2 size;
  10137. /* readonly */
  10138. Slider slider;
  10139. bool sortChildren;
  10140. float stepFactor;
  10141. String style;
  10142. /* readonly */
  10143. Array<String> tags;
  10144. bool temporary;
  10145. TraversalMode traversalMode;
  10146. /* readonly */
  10147. StringHash type;
  10148. /* readonly */
  10149. String typeName;
  10150. bool useDerivedOpacity;
  10151. float value;
  10152. /* readonly */
  10153. VariantMap vars;
  10154. VerticalAlignment verticalAlignment;
  10155. bool visible;
  10156. /* readonly */
  10157. bool visibleEffective;
  10158. /* readonly */
  10159. int weakRefs;
  10160. int width;
  10161. };
  10162. class ScrollView
  10163. {
  10164. public:
  10165. ScrollView();
  10166. ScrollView(const String&in);
  10167. // Methods:
  10168. void AddChild(UIElement);
  10169. void AddTag(const String&);
  10170. void AddTags(const String&, int8 = ';');
  10171. void ApplyAttributes();
  10172. void BringToFront();
  10173. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  10174. void DisableLayoutUpdate();
  10175. IntVector2 ElementToScreen(const IntVector2&);
  10176. void EnableLayoutUpdate();
  10177. uint FindChild(UIElement) const;
  10178. Variant GetAttribute(const String&) const;
  10179. ValueAnimation GetAttributeAnimation(const String&) const;
  10180. float GetAttributeAnimationSpeed(const String&) const;
  10181. float GetAttributeAnimationTime(const String&) const;
  10182. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10183. Variant GetAttributeDefault(const String&) const;
  10184. UIElement GetChild(const String&, bool = false) const;
  10185. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  10186. Array<UIElement> GetChildren(bool = false) const;
  10187. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  10188. UIElement GetElementEventSender() const;
  10189. bool GetInterceptNetworkUpdate(const String&) const;
  10190. uint GetNumChildren(bool) const;
  10191. bool HasSubscribedToEvent(Object, const String&);
  10192. bool HasSubscribedToEvent(const String&);
  10193. bool HasTag(const String&) const;
  10194. void InsertChild(uint, UIElement);
  10195. bool IsInside(IntVector2, bool);
  10196. bool IsInsideCombined(IntVector2, bool);
  10197. bool Load(File, bool = false);
  10198. bool Load(VectorBuffer&, bool = false);
  10199. UIElement LoadChildXML(XMLFile, XMLFile = null);
  10200. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  10201. bool LoadJSON(const JSONValue&, bool = false);
  10202. bool LoadXML(File);
  10203. bool LoadXML(VectorBuffer&);
  10204. bool LoadXML(XMLFile, XMLFile);
  10205. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  10206. bool LoadXML(const XMLElement&, bool = false);
  10207. void MarkNetworkUpdate() const;
  10208. void Remove();
  10209. void RemoveAllChildren();
  10210. void RemoveAllTags();
  10211. void RemoveAttributeAnimation(const String&);
  10212. void RemoveChild(UIElement, uint = 0);
  10213. void RemoveChild(uint);
  10214. void RemoveInstanceDefault();
  10215. void RemoveObjectAnimation();
  10216. bool RemoveTag(const String&);
  10217. void ResetDeepEnabled();
  10218. void ResetToDefault();
  10219. bool Save(File) const;
  10220. bool Save(VectorBuffer&) const;
  10221. bool SaveJSON(JSONValue&) const;
  10222. bool SaveXML(File, const String& = "\t");
  10223. bool SaveXML(VectorBuffer&, const String& = "\t");
  10224. bool SaveXML(XMLElement&) const;
  10225. IntVector2 ScreenToElement(const IntVector2&);
  10226. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10227. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  10228. void SetAnimationTime(float);
  10229. bool SetAttribute(const String&, const Variant&);
  10230. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10231. void SetAttributeAnimationSpeed(const String&, float);
  10232. void SetAttributeAnimationTime(const String&, float);
  10233. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10234. void SetDeepEnabled(bool);
  10235. void SetEnabledRecursive(bool);
  10236. void SetFixedHeight(int);
  10237. void SetFixedSize(int, int);
  10238. void SetFixedWidth(int);
  10239. void SetInterceptNetworkUpdate(const String&, bool);
  10240. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  10241. void SetMaxAnchor(float, float);
  10242. void SetMaxSize(int, int);
  10243. void SetMinAnchor(float, float);
  10244. void SetMinSize(int, int);
  10245. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  10246. void SetPivot(float, float);
  10247. void SetPosition(int, int);
  10248. void SetScrollBarsVisible(bool, bool);
  10249. void SetSize(int, int);
  10250. bool SetStyle(const String&, XMLFile = null);
  10251. bool SetStyle(const XMLElement&);
  10252. bool SetStyleAuto(XMLFile = null);
  10253. void SetViewPosition(int, int);
  10254. void UpdateLayout();
  10255. const Variant& GetVar(const StringHash&);
  10256. // Properties:
  10257. bool animationEnabled;
  10258. /* readonly */
  10259. Array<Variant> attributeDefaults;
  10260. /* readonly */
  10261. Array<AttributeInfo> attributeInfos;
  10262. Array<Variant> attributes;
  10263. bool autoDisableChildren;
  10264. float autoDisableThreshold;
  10265. bool bringToBack;
  10266. bool bringToFront;
  10267. /* readonly */
  10268. String category;
  10269. /* readonly */
  10270. IntVector2 childOffset;
  10271. /* readonly */
  10272. Array<UIElement> children;
  10273. IntRect clipBorder;
  10274. bool clipChildren;
  10275. /* writeonly */
  10276. Color color;
  10277. /* readonly */
  10278. bool colorGradient;
  10279. Array<Color> colors;
  10280. /* readonly */
  10281. IntRect combinedScreenRect;
  10282. UIElement contentElement;
  10283. XMLFile defaultStyle;
  10284. /* readonly */
  10285. float derivedOpacity;
  10286. /* readonly */
  10287. uint dragButtonCombo;
  10288. /* readonly */
  10289. int dragButtonCount;
  10290. uint dragDropMode;
  10291. bool editable;
  10292. bool elementEventSender;
  10293. bool enableAnchor;
  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. ScrollBar horizontalScrollBar;
  10309. /* readonly */
  10310. bool hovering;
  10311. int indent;
  10312. int indentSpacing;
  10313. /* readonly */
  10314. int indentWidth;
  10315. bool internal;
  10316. IntRect layoutBorder;
  10317. Vector2 layoutFlexScale;
  10318. LayoutMode layoutMode;
  10319. int layoutSpacing;
  10320. Vector2 maxAnchor;
  10321. int maxHeight;
  10322. IntVector2 maxOffset;
  10323. IntVector2 maxSize;
  10324. int maxWidth;
  10325. Vector2 minAnchor;
  10326. int minHeight;
  10327. IntVector2 minOffset;
  10328. IntVector2 minSize;
  10329. int minWidth;
  10330. String name;
  10331. /* readonly */
  10332. uint numAllChildren;
  10333. /* readonly */
  10334. uint numAttributes;
  10335. /* readonly */
  10336. uint numChildren;
  10337. ObjectAnimation objectAnimation;
  10338. float opacity;
  10339. float pageStep;
  10340. UIElement parent;
  10341. Vector2 pivot;
  10342. IntVector2 position;
  10343. int priority;
  10344. /* readonly */
  10345. int refs;
  10346. /* readonly */
  10347. UIElement root;
  10348. /* readonly */
  10349. IntVector2 screenPosition;
  10350. bool scrollBarsAutoVisible;
  10351. float scrollDeceleration;
  10352. /* readonly */
  10353. BorderImage scrollPanel;
  10354. float scrollSnapEpsilon;
  10355. float scrollStep;
  10356. bool selected;
  10357. IntVector2 size;
  10358. bool sortChildren;
  10359. String style;
  10360. /* readonly */
  10361. Array<String> tags;
  10362. bool temporary;
  10363. TraversalMode traversalMode;
  10364. /* readonly */
  10365. StringHash type;
  10366. /* readonly */
  10367. String typeName;
  10368. bool useDerivedOpacity;
  10369. /* readonly */
  10370. VariantMap vars;
  10371. VerticalAlignment verticalAlignment;
  10372. /* readonly */
  10373. ScrollBar verticalScrollBar;
  10374. IntVector2 viewPosition;
  10375. bool visible;
  10376. /* readonly */
  10377. bool visibleEffective;
  10378. /* readonly */
  10379. int weakRefs;
  10380. int width;
  10381. };
  10382. class Serializable
  10383. {
  10384. public:
  10385. // Methods:
  10386. void ApplyAttributes();
  10387. Variant GetAttribute(const String&) const;
  10388. Variant GetAttributeDefault(const String&) const;
  10389. bool GetInterceptNetworkUpdate(const String&) const;
  10390. bool HasSubscribedToEvent(Object, const String&);
  10391. bool HasSubscribedToEvent(const String&);
  10392. bool Load(File, bool = false);
  10393. bool Load(VectorBuffer&, bool = false);
  10394. bool LoadJSON(const JSONValue&, bool = false);
  10395. bool LoadXML(const XMLElement&, bool = false);
  10396. void MarkNetworkUpdate() const;
  10397. void RemoveInstanceDefault();
  10398. void ResetToDefault();
  10399. bool Save(File) const;
  10400. bool Save(VectorBuffer&) const;
  10401. bool SaveJSON(JSONValue&) const;
  10402. bool SaveXML(XMLElement&) const;
  10403. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10404. bool SetAttribute(const String&, const Variant&);
  10405. void SetInterceptNetworkUpdate(const String&, bool);
  10406. // Properties:
  10407. /* readonly */
  10408. Array<Variant> attributeDefaults;
  10409. /* readonly */
  10410. Array<AttributeInfo> attributeInfos;
  10411. Array<Variant> attributes;
  10412. /* readonly */
  10413. String category;
  10414. /* readonly */
  10415. uint numAttributes;
  10416. /* readonly */
  10417. int refs;
  10418. bool temporary;
  10419. /* readonly */
  10420. StringHash type;
  10421. /* readonly */
  10422. String typeName;
  10423. /* readonly */
  10424. int weakRefs;
  10425. };
  10426. class Serializer
  10427. {
  10428. public:
  10429. // Methods:
  10430. uint Write(Array<uint8>);
  10431. bool WriteBool(bool);
  10432. bool WriteBoundingBox(const BoundingBox&);
  10433. bool WriteByte(int8);
  10434. bool WriteColor(const Color&);
  10435. bool WriteDouble(double);
  10436. bool WriteFileID(const String&);
  10437. bool WriteFloat(float);
  10438. bool WriteInt(int);
  10439. bool WriteInt64(int64);
  10440. bool WriteIntRect(const IntRect&);
  10441. bool WriteIntVector2(const IntVector2&);
  10442. bool WriteLine(const String&);
  10443. bool WriteMatrix3(const Matrix3&);
  10444. bool WriteMatrix3x4(const Matrix3x4&);
  10445. bool WriteMatrix4(const Matrix4&);
  10446. bool WriteNetID(uint);
  10447. bool WritePackedQuaternion(const Quaternion&);
  10448. bool WritePackedVector3(const Vector3&, float);
  10449. bool WriteQuaternion(const Quaternion&);
  10450. bool WriteShort(int16);
  10451. bool WriteString(const String&);
  10452. bool WriteStringHash(const StringHash&);
  10453. bool WriteUByte(uint8);
  10454. bool WriteUInt(uint);
  10455. bool WriteUInt64(uint64);
  10456. bool WriteUShort(uint16);
  10457. bool WriteVLE(uint);
  10458. bool WriteVariant(const Variant&);
  10459. bool WriteVariantMap(const VariantMap&);
  10460. bool WriteVector2(const Vector2&);
  10461. bool WriteVector3(const Vector3&);
  10462. bool WriteVector4(const Vector4&);
  10463. bool WriteVectorBuffer(const VectorBuffer&);
  10464. };
  10465. class Skeleton
  10466. {
  10467. public:
  10468. // Methods:
  10469. Bone GetBone(const String&) const;
  10470. void Reset();
  10471. // Properties:
  10472. /* readonly */
  10473. Array<Bone> bones;
  10474. /* readonly */
  10475. uint numBones;
  10476. /* readonly */
  10477. Bone rootBone;
  10478. };
  10479. class Skybox
  10480. {
  10481. public:
  10482. // Methods:
  10483. void ApplyAttributes();
  10484. void ApplyMaterialList(const String& = String ( ));
  10485. void DrawDebugGeometry(DebugRenderer, bool);
  10486. Variant GetAttribute(const String&) const;
  10487. ValueAnimation GetAttributeAnimation(const String&) const;
  10488. float GetAttributeAnimationSpeed(const String&) const;
  10489. float GetAttributeAnimationTime(const String&) const;
  10490. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10491. Variant GetAttributeDefault(const String&) const;
  10492. bool GetInterceptNetworkUpdate(const String&) const;
  10493. bool HasSubscribedToEvent(Object, const String&);
  10494. bool HasSubscribedToEvent(const String&);
  10495. bool IsInView(Camera) const;
  10496. bool Load(File, bool = false);
  10497. bool Load(VectorBuffer&, bool = false);
  10498. bool LoadJSON(const JSONValue&, bool = false);
  10499. bool LoadXML(const XMLElement&, bool = false);
  10500. void MarkNetworkUpdate() const;
  10501. void Remove();
  10502. void RemoveAttributeAnimation(const String&);
  10503. void RemoveInstanceDefault();
  10504. void RemoveObjectAnimation();
  10505. void ResetToDefault();
  10506. bool Save(File) const;
  10507. bool Save(VectorBuffer&) const;
  10508. bool SaveJSON(JSONValue&) const;
  10509. bool SaveXML(XMLElement&) const;
  10510. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10511. void SetAnimationTime(float);
  10512. bool SetAttribute(const String&, const Variant&);
  10513. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10514. void SetAttributeAnimationSpeed(const String&, float);
  10515. void SetAttributeAnimationTime(const String&, float);
  10516. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10517. void SetInterceptNetworkUpdate(const String&, bool);
  10518. // Properties:
  10519. bool animationEnabled;
  10520. /* readonly */
  10521. Array<Variant> attributeDefaults;
  10522. /* readonly */
  10523. Array<AttributeInfo> attributeInfos;
  10524. Array<Variant> attributes;
  10525. /* readonly */
  10526. BoundingBox boundingBox;
  10527. bool castShadows;
  10528. /* readonly */
  10529. String category;
  10530. float drawDistance;
  10531. bool enabled;
  10532. /* readonly */
  10533. bool enabledEffective;
  10534. /* readonly */
  10535. uint id;
  10536. /* readonly */
  10537. bool inView;
  10538. uint lightMask;
  10539. float lodBias;
  10540. /* writeonly */
  10541. Material material;
  10542. Array<Material> materials;
  10543. uint maxLights;
  10544. Model model;
  10545. /* readonly */
  10546. Node node;
  10547. /* readonly */
  10548. uint numAttributes;
  10549. /* readonly */
  10550. uint numGeometries;
  10551. ObjectAnimation objectAnimation;
  10552. bool occludee;
  10553. bool occluder;
  10554. /* readonly */
  10555. int refs;
  10556. float shadowDistance;
  10557. uint shadowMask;
  10558. bool temporary;
  10559. /* readonly */
  10560. StringHash type;
  10561. /* readonly */
  10562. String typeName;
  10563. uint viewMask;
  10564. /* readonly */
  10565. int weakRefs;
  10566. /* readonly */
  10567. BoundingBox worldBoundingBox;
  10568. /* readonly */
  10569. Zone zone;
  10570. uint zoneMask;
  10571. };
  10572. class Slider
  10573. {
  10574. public:
  10575. Slider();
  10576. Slider(const String&in);
  10577. // Methods:
  10578. void AddChild(UIElement);
  10579. void AddTag(const String&);
  10580. void AddTags(const String&, int8 = ';');
  10581. void ApplyAttributes();
  10582. void BringToFront();
  10583. void ChangeValue(float);
  10584. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  10585. void DisableLayoutUpdate();
  10586. IntVector2 ElementToScreen(const IntVector2&);
  10587. void EnableLayoutUpdate();
  10588. uint FindChild(UIElement) const;
  10589. Variant GetAttribute(const String&) const;
  10590. ValueAnimation GetAttributeAnimation(const String&) const;
  10591. float GetAttributeAnimationSpeed(const String&) const;
  10592. float GetAttributeAnimationTime(const String&) const;
  10593. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10594. Variant GetAttributeDefault(const String&) const;
  10595. UIElement GetChild(const String&, bool = false) const;
  10596. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  10597. Array<UIElement> GetChildren(bool = false) const;
  10598. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  10599. UIElement GetElementEventSender() const;
  10600. bool GetInterceptNetworkUpdate(const String&) const;
  10601. uint GetNumChildren(bool) const;
  10602. bool HasSubscribedToEvent(Object, const String&);
  10603. bool HasSubscribedToEvent(const String&);
  10604. bool HasTag(const String&) const;
  10605. void InsertChild(uint, UIElement);
  10606. bool IsInside(IntVector2, bool);
  10607. bool IsInsideCombined(IntVector2, bool);
  10608. bool Load(File, bool = false);
  10609. bool Load(VectorBuffer&, bool = false);
  10610. UIElement LoadChildXML(XMLFile, XMLFile = null);
  10611. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  10612. bool LoadJSON(const JSONValue&, bool = false);
  10613. bool LoadXML(File);
  10614. bool LoadXML(VectorBuffer&);
  10615. bool LoadXML(XMLFile, XMLFile);
  10616. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  10617. bool LoadXML(const XMLElement&, bool = false);
  10618. void MarkNetworkUpdate() const;
  10619. void Remove();
  10620. void RemoveAllChildren();
  10621. void RemoveAllTags();
  10622. void RemoveAttributeAnimation(const String&);
  10623. void RemoveChild(UIElement, uint = 0);
  10624. void RemoveChild(uint);
  10625. void RemoveInstanceDefault();
  10626. void RemoveObjectAnimation();
  10627. bool RemoveTag(const String&);
  10628. void ResetDeepEnabled();
  10629. void ResetToDefault();
  10630. bool Save(File) const;
  10631. bool Save(VectorBuffer&) const;
  10632. bool SaveJSON(JSONValue&) const;
  10633. bool SaveXML(File, const String& = "\t");
  10634. bool SaveXML(VectorBuffer&, const String& = "\t");
  10635. bool SaveXML(XMLElement&) const;
  10636. IntVector2 ScreenToElement(const IntVector2&);
  10637. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10638. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  10639. void SetAnimationTime(float);
  10640. bool SetAttribute(const String&, const Variant&);
  10641. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10642. void SetAttributeAnimationSpeed(const String&, float);
  10643. void SetAttributeAnimationTime(const String&, float);
  10644. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10645. void SetDeepEnabled(bool);
  10646. void SetEnabledRecursive(bool);
  10647. void SetFixedHeight(int);
  10648. void SetFixedSize(int, int);
  10649. void SetFixedWidth(int);
  10650. void SetFullImageRect();
  10651. void SetHoverOffset(int, int);
  10652. void SetInterceptNetworkUpdate(const String&, bool);
  10653. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  10654. void SetMaxAnchor(float, float);
  10655. void SetMaxSize(int, int);
  10656. void SetMinAnchor(float, float);
  10657. void SetMinSize(int, int);
  10658. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  10659. void SetPivot(float, float);
  10660. void SetPosition(int, int);
  10661. void SetSize(int, int);
  10662. bool SetStyle(const String&, XMLFile = null);
  10663. bool SetStyle(const XMLElement&);
  10664. bool SetStyleAuto(XMLFile = null);
  10665. void UpdateLayout();
  10666. const Variant& GetVar(const StringHash&);
  10667. // Properties:
  10668. bool animationEnabled;
  10669. /* readonly */
  10670. Array<Variant> attributeDefaults;
  10671. /* readonly */
  10672. Array<AttributeInfo> attributeInfos;
  10673. Array<Variant> attributes;
  10674. BlendMode blendMode;
  10675. IntRect border;
  10676. bool bringToBack;
  10677. bool bringToFront;
  10678. /* readonly */
  10679. String category;
  10680. /* readonly */
  10681. IntVector2 childOffset;
  10682. /* readonly */
  10683. Array<UIElement> children;
  10684. IntRect clipBorder;
  10685. bool clipChildren;
  10686. /* writeonly */
  10687. Color color;
  10688. /* readonly */
  10689. bool colorGradient;
  10690. Array<Color> colors;
  10691. /* readonly */
  10692. IntRect combinedScreenRect;
  10693. XMLFile defaultStyle;
  10694. /* readonly */
  10695. float derivedOpacity;
  10696. /* readonly */
  10697. uint dragButtonCombo;
  10698. /* readonly */
  10699. int dragButtonCount;
  10700. uint dragDropMode;
  10701. bool editable;
  10702. bool elementEventSender;
  10703. bool enableAnchor;
  10704. bool enabled;
  10705. /* readonly */
  10706. bool enabledSelf;
  10707. /* readonly */
  10708. bool fixedHeight;
  10709. /* readonly */
  10710. bool fixedSize;
  10711. /* readonly */
  10712. bool fixedWidth;
  10713. bool focus;
  10714. FocusMode focusMode;
  10715. int height;
  10716. HorizontalAlignment horizontalAlignment;
  10717. IntVector2 hoverOffset;
  10718. /* readonly */
  10719. bool hovering;
  10720. IntRect imageBorder;
  10721. IntRect imageRect;
  10722. int indent;
  10723. int indentSpacing;
  10724. /* readonly */
  10725. int indentWidth;
  10726. bool internal;
  10727. /* readonly */
  10728. BorderImage knob;
  10729. IntRect layoutBorder;
  10730. Vector2 layoutFlexScale;
  10731. LayoutMode layoutMode;
  10732. int layoutSpacing;
  10733. Vector2 maxAnchor;
  10734. int maxHeight;
  10735. IntVector2 maxOffset;
  10736. IntVector2 maxSize;
  10737. int maxWidth;
  10738. Vector2 minAnchor;
  10739. int minHeight;
  10740. IntVector2 minOffset;
  10741. IntVector2 minSize;
  10742. int minWidth;
  10743. String name;
  10744. /* readonly */
  10745. uint numAllChildren;
  10746. /* readonly */
  10747. uint numAttributes;
  10748. /* readonly */
  10749. uint numChildren;
  10750. ObjectAnimation objectAnimation;
  10751. float opacity;
  10752. Orientation orientation;
  10753. UIElement parent;
  10754. Vector2 pivot;
  10755. IntVector2 position;
  10756. int priority;
  10757. float range;
  10758. /* readonly */
  10759. int refs;
  10760. float repeatRate;
  10761. /* readonly */
  10762. UIElement root;
  10763. /* readonly */
  10764. IntVector2 screenPosition;
  10765. bool selected;
  10766. IntVector2 size;
  10767. bool sortChildren;
  10768. String style;
  10769. /* readonly */
  10770. Array<String> tags;
  10771. bool temporary;
  10772. Texture texture;
  10773. bool tiled;
  10774. TraversalMode traversalMode;
  10775. /* readonly */
  10776. StringHash type;
  10777. /* readonly */
  10778. String typeName;
  10779. bool useDerivedOpacity;
  10780. float value;
  10781. /* readonly */
  10782. VariantMap vars;
  10783. VerticalAlignment verticalAlignment;
  10784. bool visible;
  10785. /* readonly */
  10786. bool visibleEffective;
  10787. /* readonly */
  10788. int weakRefs;
  10789. int width;
  10790. };
  10791. class SmoothedTransform
  10792. {
  10793. public:
  10794. // Methods:
  10795. void ApplyAttributes();
  10796. void DrawDebugGeometry(DebugRenderer, bool);
  10797. Variant GetAttribute(const String&) const;
  10798. ValueAnimation GetAttributeAnimation(const String&) const;
  10799. float GetAttributeAnimationSpeed(const String&) const;
  10800. float GetAttributeAnimationTime(const String&) const;
  10801. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10802. Variant GetAttributeDefault(const String&) const;
  10803. bool GetInterceptNetworkUpdate(const String&) const;
  10804. bool HasSubscribedToEvent(Object, const String&);
  10805. bool HasSubscribedToEvent(const String&);
  10806. bool Load(File, bool = false);
  10807. bool Load(VectorBuffer&, bool = false);
  10808. bool LoadJSON(const JSONValue&, bool = false);
  10809. bool LoadXML(const XMLElement&, bool = false);
  10810. void MarkNetworkUpdate() const;
  10811. void Remove();
  10812. void RemoveAttributeAnimation(const String&);
  10813. void RemoveInstanceDefault();
  10814. void RemoveObjectAnimation();
  10815. void ResetToDefault();
  10816. bool Save(File) const;
  10817. bool Save(VectorBuffer&) const;
  10818. bool SaveJSON(JSONValue&) const;
  10819. bool SaveXML(XMLElement&) const;
  10820. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10821. void SetAnimationTime(float);
  10822. bool SetAttribute(const String&, const Variant&);
  10823. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10824. void SetAttributeAnimationSpeed(const String&, float);
  10825. void SetAttributeAnimationTime(const String&, float);
  10826. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10827. void SetInterceptNetworkUpdate(const String&, bool);
  10828. void Update(float, float);
  10829. // Properties:
  10830. bool animationEnabled;
  10831. /* readonly */
  10832. Array<Variant> attributeDefaults;
  10833. /* readonly */
  10834. Array<AttributeInfo> attributeInfos;
  10835. Array<Variant> attributes;
  10836. /* readonly */
  10837. String category;
  10838. bool enabled;
  10839. /* readonly */
  10840. bool enabledEffective;
  10841. /* readonly */
  10842. uint id;
  10843. /* readonly */
  10844. bool inProgress;
  10845. /* readonly */
  10846. Node node;
  10847. /* readonly */
  10848. uint numAttributes;
  10849. ObjectAnimation objectAnimation;
  10850. /* readonly */
  10851. int refs;
  10852. Vector3 targetPosition;
  10853. Quaternion targetRotation;
  10854. Vector3 targetWorldPosition;
  10855. Quaternion targetWorldRotation;
  10856. bool temporary;
  10857. /* readonly */
  10858. StringHash type;
  10859. /* readonly */
  10860. String typeName;
  10861. /* readonly */
  10862. int weakRefs;
  10863. };
  10864. class Sound
  10865. {
  10866. public:
  10867. Sound();
  10868. Sound(const String&in);
  10869. // Methods:
  10870. bool HasSubscribedToEvent(Object, const String&);
  10871. bool HasSubscribedToEvent(const String&);
  10872. bool Load(File);
  10873. bool Load(VectorBuffer&);
  10874. bool Load(const String&);
  10875. bool Save(File) const;
  10876. bool Save(VectorBuffer&) const;
  10877. bool Save(const String&) const;
  10878. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10879. // Properties:
  10880. /* readonly */
  10881. String category;
  10882. /* readonly */
  10883. bool compressed;
  10884. /* readonly */
  10885. float frequency;
  10886. /* readonly */
  10887. float length;
  10888. bool looped;
  10889. /* readonly */
  10890. uint memoryUse;
  10891. String name;
  10892. /* readonly */
  10893. int refs;
  10894. /* readonly */
  10895. uint sampleSize;
  10896. /* readonly */
  10897. bool sixteenBit;
  10898. /* readonly */
  10899. bool stereo;
  10900. /* readonly */
  10901. StringHash type;
  10902. /* readonly */
  10903. String typeName;
  10904. /* readonly */
  10905. uint useTimer;
  10906. /* readonly */
  10907. int weakRefs;
  10908. };
  10909. class SoundListener
  10910. {
  10911. public:
  10912. // Methods:
  10913. void ApplyAttributes();
  10914. void DrawDebugGeometry(DebugRenderer, bool);
  10915. Variant GetAttribute(const String&) const;
  10916. ValueAnimation GetAttributeAnimation(const String&) const;
  10917. float GetAttributeAnimationSpeed(const String&) const;
  10918. float GetAttributeAnimationTime(const String&) const;
  10919. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10920. Variant GetAttributeDefault(const String&) const;
  10921. bool GetInterceptNetworkUpdate(const String&) const;
  10922. bool HasSubscribedToEvent(Object, const String&);
  10923. bool HasSubscribedToEvent(const String&);
  10924. bool Load(File, bool = false);
  10925. bool Load(VectorBuffer&, bool = false);
  10926. bool LoadJSON(const JSONValue&, bool = false);
  10927. bool LoadXML(const XMLElement&, bool = false);
  10928. void MarkNetworkUpdate() const;
  10929. void Remove();
  10930. void RemoveAttributeAnimation(const String&);
  10931. void RemoveInstanceDefault();
  10932. void RemoveObjectAnimation();
  10933. void ResetToDefault();
  10934. bool Save(File) const;
  10935. bool Save(VectorBuffer&) const;
  10936. bool SaveJSON(JSONValue&) const;
  10937. bool SaveXML(XMLElement&) const;
  10938. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  10939. void SetAnimationTime(float);
  10940. bool SetAttribute(const String&, const Variant&);
  10941. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  10942. void SetAttributeAnimationSpeed(const String&, float);
  10943. void SetAttributeAnimationTime(const String&, float);
  10944. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  10945. void SetInterceptNetworkUpdate(const String&, bool);
  10946. // Properties:
  10947. bool animationEnabled;
  10948. /* readonly */
  10949. Array<Variant> attributeDefaults;
  10950. /* readonly */
  10951. Array<AttributeInfo> attributeInfos;
  10952. Array<Variant> attributes;
  10953. /* readonly */
  10954. String category;
  10955. bool enabled;
  10956. /* readonly */
  10957. bool enabledEffective;
  10958. /* readonly */
  10959. uint id;
  10960. /* readonly */
  10961. Node node;
  10962. /* readonly */
  10963. uint numAttributes;
  10964. ObjectAnimation objectAnimation;
  10965. /* readonly */
  10966. int refs;
  10967. bool temporary;
  10968. /* readonly */
  10969. StringHash type;
  10970. /* readonly */
  10971. String typeName;
  10972. /* readonly */
  10973. int weakRefs;
  10974. };
  10975. class SoundSource
  10976. {
  10977. public:
  10978. SoundSource();
  10979. // Methods:
  10980. void ApplyAttributes();
  10981. void DrawDebugGeometry(DebugRenderer, bool);
  10982. Variant GetAttribute(const String&) const;
  10983. ValueAnimation GetAttributeAnimation(const String&) const;
  10984. float GetAttributeAnimationSpeed(const String&) const;
  10985. float GetAttributeAnimationTime(const String&) const;
  10986. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  10987. Variant GetAttributeDefault(const String&) const;
  10988. bool GetInterceptNetworkUpdate(const String&) const;
  10989. bool HasSubscribedToEvent(Object, const String&);
  10990. bool HasSubscribedToEvent(const String&);
  10991. bool Load(File, bool = false);
  10992. bool Load(VectorBuffer&, bool = false);
  10993. bool LoadJSON(const JSONValue&, bool = false);
  10994. bool LoadXML(const XMLElement&, bool = false);
  10995. void MarkNetworkUpdate() const;
  10996. void Play(Sound);
  10997. void Play(Sound, float);
  10998. void Play(Sound, float, float);
  10999. void Play(Sound, float, float, float);
  11000. void Remove();
  11001. void RemoveAttributeAnimation(const String&);
  11002. void RemoveInstanceDefault();
  11003. void RemoveObjectAnimation();
  11004. void ResetToDefault();
  11005. bool Save(File) const;
  11006. bool Save(VectorBuffer&) const;
  11007. bool SaveJSON(JSONValue&) const;
  11008. bool SaveXML(XMLElement&) const;
  11009. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11010. void SetAnimationTime(float);
  11011. bool SetAttribute(const String&, const Variant&);
  11012. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11013. void SetAttributeAnimationSpeed(const String&, float);
  11014. void SetAttributeAnimationTime(const String&, float);
  11015. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11016. void SetInterceptNetworkUpdate(const String&, bool);
  11017. void Stop();
  11018. // Properties:
  11019. bool animationEnabled;
  11020. /* readonly */
  11021. float attenuation;
  11022. /* readonly */
  11023. Array<Variant> attributeDefaults;
  11024. /* readonly */
  11025. Array<AttributeInfo> attributeInfos;
  11026. Array<Variant> attributes;
  11027. AutoRemoveMode autoRemoveMode;
  11028. /* readonly */
  11029. String category;
  11030. bool enabled;
  11031. /* readonly */
  11032. bool enabledEffective;
  11033. float frequency;
  11034. float gain;
  11035. /* readonly */
  11036. uint id;
  11037. /* readonly */
  11038. Node node;
  11039. /* readonly */
  11040. uint numAttributes;
  11041. ObjectAnimation objectAnimation;
  11042. float panning;
  11043. /* readonly */
  11044. bool playing;
  11045. /* readonly */
  11046. int refs;
  11047. /* readonly */
  11048. Sound sound;
  11049. String soundType;
  11050. bool temporary;
  11051. /* readonly */
  11052. float timePosition;
  11053. /* readonly */
  11054. StringHash type;
  11055. /* readonly */
  11056. String typeName;
  11057. /* readonly */
  11058. int weakRefs;
  11059. };
  11060. class SoundSource3D
  11061. {
  11062. public:
  11063. // Methods:
  11064. void ApplyAttributes();
  11065. void DrawDebugGeometry(DebugRenderer, bool);
  11066. Variant GetAttribute(const String&) const;
  11067. ValueAnimation GetAttributeAnimation(const String&) const;
  11068. float GetAttributeAnimationSpeed(const String&) const;
  11069. float GetAttributeAnimationTime(const String&) const;
  11070. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11071. Variant GetAttributeDefault(const String&) const;
  11072. bool GetInterceptNetworkUpdate(const String&) const;
  11073. bool HasSubscribedToEvent(Object, const String&);
  11074. bool HasSubscribedToEvent(const String&);
  11075. bool Load(File, bool = false);
  11076. bool Load(VectorBuffer&, bool = false);
  11077. bool LoadJSON(const JSONValue&, bool = false);
  11078. bool LoadXML(const XMLElement&, bool = false);
  11079. void MarkNetworkUpdate() const;
  11080. void Play(Sound);
  11081. void Play(Sound, float);
  11082. void Play(Sound, float, float);
  11083. void Play(Sound, float, float, float);
  11084. void Remove();
  11085. void RemoveAttributeAnimation(const String&);
  11086. void RemoveInstanceDefault();
  11087. void RemoveObjectAnimation();
  11088. void ResetToDefault();
  11089. bool Save(File) const;
  11090. bool Save(VectorBuffer&) const;
  11091. bool SaveJSON(JSONValue&) const;
  11092. bool SaveXML(XMLElement&) const;
  11093. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11094. void SetAngleAttenuation(float, float);
  11095. void SetAnimationTime(float);
  11096. bool SetAttribute(const String&, const Variant&);
  11097. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11098. void SetAttributeAnimationSpeed(const String&, float);
  11099. void SetAttributeAnimationTime(const String&, float);
  11100. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11101. void SetDistanceAttenuation(float, float, float);
  11102. void SetInterceptNetworkUpdate(const String&, bool);
  11103. void Stop();
  11104. // Properties:
  11105. bool animationEnabled;
  11106. /* readonly */
  11107. float attenuation;
  11108. /* readonly */
  11109. Array<Variant> attributeDefaults;
  11110. /* readonly */
  11111. Array<AttributeInfo> attributeInfos;
  11112. Array<Variant> attributes;
  11113. AutoRemoveMode autoRemoveMode;
  11114. /* readonly */
  11115. String category;
  11116. bool enabled;
  11117. /* readonly */
  11118. bool enabledEffective;
  11119. float farDistance;
  11120. float frequency;
  11121. float gain;
  11122. /* readonly */
  11123. uint id;
  11124. float innerAngle;
  11125. float nearDistance;
  11126. /* readonly */
  11127. Node node;
  11128. /* readonly */
  11129. uint numAttributes;
  11130. ObjectAnimation objectAnimation;
  11131. float outerAngle;
  11132. float panning;
  11133. /* readonly */
  11134. bool playing;
  11135. /* readonly */
  11136. int refs;
  11137. float rolloffFactor;
  11138. /* readonly */
  11139. Sound sound;
  11140. String soundType;
  11141. bool temporary;
  11142. /* readonly */
  11143. float timePosition;
  11144. /* readonly */
  11145. StringHash type;
  11146. /* readonly */
  11147. String typeName;
  11148. /* readonly */
  11149. int weakRefs;
  11150. };
  11151. class Sphere
  11152. {
  11153. public:
  11154. Sphere();
  11155. Sphere(const Sphere&in);
  11156. Sphere(const Vector3&in, float);
  11157. Sphere(const BoundingBox&in);
  11158. Sphere(const Frustum&in);
  11159. Sphere(const Polyhedron&in);
  11160. // Methods:
  11161. void Clear();
  11162. void Define(const BoundingBox&);
  11163. void Define(const Frustum&);
  11164. void Define(const Polyhedron&);
  11165. void Define(const Sphere&);
  11166. void Define(const Vector3&, float);
  11167. bool Defined() const;
  11168. float Distance(const Vector3&) const;
  11169. Intersection IsInside(const BoundingBox&) const;
  11170. Intersection IsInside(const Sphere&) const;
  11171. Intersection IsInside(const Vector3&) const;
  11172. Intersection IsInsideFast(const BoundingBox&) const;
  11173. Intersection IsInsideFast(const Sphere&) const;
  11174. void Merge(const BoundingBox&);
  11175. void Merge(const Frustum&);
  11176. void Merge(const Sphere&);
  11177. void Merge(const Vector3&);
  11178. // Properties:
  11179. Vector3 center;
  11180. float radius;
  11181. };
  11182. class Spline
  11183. {
  11184. public:
  11185. Spline();
  11186. Spline(InterpolationMode);
  11187. Spline(Variant[]@, InterpolationMode = BEZIER_CURVE);
  11188. Spline(const Spline&in);
  11189. // Methods:
  11190. void AddKnot(const Variant&);
  11191. void AddKnot(const Variant&, uint);
  11192. void Clear();
  11193. Variant GetPoint(float);
  11194. void RemoveKnot();
  11195. void RemoveKnot(uint);
  11196. // Properties:
  11197. InterpolationMode interpolationMode;
  11198. Array<Variant> knot;
  11199. Array<Variant> knots;
  11200. };
  11201. class SplinePath
  11202. {
  11203. public:
  11204. // Methods:
  11205. void AddControlPoint(Node, uint = M_MAX_UNSIGNED);
  11206. void ApplyAttributes();
  11207. void ClearControlPoints();
  11208. void DrawDebugGeometry(DebugRenderer, bool);
  11209. Variant GetAttribute(const String&) const;
  11210. ValueAnimation GetAttributeAnimation(const String&) const;
  11211. float GetAttributeAnimationSpeed(const String&) const;
  11212. float GetAttributeAnimationTime(const String&) const;
  11213. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11214. Variant GetAttributeDefault(const String&) const;
  11215. bool GetInterceptNetworkUpdate(const String&) const;
  11216. Vector3 GetPoint(float) const;
  11217. Vector3 GetPosition() const;
  11218. bool HasSubscribedToEvent(Object, const String&);
  11219. bool HasSubscribedToEvent(const String&);
  11220. bool Load(File, bool = false);
  11221. bool Load(VectorBuffer&, bool = false);
  11222. bool LoadJSON(const JSONValue&, bool = false);
  11223. bool LoadXML(const XMLElement&, bool = false);
  11224. void MarkNetworkUpdate() const;
  11225. void Move(float);
  11226. void Remove();
  11227. void RemoveAttributeAnimation(const String&);
  11228. void RemoveControlPoint(Node);
  11229. void RemoveInstanceDefault();
  11230. void RemoveObjectAnimation();
  11231. void Reset();
  11232. void ResetToDefault();
  11233. bool Save(File) const;
  11234. bool Save(VectorBuffer&) const;
  11235. bool SaveJSON(JSONValue&) const;
  11236. bool SaveXML(XMLElement&) const;
  11237. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11238. void SetAnimationTime(float);
  11239. bool SetAttribute(const String&, const Variant&);
  11240. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11241. void SetAttributeAnimationSpeed(const String&, float);
  11242. void SetAttributeAnimationTime(const String&, float);
  11243. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11244. void SetInterceptNetworkUpdate(const String&, bool);
  11245. void SetPosition(float);
  11246. // Properties:
  11247. bool animationEnabled;
  11248. /* readonly */
  11249. Array<Variant> attributeDefaults;
  11250. /* readonly */
  11251. Array<AttributeInfo> attributeInfos;
  11252. Array<Variant> attributes;
  11253. /* readonly */
  11254. String category;
  11255. Node controlledNode;
  11256. bool enabled;
  11257. /* readonly */
  11258. bool enabledEffective;
  11259. /* readonly */
  11260. uint id;
  11261. InterpolationMode interpolationMode;
  11262. /* readonly */
  11263. bool isFinished;
  11264. /* readonly */
  11265. float length;
  11266. /* readonly */
  11267. Node node;
  11268. /* readonly */
  11269. uint numAttributes;
  11270. ObjectAnimation objectAnimation;
  11271. /* readonly */
  11272. int refs;
  11273. float speed;
  11274. bool temporary;
  11275. /* readonly */
  11276. StringHash type;
  11277. /* readonly */
  11278. String typeName;
  11279. /* readonly */
  11280. int weakRefs;
  11281. };
  11282. class Sprite
  11283. {
  11284. public:
  11285. Sprite();
  11286. Sprite(const String&in);
  11287. // Methods:
  11288. void AddChild(UIElement);
  11289. void AddTag(const String&);
  11290. void AddTags(const String&, int8 = ';');
  11291. void ApplyAttributes();
  11292. void BringToFront();
  11293. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  11294. void DisableLayoutUpdate();
  11295. IntVector2 ElementToScreen(const IntVector2&);
  11296. void EnableLayoutUpdate();
  11297. uint FindChild(UIElement) const;
  11298. Variant GetAttribute(const String&) const;
  11299. ValueAnimation GetAttributeAnimation(const String&) const;
  11300. float GetAttributeAnimationSpeed(const String&) const;
  11301. float GetAttributeAnimationTime(const String&) const;
  11302. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11303. Variant GetAttributeDefault(const String&) const;
  11304. UIElement GetChild(const String&, bool = false) const;
  11305. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  11306. Array<UIElement> GetChildren(bool = false) const;
  11307. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  11308. UIElement GetElementEventSender() const;
  11309. bool GetInterceptNetworkUpdate(const String&) const;
  11310. uint GetNumChildren(bool) const;
  11311. bool HasSubscribedToEvent(Object, const String&);
  11312. bool HasSubscribedToEvent(const String&);
  11313. bool HasTag(const String&) const;
  11314. void InsertChild(uint, UIElement);
  11315. bool IsInside(IntVector2, bool);
  11316. bool IsInsideCombined(IntVector2, bool);
  11317. bool Load(File, bool = false);
  11318. bool Load(VectorBuffer&, bool = false);
  11319. UIElement LoadChildXML(XMLFile, XMLFile = null);
  11320. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  11321. bool LoadJSON(const JSONValue&, bool = false);
  11322. bool LoadXML(File);
  11323. bool LoadXML(VectorBuffer&);
  11324. bool LoadXML(XMLFile, XMLFile);
  11325. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  11326. bool LoadXML(const XMLElement&, bool = false);
  11327. void MarkNetworkUpdate() const;
  11328. void Remove();
  11329. void RemoveAllChildren();
  11330. void RemoveAllTags();
  11331. void RemoveAttributeAnimation(const String&);
  11332. void RemoveChild(UIElement, uint = 0);
  11333. void RemoveChild(uint);
  11334. void RemoveInstanceDefault();
  11335. void RemoveObjectAnimation();
  11336. bool RemoveTag(const String&);
  11337. void ResetDeepEnabled();
  11338. void ResetToDefault();
  11339. bool Save(File) const;
  11340. bool Save(VectorBuffer&) const;
  11341. bool SaveJSON(JSONValue&) const;
  11342. bool SaveXML(File, const String& = "\t");
  11343. bool SaveXML(VectorBuffer&, const String& = "\t");
  11344. bool SaveXML(XMLElement&) const;
  11345. IntVector2 ScreenToElement(const IntVector2&);
  11346. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11347. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  11348. void SetAnimationTime(float);
  11349. bool SetAttribute(const String&, const Variant&);
  11350. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11351. void SetAttributeAnimationSpeed(const String&, float);
  11352. void SetAttributeAnimationTime(const String&, float);
  11353. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11354. void SetDeepEnabled(bool);
  11355. void SetEnabledRecursive(bool);
  11356. void SetFixedHeight(int);
  11357. void SetFixedSize(int, int);
  11358. void SetFixedWidth(int);
  11359. void SetFullImageRect();
  11360. void SetHotSpot(int, int);
  11361. void SetInterceptNetworkUpdate(const String&, bool);
  11362. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  11363. void SetMaxAnchor(float, float);
  11364. void SetMaxSize(int, int);
  11365. void SetMinAnchor(float, float);
  11366. void SetMinSize(int, int);
  11367. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  11368. void SetPivot(float, float);
  11369. void SetPosition(float, float);
  11370. void SetScale(float);
  11371. void SetScale(float, float);
  11372. void SetSize(int, int);
  11373. bool SetStyle(const String&, XMLFile = null);
  11374. bool SetStyle(const XMLElement&);
  11375. bool SetStyleAuto(XMLFile = null);
  11376. void UpdateLayout();
  11377. const Variant& GetVar(const StringHash&);
  11378. // Properties:
  11379. bool animationEnabled;
  11380. /* readonly */
  11381. Array<Variant> attributeDefaults;
  11382. /* readonly */
  11383. Array<AttributeInfo> attributeInfos;
  11384. Array<Variant> attributes;
  11385. BlendMode blendMode;
  11386. bool bringToBack;
  11387. bool bringToFront;
  11388. /* readonly */
  11389. String category;
  11390. /* readonly */
  11391. IntVector2 childOffset;
  11392. /* readonly */
  11393. Array<UIElement> children;
  11394. IntRect clipBorder;
  11395. bool clipChildren;
  11396. /* writeonly */
  11397. Color color;
  11398. /* readonly */
  11399. bool colorGradient;
  11400. Array<Color> colors;
  11401. /* readonly */
  11402. IntRect combinedScreenRect;
  11403. XMLFile defaultStyle;
  11404. /* readonly */
  11405. float derivedOpacity;
  11406. /* readonly */
  11407. uint dragButtonCombo;
  11408. /* readonly */
  11409. int dragButtonCount;
  11410. uint dragDropMode;
  11411. bool editable;
  11412. bool elementEventSender;
  11413. bool enableAnchor;
  11414. bool enabled;
  11415. /* readonly */
  11416. bool enabledSelf;
  11417. /* readonly */
  11418. bool fixedHeight;
  11419. /* readonly */
  11420. bool fixedSize;
  11421. /* readonly */
  11422. bool fixedWidth;
  11423. bool focus;
  11424. FocusMode focusMode;
  11425. int height;
  11426. HorizontalAlignment horizontalAlignment;
  11427. IntVector2 hotSpot;
  11428. /* readonly */
  11429. bool hovering;
  11430. IntRect imageRect;
  11431. int indent;
  11432. int indentSpacing;
  11433. /* readonly */
  11434. int indentWidth;
  11435. bool internal;
  11436. IntRect layoutBorder;
  11437. Vector2 layoutFlexScale;
  11438. LayoutMode layoutMode;
  11439. int layoutSpacing;
  11440. Vector2 maxAnchor;
  11441. int maxHeight;
  11442. IntVector2 maxOffset;
  11443. IntVector2 maxSize;
  11444. int maxWidth;
  11445. Vector2 minAnchor;
  11446. int minHeight;
  11447. IntVector2 minOffset;
  11448. IntVector2 minSize;
  11449. int minWidth;
  11450. String name;
  11451. /* readonly */
  11452. uint numAllChildren;
  11453. /* readonly */
  11454. uint numAttributes;
  11455. /* readonly */
  11456. uint numChildren;
  11457. ObjectAnimation objectAnimation;
  11458. float opacity;
  11459. UIElement parent;
  11460. Vector2 pivot;
  11461. Vector2 position;
  11462. int priority;
  11463. /* readonly */
  11464. int refs;
  11465. /* readonly */
  11466. UIElement root;
  11467. float rotation;
  11468. Vector2 scale;
  11469. /* readonly */
  11470. IntVector2 screenPosition;
  11471. bool selected;
  11472. IntVector2 size;
  11473. bool sortChildren;
  11474. String style;
  11475. /* readonly */
  11476. Array<String> tags;
  11477. bool temporary;
  11478. Texture texture;
  11479. TraversalMode traversalMode;
  11480. /* readonly */
  11481. StringHash type;
  11482. /* readonly */
  11483. String typeName;
  11484. bool useDerivedOpacity;
  11485. /* readonly */
  11486. VariantMap vars;
  11487. VerticalAlignment verticalAlignment;
  11488. bool visible;
  11489. /* readonly */
  11490. bool visibleEffective;
  11491. /* readonly */
  11492. int weakRefs;
  11493. int width;
  11494. };
  11495. class Sprite2D
  11496. {
  11497. public:
  11498. Sprite2D();
  11499. Sprite2D(const String&in);
  11500. // Methods:
  11501. bool HasSubscribedToEvent(Object, const String&);
  11502. bool HasSubscribedToEvent(const String&);
  11503. bool Load(File);
  11504. bool Load(VectorBuffer&);
  11505. bool Load(const String&);
  11506. bool Save(File) const;
  11507. bool Save(VectorBuffer&) const;
  11508. bool Save(const String&) const;
  11509. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11510. // Properties:
  11511. /* readonly */
  11512. String category;
  11513. Vector2 hotSpot;
  11514. /* readonly */
  11515. uint memoryUse;
  11516. String name;
  11517. IntVector2 offset;
  11518. IntRect rectangle;
  11519. /* readonly */
  11520. int refs;
  11521. Texture2D texture;
  11522. float textureEdgeOffset;
  11523. /* readonly */
  11524. StringHash type;
  11525. /* readonly */
  11526. String typeName;
  11527. /* readonly */
  11528. uint useTimer;
  11529. /* readonly */
  11530. int weakRefs;
  11531. };
  11532. class SpriteSheet2D
  11533. {
  11534. public:
  11535. SpriteSheet2D();
  11536. SpriteSheet2D(const String&in);
  11537. // Methods:
  11538. void DefineSprite(const String&, const IntRect&, const Vector2& = Vector2 ( 0.5f , 0.5f ), const IntVector2& = IntVector2 :: ZERO);
  11539. Sprite2D GetSprite(const String&);
  11540. bool HasSubscribedToEvent(Object, const String&);
  11541. bool HasSubscribedToEvent(const String&);
  11542. bool Load(File);
  11543. bool Load(VectorBuffer&);
  11544. bool Load(const String&);
  11545. bool Save(File) const;
  11546. bool Save(VectorBuffer&) const;
  11547. bool Save(const String&) const;
  11548. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11549. // Properties:
  11550. /* readonly */
  11551. String category;
  11552. /* readonly */
  11553. uint memoryUse;
  11554. String name;
  11555. /* readonly */
  11556. int refs;
  11557. Texture2D texture;
  11558. /* readonly */
  11559. StringHash type;
  11560. /* readonly */
  11561. String typeName;
  11562. /* readonly */
  11563. uint useTimer;
  11564. /* readonly */
  11565. int weakRefs;
  11566. };
  11567. class StaticModel
  11568. {
  11569. public:
  11570. // Methods:
  11571. void ApplyAttributes();
  11572. void ApplyMaterialList(const String& = String ( ));
  11573. void DrawDebugGeometry(DebugRenderer, bool);
  11574. Variant GetAttribute(const String&) const;
  11575. ValueAnimation GetAttributeAnimation(const String&) const;
  11576. float GetAttributeAnimationSpeed(const String&) const;
  11577. float GetAttributeAnimationTime(const String&) const;
  11578. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11579. Variant GetAttributeDefault(const String&) const;
  11580. bool GetInterceptNetworkUpdate(const String&) const;
  11581. bool HasSubscribedToEvent(Object, const String&);
  11582. bool HasSubscribedToEvent(const String&);
  11583. bool IsInView(Camera) const;
  11584. bool IsInside(const Vector3&) const;
  11585. bool IsInsideLocal(const Vector3&) const;
  11586. bool Load(File, bool = false);
  11587. bool Load(VectorBuffer&, bool = false);
  11588. bool LoadJSON(const JSONValue&, bool = false);
  11589. bool LoadXML(const XMLElement&, bool = false);
  11590. void MarkNetworkUpdate() const;
  11591. void Remove();
  11592. void RemoveAttributeAnimation(const String&);
  11593. void RemoveInstanceDefault();
  11594. void RemoveObjectAnimation();
  11595. void ResetToDefault();
  11596. bool Save(File) const;
  11597. bool Save(VectorBuffer&) const;
  11598. bool SaveJSON(JSONValue&) const;
  11599. bool SaveXML(XMLElement&) const;
  11600. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11601. void SetAnimationTime(float);
  11602. bool SetAttribute(const String&, const Variant&);
  11603. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11604. void SetAttributeAnimationSpeed(const String&, float);
  11605. void SetAttributeAnimationTime(const String&, float);
  11606. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11607. void SetInterceptNetworkUpdate(const String&, bool);
  11608. // Properties:
  11609. bool animationEnabled;
  11610. /* readonly */
  11611. Array<Variant> attributeDefaults;
  11612. /* readonly */
  11613. Array<AttributeInfo> attributeInfos;
  11614. Array<Variant> attributes;
  11615. /* readonly */
  11616. BoundingBox boundingBox;
  11617. bool castShadows;
  11618. /* readonly */
  11619. String category;
  11620. float drawDistance;
  11621. bool enabled;
  11622. /* readonly */
  11623. bool enabledEffective;
  11624. /* readonly */
  11625. uint id;
  11626. /* readonly */
  11627. bool inView;
  11628. uint lightMask;
  11629. float lodBias;
  11630. /* writeonly */
  11631. Material material;
  11632. Array<Material> materials;
  11633. uint maxLights;
  11634. Model model;
  11635. /* readonly */
  11636. Node node;
  11637. /* readonly */
  11638. uint numAttributes;
  11639. /* readonly */
  11640. uint numGeometries;
  11641. ObjectAnimation objectAnimation;
  11642. bool occludee;
  11643. bool occluder;
  11644. uint occlusionLodLevel;
  11645. /* readonly */
  11646. int refs;
  11647. float shadowDistance;
  11648. uint shadowMask;
  11649. bool temporary;
  11650. /* readonly */
  11651. StringHash type;
  11652. /* readonly */
  11653. String typeName;
  11654. uint viewMask;
  11655. /* readonly */
  11656. int weakRefs;
  11657. /* readonly */
  11658. BoundingBox worldBoundingBox;
  11659. uint zoneMask;
  11660. };
  11661. class StaticModelGroup
  11662. {
  11663. public:
  11664. // Methods:
  11665. void AddInstanceNode(Node);
  11666. void ApplyAttributes();
  11667. void ApplyMaterialList(const String& = String ( ));
  11668. void DrawDebugGeometry(DebugRenderer, bool);
  11669. Variant GetAttribute(const String&) const;
  11670. ValueAnimation GetAttributeAnimation(const String&) const;
  11671. float GetAttributeAnimationSpeed(const String&) const;
  11672. float GetAttributeAnimationTime(const String&) const;
  11673. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11674. Variant GetAttributeDefault(const String&) const;
  11675. bool GetInterceptNetworkUpdate(const String&) const;
  11676. bool HasSubscribedToEvent(Object, const String&);
  11677. bool HasSubscribedToEvent(const String&);
  11678. bool IsInView(Camera) const;
  11679. bool Load(File, bool = false);
  11680. bool Load(VectorBuffer&, bool = false);
  11681. bool LoadJSON(const JSONValue&, bool = false);
  11682. bool LoadXML(const XMLElement&, bool = false);
  11683. void MarkNetworkUpdate() const;
  11684. void Remove();
  11685. void RemoveAllInstanceNodes();
  11686. void RemoveAttributeAnimation(const String&);
  11687. void RemoveInstanceDefault();
  11688. void RemoveInstanceNode(Node);
  11689. void RemoveObjectAnimation();
  11690. void ResetToDefault();
  11691. bool Save(File) const;
  11692. bool Save(VectorBuffer&) const;
  11693. bool SaveJSON(JSONValue&) const;
  11694. bool SaveXML(XMLElement&) const;
  11695. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11696. void SetAnimationTime(float);
  11697. bool SetAttribute(const String&, const Variant&);
  11698. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11699. void SetAttributeAnimationSpeed(const String&, float);
  11700. void SetAttributeAnimationTime(const String&, float);
  11701. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11702. void SetInterceptNetworkUpdate(const String&, bool);
  11703. // Properties:
  11704. bool animationEnabled;
  11705. /* readonly */
  11706. Array<Variant> attributeDefaults;
  11707. /* readonly */
  11708. Array<AttributeInfo> attributeInfos;
  11709. Array<Variant> attributes;
  11710. /* readonly */
  11711. BoundingBox boundingBox;
  11712. bool castShadows;
  11713. /* readonly */
  11714. String category;
  11715. float drawDistance;
  11716. bool enabled;
  11717. /* readonly */
  11718. bool enabledEffective;
  11719. /* readonly */
  11720. uint id;
  11721. /* readonly */
  11722. bool inView;
  11723. /* readonly */
  11724. Array<Node> instanceNodes;
  11725. uint lightMask;
  11726. float lodBias;
  11727. /* writeonly */
  11728. Material material;
  11729. Array<Material> materials;
  11730. uint maxLights;
  11731. Model model;
  11732. /* readonly */
  11733. Node node;
  11734. /* readonly */
  11735. uint numAttributes;
  11736. /* readonly */
  11737. uint numGeometries;
  11738. /* readonly */
  11739. uint numInstanceNodes;
  11740. ObjectAnimation objectAnimation;
  11741. bool occludee;
  11742. bool occluder;
  11743. uint occlusionLodLevel;
  11744. /* readonly */
  11745. int refs;
  11746. float shadowDistance;
  11747. uint shadowMask;
  11748. bool temporary;
  11749. /* readonly */
  11750. StringHash type;
  11751. /* readonly */
  11752. String typeName;
  11753. uint viewMask;
  11754. /* readonly */
  11755. int weakRefs;
  11756. /* readonly */
  11757. BoundingBox worldBoundingBox;
  11758. /* readonly */
  11759. Zone zone;
  11760. uint zoneMask;
  11761. };
  11762. class StaticSprite2D
  11763. {
  11764. public:
  11765. // Methods:
  11766. void ApplyAttributes();
  11767. void DrawDebugGeometry(DebugRenderer, bool);
  11768. Variant GetAttribute(const String&) const;
  11769. ValueAnimation GetAttributeAnimation(const String&) const;
  11770. float GetAttributeAnimationSpeed(const String&) const;
  11771. float GetAttributeAnimationTime(const String&) const;
  11772. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  11773. Variant GetAttributeDefault(const String&) const;
  11774. bool GetInterceptNetworkUpdate(const String&) const;
  11775. bool HasSubscribedToEvent(Object, const String&);
  11776. bool HasSubscribedToEvent(const String&);
  11777. bool IsInView(Camera) const;
  11778. bool Load(File, bool = false);
  11779. bool Load(VectorBuffer&, bool = false);
  11780. bool LoadJSON(const JSONValue&, bool = false);
  11781. bool LoadXML(const XMLElement&, bool = false);
  11782. void MarkNetworkUpdate() const;
  11783. void Remove();
  11784. void RemoveAttributeAnimation(const String&);
  11785. void RemoveInstanceDefault();
  11786. void RemoveObjectAnimation();
  11787. void ResetToDefault();
  11788. bool Save(File) const;
  11789. bool Save(VectorBuffer&) const;
  11790. bool SaveJSON(JSONValue&) const;
  11791. bool SaveXML(XMLElement&) const;
  11792. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11793. void SetAnimationTime(float);
  11794. bool SetAttribute(const String&, const Variant&);
  11795. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  11796. void SetAttributeAnimationSpeed(const String&, float);
  11797. void SetAttributeAnimationTime(const String&, float);
  11798. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  11799. void SetFlip(bool, bool);
  11800. void SetInterceptNetworkUpdate(const String&, bool);
  11801. // Properties:
  11802. float alpha;
  11803. bool animationEnabled;
  11804. /* readonly */
  11805. Array<Variant> attributeDefaults;
  11806. /* readonly */
  11807. Array<AttributeInfo> attributeInfos;
  11808. Array<Variant> attributes;
  11809. BlendMode blendMode;
  11810. /* readonly */
  11811. BoundingBox boundingBox;
  11812. bool castShadows;
  11813. /* readonly */
  11814. String category;
  11815. Color color;
  11816. Material customMaterial;
  11817. float drawDistance;
  11818. Rect drawRect;
  11819. bool enabled;
  11820. /* readonly */
  11821. bool enabledEffective;
  11822. bool flipX;
  11823. bool flipY;
  11824. Vector2 hotSpot;
  11825. /* readonly */
  11826. uint id;
  11827. /* readonly */
  11828. bool inView;
  11829. int layer;
  11830. uint lightMask;
  11831. float lodBias;
  11832. uint maxLights;
  11833. /* readonly */
  11834. Node node;
  11835. /* readonly */
  11836. uint numAttributes;
  11837. ObjectAnimation objectAnimation;
  11838. bool occludee;
  11839. bool occluder;
  11840. int orderInLayer;
  11841. /* readonly */
  11842. int refs;
  11843. float shadowDistance;
  11844. uint shadowMask;
  11845. Sprite2D sprite;
  11846. bool temporary;
  11847. Rect textureRect;
  11848. /* readonly */
  11849. StringHash type;
  11850. /* readonly */
  11851. String typeName;
  11852. bool useDrawRect;
  11853. bool useHotSpot;
  11854. bool useTextureRect;
  11855. uint viewMask;
  11856. /* readonly */
  11857. int weakRefs;
  11858. /* readonly */
  11859. BoundingBox worldBoundingBox;
  11860. uint zoneMask;
  11861. };
  11862. class String
  11863. {
  11864. public:
  11865. ~String();
  11866. String();
  11867. String(const String&in);
  11868. String(int);
  11869. String(uint);
  11870. String(float);
  11871. String(double);
  11872. String(bool);
  11873. String(const char*);
  11874. // Methods:
  11875. void AppendUTF8(uint);
  11876. uint AtUTF8(uint) const;
  11877. uint ByteOffsetUTF8(uint) const;
  11878. void Clear();
  11879. int Compare(const String&, bool = true) const;
  11880. bool Contains(const String&, bool = true) const;
  11881. bool Contains(uint8, bool = true) const;
  11882. bool EndsWith(const String&, bool = true) const;
  11883. uint Find(const String&, uint = 0, bool = true) const;
  11884. uint Find(uint8, uint = 0, bool = true) const;
  11885. uint FindLast(const String&, uint = 0xffffffff, bool = true) const;
  11886. uint FindLast(uint8, uint = 0xffffffff, bool = true) const;
  11887. void Join(Array<String>&, const String&);
  11888. uint NextUTF8Char(uint&) const;
  11889. void Replace(const String&, const String&, bool = true);
  11890. void Replace(uint8, uint8, bool = true);
  11891. void ReplaceUTF8(uint, uint);
  11892. String Replaced(const String&, const String&, bool = true) const;
  11893. String Replaced(uint8, uint8, bool = true) const;
  11894. void Resize(uint);
  11895. void SetUTF8FromLatin1(const String&);
  11896. Array<String> Split(uint8, bool = false) const;
  11897. bool StartsWith(const String&, bool = true) const;
  11898. String Substring(uint) const;
  11899. String Substring(uint, uint) const;
  11900. String SubstringUTF8(uint) const;
  11901. String SubstringUTF8(uint, uint) const;
  11902. bool ToBool() const;
  11903. Color ToColor() const;
  11904. double ToDouble() const;
  11905. float ToFloat() const;
  11906. int ToInt(int = 10) const;
  11907. int64 ToInt64(int = 10) const;
  11908. IntRect ToIntRect() const;
  11909. IntVector2 ToIntVector2() const;
  11910. IntVector3 ToIntVector3() const;
  11911. String ToLower() const;
  11912. Matrix3 ToMatrix3() const;
  11913. Matrix3x4 ToMatrix3x4() const;
  11914. Matrix4 ToMatrix4() const;
  11915. Quaternion ToQuaternion() const;
  11916. uint ToUInt(int = 10) const;
  11917. uint64 ToUInt64(int = 10) const;
  11918. String ToUpper() const;
  11919. Vector2 ToVector2() const;
  11920. Vector3 ToVector3() const;
  11921. Vector4 ToVector4(bool = false) const;
  11922. Variant ToVectorVariant() const;
  11923. String Trimmed() const;
  11924. // Properties:
  11925. /* readonly */
  11926. bool empty;
  11927. /* readonly */
  11928. uint length;
  11929. /* readonly */
  11930. uint utf8Length;
  11931. };
  11932. class StringHash
  11933. {
  11934. public:
  11935. StringHash();
  11936. StringHash(const StringHash&in);
  11937. StringHash(const String&in);
  11938. StringHash(uint);
  11939. // Methods:
  11940. String ToString() const;
  11941. // Properties:
  11942. /* readonly */
  11943. uint value;
  11944. };
  11945. class Technique
  11946. {
  11947. public:
  11948. Technique();
  11949. Technique(const String&in);
  11950. // Methods:
  11951. Technique Clone(const String& = String ( )) const;
  11952. Pass CreatePass(const String&);
  11953. Pass GetPass(const String&);
  11954. Pass GetSupportedPass(const String&);
  11955. bool HasPass(const String&) const;
  11956. bool HasSubscribedToEvent(Object, const String&);
  11957. bool HasSubscribedToEvent(const String&);
  11958. bool Load(File);
  11959. bool Load(VectorBuffer&);
  11960. bool Load(const String&);
  11961. void RemovePass(const String&);
  11962. bool Save(File) const;
  11963. bool Save(VectorBuffer&) const;
  11964. bool Save(const String&) const;
  11965. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  11966. // Properties:
  11967. /* readonly */
  11968. String category;
  11969. bool desktop;
  11970. /* readonly */
  11971. uint memoryUse;
  11972. String name;
  11973. /* readonly */
  11974. uint numPasses;
  11975. /* readonly */
  11976. Array<String> passNames;
  11977. /* readonly */
  11978. Array<Pass> passes;
  11979. /* readonly */
  11980. int refs;
  11981. /* readonly */
  11982. bool supported;
  11983. /* readonly */
  11984. StringHash type;
  11985. /* readonly */
  11986. String typeName;
  11987. /* readonly */
  11988. uint useTimer;
  11989. /* readonly */
  11990. int weakRefs;
  11991. };
  11992. class TechniqueEntry
  11993. {
  11994. public:
  11995. ~TechniqueEntry();
  11996. TechniqueEntry();
  11997. TechniqueEntry(const TechniqueEntry&in);
  11998. // Properties:
  11999. float lodDistance;
  12000. int qualityLevel;
  12001. Technique technique;
  12002. };
  12003. class Terrain
  12004. {
  12005. public:
  12006. // Methods:
  12007. void ApplyAttributes();
  12008. void ApplyHeightMap();
  12009. void DrawDebugGeometry(DebugRenderer, bool);
  12010. Variant GetAttribute(const String&) const;
  12011. ValueAnimation GetAttributeAnimation(const String&) const;
  12012. float GetAttributeAnimationSpeed(const String&) const;
  12013. float GetAttributeAnimationTime(const String&) const;
  12014. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  12015. Variant GetAttributeDefault(const String&) const;
  12016. float GetHeight(const Vector3&) const;
  12017. bool GetInterceptNetworkUpdate(const String&) const;
  12018. TerrainPatch GetNeighborPatch(int, int) const;
  12019. Vector3 GetNormal(const Vector3&) const;
  12020. TerrainPatch GetPatch(int, int) const;
  12021. bool HasSubscribedToEvent(Object, const String&);
  12022. bool HasSubscribedToEvent(const String&);
  12023. bool Load(File, bool = false);
  12024. bool Load(VectorBuffer&, bool = false);
  12025. bool LoadJSON(const JSONValue&, bool = false);
  12026. bool LoadXML(const XMLElement&, bool = false);
  12027. void MarkNetworkUpdate() const;
  12028. void Remove();
  12029. void RemoveAttributeAnimation(const String&);
  12030. void RemoveInstanceDefault();
  12031. void RemoveObjectAnimation();
  12032. void ResetToDefault();
  12033. bool Save(File) const;
  12034. bool Save(VectorBuffer&) const;
  12035. bool SaveJSON(JSONValue&) const;
  12036. bool SaveXML(XMLElement&) const;
  12037. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12038. void SetAnimationTime(float);
  12039. bool SetAttribute(const String&, const Variant&);
  12040. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  12041. void SetAttributeAnimationSpeed(const String&, float);
  12042. void SetAttributeAnimationTime(const String&, float);
  12043. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  12044. void SetInterceptNetworkUpdate(const String&, bool);
  12045. void SetNeighbors(Terrain, Terrain, Terrain, Terrain);
  12046. IntVector2 WorldToHeightMap(const Vector3&) const;
  12047. // Properties:
  12048. bool animationEnabled;
  12049. /* readonly */
  12050. Array<Variant> attributeDefaults;
  12051. /* readonly */
  12052. Array<AttributeInfo> attributeInfos;
  12053. Array<Variant> attributes;
  12054. bool castShadows;
  12055. /* readonly */
  12056. String category;
  12057. float drawDistance;
  12058. Terrain eastNeighbor;
  12059. bool enabled;
  12060. /* readonly */
  12061. bool enabledEffective;
  12062. Image heightMap;
  12063. /* readonly */
  12064. uint id;
  12065. uint lightMask;
  12066. float lodBias;
  12067. Material material;
  12068. uint maxLights;
  12069. uint maxLodLevels;
  12070. /* readonly */
  12071. Node node;
  12072. Terrain northNeighbor;
  12073. /* readonly */
  12074. uint numAttributes;
  12075. /* readonly */
  12076. IntVector2 numPatches;
  12077. /* readonly */
  12078. IntVector2 numVertices;
  12079. ObjectAnimation objectAnimation;
  12080. bool occludee;
  12081. bool occluder;
  12082. uint occlusionLodLevel;
  12083. int patchSize;
  12084. /* readonly */
  12085. Array<TerrainPatch> patches;
  12086. /* readonly */
  12087. int refs;
  12088. float shadowDistance;
  12089. uint shadowMask;
  12090. bool smoothing;
  12091. Terrain southNeighbor;
  12092. Vector3 spacing;
  12093. bool temporary;
  12094. /* readonly */
  12095. StringHash type;
  12096. /* readonly */
  12097. String typeName;
  12098. uint viewMask;
  12099. /* readonly */
  12100. int weakRefs;
  12101. Terrain westNeighbor;
  12102. uint zoneMask;
  12103. };
  12104. class TerrainPatch
  12105. {
  12106. public:
  12107. // Methods:
  12108. void ApplyAttributes();
  12109. void DrawDebugGeometry(DebugRenderer, bool);
  12110. Variant GetAttribute(const String&) const;
  12111. ValueAnimation GetAttributeAnimation(const String&) const;
  12112. float GetAttributeAnimationSpeed(const String&) const;
  12113. float GetAttributeAnimationTime(const String&) const;
  12114. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  12115. Variant GetAttributeDefault(const String&) const;
  12116. bool GetInterceptNetworkUpdate(const String&) const;
  12117. bool HasSubscribedToEvent(Object, const String&);
  12118. bool HasSubscribedToEvent(const String&);
  12119. bool IsInView(Camera) const;
  12120. bool Load(File, bool = false);
  12121. bool Load(VectorBuffer&, bool = false);
  12122. bool LoadJSON(const JSONValue&, bool = false);
  12123. bool LoadXML(const XMLElement&, bool = false);
  12124. void MarkNetworkUpdate() const;
  12125. void Remove();
  12126. void RemoveAttributeAnimation(const String&);
  12127. void RemoveInstanceDefault();
  12128. void RemoveObjectAnimation();
  12129. void ResetToDefault();
  12130. bool Save(File) const;
  12131. bool Save(VectorBuffer&) const;
  12132. bool SaveJSON(JSONValue&) const;
  12133. bool SaveXML(XMLElement&) const;
  12134. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12135. void SetAnimationTime(float);
  12136. bool SetAttribute(const String&, const Variant&);
  12137. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  12138. void SetAttributeAnimationSpeed(const String&, float);
  12139. void SetAttributeAnimationTime(const String&, float);
  12140. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  12141. void SetInterceptNetworkUpdate(const String&, bool);
  12142. // Properties:
  12143. bool animationEnabled;
  12144. /* readonly */
  12145. Array<Variant> attributeDefaults;
  12146. /* readonly */
  12147. Array<AttributeInfo> attributeInfos;
  12148. Array<Variant> attributes;
  12149. /* readonly */
  12150. BoundingBox boundingBox;
  12151. bool castShadows;
  12152. /* readonly */
  12153. String category;
  12154. float drawDistance;
  12155. bool enabled;
  12156. /* readonly */
  12157. bool enabledEffective;
  12158. /* readonly */
  12159. uint id;
  12160. /* readonly */
  12161. bool inView;
  12162. uint lightMask;
  12163. float lodBias;
  12164. uint maxLights;
  12165. /* readonly */
  12166. Node node;
  12167. /* readonly */
  12168. uint numAttributes;
  12169. ObjectAnimation objectAnimation;
  12170. bool occludee;
  12171. bool occluder;
  12172. /* readonly */
  12173. int refs;
  12174. float shadowDistance;
  12175. uint shadowMask;
  12176. bool temporary;
  12177. /* readonly */
  12178. StringHash type;
  12179. /* readonly */
  12180. String typeName;
  12181. uint viewMask;
  12182. /* readonly */
  12183. int weakRefs;
  12184. /* readonly */
  12185. BoundingBox worldBoundingBox;
  12186. uint zoneMask;
  12187. };
  12188. class Text
  12189. {
  12190. public:
  12191. Text();
  12192. Text(const String&in);
  12193. // Methods:
  12194. void AddChild(UIElement);
  12195. void AddTag(const String&);
  12196. void AddTags(const String&, int8 = ';');
  12197. void ApplyAttributes();
  12198. void BringToFront();
  12199. void ClearSelection();
  12200. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  12201. void DisableLayoutUpdate();
  12202. IntVector2 ElementToScreen(const IntVector2&);
  12203. void EnableLayoutUpdate();
  12204. uint FindChild(UIElement) const;
  12205. Variant GetAttribute(const String&) const;
  12206. ValueAnimation GetAttributeAnimation(const String&) const;
  12207. float GetAttributeAnimationSpeed(const String&) const;
  12208. float GetAttributeAnimationTime(const String&) const;
  12209. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  12210. Variant GetAttributeDefault(const String&) const;
  12211. UIElement GetChild(const String&, bool = false) const;
  12212. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  12213. Array<UIElement> GetChildren(bool = false) const;
  12214. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  12215. UIElement GetElementEventSender() const;
  12216. bool GetInterceptNetworkUpdate(const String&) const;
  12217. uint GetNumChildren(bool) const;
  12218. bool HasSubscribedToEvent(Object, const String&);
  12219. bool HasSubscribedToEvent(const String&);
  12220. bool HasTag(const String&) const;
  12221. void InsertChild(uint, UIElement);
  12222. bool IsInside(IntVector2, bool);
  12223. bool IsInsideCombined(IntVector2, bool);
  12224. bool Load(File, bool = false);
  12225. bool Load(VectorBuffer&, bool = false);
  12226. UIElement LoadChildXML(XMLFile, XMLFile = null);
  12227. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  12228. bool LoadJSON(const JSONValue&, bool = false);
  12229. bool LoadXML(File);
  12230. bool LoadXML(VectorBuffer&);
  12231. bool LoadXML(XMLFile, XMLFile);
  12232. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  12233. bool LoadXML(const XMLElement&, bool = false);
  12234. void MarkNetworkUpdate() const;
  12235. void Remove();
  12236. void RemoveAllChildren();
  12237. void RemoveAllTags();
  12238. void RemoveAttributeAnimation(const String&);
  12239. void RemoveChild(UIElement, uint = 0);
  12240. void RemoveChild(uint);
  12241. void RemoveInstanceDefault();
  12242. void RemoveObjectAnimation();
  12243. bool RemoveTag(const String&);
  12244. void ResetDeepEnabled();
  12245. void ResetToDefault();
  12246. bool Save(File) const;
  12247. bool Save(VectorBuffer&) const;
  12248. bool SaveJSON(JSONValue&) const;
  12249. bool SaveXML(File, const String& = "\t");
  12250. bool SaveXML(VectorBuffer&, const String& = "\t");
  12251. bool SaveXML(XMLElement&) const;
  12252. IntVector2 ScreenToElement(const IntVector2&);
  12253. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12254. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  12255. void SetAnimationTime(float);
  12256. bool SetAttribute(const String&, const Variant&);
  12257. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  12258. void SetAttributeAnimationSpeed(const String&, float);
  12259. void SetAttributeAnimationTime(const String&, float);
  12260. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  12261. void SetDeepEnabled(bool);
  12262. void SetEnabledRecursive(bool);
  12263. void SetFixedHeight(int);
  12264. void SetFixedSize(int, int);
  12265. void SetFixedWidth(int);
  12266. bool SetFont(Font, int);
  12267. bool SetFont(const String&, int);
  12268. void SetInterceptNetworkUpdate(const String&, bool);
  12269. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  12270. void SetMaxAnchor(float, float);
  12271. void SetMaxSize(int, int);
  12272. void SetMinAnchor(float, float);
  12273. void SetMinSize(int, int);
  12274. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  12275. void SetPivot(float, float);
  12276. void SetPosition(int, int);
  12277. void SetSelection(uint, uint = M_MAX_UNSIGNED);
  12278. void SetSize(int, int);
  12279. bool SetStyle(const String&, XMLFile = null);
  12280. bool SetStyle(const XMLElement&);
  12281. bool SetStyleAuto(XMLFile = null);
  12282. void UpdateLayout();
  12283. const Variant& GetVar(const StringHash&);
  12284. // Properties:
  12285. bool animationEnabled;
  12286. /* readonly */
  12287. Array<Variant> attributeDefaults;
  12288. /* readonly */
  12289. Array<AttributeInfo> attributeInfos;
  12290. Array<Variant> attributes;
  12291. bool autoLocalizable;
  12292. bool bringToBack;
  12293. bool bringToFront;
  12294. /* readonly */
  12295. String category;
  12296. /* readonly */
  12297. Array<IntVector2> charPositions;
  12298. /* readonly */
  12299. Array<IntVector2> charSizes;
  12300. /* readonly */
  12301. IntVector2 childOffset;
  12302. /* readonly */
  12303. Array<UIElement> children;
  12304. IntRect clipBorder;
  12305. bool clipChildren;
  12306. /* writeonly */
  12307. Color color;
  12308. /* readonly */
  12309. bool colorGradient;
  12310. Array<Color> colors;
  12311. /* readonly */
  12312. IntRect combinedScreenRect;
  12313. XMLFile defaultStyle;
  12314. /* readonly */
  12315. float derivedOpacity;
  12316. /* readonly */
  12317. uint dragButtonCombo;
  12318. /* readonly */
  12319. int dragButtonCount;
  12320. uint dragDropMode;
  12321. bool editable;
  12322. Color effectColor;
  12323. bool effectRoundStroke;
  12324. IntVector2 effectShadowOffset;
  12325. int effectStrokeThickness;
  12326. bool elementEventSender;
  12327. bool enableAnchor;
  12328. bool enabled;
  12329. /* readonly */
  12330. bool enabledSelf;
  12331. /* readonly */
  12332. bool fixedHeight;
  12333. /* readonly */
  12334. bool fixedSize;
  12335. /* readonly */
  12336. bool fixedWidth;
  12337. bool focus;
  12338. FocusMode focusMode;
  12339. /* readonly */
  12340. Font font;
  12341. int fontSize;
  12342. int height;
  12343. HorizontalAlignment horizontalAlignment;
  12344. Color hoverColor;
  12345. /* readonly */
  12346. bool hovering;
  12347. int indent;
  12348. int indentSpacing;
  12349. /* readonly */
  12350. int indentWidth;
  12351. bool internal;
  12352. IntRect layoutBorder;
  12353. Vector2 layoutFlexScale;
  12354. LayoutMode layoutMode;
  12355. int layoutSpacing;
  12356. Vector2 maxAnchor;
  12357. int maxHeight;
  12358. IntVector2 maxOffset;
  12359. IntVector2 maxSize;
  12360. int maxWidth;
  12361. Vector2 minAnchor;
  12362. int minHeight;
  12363. IntVector2 minOffset;
  12364. IntVector2 minSize;
  12365. int minWidth;
  12366. String name;
  12367. /* readonly */
  12368. uint numAllChildren;
  12369. /* readonly */
  12370. uint numAttributes;
  12371. /* readonly */
  12372. uint numChars;
  12373. /* readonly */
  12374. uint numChildren;
  12375. /* readonly */
  12376. uint numRows;
  12377. ObjectAnimation objectAnimation;
  12378. float opacity;
  12379. UIElement parent;
  12380. Vector2 pivot;
  12381. IntVector2 position;
  12382. int priority;
  12383. /* readonly */
  12384. int refs;
  12385. /* readonly */
  12386. UIElement root;
  12387. /* readonly */
  12388. int rowHeight;
  12389. float rowSpacing;
  12390. /* readonly */
  12391. Array<int> rowWidths;
  12392. /* readonly */
  12393. IntVector2 screenPosition;
  12394. bool selected;
  12395. Color selectionColor;
  12396. /* readonly */
  12397. uint selectionLength;
  12398. /* readonly */
  12399. uint selectionStart;
  12400. IntVector2 size;
  12401. bool sortChildren;
  12402. String style;
  12403. /* readonly */
  12404. Array<String> tags;
  12405. bool temporary;
  12406. String text;
  12407. HorizontalAlignment textAlignment;
  12408. TextEffect textEffect;
  12409. TraversalMode traversalMode;
  12410. /* readonly */
  12411. StringHash type;
  12412. /* readonly */
  12413. String typeName;
  12414. bool useDerivedOpacity;
  12415. /* readonly */
  12416. VariantMap vars;
  12417. VerticalAlignment verticalAlignment;
  12418. bool visible;
  12419. /* readonly */
  12420. bool visibleEffective;
  12421. /* readonly */
  12422. int weakRefs;
  12423. int width;
  12424. bool wordwrap;
  12425. };
  12426. class Text3D
  12427. {
  12428. public:
  12429. // Methods:
  12430. void ApplyAttributes();
  12431. void DrawDebugGeometry(DebugRenderer, bool);
  12432. Variant GetAttribute(const String&) const;
  12433. ValueAnimation GetAttributeAnimation(const String&) const;
  12434. float GetAttributeAnimationSpeed(const String&) const;
  12435. float GetAttributeAnimationTime(const String&) const;
  12436. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  12437. Variant GetAttributeDefault(const String&) const;
  12438. bool GetInterceptNetworkUpdate(const String&) const;
  12439. bool HasSubscribedToEvent(Object, const String&);
  12440. bool HasSubscribedToEvent(const String&);
  12441. bool IsInView(Camera) const;
  12442. bool Load(File, bool = false);
  12443. bool Load(VectorBuffer&, bool = false);
  12444. bool LoadJSON(const JSONValue&, bool = false);
  12445. bool LoadXML(const XMLElement&, bool = false);
  12446. void MarkNetworkUpdate() const;
  12447. void Remove();
  12448. void RemoveAttributeAnimation(const String&);
  12449. void RemoveInstanceDefault();
  12450. void RemoveObjectAnimation();
  12451. void ResetToDefault();
  12452. bool Save(File) const;
  12453. bool Save(VectorBuffer&) const;
  12454. bool SaveJSON(JSONValue&) const;
  12455. bool SaveXML(XMLElement&) const;
  12456. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12457. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  12458. void SetAnimationTime(float);
  12459. bool SetAttribute(const String&, const Variant&);
  12460. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  12461. void SetAttributeAnimationSpeed(const String&, float);
  12462. void SetAttributeAnimationTime(const String&, float);
  12463. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  12464. bool SetFont(Font, int);
  12465. bool SetFont(const String&, int);
  12466. void SetInterceptNetworkUpdate(const String&, bool);
  12467. // Properties:
  12468. bool animationEnabled;
  12469. /* readonly */
  12470. Array<Variant> attributeDefaults;
  12471. /* readonly */
  12472. Array<AttributeInfo> attributeInfos;
  12473. Array<Variant> attributes;
  12474. /* readonly */
  12475. BoundingBox boundingBox;
  12476. bool castShadows;
  12477. /* readonly */
  12478. String category;
  12479. /* readonly */
  12480. Array<IntVector2> charPositions;
  12481. /* readonly */
  12482. Array<IntVector2> charSizes;
  12483. /* writeonly */
  12484. Color color;
  12485. Array<Color> colors;
  12486. float drawDistance;
  12487. Color effectColor;
  12488. float effectDepthBias;
  12489. bool effectRoundStroke;
  12490. IntVector2 effectShadowOffset;
  12491. int effectStrokeThickness;
  12492. bool enabled;
  12493. /* readonly */
  12494. bool enabledEffective;
  12495. FaceCameraMode faceCameraMode;
  12496. bool fixedScreenSize;
  12497. /* readonly */
  12498. Font font;
  12499. int fontSize;
  12500. /* readonly */
  12501. int height;
  12502. HorizontalAlignment horizontalAlignment;
  12503. /* readonly */
  12504. uint id;
  12505. /* readonly */
  12506. bool inView;
  12507. uint lightMask;
  12508. float lodBias;
  12509. Material material;
  12510. uint maxLights;
  12511. /* readonly */
  12512. Node node;
  12513. /* readonly */
  12514. uint numAttributes;
  12515. /* readonly */
  12516. uint numChars;
  12517. /* readonly */
  12518. uint numRows;
  12519. ObjectAnimation objectAnimation;
  12520. bool occludee;
  12521. bool occluder;
  12522. float opacity;
  12523. /* readonly */
  12524. int refs;
  12525. /* readonly */
  12526. int rowHeight;
  12527. float rowSpacing;
  12528. /* readonly */
  12529. Array<int> rowWidths;
  12530. float shadowDistance;
  12531. uint shadowMask;
  12532. bool temporary;
  12533. String text;
  12534. HorizontalAlignment textAlignment;
  12535. TextEffect textEffect;
  12536. /* readonly */
  12537. StringHash type;
  12538. /* readonly */
  12539. String typeName;
  12540. VerticalAlignment verticalAlignment;
  12541. uint viewMask;
  12542. /* readonly */
  12543. int weakRefs;
  12544. int width;
  12545. bool wordwrap;
  12546. /* readonly */
  12547. BoundingBox worldBoundingBox;
  12548. uint zoneMask;
  12549. };
  12550. class Texture
  12551. {
  12552. public:
  12553. Texture();
  12554. Texture(const String&in);
  12555. // Methods:
  12556. void ClearDataLost();
  12557. bool HasSubscribedToEvent(Object, const String&);
  12558. bool HasSubscribedToEvent(const String&);
  12559. bool Load(File);
  12560. bool Load(VectorBuffer&);
  12561. bool Load(const String&);
  12562. bool Save(File) const;
  12563. bool Save(VectorBuffer&) const;
  12564. bool Save(const String&) const;
  12565. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12566. void SetNumLevels(uint);
  12567. // Properties:
  12568. Array<TextureAddressMode> addressMode;
  12569. uint anisotropy;
  12570. /* readonly */
  12571. bool autoResolve;
  12572. Texture backupTexture;
  12573. Color borderColor;
  12574. /* readonly */
  12575. String category;
  12576. /* readonly */
  12577. uint components;
  12578. /* readonly */
  12579. bool compressed;
  12580. /* readonly */
  12581. bool dataLost;
  12582. TextureFilterMode filterMode;
  12583. /* readonly */
  12584. uint format;
  12585. /* readonly */
  12586. int height;
  12587. /* readonly */
  12588. Array<int> levelHeight;
  12589. /* readonly */
  12590. Array<int> levelWidth;
  12591. /* readonly */
  12592. uint levels;
  12593. /* readonly */
  12594. bool levelsDirty;
  12595. /* readonly */
  12596. uint memoryUse;
  12597. Array<int> mipsToSkip;
  12598. /* readonly */
  12599. int multiSample;
  12600. String name;
  12601. /* readonly */
  12602. int refs;
  12603. /* readonly */
  12604. bool resolveDirty;
  12605. bool sRGB;
  12606. /* readonly */
  12607. StringHash type;
  12608. /* readonly */
  12609. String typeName;
  12610. /* readonly */
  12611. TextureUsage usage;
  12612. /* readonly */
  12613. uint useTimer;
  12614. /* readonly */
  12615. int weakRefs;
  12616. /* readonly */
  12617. int width;
  12618. };
  12619. class Texture2D
  12620. {
  12621. public:
  12622. Texture2D();
  12623. Texture2D(const String&in);
  12624. // Methods:
  12625. void ClearDataLost();
  12626. Image GetImage() const;
  12627. bool HasSubscribedToEvent(Object, const String&);
  12628. bool HasSubscribedToEvent(const String&);
  12629. bool Load(File);
  12630. bool Load(VectorBuffer&);
  12631. bool Load(const String&);
  12632. bool Save(File) const;
  12633. bool Save(VectorBuffer&) const;
  12634. bool Save(const String&) const;
  12635. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12636. bool SetData(Image, bool = false);
  12637. void SetNumLevels(uint);
  12638. bool SetSize(int, int, uint, TextureUsage = TEXTURE_STATIC, int = 1, bool = true);
  12639. // Properties:
  12640. Array<TextureAddressMode> addressMode;
  12641. uint anisotropy;
  12642. /* readonly */
  12643. bool autoResolve;
  12644. Texture backupTexture;
  12645. Color borderColor;
  12646. /* readonly */
  12647. String category;
  12648. /* readonly */
  12649. uint components;
  12650. /* readonly */
  12651. bool compressed;
  12652. /* readonly */
  12653. bool dataLost;
  12654. TextureFilterMode filterMode;
  12655. /* readonly */
  12656. uint format;
  12657. /* readonly */
  12658. int height;
  12659. /* readonly */
  12660. Array<int> levelHeight;
  12661. /* readonly */
  12662. Array<int> levelWidth;
  12663. /* readonly */
  12664. uint levels;
  12665. /* readonly */
  12666. bool levelsDirty;
  12667. /* readonly */
  12668. uint memoryUse;
  12669. Array<int> mipsToSkip;
  12670. /* readonly */
  12671. int multiSample;
  12672. String name;
  12673. /* readonly */
  12674. int refs;
  12675. /* readonly */
  12676. RenderSurface renderSurface;
  12677. /* readonly */
  12678. bool resolveDirty;
  12679. bool sRGB;
  12680. /* readonly */
  12681. StringHash type;
  12682. /* readonly */
  12683. String typeName;
  12684. /* readonly */
  12685. TextureUsage usage;
  12686. /* readonly */
  12687. uint useTimer;
  12688. /* readonly */
  12689. int weakRefs;
  12690. /* readonly */
  12691. int width;
  12692. };
  12693. class Texture2DArray
  12694. {
  12695. public:
  12696. Texture2DArray();
  12697. Texture2DArray(const String&in);
  12698. // Methods:
  12699. void ClearDataLost();
  12700. bool HasSubscribedToEvent(Object, const String&);
  12701. bool HasSubscribedToEvent(const String&);
  12702. bool Load(File);
  12703. bool Load(VectorBuffer&);
  12704. bool Load(const String&);
  12705. bool Save(File) const;
  12706. bool Save(VectorBuffer&) const;
  12707. bool Save(const String&) const;
  12708. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12709. bool SetData(uint, Image, bool = false);
  12710. void SetNumLevels(uint);
  12711. bool SetSize(uint, int, int, uint, TextureUsage = TEXTURE_STATIC);
  12712. // Properties:
  12713. Array<TextureAddressMode> addressMode;
  12714. uint anisotropy;
  12715. /* readonly */
  12716. bool autoResolve;
  12717. Texture backupTexture;
  12718. Color borderColor;
  12719. /* readonly */
  12720. String category;
  12721. /* readonly */
  12722. uint components;
  12723. /* readonly */
  12724. bool compressed;
  12725. /* readonly */
  12726. bool dataLost;
  12727. TextureFilterMode filterMode;
  12728. /* readonly */
  12729. uint format;
  12730. /* readonly */
  12731. int height;
  12732. uint layers;
  12733. /* readonly */
  12734. Array<int> levelHeight;
  12735. /* readonly */
  12736. Array<int> levelWidth;
  12737. /* readonly */
  12738. uint levels;
  12739. /* readonly */
  12740. bool levelsDirty;
  12741. /* readonly */
  12742. uint memoryUse;
  12743. Array<int> mipsToSkip;
  12744. /* readonly */
  12745. int multiSample;
  12746. String name;
  12747. /* readonly */
  12748. int refs;
  12749. /* readonly */
  12750. RenderSurface renderSurface;
  12751. /* readonly */
  12752. bool resolveDirty;
  12753. bool sRGB;
  12754. /* readonly */
  12755. StringHash type;
  12756. /* readonly */
  12757. String typeName;
  12758. /* readonly */
  12759. TextureUsage usage;
  12760. /* readonly */
  12761. uint useTimer;
  12762. /* readonly */
  12763. int weakRefs;
  12764. /* readonly */
  12765. int width;
  12766. };
  12767. class Texture3D
  12768. {
  12769. public:
  12770. Texture3D();
  12771. Texture3D(const String&in);
  12772. // Methods:
  12773. void ClearDataLost();
  12774. bool HasSubscribedToEvent(Object, const String&);
  12775. bool HasSubscribedToEvent(const String&);
  12776. bool Load(File);
  12777. bool Load(VectorBuffer&);
  12778. bool Load(const String&);
  12779. bool Save(File) const;
  12780. bool Save(VectorBuffer&) const;
  12781. bool Save(const String&) const;
  12782. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12783. bool SetData(Image, bool = false);
  12784. void SetNumLevels(uint);
  12785. bool SetSize(int, int, int, uint, TextureUsage = TEXTURE_STATIC);
  12786. // Properties:
  12787. Array<TextureAddressMode> addressMode;
  12788. uint anisotropy;
  12789. /* readonly */
  12790. bool autoResolve;
  12791. Texture backupTexture;
  12792. Color borderColor;
  12793. /* readonly */
  12794. String category;
  12795. /* readonly */
  12796. uint components;
  12797. /* readonly */
  12798. bool compressed;
  12799. /* readonly */
  12800. bool dataLost;
  12801. TextureFilterMode filterMode;
  12802. /* readonly */
  12803. uint format;
  12804. /* readonly */
  12805. int height;
  12806. /* readonly */
  12807. Array<int> levelHeight;
  12808. /* readonly */
  12809. Array<int> levelWidth;
  12810. /* readonly */
  12811. uint levels;
  12812. /* readonly */
  12813. bool levelsDirty;
  12814. /* readonly */
  12815. uint memoryUse;
  12816. Array<int> mipsToSkip;
  12817. /* readonly */
  12818. int multiSample;
  12819. String name;
  12820. /* readonly */
  12821. int refs;
  12822. /* readonly */
  12823. bool resolveDirty;
  12824. bool sRGB;
  12825. /* readonly */
  12826. StringHash type;
  12827. /* readonly */
  12828. String typeName;
  12829. /* readonly */
  12830. TextureUsage usage;
  12831. /* readonly */
  12832. uint useTimer;
  12833. /* readonly */
  12834. int weakRefs;
  12835. /* readonly */
  12836. int width;
  12837. };
  12838. class TextureCube
  12839. {
  12840. public:
  12841. TextureCube();
  12842. TextureCube(const String&in);
  12843. // Methods:
  12844. void ClearDataLost();
  12845. Image GetImage(CubeMapFace) const;
  12846. bool HasSubscribedToEvent(Object, const String&);
  12847. bool HasSubscribedToEvent(const String&);
  12848. bool Load(File);
  12849. bool Load(VectorBuffer&);
  12850. bool Load(const String&);
  12851. bool Save(File) const;
  12852. bool Save(VectorBuffer&) const;
  12853. bool Save(const String&) const;
  12854. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12855. bool SetData(CubeMapFace, Image, bool = false);
  12856. void SetNumLevels(uint);
  12857. bool SetSize(int, uint, TextureUsage = TEXTURE_STATIC, int = 1);
  12858. // Properties:
  12859. Array<TextureAddressMode> addressMode;
  12860. uint anisotropy;
  12861. /* readonly */
  12862. bool autoResolve;
  12863. Texture backupTexture;
  12864. Color borderColor;
  12865. /* readonly */
  12866. String category;
  12867. /* readonly */
  12868. uint components;
  12869. /* readonly */
  12870. bool compressed;
  12871. /* readonly */
  12872. bool dataLost;
  12873. TextureFilterMode filterMode;
  12874. /* readonly */
  12875. uint format;
  12876. /* readonly */
  12877. int height;
  12878. /* readonly */
  12879. Array<int> levelHeight;
  12880. /* readonly */
  12881. Array<int> levelWidth;
  12882. /* readonly */
  12883. uint levels;
  12884. /* readonly */
  12885. bool levelsDirty;
  12886. /* readonly */
  12887. uint memoryUse;
  12888. Array<int> mipsToSkip;
  12889. /* readonly */
  12890. int multiSample;
  12891. String name;
  12892. /* readonly */
  12893. int refs;
  12894. /* readonly */
  12895. Array<RenderSurface> renderSurfaces;
  12896. /* readonly */
  12897. bool resolveDirty;
  12898. bool sRGB;
  12899. /* readonly */
  12900. StringHash type;
  12901. /* readonly */
  12902. String typeName;
  12903. /* readonly */
  12904. TextureUsage usage;
  12905. /* readonly */
  12906. uint useTimer;
  12907. /* readonly */
  12908. int weakRefs;
  12909. /* readonly */
  12910. int width;
  12911. };
  12912. class TextureFrame
  12913. {
  12914. public:
  12915. // Properties:
  12916. float time;
  12917. Rect uv;
  12918. };
  12919. class Tile2D
  12920. {
  12921. public:
  12922. // Methods:
  12923. bool HasProperty(const String&) const;
  12924. const String& GetProperty(const String&) const;
  12925. // Properties:
  12926. /* readonly */
  12927. int gid;
  12928. /* readonly */
  12929. int refs;
  12930. /* readonly */
  12931. Sprite2D sprite;
  12932. /* readonly */
  12933. int weakRefs;
  12934. };
  12935. class TileMap2D
  12936. {
  12937. public:
  12938. // Methods:
  12939. void ApplyAttributes();
  12940. void DrawDebugGeometry(DebugRenderer, bool);
  12941. Variant GetAttribute(const String&) const;
  12942. ValueAnimation GetAttributeAnimation(const String&) const;
  12943. float GetAttributeAnimationSpeed(const String&) const;
  12944. float GetAttributeAnimationTime(const String&) const;
  12945. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  12946. Variant GetAttributeDefault(const String&) const;
  12947. bool GetInterceptNetworkUpdate(const String&) const;
  12948. TileMapLayer2D GetLayer(uint) const;
  12949. bool HasSubscribedToEvent(Object, const String&);
  12950. bool HasSubscribedToEvent(const String&);
  12951. bool Load(File, bool = false);
  12952. bool Load(VectorBuffer&, bool = false);
  12953. bool LoadJSON(const JSONValue&, bool = false);
  12954. bool LoadXML(const XMLElement&, bool = false);
  12955. void MarkNetworkUpdate() const;
  12956. bool PositionToTileIndex(int&, int&, const Vector2&) const;
  12957. void Remove();
  12958. void RemoveAttributeAnimation(const String&);
  12959. void RemoveInstanceDefault();
  12960. void RemoveObjectAnimation();
  12961. void ResetToDefault();
  12962. bool Save(File) const;
  12963. bool Save(VectorBuffer&) const;
  12964. bool SaveJSON(JSONValue&) const;
  12965. bool SaveXML(XMLElement&) const;
  12966. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  12967. void SetAnimationTime(float);
  12968. bool SetAttribute(const String&, const Variant&);
  12969. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  12970. void SetAttributeAnimationSpeed(const String&, float);
  12971. void SetAttributeAnimationTime(const String&, float);
  12972. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  12973. void SetInterceptNetworkUpdate(const String&, bool);
  12974. Vector2 TileIndexToPosition(int, int) const;
  12975. // Properties:
  12976. bool animationEnabled;
  12977. /* readonly */
  12978. Array<Variant> attributeDefaults;
  12979. /* readonly */
  12980. Array<AttributeInfo> attributeInfos;
  12981. Array<Variant> attributes;
  12982. /* readonly */
  12983. String category;
  12984. bool enabled;
  12985. /* readonly */
  12986. bool enabledEffective;
  12987. /* readonly */
  12988. uint id;
  12989. /* readonly */
  12990. TileMapInfo2D info;
  12991. /* readonly */
  12992. Node node;
  12993. /* readonly */
  12994. uint numAttributes;
  12995. /* readonly */
  12996. uint numLayers;
  12997. ObjectAnimation objectAnimation;
  12998. /* readonly */
  12999. int refs;
  13000. bool temporary;
  13001. TmxFile2D tmxFile;
  13002. /* readonly */
  13003. StringHash type;
  13004. /* readonly */
  13005. String typeName;
  13006. /* readonly */
  13007. int weakRefs;
  13008. };
  13009. class TileMapInfo2D
  13010. {
  13011. public:
  13012. // Properties:
  13013. int height;
  13014. /* readonly */
  13015. float mapHeight;
  13016. /* readonly */
  13017. float mapWidth;
  13018. Orientation2D orientation;
  13019. float tileHeight;
  13020. float tileWidth;
  13021. int width;
  13022. };
  13023. class TileMapLayer2D
  13024. {
  13025. public:
  13026. // Methods:
  13027. void ApplyAttributes();
  13028. void DrawDebugGeometry(DebugRenderer, bool);
  13029. Variant GetAttribute(const String&) const;
  13030. ValueAnimation GetAttributeAnimation(const String&) const;
  13031. float GetAttributeAnimationSpeed(const String&) const;
  13032. float GetAttributeAnimationTime(const String&) const;
  13033. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  13034. Variant GetAttributeDefault(const String&) const;
  13035. bool GetInterceptNetworkUpdate(const String&) const;
  13036. TileMapObject2D GetObject(uint) const;
  13037. Node GetObjectNode(uint) const;
  13038. Tile2D GetTile(int, int) const;
  13039. Node GetTileNode(int, int) const;
  13040. bool HasProperty(const String&) const;
  13041. bool HasSubscribedToEvent(Object, const String&);
  13042. bool HasSubscribedToEvent(const String&);
  13043. bool Load(File, bool = false);
  13044. bool Load(VectorBuffer&, bool = false);
  13045. bool LoadJSON(const JSONValue&, bool = false);
  13046. bool LoadXML(const XMLElement&, bool = false);
  13047. void MarkNetworkUpdate() const;
  13048. void Remove();
  13049. void RemoveAttributeAnimation(const String&);
  13050. void RemoveInstanceDefault();
  13051. void RemoveObjectAnimation();
  13052. void ResetToDefault();
  13053. bool Save(File) const;
  13054. bool Save(VectorBuffer&) const;
  13055. bool SaveJSON(JSONValue&) const;
  13056. bool SaveXML(XMLElement&) const;
  13057. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13058. void SetAnimationTime(float);
  13059. bool SetAttribute(const String&, const Variant&);
  13060. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  13061. void SetAttributeAnimationSpeed(const String&, float);
  13062. void SetAttributeAnimationTime(const String&, float);
  13063. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  13064. void SetInterceptNetworkUpdate(const String&, bool);
  13065. const String& GetProperty(const String&) const;
  13066. // Properties:
  13067. bool animationEnabled;
  13068. /* readonly */
  13069. Array<Variant> attributeDefaults;
  13070. /* readonly */
  13071. Array<AttributeInfo> attributeInfos;
  13072. Array<Variant> attributes;
  13073. /* readonly */
  13074. String category;
  13075. int drawOrder;
  13076. bool enabled;
  13077. /* readonly */
  13078. bool enabledEffective;
  13079. /* readonly */
  13080. int height;
  13081. /* readonly */
  13082. uint id;
  13083. /* readonly */
  13084. Node imageNode;
  13085. /* readonly */
  13086. TileMapLayerType2D layerType;
  13087. /* readonly */
  13088. Node node;
  13089. /* readonly */
  13090. uint numAttributes;
  13091. /* readonly */
  13092. uint numObjects;
  13093. ObjectAnimation objectAnimation;
  13094. /* readonly */
  13095. int refs;
  13096. bool temporary;
  13097. /* readonly */
  13098. StringHash type;
  13099. /* readonly */
  13100. String typeName;
  13101. bool visible;
  13102. /* readonly */
  13103. int weakRefs;
  13104. /* readonly */
  13105. int width;
  13106. };
  13107. class TileMapObject2D
  13108. {
  13109. public:
  13110. // Methods:
  13111. bool HasProperty(const String&) const;
  13112. const String& GetProperty(const String&) const;
  13113. const Vector2& GetPoint(uint) const;
  13114. // Properties:
  13115. /* readonly */
  13116. String name;
  13117. /* readonly */
  13118. uint numPoints;
  13119. /* readonly */
  13120. TileObjectType2D objectType;
  13121. /* readonly */
  13122. Vector2 position;
  13123. /* readonly */
  13124. int refs;
  13125. /* readonly */
  13126. Vector2 size;
  13127. /* readonly */
  13128. int tileGid;
  13129. /* readonly */
  13130. Sprite2D tileSprite;
  13131. /* readonly */
  13132. String type;
  13133. /* readonly */
  13134. int weakRefs;
  13135. };
  13136. class Time
  13137. {
  13138. public:
  13139. // Methods:
  13140. bool HasSubscribedToEvent(Object, const String&);
  13141. bool HasSubscribedToEvent(const String&);
  13142. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13143. // Properties:
  13144. /* readonly */
  13145. String category;
  13146. /* readonly */
  13147. float elapsedTime;
  13148. /* readonly */
  13149. uint frameNumber;
  13150. /* readonly */
  13151. int refs;
  13152. /* readonly */
  13153. uint systemTime;
  13154. /* readonly */
  13155. uint timeSinceEpoch;
  13156. /* readonly */
  13157. String timeStamp;
  13158. /* readonly */
  13159. float timeStep;
  13160. /* readonly */
  13161. StringHash type;
  13162. /* readonly */
  13163. String typeName;
  13164. /* readonly */
  13165. int weakRefs;
  13166. };
  13167. class Timer
  13168. {
  13169. public:
  13170. Timer();
  13171. // Methods:
  13172. uint GetMSec(bool);
  13173. void Reset();
  13174. };
  13175. class TmxFile2D
  13176. {
  13177. public:
  13178. TmxFile2D();
  13179. TmxFile2D(const String&in);
  13180. // Methods:
  13181. bool HasSubscribedToEvent(Object, const String&);
  13182. bool HasSubscribedToEvent(const String&);
  13183. bool Load(File);
  13184. bool Load(VectorBuffer&);
  13185. bool Load(const String&);
  13186. bool Save(File) const;
  13187. bool Save(VectorBuffer&) const;
  13188. bool Save(const String&) const;
  13189. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13190. // Properties:
  13191. /* readonly */
  13192. String category;
  13193. /* readonly */
  13194. uint memoryUse;
  13195. String name;
  13196. /* readonly */
  13197. int refs;
  13198. /* readonly */
  13199. StringHash type;
  13200. /* readonly */
  13201. String typeName;
  13202. /* readonly */
  13203. uint useTimer;
  13204. /* readonly */
  13205. int weakRefs;
  13206. };
  13207. class ToolTip
  13208. {
  13209. public:
  13210. ToolTip();
  13211. ToolTip(const String&in);
  13212. // Methods:
  13213. void AddChild(UIElement);
  13214. void AddTag(const String&);
  13215. void AddTags(const String&, int8 = ';');
  13216. void ApplyAttributes();
  13217. void BringToFront();
  13218. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  13219. void DisableLayoutUpdate();
  13220. IntVector2 ElementToScreen(const IntVector2&);
  13221. void EnableLayoutUpdate();
  13222. uint FindChild(UIElement) const;
  13223. Variant GetAttribute(const String&) const;
  13224. ValueAnimation GetAttributeAnimation(const String&) const;
  13225. float GetAttributeAnimationSpeed(const String&) const;
  13226. float GetAttributeAnimationTime(const String&) const;
  13227. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  13228. Variant GetAttributeDefault(const String&) const;
  13229. UIElement GetChild(const String&, bool = false) const;
  13230. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  13231. Array<UIElement> GetChildren(bool = false) const;
  13232. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  13233. UIElement GetElementEventSender() const;
  13234. bool GetInterceptNetworkUpdate(const String&) const;
  13235. uint GetNumChildren(bool) const;
  13236. bool HasSubscribedToEvent(Object, const String&);
  13237. bool HasSubscribedToEvent(const String&);
  13238. bool HasTag(const String&) const;
  13239. void InsertChild(uint, UIElement);
  13240. bool IsInside(IntVector2, bool);
  13241. bool IsInsideCombined(IntVector2, bool);
  13242. bool Load(File, bool = false);
  13243. bool Load(VectorBuffer&, bool = false);
  13244. UIElement LoadChildXML(XMLFile, XMLFile = null);
  13245. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  13246. bool LoadJSON(const JSONValue&, bool = false);
  13247. bool LoadXML(File);
  13248. bool LoadXML(VectorBuffer&);
  13249. bool LoadXML(XMLFile, XMLFile);
  13250. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  13251. bool LoadXML(const XMLElement&, bool = false);
  13252. void MarkNetworkUpdate() const;
  13253. void Remove();
  13254. void RemoveAllChildren();
  13255. void RemoveAllTags();
  13256. void RemoveAttributeAnimation(const String&);
  13257. void RemoveChild(UIElement, uint = 0);
  13258. void RemoveChild(uint);
  13259. void RemoveInstanceDefault();
  13260. void RemoveObjectAnimation();
  13261. bool RemoveTag(const String&);
  13262. void ResetDeepEnabled();
  13263. void ResetToDefault();
  13264. bool Save(File) const;
  13265. bool Save(VectorBuffer&) const;
  13266. bool SaveJSON(JSONValue&) const;
  13267. bool SaveXML(File, const String& = "\t");
  13268. bool SaveXML(VectorBuffer&, const String& = "\t");
  13269. bool SaveXML(XMLElement&) const;
  13270. IntVector2 ScreenToElement(const IntVector2&);
  13271. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13272. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  13273. void SetAnimationTime(float);
  13274. bool SetAttribute(const String&, const Variant&);
  13275. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  13276. void SetAttributeAnimationSpeed(const String&, float);
  13277. void SetAttributeAnimationTime(const String&, float);
  13278. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  13279. void SetDeepEnabled(bool);
  13280. void SetEnabledRecursive(bool);
  13281. void SetFixedHeight(int);
  13282. void SetFixedSize(int, int);
  13283. void SetFixedWidth(int);
  13284. void SetInterceptNetworkUpdate(const String&, bool);
  13285. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  13286. void SetMaxAnchor(float, float);
  13287. void SetMaxSize(int, int);
  13288. void SetMinAnchor(float, float);
  13289. void SetMinSize(int, int);
  13290. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  13291. void SetPivot(float, float);
  13292. void SetPosition(int, int);
  13293. void SetSize(int, int);
  13294. bool SetStyle(const String&, XMLFile = null);
  13295. bool SetStyle(const XMLElement&);
  13296. bool SetStyleAuto(XMLFile = null);
  13297. void UpdateLayout();
  13298. const Variant& GetVar(const StringHash&);
  13299. // Properties:
  13300. bool animationEnabled;
  13301. /* readonly */
  13302. Array<Variant> attributeDefaults;
  13303. /* readonly */
  13304. Array<AttributeInfo> attributeInfos;
  13305. Array<Variant> attributes;
  13306. bool bringToBack;
  13307. bool bringToFront;
  13308. /* readonly */
  13309. String category;
  13310. /* readonly */
  13311. IntVector2 childOffset;
  13312. /* readonly */
  13313. Array<UIElement> children;
  13314. IntRect clipBorder;
  13315. bool clipChildren;
  13316. /* writeonly */
  13317. Color color;
  13318. /* readonly */
  13319. bool colorGradient;
  13320. Array<Color> colors;
  13321. /* readonly */
  13322. IntRect combinedScreenRect;
  13323. XMLFile defaultStyle;
  13324. float delay;
  13325. /* readonly */
  13326. float derivedOpacity;
  13327. /* readonly */
  13328. uint dragButtonCombo;
  13329. /* readonly */
  13330. int dragButtonCount;
  13331. uint dragDropMode;
  13332. bool editable;
  13333. bool elementEventSender;
  13334. bool enableAnchor;
  13335. bool enabled;
  13336. /* readonly */
  13337. bool enabledSelf;
  13338. /* readonly */
  13339. bool fixedHeight;
  13340. /* readonly */
  13341. bool fixedSize;
  13342. /* readonly */
  13343. bool fixedWidth;
  13344. bool focus;
  13345. FocusMode focusMode;
  13346. int height;
  13347. HorizontalAlignment horizontalAlignment;
  13348. /* readonly */
  13349. bool hovering;
  13350. int indent;
  13351. int indentSpacing;
  13352. /* readonly */
  13353. int indentWidth;
  13354. bool internal;
  13355. IntRect layoutBorder;
  13356. Vector2 layoutFlexScale;
  13357. LayoutMode layoutMode;
  13358. int layoutSpacing;
  13359. Vector2 maxAnchor;
  13360. int maxHeight;
  13361. IntVector2 maxOffset;
  13362. IntVector2 maxSize;
  13363. int maxWidth;
  13364. Vector2 minAnchor;
  13365. int minHeight;
  13366. IntVector2 minOffset;
  13367. IntVector2 minSize;
  13368. int minWidth;
  13369. String name;
  13370. /* readonly */
  13371. uint numAllChildren;
  13372. /* readonly */
  13373. uint numAttributes;
  13374. /* readonly */
  13375. uint numChildren;
  13376. ObjectAnimation objectAnimation;
  13377. float opacity;
  13378. UIElement parent;
  13379. Vector2 pivot;
  13380. IntVector2 position;
  13381. int priority;
  13382. /* readonly */
  13383. int refs;
  13384. /* readonly */
  13385. UIElement root;
  13386. /* readonly */
  13387. IntVector2 screenPosition;
  13388. bool selected;
  13389. IntVector2 size;
  13390. bool sortChildren;
  13391. String style;
  13392. /* readonly */
  13393. Array<String> tags;
  13394. bool temporary;
  13395. TraversalMode traversalMode;
  13396. /* readonly */
  13397. StringHash type;
  13398. /* readonly */
  13399. String typeName;
  13400. bool useDerivedOpacity;
  13401. /* readonly */
  13402. VariantMap vars;
  13403. VerticalAlignment verticalAlignment;
  13404. bool visible;
  13405. /* readonly */
  13406. bool visibleEffective;
  13407. /* readonly */
  13408. int weakRefs;
  13409. int width;
  13410. };
  13411. class TouchState
  13412. {
  13413. public:
  13414. // Properties:
  13415. IntVector2 delta;
  13416. IntVector2 lastPosition;
  13417. IntVector2 position;
  13418. float pressure;
  13419. int touchID;
  13420. /* readonly */
  13421. UIElement touchedElement;
  13422. };
  13423. class UI
  13424. {
  13425. public:
  13426. // Methods:
  13427. void Clear();
  13428. void DebugDraw(UIElement);
  13429. UIElement GetElementAt(const IntVector2&, bool = true);
  13430. UIElement GetElementAt(int, int, bool = true);
  13431. bool HasModalElement() const;
  13432. bool HasSubscribedToEvent(Object, const String&);
  13433. bool HasSubscribedToEvent(const String&);
  13434. bool IsDragging() const;
  13435. UIElement LoadLayout(File);
  13436. UIElement LoadLayout(File, XMLFile);
  13437. UIElement LoadLayout(VectorBuffer&);
  13438. UIElement LoadLayout(VectorBuffer&, XMLFile);
  13439. UIElement LoadLayout(XMLFile);
  13440. UIElement LoadLayout(XMLFile, XMLFile);
  13441. bool SaveLayout(File, UIElement);
  13442. bool SaveLayout(VectorBuffer&, UIElement);
  13443. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13444. void SetCustomSize(int, int);
  13445. void SetFocusElement(UIElement, bool = false);
  13446. void SetHeight(float);
  13447. void SetWidth(float);
  13448. const Array<UIElement> GetDragElements();
  13449. // Properties:
  13450. /* readonly */
  13451. String category;
  13452. String clipBoardText;
  13453. Cursor cursor;
  13454. /* readonly */
  13455. IntVector2 cursorPosition;
  13456. IntVector2 customSize;
  13457. float defaultToolTipDelay;
  13458. float doubleClickInterval;
  13459. int dragBeginDistance;
  13460. float dragBeginInterval;
  13461. UIElement focusElement;
  13462. bool forceAutoHint;
  13463. /* readonly */
  13464. UIElement frontElement;
  13465. int maxFontTextureSize;
  13466. /* readonly */
  13467. UIElement modalRoot;
  13468. bool nonFocusedMouseWheel;
  13469. /* readonly */
  13470. int refs;
  13471. /* readonly */
  13472. UIElement root;
  13473. float scale;
  13474. /* readonly */
  13475. StringHash type;
  13476. /* readonly */
  13477. String typeName;
  13478. bool useMutableGlyphs;
  13479. bool useScreenKeyboard;
  13480. bool useSystemClipboard;
  13481. /* readonly */
  13482. int weakRefs;
  13483. };
  13484. class UIElement
  13485. {
  13486. public:
  13487. UIElement();
  13488. UIElement(const String&in);
  13489. // Methods:
  13490. void AddChild(UIElement);
  13491. void AddTag(const String&);
  13492. void AddTags(const String&, int8 = ';');
  13493. void ApplyAttributes();
  13494. void BringToFront();
  13495. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  13496. void DisableLayoutUpdate();
  13497. IntVector2 ElementToScreen(const IntVector2&);
  13498. void EnableLayoutUpdate();
  13499. uint FindChild(UIElement) const;
  13500. Variant GetAttribute(const String&) const;
  13501. ValueAnimation GetAttributeAnimation(const String&) const;
  13502. float GetAttributeAnimationSpeed(const String&) const;
  13503. float GetAttributeAnimationTime(const String&) const;
  13504. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  13505. Variant GetAttributeDefault(const String&) const;
  13506. UIElement GetChild(const String&, bool = false) const;
  13507. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  13508. Array<UIElement> GetChildren(bool = false) const;
  13509. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  13510. UIElement GetElementEventSender() const;
  13511. bool GetInterceptNetworkUpdate(const String&) const;
  13512. uint GetNumChildren(bool) const;
  13513. bool HasSubscribedToEvent(Object, const String&);
  13514. bool HasSubscribedToEvent(const String&);
  13515. bool HasTag(const String&) const;
  13516. void InsertChild(uint, UIElement);
  13517. bool IsInside(IntVector2, bool);
  13518. bool IsInsideCombined(IntVector2, bool);
  13519. bool Load(File, bool = false);
  13520. bool Load(VectorBuffer&, bool = false);
  13521. UIElement LoadChildXML(XMLFile, XMLFile = null);
  13522. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  13523. bool LoadJSON(const JSONValue&, bool = false);
  13524. bool LoadXML(File);
  13525. bool LoadXML(VectorBuffer&);
  13526. bool LoadXML(XMLFile, XMLFile);
  13527. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  13528. bool LoadXML(const XMLElement&, bool = false);
  13529. void MarkNetworkUpdate() const;
  13530. void Remove();
  13531. void RemoveAllChildren();
  13532. void RemoveAllTags();
  13533. void RemoveAttributeAnimation(const String&);
  13534. void RemoveChild(UIElement, uint = 0);
  13535. void RemoveChild(uint);
  13536. void RemoveInstanceDefault();
  13537. void RemoveObjectAnimation();
  13538. bool RemoveTag(const String&);
  13539. void ResetDeepEnabled();
  13540. void ResetToDefault();
  13541. bool Save(File) const;
  13542. bool Save(VectorBuffer&) const;
  13543. bool SaveJSON(JSONValue&) const;
  13544. bool SaveXML(File, const String& = "\t");
  13545. bool SaveXML(VectorBuffer&, const String& = "\t");
  13546. bool SaveXML(XMLElement&) const;
  13547. IntVector2 ScreenToElement(const IntVector2&);
  13548. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13549. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  13550. void SetAnimationTime(float);
  13551. bool SetAttribute(const String&, const Variant&);
  13552. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  13553. void SetAttributeAnimationSpeed(const String&, float);
  13554. void SetAttributeAnimationTime(const String&, float);
  13555. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  13556. void SetDeepEnabled(bool);
  13557. void SetEnabledRecursive(bool);
  13558. void SetFixedHeight(int);
  13559. void SetFixedSize(int, int);
  13560. void SetFixedWidth(int);
  13561. void SetInterceptNetworkUpdate(const String&, bool);
  13562. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  13563. void SetMaxAnchor(float, float);
  13564. void SetMaxSize(int, int);
  13565. void SetMinAnchor(float, float);
  13566. void SetMinSize(int, int);
  13567. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  13568. void SetPivot(float, float);
  13569. void SetPosition(int, int);
  13570. void SetSize(int, int);
  13571. bool SetStyle(const String&, XMLFile = null);
  13572. bool SetStyle(const XMLElement&);
  13573. bool SetStyleAuto(XMLFile = null);
  13574. void UpdateLayout();
  13575. const Variant& GetVar(const StringHash&);
  13576. // Properties:
  13577. bool animationEnabled;
  13578. /* readonly */
  13579. Array<Variant> attributeDefaults;
  13580. /* readonly */
  13581. Array<AttributeInfo> attributeInfos;
  13582. Array<Variant> attributes;
  13583. bool bringToBack;
  13584. bool bringToFront;
  13585. /* readonly */
  13586. String category;
  13587. /* readonly */
  13588. IntVector2 childOffset;
  13589. /* readonly */
  13590. Array<UIElement> children;
  13591. IntRect clipBorder;
  13592. bool clipChildren;
  13593. /* writeonly */
  13594. Color color;
  13595. /* readonly */
  13596. bool colorGradient;
  13597. Array<Color> colors;
  13598. /* readonly */
  13599. IntRect combinedScreenRect;
  13600. XMLFile defaultStyle;
  13601. /* readonly */
  13602. float derivedOpacity;
  13603. /* readonly */
  13604. uint dragButtonCombo;
  13605. /* readonly */
  13606. int dragButtonCount;
  13607. uint dragDropMode;
  13608. bool editable;
  13609. bool elementEventSender;
  13610. bool enableAnchor;
  13611. bool enabled;
  13612. /* readonly */
  13613. bool enabledSelf;
  13614. /* readonly */
  13615. bool fixedHeight;
  13616. /* readonly */
  13617. bool fixedSize;
  13618. /* readonly */
  13619. bool fixedWidth;
  13620. bool focus;
  13621. FocusMode focusMode;
  13622. int height;
  13623. HorizontalAlignment horizontalAlignment;
  13624. /* readonly */
  13625. bool hovering;
  13626. int indent;
  13627. int indentSpacing;
  13628. /* readonly */
  13629. int indentWidth;
  13630. bool internal;
  13631. IntRect layoutBorder;
  13632. Vector2 layoutFlexScale;
  13633. LayoutMode layoutMode;
  13634. int layoutSpacing;
  13635. Vector2 maxAnchor;
  13636. int maxHeight;
  13637. IntVector2 maxOffset;
  13638. IntVector2 maxSize;
  13639. int maxWidth;
  13640. Vector2 minAnchor;
  13641. int minHeight;
  13642. IntVector2 minOffset;
  13643. IntVector2 minSize;
  13644. int minWidth;
  13645. String name;
  13646. /* readonly */
  13647. uint numAllChildren;
  13648. /* readonly */
  13649. uint numAttributes;
  13650. /* readonly */
  13651. uint numChildren;
  13652. ObjectAnimation objectAnimation;
  13653. float opacity;
  13654. UIElement parent;
  13655. Vector2 pivot;
  13656. IntVector2 position;
  13657. int priority;
  13658. /* readonly */
  13659. int refs;
  13660. /* readonly */
  13661. UIElement root;
  13662. /* readonly */
  13663. IntVector2 screenPosition;
  13664. bool selected;
  13665. IntVector2 size;
  13666. bool sortChildren;
  13667. String style;
  13668. /* readonly */
  13669. Array<String> tags;
  13670. bool temporary;
  13671. TraversalMode traversalMode;
  13672. /* readonly */
  13673. StringHash type;
  13674. /* readonly */
  13675. String typeName;
  13676. bool useDerivedOpacity;
  13677. /* readonly */
  13678. VariantMap vars;
  13679. VerticalAlignment verticalAlignment;
  13680. bool visible;
  13681. /* readonly */
  13682. bool visibleEffective;
  13683. /* readonly */
  13684. int weakRefs;
  13685. int width;
  13686. };
  13687. class ValueAnimation
  13688. {
  13689. public:
  13690. ValueAnimation();
  13691. ValueAnimation(const String&in);
  13692. // Methods:
  13693. bool HasSubscribedToEvent(Object, const String&);
  13694. bool HasSubscribedToEvent(const String&);
  13695. bool Load(File);
  13696. bool Load(VectorBuffer&);
  13697. bool Load(const String&);
  13698. bool Save(File) const;
  13699. bool Save(VectorBuffer&) const;
  13700. bool Save(const String&) const;
  13701. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  13702. void SetEventFrame(float, const String&, const VariantMap& = VariantMap ( ));
  13703. void SetKeyFrame(float, const Variant&);
  13704. // Properties:
  13705. /* readonly */
  13706. String category;
  13707. InterpMethod interpolationMethod;
  13708. /* readonly */
  13709. uint memoryUse;
  13710. String name;
  13711. /* readonly */
  13712. int refs;
  13713. float splineTension;
  13714. /* readonly */
  13715. StringHash type;
  13716. /* readonly */
  13717. String typeName;
  13718. /* readonly */
  13719. uint useTimer;
  13720. VariantType valueType;
  13721. /* readonly */
  13722. int weakRefs;
  13723. };
  13724. class Variant
  13725. {
  13726. public:
  13727. ~Variant();
  13728. Variant();
  13729. Variant(const Variant&in);
  13730. Variant(int);
  13731. Variant(uint);
  13732. Variant(int64);
  13733. Variant(uint64);
  13734. Variant(const StringHash&in);
  13735. Variant(bool);
  13736. Variant(float);
  13737. Variant(double);
  13738. Variant(const Vector2&in);
  13739. Variant(const Vector3&in);
  13740. Variant(const Vector4&in);
  13741. Variant(const Quaternion&in);
  13742. Variant(const Color&in);
  13743. Variant(const String&in);
  13744. Variant(const ResourceRef&in);
  13745. Variant(const ResourceRefList&in);
  13746. Variant(const Variant[]@);
  13747. Variant(const String[]@);
  13748. Variant(const VariantMap&in);
  13749. Variant(const Rect&in);
  13750. Variant(const IntRect&in);
  13751. Variant(const IntVector2&in);
  13752. Variant(const IntVector3&in);
  13753. Variant(RefCounted@);
  13754. Variant(ScriptObject@);
  13755. Variant(const Matrix3&in);
  13756. Variant(const Matrix3x4&in);
  13757. Variant(const Matrix4&in);
  13758. Variant(const String&in, const String&in);
  13759. Variant(VariantType, const String&in);
  13760. Variant(const VectorBuffer&in);
  13761. // Methods:
  13762. void Clear();
  13763. const Color& GetColor() const;
  13764. void FromString(VariantType, const String&);
  13765. void FromString(const String&, const String&);
  13766. bool GetBool() const;
  13767. VectorBuffer GetBuffer() const;
  13768. double GetDouble() const;
  13769. float GetFloat() const;
  13770. int GetInt() const;
  13771. int GetInt64() const;
  13772. RefCounted GetPtr() const;
  13773. ScriptObject GetScriptObject() const;
  13774. StringHash GetStringHash() const;
  13775. Array<String> GetStringVector() const;
  13776. uint GetUInt() const;
  13777. uint64 GetUInt64() const;
  13778. Array<Variant> GetVariantVector() const;
  13779. const IntRect& GetIntRect() const;
  13780. const IntVector2& GetIntVector2() const;
  13781. const IntVector3& GetIntVector3() const;
  13782. const Matrix3& GetMatrix3() const;
  13783. const Matrix3x4& GetMatrix3x4() const;
  13784. const Matrix4& GetMatrix4() const;
  13785. const Quaternion& GetQuaternion() const;
  13786. const Rect& GetRect() const;
  13787. const ResourceRef& GetResourceRef() const;
  13788. const ResourceRefList& GetResourceRefList() const;
  13789. const String& GetString() const;
  13790. String ToString() const;
  13791. const VariantMap& GetVariantMap() const;
  13792. const Vector2& GetVector2() const;
  13793. const Vector3& GetVector3() const;
  13794. const Vector4& GetVector4() const;
  13795. // Properties:
  13796. /* readonly */
  13797. bool empty;
  13798. /* readonly */
  13799. VariantType type;
  13800. /* readonly */
  13801. String typeName;
  13802. /* readonly */
  13803. bool zero;
  13804. };
  13805. class VariantMap
  13806. {
  13807. public:
  13808. ~VariantMap();
  13809. VariantMap();
  13810. VariantMap(const VariantMap&in);
  13811. // Methods:
  13812. void Clear();
  13813. bool Contains(StringHash) const;
  13814. bool Contains(const String&) const;
  13815. bool Erase(StringHash);
  13816. bool Erase(const String&);
  13817. // Properties:
  13818. /* readonly */
  13819. Array<StringHash> keys;
  13820. /* readonly */
  13821. uint length;
  13822. /* readonly */
  13823. Array<Variant> values;
  13824. };
  13825. class Vector2
  13826. {
  13827. public:
  13828. Vector2();
  13829. Vector2(const Vector2&in);
  13830. Vector2(const IntVector2&in);
  13831. Vector2(float, float);
  13832. Vector2(float[]&inout);
  13833. // Methods:
  13834. Vector2 Abs() const;
  13835. float AbsDotProduct(const Vector2&) const;
  13836. float Angle(const Vector2&) const;
  13837. float DotProduct(const Vector2&) const;
  13838. bool Equals(const Vector2&) const;
  13839. bool IsNaN() const;
  13840. Vector2 Lerp(const Vector2&, float) const;
  13841. void Normalize();
  13842. Vector2 Normalized() const;
  13843. float ProjectOntoAxis(const Vector2&) const;
  13844. String ToString() const;
  13845. // Properties:
  13846. /* readonly */
  13847. Array<float> data;
  13848. /* readonly */
  13849. float length;
  13850. /* readonly */
  13851. float lengthSquared;
  13852. float x;
  13853. float y;
  13854. // Constants:
  13855. static const Vector2 DOWN;
  13856. static const Vector2 LEFT;
  13857. static const Vector2 ONE;
  13858. static const Vector2 RIGHT;
  13859. static const Vector2 UP;
  13860. static const Vector2 ZERO;
  13861. };
  13862. class Vector3
  13863. {
  13864. public:
  13865. Vector3();
  13866. Vector3(const Vector3&in);
  13867. Vector3(const Vector2&in, float);
  13868. Vector3(const Vector2&in);
  13869. Vector3(const IntVector3&in);
  13870. Vector3(float, float, float);
  13871. Vector3(float, float);
  13872. Vector3(float[]&inout);
  13873. // Methods:
  13874. Vector3 Abs() const;
  13875. float AbsDotProduct(const Vector3&) const;
  13876. float Angle(const Vector3&) const;
  13877. Vector3 CrossProduct(const Vector3&) const;
  13878. float DotProduct(const Vector3&) const;
  13879. bool Equals(const Vector3&) const;
  13880. bool IsNaN() const;
  13881. Vector3 Lerp(const Vector3&, float) const;
  13882. void Normalize();
  13883. Vector3 Normalized() const;
  13884. float ProjectOntoAxis(const Vector3&) const;
  13885. String ToString() const;
  13886. // Properties:
  13887. /* readonly */
  13888. Array<float> data;
  13889. /* readonly */
  13890. float length;
  13891. /* readonly */
  13892. float lengthSquared;
  13893. float x;
  13894. float y;
  13895. float z;
  13896. // Constants:
  13897. static const Vector3 BACK;
  13898. static const Vector3 DOWN;
  13899. static const Vector3 FORWARD;
  13900. static const Vector3 LEFT;
  13901. static const Vector3 ONE;
  13902. static const Vector3 RIGHT;
  13903. static const Vector3 UP;
  13904. static const Vector3 ZERO;
  13905. };
  13906. class Vector4
  13907. {
  13908. public:
  13909. Vector4();
  13910. Vector4(const Vector4&in);
  13911. Vector4(float, float, float, float);
  13912. Vector4(const Vector3&in, float);
  13913. Vector4(float[]&inout);
  13914. // Methods:
  13915. Vector4 Abs() const;
  13916. float AbsDotProduct(const Vector4&) const;
  13917. float DotProduct(const Vector4&) const;
  13918. bool Equals(const Vector4&) const;
  13919. bool IsNaN() const;
  13920. Vector4 Lerp(const Vector4&, float) const;
  13921. float ProjectOntoAxis(const Vector3&) const;
  13922. String ToString() const;
  13923. // Properties:
  13924. /* readonly */
  13925. Array<float> data;
  13926. float w;
  13927. float x;
  13928. float y;
  13929. float z;
  13930. };
  13931. class VectorBuffer
  13932. {
  13933. public:
  13934. ~VectorBuffer();
  13935. VectorBuffer();
  13936. VectorBuffer(const VectorBuffer&in);
  13937. VectorBuffer(Deserializer@, uint);
  13938. // Methods:
  13939. void Clear();
  13940. Array<uint8> Read(uint);
  13941. bool ReadBool();
  13942. BoundingBox ReadBoundingBox();
  13943. int8 ReadByte();
  13944. Color ReadColor();
  13945. double ReadDouble();
  13946. String ReadFileID();
  13947. float ReadFloat();
  13948. int ReadInt();
  13949. int64 ReadInt64();
  13950. IntRect ReadIntRect();
  13951. IntVector2 ReadIntVector2();
  13952. String ReadLine();
  13953. Matrix3 ReadMatrix3();
  13954. Matrix3x4 ReadMatrix3x4();
  13955. Matrix4 ReadMatrix4();
  13956. uint ReadNetID();
  13957. Quaternion ReadPackedQuaternion();
  13958. Vector3 ReadPackedVector3(float);
  13959. Quaternion ReadQuaternion();
  13960. int16 ReadShort();
  13961. String ReadString();
  13962. StringHash ReadStringHash();
  13963. uint8 ReadUByte();
  13964. uint ReadUInt();
  13965. uint64 ReadUInt64();
  13966. uint16 ReadUShort();
  13967. uint ReadVLE();
  13968. Variant ReadVariant();
  13969. VariantMap ReadVariantMap();
  13970. Vector2 ReadVector2();
  13971. Vector3 ReadVector3();
  13972. Vector4 ReadVector4();
  13973. VectorBuffer ReadVectorBuffer(uint);
  13974. void Resize(uint);
  13975. uint Seek(uint);
  13976. void SetData(Deserializer, uint);
  13977. uint Write(Array<uint8>);
  13978. bool WriteBool(bool);
  13979. bool WriteBoundingBox(const BoundingBox&);
  13980. bool WriteByte(int8);
  13981. bool WriteColor(const Color&);
  13982. bool WriteDouble(double);
  13983. bool WriteFileID(const String&);
  13984. bool WriteFloat(float);
  13985. bool WriteInt(int);
  13986. bool WriteInt64(int64);
  13987. bool WriteIntRect(const IntRect&);
  13988. bool WriteIntVector2(const IntVector2&);
  13989. bool WriteLine(const String&);
  13990. bool WriteMatrix3(const Matrix3&);
  13991. bool WriteMatrix3x4(const Matrix3x4&);
  13992. bool WriteMatrix4(const Matrix4&);
  13993. bool WriteNetID(uint);
  13994. bool WritePackedQuaternion(const Quaternion&);
  13995. bool WritePackedVector3(const Vector3&, float);
  13996. bool WriteQuaternion(const Quaternion&);
  13997. bool WriteShort(int16);
  13998. bool WriteString(const String&);
  13999. bool WriteStringHash(const StringHash&);
  14000. bool WriteUByte(uint8);
  14001. bool WriteUInt(uint);
  14002. bool WriteUInt64(uint64);
  14003. bool WriteUShort(uint16);
  14004. bool WriteVLE(uint);
  14005. bool WriteVariant(const Variant&);
  14006. bool WriteVariantMap(const VariantMap&);
  14007. bool WriteVector2(const Vector2&);
  14008. bool WriteVector3(const Vector3&);
  14009. bool WriteVector4(const Vector4&);
  14010. bool WriteVectorBuffer(const VectorBuffer&);
  14011. // Properties:
  14012. /* readonly */
  14013. uint checksum;
  14014. /* readonly */
  14015. bool eof;
  14016. /* readonly */
  14017. String name;
  14018. /* readonly */
  14019. uint position;
  14020. /* readonly */
  14021. uint size;
  14022. };
  14023. class VertexBuffer
  14024. {
  14025. public:
  14026. VertexBuffer();
  14027. // Methods:
  14028. VectorBuffer GetData() const;
  14029. uint GetElementOffset(VertexElementSemantic, uint8 = 0) const;
  14030. uint GetElementOffset(VertexElementType, VertexElementSemantic, uint8 = 0) const;
  14031. bool HasElement(VertexElementSemantic, uint8 = 0) const;
  14032. bool HasElement(VertexElementType, VertexElementSemantic, uint8 = 0) const;
  14033. bool HasSubscribedToEvent(Object, const String&);
  14034. bool HasSubscribedToEvent(const String&);
  14035. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  14036. bool SetData(VectorBuffer&);
  14037. bool SetDataRange(VectorBuffer&, uint, uint, bool = false);
  14038. void SetSize(uint, Array<VertexElement>, bool = false);
  14039. void SetSize(uint, uint, bool = false);
  14040. // Properties:
  14041. /* readonly */
  14042. String category;
  14043. /* readonly */
  14044. bool dynamic;
  14045. /* readonly */
  14046. uint elementMask;
  14047. /* readonly */
  14048. Array<VertexElement> elements;
  14049. /* readonly */
  14050. int refs;
  14051. bool shadowed;
  14052. /* readonly */
  14053. StringHash type;
  14054. /* readonly */
  14055. String typeName;
  14056. /* readonly */
  14057. uint vertexCount;
  14058. /* readonly */
  14059. uint vertexSize;
  14060. /* readonly */
  14061. int weakRefs;
  14062. };
  14063. class VertexElement
  14064. {
  14065. public:
  14066. ~VertexElement();
  14067. VertexElement();
  14068. VertexElement(const VertexElement&in);
  14069. VertexElement(VertexElementType, VertexElementSemantic, uint8 index = 0, bool perInstance = false);
  14070. // Properties:
  14071. uint8 index;
  14072. uint offset;
  14073. bool perInstance;
  14074. VertexElementSemantic semantic;
  14075. VertexElementType type;
  14076. };
  14077. class View3D
  14078. {
  14079. public:
  14080. View3D();
  14081. View3D(const String&in);
  14082. // Methods:
  14083. void AddChild(UIElement);
  14084. void AddTag(const String&);
  14085. void AddTags(const String&, int8 = ';');
  14086. void ApplyAttributes();
  14087. void BringToFront();
  14088. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  14089. void DisableLayoutUpdate();
  14090. IntVector2 ElementToScreen(const IntVector2&);
  14091. void EnableLayoutUpdate();
  14092. uint FindChild(UIElement) const;
  14093. Variant GetAttribute(const String&) const;
  14094. ValueAnimation GetAttributeAnimation(const String&) const;
  14095. float GetAttributeAnimationSpeed(const String&) const;
  14096. float GetAttributeAnimationTime(const String&) const;
  14097. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  14098. Variant GetAttributeDefault(const String&) const;
  14099. UIElement GetChild(const String&, bool = false) const;
  14100. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  14101. Array<UIElement> GetChildren(bool = false) const;
  14102. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  14103. UIElement GetElementEventSender() const;
  14104. bool GetInterceptNetworkUpdate(const String&) const;
  14105. uint GetNumChildren(bool) const;
  14106. bool HasSubscribedToEvent(Object, const String&);
  14107. bool HasSubscribedToEvent(const String&);
  14108. bool HasTag(const String&) const;
  14109. void InsertChild(uint, UIElement);
  14110. bool IsInside(IntVector2, bool);
  14111. bool IsInsideCombined(IntVector2, bool);
  14112. bool Load(File, bool = false);
  14113. bool Load(VectorBuffer&, bool = false);
  14114. UIElement LoadChildXML(XMLFile, XMLFile = null);
  14115. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  14116. bool LoadJSON(const JSONValue&, bool = false);
  14117. bool LoadXML(File);
  14118. bool LoadXML(VectorBuffer&);
  14119. bool LoadXML(XMLFile, XMLFile);
  14120. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  14121. bool LoadXML(const XMLElement&, bool = false);
  14122. void MarkNetworkUpdate() const;
  14123. void QueueUpdate();
  14124. void Remove();
  14125. void RemoveAllChildren();
  14126. void RemoveAllTags();
  14127. void RemoveAttributeAnimation(const String&);
  14128. void RemoveChild(UIElement, uint = 0);
  14129. void RemoveChild(uint);
  14130. void RemoveInstanceDefault();
  14131. void RemoveObjectAnimation();
  14132. bool RemoveTag(const String&);
  14133. void ResetDeepEnabled();
  14134. void ResetToDefault();
  14135. bool Save(File) const;
  14136. bool Save(VectorBuffer&) const;
  14137. bool SaveJSON(JSONValue&) const;
  14138. bool SaveXML(File, const String& = "\t");
  14139. bool SaveXML(VectorBuffer&, const String& = "\t");
  14140. bool SaveXML(XMLElement&) const;
  14141. IntVector2 ScreenToElement(const IntVector2&);
  14142. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  14143. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  14144. void SetAnimationTime(float);
  14145. bool SetAttribute(const String&, const Variant&);
  14146. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  14147. void SetAttributeAnimationSpeed(const String&, float);
  14148. void SetAttributeAnimationTime(const String&, float);
  14149. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  14150. void SetDeepEnabled(bool);
  14151. void SetEnabledRecursive(bool);
  14152. void SetFixedHeight(int);
  14153. void SetFixedSize(int, int);
  14154. void SetFixedWidth(int);
  14155. void SetFullImageRect();
  14156. void SetHoverOffset(int, int);
  14157. void SetInterceptNetworkUpdate(const String&, bool);
  14158. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  14159. void SetMaxAnchor(float, float);
  14160. void SetMaxSize(int, int);
  14161. void SetMinAnchor(float, float);
  14162. void SetMinSize(int, int);
  14163. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  14164. void SetPivot(float, float);
  14165. void SetPosition(int, int);
  14166. void SetSize(int, int);
  14167. bool SetStyle(const String&, XMLFile = null);
  14168. bool SetStyle(const XMLElement&);
  14169. bool SetStyleAuto(XMLFile = null);
  14170. void SetView(Scene, Camera, bool = true);
  14171. void UpdateLayout();
  14172. const Variant& GetVar(const StringHash&);
  14173. // Properties:
  14174. bool animationEnabled;
  14175. /* readonly */
  14176. Array<Variant> attributeDefaults;
  14177. /* readonly */
  14178. Array<AttributeInfo> attributeInfos;
  14179. Array<Variant> attributes;
  14180. bool autoUpdate;
  14181. BlendMode blendMode;
  14182. IntRect border;
  14183. bool bringToBack;
  14184. bool bringToFront;
  14185. /* readonly */
  14186. Node cameraNode;
  14187. /* readonly */
  14188. String category;
  14189. /* readonly */
  14190. IntVector2 childOffset;
  14191. /* readonly */
  14192. Array<UIElement> children;
  14193. IntRect clipBorder;
  14194. bool clipChildren;
  14195. /* writeonly */
  14196. Color color;
  14197. /* readonly */
  14198. bool colorGradient;
  14199. Array<Color> colors;
  14200. /* readonly */
  14201. IntRect combinedScreenRect;
  14202. XMLFile defaultStyle;
  14203. /* readonly */
  14204. Texture2D depthTexture;
  14205. /* readonly */
  14206. float derivedOpacity;
  14207. /* readonly */
  14208. uint dragButtonCombo;
  14209. /* readonly */
  14210. int dragButtonCount;
  14211. uint dragDropMode;
  14212. bool editable;
  14213. bool elementEventSender;
  14214. bool enableAnchor;
  14215. bool enabled;
  14216. /* readonly */
  14217. bool enabledSelf;
  14218. /* readonly */
  14219. bool fixedHeight;
  14220. bool fixedHeightResizing;
  14221. /* readonly */
  14222. bool fixedSize;
  14223. /* readonly */
  14224. bool fixedWidth;
  14225. bool fixedWidthResizing;
  14226. bool focus;
  14227. FocusMode focusMode;
  14228. uint format;
  14229. int height;
  14230. HorizontalAlignment horizontalAlignment;
  14231. IntVector2 hoverOffset;
  14232. /* readonly */
  14233. bool hovering;
  14234. IntRect imageBorder;
  14235. IntRect imageRect;
  14236. int indent;
  14237. int indentSpacing;
  14238. /* readonly */
  14239. int indentWidth;
  14240. bool internal;
  14241. IntRect layoutBorder;
  14242. Vector2 layoutFlexScale;
  14243. LayoutMode layoutMode;
  14244. int layoutSpacing;
  14245. Vector2 maxAnchor;
  14246. int maxHeight;
  14247. IntVector2 maxOffset;
  14248. IntVector2 maxSize;
  14249. int maxWidth;
  14250. Vector2 minAnchor;
  14251. int minHeight;
  14252. IntVector2 minOffset;
  14253. IntVector2 minSize;
  14254. int minWidth;
  14255. bool modal;
  14256. bool modalAutoDismiss;
  14257. Color modalFrameColor;
  14258. IntVector2 modalFrameSize;
  14259. Color modalShadeColor;
  14260. bool movable;
  14261. String name;
  14262. /* readonly */
  14263. uint numAllChildren;
  14264. /* readonly */
  14265. uint numAttributes;
  14266. /* readonly */
  14267. uint numChildren;
  14268. ObjectAnimation objectAnimation;
  14269. float opacity;
  14270. UIElement parent;
  14271. Vector2 pivot;
  14272. IntVector2 position;
  14273. int priority;
  14274. /* readonly */
  14275. int refs;
  14276. /* readonly */
  14277. Texture2D renderTexture;
  14278. bool resizable;
  14279. IntRect resizeBorder;
  14280. /* readonly */
  14281. UIElement root;
  14282. /* readonly */
  14283. Scene scene;
  14284. /* readonly */
  14285. IntVector2 screenPosition;
  14286. bool selected;
  14287. IntVector2 size;
  14288. bool sortChildren;
  14289. String style;
  14290. /* readonly */
  14291. Array<String> tags;
  14292. bool temporary;
  14293. Texture texture;
  14294. bool tiled;
  14295. TraversalMode traversalMode;
  14296. /* readonly */
  14297. StringHash type;
  14298. /* readonly */
  14299. String typeName;
  14300. bool useDerivedOpacity;
  14301. /* readonly */
  14302. VariantMap vars;
  14303. VerticalAlignment verticalAlignment;
  14304. /* readonly */
  14305. Viewport viewport;
  14306. bool visible;
  14307. /* readonly */
  14308. bool visibleEffective;
  14309. /* readonly */
  14310. int weakRefs;
  14311. int width;
  14312. };
  14313. class Viewport
  14314. {
  14315. public:
  14316. Viewport();
  14317. Viewport(Scene&, Camera&, RenderPath& renderPath = null);
  14318. Viewport(Scene&, Camera&, const IntRect&in, RenderPath& renderPath = null);
  14319. // Methods:
  14320. Ray GetScreenRay(int, int) const;
  14321. bool HasSubscribedToEvent(Object, const String&);
  14322. bool HasSubscribedToEvent(const String&);
  14323. Vector3 ScreenToWorldPoint(int, int, float) const;
  14324. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  14325. void SetRenderPath(XMLFile);
  14326. IntVector2 WorldToScreenPoint(const Vector3&) const;
  14327. // Properties:
  14328. Camera camera;
  14329. /* readonly */
  14330. String category;
  14331. Camera cullCamera;
  14332. bool drawDebug;
  14333. IntRect rect;
  14334. /* readonly */
  14335. int refs;
  14336. RenderPath renderPath;
  14337. Scene scene;
  14338. /* readonly */
  14339. StringHash type;
  14340. /* readonly */
  14341. String typeName;
  14342. /* readonly */
  14343. int weakRefs;
  14344. };
  14345. class WeakHandle
  14346. {
  14347. public:
  14348. ~WeakHandle();
  14349. WeakHandle();
  14350. WeakHandle(const WeakHandle&in);
  14351. WeakHandle(RefCounted@);
  14352. // Methods:
  14353. RefCounted Get() const;
  14354. // Properties:
  14355. /* readonly */
  14356. bool expired;
  14357. /* readonly */
  14358. int refs;
  14359. /* readonly */
  14360. int weakRefs;
  14361. };
  14362. class Window
  14363. {
  14364. public:
  14365. Window();
  14366. Window(const String&in);
  14367. // Methods:
  14368. void AddChild(UIElement);
  14369. void AddTag(const String&);
  14370. void AddTags(const String&, int8 = ';');
  14371. void ApplyAttributes();
  14372. void BringToFront();
  14373. UIElement CreateChild(const String&, const String& = String ( ), uint = M_MAX_UNSIGNED);
  14374. void DisableLayoutUpdate();
  14375. IntVector2 ElementToScreen(const IntVector2&);
  14376. void EnableLayoutUpdate();
  14377. uint FindChild(UIElement) const;
  14378. Variant GetAttribute(const String&) const;
  14379. ValueAnimation GetAttributeAnimation(const String&) const;
  14380. float GetAttributeAnimationSpeed(const String&) const;
  14381. float GetAttributeAnimationTime(const String&) const;
  14382. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  14383. Variant GetAttributeDefault(const String&) const;
  14384. UIElement GetChild(const String&, bool = false) const;
  14385. UIElement GetChild(const StringHash&, const Variant& = Variant ( ), bool = false) const;
  14386. Array<UIElement> GetChildren(bool = false) const;
  14387. Array<UIElement> GetChildrenWithTag(const String&, bool = false) const;
  14388. UIElement GetElementEventSender() const;
  14389. bool GetInterceptNetworkUpdate(const String&) const;
  14390. uint GetNumChildren(bool) const;
  14391. bool HasSubscribedToEvent(Object, const String&);
  14392. bool HasSubscribedToEvent(const String&);
  14393. bool HasTag(const String&) const;
  14394. void InsertChild(uint, UIElement);
  14395. bool IsInside(IntVector2, bool);
  14396. bool IsInsideCombined(IntVector2, bool);
  14397. bool Load(File, bool = false);
  14398. bool Load(VectorBuffer&, bool = false);
  14399. UIElement LoadChildXML(XMLFile, XMLFile = null);
  14400. UIElement LoadChildXML(const XMLElement&, XMLFile = null, bool = false);
  14401. bool LoadJSON(const JSONValue&, bool = false);
  14402. bool LoadXML(File);
  14403. bool LoadXML(VectorBuffer&);
  14404. bool LoadXML(XMLFile, XMLFile);
  14405. bool LoadXML(const XMLElement&, XMLFile, bool = false);
  14406. bool LoadXML(const XMLElement&, bool = false);
  14407. void MarkNetworkUpdate() const;
  14408. void Remove();
  14409. void RemoveAllChildren();
  14410. void RemoveAllTags();
  14411. void RemoveAttributeAnimation(const String&);
  14412. void RemoveChild(UIElement, uint = 0);
  14413. void RemoveChild(uint);
  14414. void RemoveInstanceDefault();
  14415. void RemoveObjectAnimation();
  14416. bool RemoveTag(const String&);
  14417. void ResetDeepEnabled();
  14418. void ResetToDefault();
  14419. bool Save(File) const;
  14420. bool Save(VectorBuffer&) const;
  14421. bool SaveJSON(JSONValue&) const;
  14422. bool SaveXML(File, const String& = "\t");
  14423. bool SaveXML(VectorBuffer&, const String& = "\t");
  14424. bool SaveXML(XMLElement&) const;
  14425. IntVector2 ScreenToElement(const IntVector2&);
  14426. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  14427. void SetAlignment(HorizontalAlignment, VerticalAlignment);
  14428. void SetAnimationTime(float);
  14429. bool SetAttribute(const String&, const Variant&);
  14430. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  14431. void SetAttributeAnimationSpeed(const String&, float);
  14432. void SetAttributeAnimationTime(const String&, float);
  14433. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  14434. void SetDeepEnabled(bool);
  14435. void SetEnabledRecursive(bool);
  14436. void SetFixedHeight(int);
  14437. void SetFixedSize(int, int);
  14438. void SetFixedWidth(int);
  14439. void SetFullImageRect();
  14440. void SetHoverOffset(int, int);
  14441. void SetInterceptNetworkUpdate(const String&, bool);
  14442. void SetLayout(LayoutMode, int = 0, const IntRect& = IntRect ( 0 , 0 , 0 , 0 ));
  14443. void SetMaxAnchor(float, float);
  14444. void SetMaxSize(int, int);
  14445. void SetMinAnchor(float, float);
  14446. void SetMinSize(int, int);
  14447. void SetParent(UIElement, uint = M_MAX_UNSIGNED);
  14448. void SetPivot(float, float);
  14449. void SetPosition(int, int);
  14450. void SetSize(int, int);
  14451. bool SetStyle(const String&, XMLFile = null);
  14452. bool SetStyle(const XMLElement&);
  14453. bool SetStyleAuto(XMLFile = null);
  14454. void UpdateLayout();
  14455. const Variant& GetVar(const StringHash&);
  14456. // Properties:
  14457. bool animationEnabled;
  14458. /* readonly */
  14459. Array<Variant> attributeDefaults;
  14460. /* readonly */
  14461. Array<AttributeInfo> attributeInfos;
  14462. Array<Variant> attributes;
  14463. BlendMode blendMode;
  14464. IntRect border;
  14465. bool bringToBack;
  14466. bool bringToFront;
  14467. /* readonly */
  14468. String category;
  14469. /* readonly */
  14470. IntVector2 childOffset;
  14471. /* readonly */
  14472. Array<UIElement> children;
  14473. IntRect clipBorder;
  14474. bool clipChildren;
  14475. /* writeonly */
  14476. Color color;
  14477. /* readonly */
  14478. bool colorGradient;
  14479. Array<Color> colors;
  14480. /* readonly */
  14481. IntRect combinedScreenRect;
  14482. XMLFile defaultStyle;
  14483. /* readonly */
  14484. float derivedOpacity;
  14485. /* readonly */
  14486. uint dragButtonCombo;
  14487. /* readonly */
  14488. int dragButtonCount;
  14489. uint dragDropMode;
  14490. bool editable;
  14491. bool elementEventSender;
  14492. bool enableAnchor;
  14493. bool enabled;
  14494. /* readonly */
  14495. bool enabledSelf;
  14496. /* readonly */
  14497. bool fixedHeight;
  14498. bool fixedHeightResizing;
  14499. /* readonly */
  14500. bool fixedSize;
  14501. /* readonly */
  14502. bool fixedWidth;
  14503. bool fixedWidthResizing;
  14504. bool focus;
  14505. FocusMode focusMode;
  14506. int height;
  14507. HorizontalAlignment horizontalAlignment;
  14508. IntVector2 hoverOffset;
  14509. /* readonly */
  14510. bool hovering;
  14511. IntRect imageBorder;
  14512. IntRect imageRect;
  14513. int indent;
  14514. int indentSpacing;
  14515. /* readonly */
  14516. int indentWidth;
  14517. bool internal;
  14518. IntRect layoutBorder;
  14519. Vector2 layoutFlexScale;
  14520. LayoutMode layoutMode;
  14521. int layoutSpacing;
  14522. Vector2 maxAnchor;
  14523. int maxHeight;
  14524. IntVector2 maxOffset;
  14525. IntVector2 maxSize;
  14526. int maxWidth;
  14527. Vector2 minAnchor;
  14528. int minHeight;
  14529. IntVector2 minOffset;
  14530. IntVector2 minSize;
  14531. int minWidth;
  14532. bool modal;
  14533. bool modalAutoDismiss;
  14534. Color modalFrameColor;
  14535. IntVector2 modalFrameSize;
  14536. Color modalShadeColor;
  14537. bool movable;
  14538. String name;
  14539. /* readonly */
  14540. uint numAllChildren;
  14541. /* readonly */
  14542. uint numAttributes;
  14543. /* readonly */
  14544. uint numChildren;
  14545. ObjectAnimation objectAnimation;
  14546. float opacity;
  14547. UIElement parent;
  14548. Vector2 pivot;
  14549. IntVector2 position;
  14550. int priority;
  14551. /* readonly */
  14552. int refs;
  14553. bool resizable;
  14554. IntRect resizeBorder;
  14555. /* readonly */
  14556. UIElement root;
  14557. /* readonly */
  14558. IntVector2 screenPosition;
  14559. bool selected;
  14560. IntVector2 size;
  14561. bool sortChildren;
  14562. String style;
  14563. /* readonly */
  14564. Array<String> tags;
  14565. bool temporary;
  14566. Texture texture;
  14567. bool tiled;
  14568. TraversalMode traversalMode;
  14569. /* readonly */
  14570. StringHash type;
  14571. /* readonly */
  14572. String typeName;
  14573. bool useDerivedOpacity;
  14574. /* readonly */
  14575. VariantMap vars;
  14576. VerticalAlignment verticalAlignment;
  14577. bool visible;
  14578. /* readonly */
  14579. bool visibleEffective;
  14580. /* readonly */
  14581. int weakRefs;
  14582. int width;
  14583. };
  14584. class XMLElement
  14585. {
  14586. public:
  14587. ~XMLElement();
  14588. XMLElement();
  14589. XMLElement(const XMLElement&in);
  14590. // Methods:
  14591. XMLElement CreateChild(const String&);
  14592. String GetAttribute(const String& = String ( )) const;
  14593. String GetAttributeLower(const String&) const;
  14594. Array<String> GetAttributeNames() const;
  14595. String GetAttributeUpper(const String&) const;
  14596. bool GetBool(const String&) const;
  14597. BoundingBox GetBoundingBox() const;
  14598. XMLElement GetChild(const String& = String ( )) const;
  14599. Color GetColor(const String&) const;
  14600. double GetDouble(const String&) const;
  14601. float GetFloat(const String&) const;
  14602. int GetInt(const String&) const;
  14603. int64 GetInt64(const String&) const;
  14604. IntRect GetIntRect(const String&) const;
  14605. IntVector2 GetIntVector2(const String&) const;
  14606. IntVector3 GetIntVector3(const String&) const;
  14607. Matrix3 GetMatrix3(const String&) const;
  14608. Matrix3x4 GetMatrix3x4(const String&) const;
  14609. Matrix4 GetMatrix4(const String&) const;
  14610. XMLElement GetNext(const String& = String ( )) const;
  14611. XMLElement GetOrCreateChild(const String&);
  14612. Quaternion GetQuaternion(const String&) const;
  14613. ResourceRef GetResourceRef() const;
  14614. ResourceRefList GetResourceRefList() const;
  14615. uint GetUInt(const String&) const;
  14616. uint64 GetUInt64(const String&) const;
  14617. String GetValue() const;
  14618. Variant GetVariant() const;
  14619. VariantMap GetVariantMap() const;
  14620. Array<Variant> GetVariantVector() const;
  14621. Vector2 GetVector2(const String&) const;
  14622. Vector3 GetVector3(const String&) const;
  14623. Vector4 GetVector4(const String&) const;
  14624. Variant GetVectorVariant(const String&) const;
  14625. bool HasAttribute(const String&) const;
  14626. bool HasChild(const String&) const;
  14627. bool RemoveAttribute(const String& = String ( ));
  14628. bool RemoveChild(const String&);
  14629. bool RemoveChild(const XMLElement&);
  14630. bool RemoveChildren(const String& = String ( ));
  14631. XPathResultSet Select(const String&);
  14632. XPathResultSet SelectPrepared(const XPathQuery&);
  14633. XMLElement SelectSingle(const String&);
  14634. XMLElement SelectSinglePrepared(const XPathQuery&);
  14635. bool SetAttribute(const String&);
  14636. bool SetAttribute(const String&, const String&);
  14637. bool SetBool(const String&, bool);
  14638. bool SetBoundingBox(const BoundingBox&);
  14639. bool SetColor(const String&, const Color&);
  14640. bool SetDouble(const String&, double);
  14641. bool SetFloat(const String&, float);
  14642. bool SetInt(const String&, int);
  14643. bool SetInt64(const String&, int64);
  14644. bool SetIntRect(const String&, const IntRect&);
  14645. bool SetIntVector2(const String&, const IntVector2&);
  14646. bool SetIntVector3(const String&, const IntVector3&);
  14647. bool SetMatrix3(const String&, const Matrix3&);
  14648. bool SetMatrix3x4(const String&, const Matrix3x4&);
  14649. bool SetMatrix4(const String&, const Matrix4&);
  14650. bool SetQuaternion(const String&, const Quaternion&);
  14651. bool SetResourceRef(const String&, const ResourceRef&);
  14652. bool SetResourceRefList(const String&, const ResourceRefList&);
  14653. bool SetUInt(const String&, uint);
  14654. bool SetUInt64(const String&, uint64);
  14655. bool SetValue(const String&);
  14656. bool SetVariant(const Variant&);
  14657. bool SetVariantMap(const VariantMap&);
  14658. bool SetVariantVector(Array<Variant>);
  14659. bool SetVector2(const String&, const Vector2&);
  14660. bool SetVector3(const String&, const Vector3&);
  14661. bool SetVector4(const String&, const Vector4&);
  14662. bool SetVectorVariant(const String&, const Variant&);
  14663. // Properties:
  14664. /* readonly */
  14665. XMLFile file;
  14666. /* readonly */
  14667. bool isNull;
  14668. /* readonly */
  14669. String name;
  14670. /* readonly */
  14671. XMLElement nextResult;
  14672. /* readonly */
  14673. bool notNull;
  14674. /* readonly */
  14675. uint numAttributes;
  14676. /* readonly */
  14677. XMLElement parent;
  14678. String value;
  14679. };
  14680. class XMLFile
  14681. {
  14682. public:
  14683. XMLFile();
  14684. XMLFile(const String&in);
  14685. // Methods:
  14686. XMLElement CreateRoot(const String&);
  14687. bool FromString(const String&);
  14688. XMLElement GetOrCreateRoot(const String&);
  14689. XMLElement GetRoot(const String& = String ( ));
  14690. bool HasSubscribedToEvent(Object, const String&);
  14691. bool HasSubscribedToEvent(const String&);
  14692. bool Load(File);
  14693. bool Load(VectorBuffer&);
  14694. bool Load(const String&);
  14695. void Patch(XMLElement);
  14696. void Patch(XMLFile);
  14697. bool Save(File) const;
  14698. bool Save(File, const String&) const;
  14699. bool Save(VectorBuffer&) const;
  14700. bool Save(const String&) const;
  14701. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  14702. String ToString(const String& = String ( "\t" )) const;
  14703. // Properties:
  14704. /* readonly */
  14705. String category;
  14706. /* readonly */
  14707. uint memoryUse;
  14708. String name;
  14709. /* readonly */
  14710. int refs;
  14711. /* readonly */
  14712. XMLElement root;
  14713. /* readonly */
  14714. StringHash type;
  14715. /* readonly */
  14716. String typeName;
  14717. /* readonly */
  14718. uint useTimer;
  14719. /* readonly */
  14720. int weakRefs;
  14721. };
  14722. class XPathQuery
  14723. {
  14724. public:
  14725. ~XPathQuery();
  14726. XPathQuery();
  14727. XPathQuery(const String&in, const String&inout arg1 = String ( ));
  14728. // Methods:
  14729. void Bind();
  14730. void Clear();
  14731. XPathResultSet Evaluate(XMLElement);
  14732. bool EvaluateToBool(XMLElement);
  14733. float EvaluateToFloat(XMLElement);
  14734. String EvaluateToString(XMLElement);
  14735. bool SetQuery(const String&, const String& = String ( ), bool = true);
  14736. bool SetVariable(const String&, bool);
  14737. bool SetVariable(const String&, const String&);
  14738. bool SetVariable(const String&, const XPathResultSet&);
  14739. bool SetVariable(const String&, float);
  14740. // Properties:
  14741. String query;
  14742. };
  14743. class XPathResultSet
  14744. {
  14745. public:
  14746. ~XPathResultSet();
  14747. XPathResultSet();
  14748. XPathResultSet(const XPathResultSet&in);
  14749. // Properties:
  14750. /* readonly */
  14751. bool empty;
  14752. /* readonly */
  14753. XMLElement firstResult;
  14754. /* readonly */
  14755. uint size;
  14756. };
  14757. class Zone
  14758. {
  14759. public:
  14760. // Methods:
  14761. void ApplyAttributes();
  14762. void DrawDebugGeometry(DebugRenderer, bool);
  14763. Variant GetAttribute(const String&) const;
  14764. ValueAnimation GetAttributeAnimation(const String&) const;
  14765. float GetAttributeAnimationSpeed(const String&) const;
  14766. float GetAttributeAnimationTime(const String&) const;
  14767. WrapMode GetAttributeAnimationWrapMode(const String&) const;
  14768. Variant GetAttributeDefault(const String&) const;
  14769. bool GetInterceptNetworkUpdate(const String&) const;
  14770. bool HasSubscribedToEvent(Object, const String&);
  14771. bool HasSubscribedToEvent(const String&);
  14772. bool IsInView(Camera) const;
  14773. bool Load(File, bool = false);
  14774. bool Load(VectorBuffer&, bool = false);
  14775. bool LoadJSON(const JSONValue&, bool = false);
  14776. bool LoadXML(const XMLElement&, bool = false);
  14777. void MarkNetworkUpdate() const;
  14778. void Remove();
  14779. void RemoveAttributeAnimation(const String&);
  14780. void RemoveInstanceDefault();
  14781. void RemoveObjectAnimation();
  14782. void ResetToDefault();
  14783. bool Save(File) const;
  14784. bool Save(VectorBuffer&) const;
  14785. bool SaveJSON(JSONValue&) const;
  14786. bool SaveXML(XMLElement&) const;
  14787. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  14788. void SetAnimationTime(float);
  14789. bool SetAttribute(const String&, const Variant&);
  14790. void SetAttributeAnimation(const String&, ValueAnimation, WrapMode = WM_LOOP, float = 1.0f);
  14791. void SetAttributeAnimationSpeed(const String&, float);
  14792. void SetAttributeAnimationTime(const String&, float);
  14793. void SetAttributeAnimationWrapMode(const String&, WrapMode);
  14794. void SetInterceptNetworkUpdate(const String&, bool);
  14795. // Properties:
  14796. Color ambientColor;
  14797. /* readonly */
  14798. Color ambientEndColor;
  14799. bool ambientGradient;
  14800. /* readonly */
  14801. Color ambientStartColor;
  14802. bool animationEnabled;
  14803. /* readonly */
  14804. Array<Variant> attributeDefaults;
  14805. /* readonly */
  14806. Array<AttributeInfo> attributeInfos;
  14807. Array<Variant> attributes;
  14808. BoundingBox boundingBox;
  14809. bool castShadows;
  14810. /* readonly */
  14811. String category;
  14812. float drawDistance;
  14813. bool enabled;
  14814. /* readonly */
  14815. bool enabledEffective;
  14816. Color fogColor;
  14817. float fogEnd;
  14818. float fogHeight;
  14819. float fogHeightScale;
  14820. float fogStart;
  14821. bool heightFog;
  14822. /* readonly */
  14823. uint id;
  14824. /* readonly */
  14825. bool inView;
  14826. /* readonly */
  14827. Matrix3x4 inverseWorldTransform;
  14828. uint lightMask;
  14829. float lodBias;
  14830. uint maxLights;
  14831. /* readonly */
  14832. Node node;
  14833. /* readonly */
  14834. uint numAttributes;
  14835. ObjectAnimation objectAnimation;
  14836. bool occludee;
  14837. bool occluder;
  14838. bool override;
  14839. int priority;
  14840. /* readonly */
  14841. int refs;
  14842. float shadowDistance;
  14843. uint shadowMask;
  14844. bool temporary;
  14845. /* readonly */
  14846. StringHash type;
  14847. /* readonly */
  14848. String typeName;
  14849. uint viewMask;
  14850. /* readonly */
  14851. int weakRefs;
  14852. /* readonly */
  14853. BoundingBox worldBoundingBox;
  14854. uint zoneMask;
  14855. Texture zoneTexture;
  14856. };
  14857. // Enumerations
  14858. enum AnimationBlendMode
  14859. {
  14860. ABM_LERP,
  14861. ABM_ADDITIVE,
  14862. };
  14863. enum AutoRemoveMode
  14864. {
  14865. REMOVE_DISABLED,
  14866. REMOVE_COMPONENT,
  14867. REMOVE_NODE,
  14868. };
  14869. enum BlendMode
  14870. {
  14871. BLEND_REPLACE,
  14872. BLEND_ADD,
  14873. BLEND_MULTIPLY,
  14874. BLEND_ALPHA,
  14875. BLEND_ADDALPHA,
  14876. BLEND_PREMULALPHA,
  14877. BLEND_INVDESTALPHA,
  14878. BLEND_SUBTRACT,
  14879. BLEND_SUBTRACTALPHA,
  14880. };
  14881. enum BodyType2D
  14882. {
  14883. BT_STATIC,
  14884. BT_KINEMATIC,
  14885. BT_DYNAMIC,
  14886. };
  14887. enum CollisionEventMode
  14888. {
  14889. COLLISION_NEVER,
  14890. COLLISION_ACTIVE,
  14891. COLLISION_ALWAYS,
  14892. };
  14893. enum CompareMode
  14894. {
  14895. CMP_ALWAYS,
  14896. CMP_EQUAL,
  14897. CMP_NOTEQUAL,
  14898. CMP_LESS,
  14899. CMP_LESSEQUAL,
  14900. CMP_GREATER,
  14901. CMP_GREATEREQUAL,
  14902. };
  14903. enum CompressedFormat
  14904. {
  14905. CF_NONE,
  14906. CF_RGBA,
  14907. CF_DXT1,
  14908. CF_DXT3,
  14909. CF_DXT5,
  14910. CF_ETC1,
  14911. CF_PVRTC_RGB_2BPP,
  14912. CF_PVRTC_RGBA_2BPP,
  14913. CF_PVRTC_RGB_4BPP,
  14914. CF_PVRTC_RGBA_4BPP,
  14915. };
  14916. enum ConstraintType
  14917. {
  14918. CONSTRAINT_POINT,
  14919. CONSTRAINT_HINGE,
  14920. CONSTRAINT_SLIDER,
  14921. CONSTRAINT_CONETWIST,
  14922. };
  14923. enum Corner
  14924. {
  14925. C_TOPLEFT,
  14926. C_TOPRIGHT,
  14927. C_BOTTOMLEFT,
  14928. C_BOTTOMRIGHT,
  14929. };
  14930. enum CreateMode
  14931. {
  14932. REPLICATED,
  14933. LOCAL,
  14934. };
  14935. enum CrowdAgentRequestedTarget
  14936. {
  14937. CA_REQUESTEDTARGET_NONE,
  14938. CA_REQUESTEDTARGET_POSITION,
  14939. CA_REQUESTEDTARGET_VELOCITY,
  14940. };
  14941. enum CrowdAgentState
  14942. {
  14943. CA_STATE_INVALID,
  14944. CA_STATE_WALKING,
  14945. CA_STATE_OFFMESH,
  14946. };
  14947. enum CrowdAgentTargetState
  14948. {
  14949. CA_TARGET_NONE,
  14950. CA_TARGET_FAILED,
  14951. CA_TARGET_VALID,
  14952. CA_TARGET_REQUESTING,
  14953. CA_TARGET_WAITINGFORQUEUE,
  14954. CA_TARGET_WAITINGFORPATH,
  14955. CA_TARGET_VELOCITY,
  14956. };
  14957. enum CubeMapFace
  14958. {
  14959. FACE_POSITIVE_X,
  14960. FACE_NEGATIVE_X,
  14961. FACE_POSITIVE_Y,
  14962. FACE_NEGATIVE_Y,
  14963. FACE_POSITIVE_Z,
  14964. FACE_NEGATIVE_Z,
  14965. };
  14966. enum CullMode
  14967. {
  14968. CULL_NONE,
  14969. CULL_CCW,
  14970. CULL_CW,
  14971. };
  14972. enum CursorShape
  14973. {
  14974. CS_NORMAL,
  14975. CS_IBEAM,
  14976. CS_CROSS,
  14977. CS_RESIZEVERTICAL,
  14978. CS_RESIZEDIAGONAL_TOPRIGHT,
  14979. CS_RESIZEHORIZONTAL,
  14980. CS_RESIZEDIAGONAL_TOPLEFT,
  14981. CS_RESIZE_ALL,
  14982. CS_ACCEPTDROP,
  14983. CS_REJECTDROP,
  14984. CS_BUSY,
  14985. CS_BUSY_ARROW,
  14986. };
  14987. enum DBAPI
  14988. {
  14989. DBAPI_SQLITE,
  14990. DBAPI_ODBC,
  14991. };
  14992. enum DumpMode
  14993. {
  14994. DOXYGEN,
  14995. C_HEADER,
  14996. };
  14997. enum EmitterType
  14998. {
  14999. EMITTER_SPHERE,
  15000. EMITTER_BOX,
  15001. };
  15002. enum EmitterType2D
  15003. {
  15004. EMITTER_TYPE_GRAVITY,
  15005. EMITTER_TYPE_RADIAL,
  15006. };
  15007. enum FaceCameraMode
  15008. {
  15009. FC_NONE,
  15010. FC_ROTATE_XYZ,
  15011. FC_ROTATE_Y,
  15012. FC_LOOKAT_XYZ,
  15013. FC_LOOKAT_Y,
  15014. FC_LOOKAT_MIXED,
  15015. FC_DIRECTION,
  15016. };
  15017. enum FileMode
  15018. {
  15019. FILE_READ,
  15020. FILE_WRITE,
  15021. FILE_READWRITE,
  15022. };
  15023. enum FillMode
  15024. {
  15025. FILL_SOLID,
  15026. FILL_WIREFRAME,
  15027. FILL_POINT,
  15028. };
  15029. enum FocusMode
  15030. {
  15031. FM_NOTFOCUSABLE,
  15032. FM_RESETFOCUS,
  15033. FM_FOCUSABLE,
  15034. FM_FOCUSABLE_DEFOCUSABLE,
  15035. };
  15036. enum FontType
  15037. {
  15038. FONT_NONE,
  15039. FONT_FREETYPE,
  15040. FONT_BITMAP,
  15041. };
  15042. enum HighlightMode
  15043. {
  15044. HM_NEVER,
  15045. HM_FOCUS,
  15046. HM_ALWAYS,
  15047. };
  15048. enum HorizontalAlignment
  15049. {
  15050. HA_LEFT,
  15051. HA_CENTER,
  15052. HA_RIGHT,
  15053. HA_CUSTOM,
  15054. };
  15055. enum HttpRequestState
  15056. {
  15057. HTTP_INITIALIZING,
  15058. HTTP_ERROR,
  15059. HTTP_OPEN,
  15060. HTTP_CLOSED,
  15061. };
  15062. enum IKAlgorithm
  15063. {
  15064. FABRIK,
  15065. };
  15066. enum InterpMethod
  15067. {
  15068. IM_NONE,
  15069. IM_LINEAR,
  15070. IM_SPLINE,
  15071. };
  15072. enum InterpolationMode
  15073. {
  15074. BEZIER_CURVE,
  15075. CATMULL_ROM_CURVE,
  15076. LINEAR_CURVE,
  15077. CATMULL_ROM_FULL_CURVE,
  15078. };
  15079. enum Intersection
  15080. {
  15081. OUTSIDE,
  15082. INTERSECTS,
  15083. INSIDE,
  15084. };
  15085. enum JSONNumberType
  15086. {
  15087. JSONNT_NAN,
  15088. JSONNT_INT,
  15089. JSONNT_UINT,
  15090. JSONNT_FLOAT_DOUBLE,
  15091. };
  15092. enum JSONValueType
  15093. {
  15094. JSON_NULL,
  15095. JSON_BOOL,
  15096. JSON_NUMBER,
  15097. JSON_STRING,
  15098. JSON_ARRAY,
  15099. JSON_OBJECT,
  15100. };
  15101. enum LayoutMode
  15102. {
  15103. LM_FREE,
  15104. LM_HORIZONTAL,
  15105. LM_VERTICAL,
  15106. };
  15107. enum LightType
  15108. {
  15109. LIGHT_DIRECTIONAL,
  15110. LIGHT_SPOT,
  15111. LIGHT_POINT,
  15112. };
  15113. enum LoadMode
  15114. {
  15115. LOAD_RESOURCES_ONLY,
  15116. LOAD_SCENE,
  15117. LOAD_SCENE_AND_RESOURCES,
  15118. };
  15119. enum LoopMode2D
  15120. {
  15121. LM_DEFAULT,
  15122. LM_FORCE_LOOPED,
  15123. LM_FORCE_CLAMPED,
  15124. };
  15125. enum MouseMode
  15126. {
  15127. MM_ABSOLUTE,
  15128. MM_RELATIVE,
  15129. MM_WRAP,
  15130. MM_FREE,
  15131. };
  15132. enum NavigationPushiness
  15133. {
  15134. NAVIGATIONPUSHINESS_LOW,
  15135. NAVIGATIONPUSHINESS_MEDIUM,
  15136. NAVIGATIONPUSHINESS_HIGH,
  15137. NAVIGATIONPUSHINESS_NONE,
  15138. };
  15139. enum NavigationQuality
  15140. {
  15141. NAVIGATIONQUALITY_LOW,
  15142. NAVIGATIONQUALITY_MEDIUM,
  15143. NAVIGATIONQUALITY_HIGH,
  15144. };
  15145. enum NavmeshPartitionType
  15146. {
  15147. NAVMESH_PARTITION_WATERSHED,
  15148. NAVMESH_PARTITION_MONOTONE,
  15149. };
  15150. enum Orientation
  15151. {
  15152. O_HORIZONTAL,
  15153. O_VERTICAL,
  15154. };
  15155. enum Orientation2D
  15156. {
  15157. O_ORTHOGONAL,
  15158. O_ISOMETRIC,
  15159. O_STAGGERED,
  15160. O_HEXAGONAL,
  15161. };
  15162. enum PassLightingMode
  15163. {
  15164. LIGHTING_UNLIT,
  15165. LIGHTING_PERVERTEX,
  15166. LIGHTING_PERPIXEL,
  15167. };
  15168. enum PrimitiveType
  15169. {
  15170. TRIANGLE_LIST,
  15171. LINE_LIST,
  15172. POINT_LIST,
  15173. TRIANGLE_STRIP,
  15174. LINE_STRIP,
  15175. TRIANGLE_FAN,
  15176. };
  15177. enum RayQueryLevel
  15178. {
  15179. RAY_AABB,
  15180. RAY_OBB,
  15181. RAY_TRIANGLE,
  15182. RAY_TRIANGLE_UV,
  15183. };
  15184. enum RenderCommandSortMode
  15185. {
  15186. SORT_FRONTTOBACK,
  15187. SORT_BACKTOFRONT,
  15188. };
  15189. enum RenderCommandType
  15190. {
  15191. CMD_NONE,
  15192. CMD_CLEAR,
  15193. CMD_SCENEPASS,
  15194. CMD_QUAD,
  15195. CMD_FORWARDLIGHTS,
  15196. CMD_LIGHTVOLUMES,
  15197. CMD_RENDERUI,
  15198. CMD_SENDEVENT,
  15199. };
  15200. enum RenderSurfaceUpdateMode
  15201. {
  15202. SURFACE_MANUALUPDATE,
  15203. SURFACE_UPDATEVISIBLE,
  15204. SURFACE_UPDATEALWAYS,
  15205. };
  15206. enum RenderTargetSizeMode
  15207. {
  15208. SIZE_ABSOLUTE,
  15209. SIZE_VIEWPORTDIVISOR,
  15210. SIZE_VIEWPORTMULTIPLIER,
  15211. };
  15212. enum ShadowQuality
  15213. {
  15214. SHADOWQUALITY_SIMPLE_16BIT,
  15215. SHADOWQUALITY_SIMPLE_24BIT,
  15216. SHADOWQUALITY_PCF_16BIT,
  15217. SHADOWQUALITY_PCF_24BIT,
  15218. SHADOWQUALITY_VSM,
  15219. SHADOWQUALITY_BLUR_VSM,
  15220. };
  15221. enum ShapeType
  15222. {
  15223. SHAPE_BOX,
  15224. SHAPE_SPHERE,
  15225. SHAPE_STATICPLANE,
  15226. SHAPE_CYLINDER,
  15227. SHAPE_CAPSULE,
  15228. SHAPE_CONE,
  15229. SHAPE_TRIANGLEMESH,
  15230. SHAPE_CONVEXHULL,
  15231. SHAPE_TERRAIN,
  15232. };
  15233. enum TextEffect
  15234. {
  15235. TE_NONE,
  15236. TE_SHADOW,
  15237. TE_STROKE,
  15238. };
  15239. enum TextureAddressMode
  15240. {
  15241. ADDRESS_WRAP,
  15242. ADDRESS_MIRROR,
  15243. ADDRESS_CLAMP,
  15244. ADDRESS_BORDER,
  15245. };
  15246. enum TextureCoordinate
  15247. {
  15248. COORD_U,
  15249. COORD_V,
  15250. COORD_W,
  15251. };
  15252. enum TextureFilterMode
  15253. {
  15254. FILTER_NEAREST,
  15255. FILTER_BILINEAR,
  15256. FILTER_TRILINEAR,
  15257. FILTER_ANISOTROPIC,
  15258. FILTER_NEAREST_ANISOTROPIC,
  15259. FILTER_DEFAULT,
  15260. };
  15261. enum TextureUnit
  15262. {
  15263. TU_DIFFUSE,
  15264. TU_ALBEDOBUFFER,
  15265. TU_NORMAL,
  15266. TU_NORMALBUFFER,
  15267. TU_SPECULAR,
  15268. TU_EMISSIVE,
  15269. TU_ENVIRONMENT,
  15270. TU_LIGHTRAMP,
  15271. TU_LIGHTSHAPE,
  15272. TU_SHADOWMAP,
  15273. TU_CUSTOM1,
  15274. TU_CUSTOM2,
  15275. TU_VOLUMEMAP,
  15276. TU_FACESELECT,
  15277. TU_INDIRECTION,
  15278. TU_DEPTHBUFFER,
  15279. TU_LIGHTBUFFER,
  15280. TU_ZONE,
  15281. MAX_MATERIAL_TEXTURE_UNITS,
  15282. MAX_TEXTURE_UNITS,
  15283. };
  15284. enum TextureUsage
  15285. {
  15286. TEXTURE_STATIC,
  15287. TEXTURE_DYNAMIC,
  15288. TEXTURE_RENDERTARGET,
  15289. TEXTURE_DEPTHSTENCIL,
  15290. };
  15291. enum TileMapLayerType2D
  15292. {
  15293. LT_TILE_LAYER,
  15294. LT_OBJECT_GROUP,
  15295. LT_IMAGE_LAYER,
  15296. LT_INVALID,
  15297. };
  15298. enum TileObjectType2D
  15299. {
  15300. OT_RECTANGLE,
  15301. OT_ELLIPSE,
  15302. OT_POLYGON,
  15303. OT_POLYLINE,
  15304. OT_TILE,
  15305. OT_INVALID,
  15306. };
  15307. enum TrailType
  15308. {
  15309. TT_FACE_CAMERA,
  15310. TT_BONE,
  15311. };
  15312. enum TransformSpace
  15313. {
  15314. TS_LOCAL,
  15315. TS_PARENT,
  15316. TS_WORLD,
  15317. };
  15318. enum TraversalMode
  15319. {
  15320. TM_BREADTH_FIRST,
  15321. TM_DEPTH_FIRST,
  15322. };
  15323. enum VariantType
  15324. {
  15325. VAR_NONE,
  15326. VAR_INT,
  15327. VAR_BOOL,
  15328. VAR_FLOAT,
  15329. VAR_VECTOR2,
  15330. VAR_VECTOR3,
  15331. VAR_VECTOR4,
  15332. VAR_QUATERNION,
  15333. VAR_COLOR,
  15334. VAR_STRING,
  15335. VAR_BUFFER,
  15336. VAR_VOIDPTR,
  15337. VAR_RESOURCEREF,
  15338. VAR_RESOURCEREFLIST,
  15339. VAR_VARIANTVECTOR,
  15340. VAR_VARIANTMAP,
  15341. VAR_INTRECT,
  15342. VAR_INTVECTOR2,
  15343. VAR_INTVECTOR3,
  15344. VAR_PTR,
  15345. VAR_MATRIX3,
  15346. VAR_MATRIX3X4,
  15347. VAR_MATRIX4,
  15348. VAR_DOUBLE,
  15349. VAR_STRINGVECTOR,
  15350. VAR_RECT,
  15351. };
  15352. enum VertexElementSemantic
  15353. {
  15354. SEM_POSITION,
  15355. SEM_NORMAL,
  15356. SEM_BINORMAL,
  15357. SEM_TANGENT,
  15358. SEM_TEXCOORD,
  15359. SEM_COLOR,
  15360. SEM_BLENDWEIGHTS,
  15361. SEM_BLENDINDICES,
  15362. SEM_OBJECTINDEX,
  15363. MAX_VERTEX_ELEMENT_SEMANTICS,
  15364. };
  15365. enum VertexElementType
  15366. {
  15367. TYPE_INT,
  15368. TYPE_FLOAT,
  15369. TYPE_VECTOR2,
  15370. TYPE_VECTOR3,
  15371. TYPE_VECTOR4,
  15372. TYPE_UBYTE4,
  15373. TYPE_UBYTE4_NORM,
  15374. MAX_VERTEX_ELEMENT_TYPES,
  15375. };
  15376. enum VerticalAlignment
  15377. {
  15378. VA_TOP,
  15379. VA_CENTER,
  15380. VA_BOTTOM,
  15381. VA_CUSTOM,
  15382. };
  15383. enum WrapMode
  15384. {
  15385. WM_LOOP,
  15386. WM_ONCE,
  15387. WM_CLAMP,
  15388. };
  15389. // Global functions
  15390. float Abs(float);
  15391. float Acos(float);
  15392. String AddTrailingSlash(const String&);
  15393. float Asin(float);
  15394. float Atan(float);
  15395. float Atan2(float, float);
  15396. float Ceil(float);
  15397. int CeilToInt(float);
  15398. float Clamp(float, float, float);
  15399. int Clamp(int, int, int);
  15400. void ClearDelayedExecute(const String& = String ( ));
  15401. VectorBuffer CompressVectorBuffer(VectorBuffer&);
  15402. float Cos(float);
  15403. uint CountSetBits(uint);
  15404. VectorBuffer DecompressVectorBuffer(VectorBuffer&);
  15405. void DelayedExecute(float, bool, const String&, const Array<Variant> = null);
  15406. bool Equals(float, float);
  15407. void ErrorDialog(const String&, const String&);
  15408. float Floor(float);
  15409. int FloorToInt(float);
  15410. float Fract(float);
  15411. uint GetAlphaFormat();
  15412. Array<String> GetArguments();
  15413. String GetConsoleInput();
  15414. uint GetDepthStencilFormat();
  15415. Object GetEventSender();
  15416. String GetExtension(const String&, bool = true);
  15417. String GetFileName(const String&);
  15418. String GetFileNameAndExtension(const String&, bool = false);
  15419. String GetFileSizeString(uint64);
  15420. uint GetFloat16Format();
  15421. uint GetFloat32Format();
  15422. uint GetFormat(const String&);
  15423. Variant GetGlobalVar(const String&);
  15424. String GetInternalPath(const String&);
  15425. uint GetLinearDepthFormat();
  15426. uint GetLuminanceAlphaFormat();
  15427. uint GetLuminanceFormat();
  15428. uint GetMaxBones();
  15429. String GetMiniDumpDir();
  15430. uint GetNumLogicalCPUs();
  15431. uint GetNumPhysicalCPUs();
  15432. Array<AttributeInfo> GetObjectAttributeInfos(const String&);
  15433. Array<String> GetObjectCategories();
  15434. Array<String> GetObjectsByCategory(const String&);
  15435. String GetParentPath(const String&);
  15436. String GetPath(const String&);
  15437. String GetPlatform();
  15438. uint64 GetTotalMemory();
  15439. uint GetRG16Format();
  15440. uint GetRGBA16Format();
  15441. uint GetRGBAFloat16Format();
  15442. uint GetRGBAFloat32Format();
  15443. uint GetRGBAFormat();
  15444. uint GetRGBFormat();
  15445. uint GetRGFloat16Format();
  15446. uint GetRGFloat32Format();
  15447. uint GetRandomSeed();
  15448. uint GetReadableDepthFormat();
  15449. String GetTextureUnitName(TextureUnit);
  15450. VariantType GetVariantTypeFromName(const String&);
  15451. String GetVariantTypeName(VariantType);
  15452. bool HasSubscribedToEvent(Object, const String&);
  15453. bool HasSubscribedToEvent(const String&);
  15454. float InverseLerp(float, float, float);
  15455. bool IsAbsolutePath(const String&);
  15456. bool IsAlpha(uint);
  15457. bool IsDigit(uint);
  15458. bool IsNaN(float);
  15459. bool IsPowerOfTwo(uint);
  15460. String Join(Array<String>&, const String&);
  15461. float Lerp(float, float, float);
  15462. float Ln(float);
  15463. void MarkNetworkUpdate();
  15464. float Max(float, float);
  15465. int Max(int, int);
  15466. float Min(float, float);
  15467. int Min(int, int);
  15468. float Mod(float, float);
  15469. uint NextPowerOfTwo(uint);
  15470. void OpenConsoleWindow();
  15471. float Pow(float, float);
  15472. void Print(bool, bool = false);
  15473. void Print(const String&, bool = false);
  15474. void Print(const Variant&, bool = false);
  15475. void Print(float, bool = false);
  15476. void Print(int, bool = false);
  15477. void Print(uint, bool = false);
  15478. void PrintCallStack(bool = false);
  15479. float Random();
  15480. float Random(float);
  15481. float Random(float, float);
  15482. int RandomInt();
  15483. int RandomInt(int);
  15484. int RandomInt(int, int);
  15485. float RandomNormal(float, float);
  15486. void RegisterEventName(const String&);
  15487. void Remove();
  15488. String RemoveTrailingSlash(const String&);
  15489. String ReplaceExtension(const String&, const String&);
  15490. float Round(float);
  15491. int RoundToInt(float);
  15492. uint SDBMHash(uint, uint8);
  15493. void SendEvent(const String&, VariantMap& = VariantMap ( ));
  15494. void SetGlobalVar(const String&, Variant&);
  15495. void SetMiniDumpDir(const String&);
  15496. void SetRandomSeed(uint);
  15497. float Sign(float);
  15498. float Sin(float);
  15499. float SmoothStep(float, float, float);
  15500. float Sqrt(float);
  15501. float StableRandom(const Vector2&);
  15502. float StableRandom(const Vector3&);
  15503. float StableRandom(float);
  15504. const String& GetTypeName(StringHash);
  15505. void SubscribeToEvent(Object, const String&, const String&);
  15506. void SubscribeToEvent(const String&, const String&);
  15507. float Tan(float);
  15508. uint ToLower(uint);
  15509. String ToStringHex(int);
  15510. uint ToUpper(uint);
  15511. void UnsubscribeFromAllEvents();
  15512. void UnsubscribeFromAllEventsExcept(Array<String>);
  15513. void UnsubscribeFromEvent(Object, const String&);
  15514. void UnsubscribeFromEvent(const String&);
  15515. void UnsubscribeFromEvents(Object);
  15516. Vector2 VectorCeil(const Vector2&);
  15517. Vector3 VectorCeil(const Vector3&);
  15518. Vector4 VectorCeil(const Vector4&);
  15519. IntVector2 VectorCeilToInt(const Vector2&);
  15520. IntVector3 VectorCeilToInt(const Vector3&);
  15521. Vector2 VectorFloor(const Vector2&);
  15522. Vector3 VectorFloor(const Vector3&);
  15523. Vector4 VectorFloor(const Vector4&);
  15524. IntVector2 VectorFloorToInt(const Vector2&);
  15525. IntVector3 VectorFloorToInt(const Vector3&);
  15526. Vector2 VectorLerp(const Vector2&, const Vector2&, const Vector2&);
  15527. Vector3 VectorLerp(const Vector3&, const Vector3&, const Vector3&);
  15528. Vector4 VectorLerp(const Vector4&, const Vector4&, const Vector4&);
  15529. IntVector2 VectorMax(const IntVector2&, const IntVector2&);
  15530. IntVector3 VectorMax(const IntVector3&, const IntVector3&);
  15531. Vector2 VectorMax(const Vector2&, const Vector2&);
  15532. Vector3 VectorMax(const Vector3&, const Vector3&);
  15533. Vector4 VectorMax(const Vector4&, const Vector4&);
  15534. IntVector2 VectorMin(const IntVector2&, const IntVector2&);
  15535. IntVector3 VectorMin(const IntVector3&, const IntVector3&);
  15536. Vector2 VectorMin(const Vector2&, const Vector2&);
  15537. Vector3 VectorMin(const Vector3&, const Vector3&);
  15538. Vector4 VectorMin(const Vector4&, const Vector4&);
  15539. Vector2 VectorRound(const Vector2&);
  15540. Vector3 VectorRound(const Vector3&);
  15541. Vector4 VectorRound(const Vector4&);
  15542. IntVector2 VectorRoundToInt(const Vector2&);
  15543. IntVector3 VectorRoundToInt(const Vector3&);
  15544. bool WriteDrawablesToOBJ(Array<Drawable>, File, bool, bool, bool = false);
  15545. // Global properties
  15546. DBAPI DBAPI;
  15547. Audio audio;
  15548. ResourceCache cache;
  15549. Console console;
  15550. Database database;
  15551. DebugHud debugHud;
  15552. DebugRenderer debugRenderer;
  15553. Engine engine;
  15554. FileSystem fileSystem;
  15555. VariantMap globalVars;
  15556. Graphics graphics;
  15557. Input input;
  15558. Localization localization;
  15559. Log log;
  15560. Network network;
  15561. Node node;
  15562. Octree octree;
  15563. PhysicsWorld physicsWorld;
  15564. PhysicsWorld2D physicsWorld2D;
  15565. Renderer renderer;
  15566. ResourceCache resourceCache;
  15567. Scene scene;
  15568. Script script;
  15569. ScriptFile scriptFile;
  15570. ScriptInstance self;
  15571. Time time;
  15572. UI ui;
  15573. // Global constants
  15574. uint AM_COMPONENTID;
  15575. uint AM_DEFAULT;
  15576. uint AM_FILE;
  15577. uint AM_FILEREADONLY;
  15578. uint AM_LATESTDATA;
  15579. uint AM_NET;
  15580. uint AM_NODEID;
  15581. uint AM_NODEIDVECTOR;
  15582. uint AM_NOEDIT;
  15583. Color BLACK;
  15584. Color BLUE;
  15585. uint8 CHANNEL_POSITION;
  15586. uint8 CHANNEL_ROTATION;
  15587. uint8 CHANNEL_SCALE;
  15588. uint CLEAR_COLOR;
  15589. uint CLEAR_DEPTH;
  15590. uint CLEAR_STENCIL;
  15591. int CONTROLLER_AXIS_LEFTX;
  15592. int CONTROLLER_AXIS_LEFTY;
  15593. int CONTROLLER_AXIS_RIGHTX;
  15594. int CONTROLLER_AXIS_RIGHTY;
  15595. int CONTROLLER_AXIS_TRIGGERLEFT;
  15596. int CONTROLLER_AXIS_TRIGGERRIGHT;
  15597. int CONTROLLER_BUTTON_A;
  15598. int CONTROLLER_BUTTON_B;
  15599. int CONTROLLER_BUTTON_BACK;
  15600. int CONTROLLER_BUTTON_DPAD_DOWN;
  15601. int CONTROLLER_BUTTON_DPAD_LEFT;
  15602. int CONTROLLER_BUTTON_DPAD_RIGHT;
  15603. int CONTROLLER_BUTTON_DPAD_UP;
  15604. int CONTROLLER_BUTTON_GUIDE;
  15605. int CONTROLLER_BUTTON_LEFTSHOULDER;
  15606. int CONTROLLER_BUTTON_LEFTSTICK;
  15607. int CONTROLLER_BUTTON_RIGHTSHOULDER;
  15608. int CONTROLLER_BUTTON_RIGHTSTICK;
  15609. int CONTROLLER_BUTTON_START;
  15610. int CONTROLLER_BUTTON_X;
  15611. int CONTROLLER_BUTTON_Y;
  15612. Color CYAN;
  15613. uint DD_DISABLED;
  15614. uint DD_SOURCE;
  15615. uint DD_SOURCE_AND_TARGET;
  15616. uint DD_TARGET;
  15617. uint DEBUGHUD_SHOW_ALL;
  15618. uint DEBUGHUD_SHOW_EVENTPROFILER;
  15619. uint DEBUGHUD_SHOW_MEMORY;
  15620. uint DEBUGHUD_SHOW_MODE;
  15621. uint DEBUGHUD_SHOW_NONE;
  15622. uint DEBUGHUD_SHOW_PROFILER;
  15623. uint DEBUGHUD_SHOW_STATS;
  15624. uint DEFAULT_LIGHTMASK;
  15625. uint DEFAULT_VIEWMASK;
  15626. uint DRAWABLE_ANY;
  15627. uint DRAWABLE_GEOMETRY;
  15628. uint DRAWABLE_GEOMETRY2D;
  15629. uint DRAWABLE_LIGHT;
  15630. uint DRAWABLE_ZONE;
  15631. uint FIRST_LOCAL_ID;
  15632. uint FIRST_REPLICATED_ID;
  15633. Color GRAY;
  15634. Color GREEN;
  15635. int HAT_CENTER;
  15636. int HAT_DOWN;
  15637. int HAT_LEFT;
  15638. int HAT_RIGHT;
  15639. int HAT_UP;
  15640. int KEY_0;
  15641. int KEY_1;
  15642. int KEY_2;
  15643. int KEY_3;
  15644. int KEY_4;
  15645. int KEY_5;
  15646. int KEY_6;
  15647. int KEY_7;
  15648. int KEY_8;
  15649. int KEY_9;
  15650. int KEY_A;
  15651. int KEY_ALT;
  15652. int KEY_APPLICATION;
  15653. int KEY_B;
  15654. int KEY_BACKSPACE;
  15655. int KEY_C;
  15656. int KEY_CAPSLOCK;
  15657. int KEY_CTRL;
  15658. int KEY_D;
  15659. int KEY_DELETE;
  15660. int KEY_DOWN;
  15661. int KEY_E;
  15662. int KEY_END;
  15663. int KEY_ESCAPE;
  15664. int KEY_F;
  15665. int KEY_F1;
  15666. int KEY_F10;
  15667. int KEY_F11;
  15668. int KEY_F12;
  15669. int KEY_F13;
  15670. int KEY_F14;
  15671. int KEY_F15;
  15672. int KEY_F16;
  15673. int KEY_F17;
  15674. int KEY_F18;
  15675. int KEY_F19;
  15676. int KEY_F2;
  15677. int KEY_F20;
  15678. int KEY_F21;
  15679. int KEY_F22;
  15680. int KEY_F23;
  15681. int KEY_F24;
  15682. int KEY_F3;
  15683. int KEY_F4;
  15684. int KEY_F5;
  15685. int KEY_F6;
  15686. int KEY_F7;
  15687. int KEY_F8;
  15688. int KEY_F9;
  15689. int KEY_G;
  15690. int KEY_GUI;
  15691. int KEY_H;
  15692. int KEY_HOME;
  15693. int KEY_I;
  15694. int KEY_INSERT;
  15695. int KEY_J;
  15696. int KEY_K;
  15697. int KEY_KP_0;
  15698. int KEY_KP_1;
  15699. int KEY_KP_2;
  15700. int KEY_KP_3;
  15701. int KEY_KP_4;
  15702. int KEY_KP_5;
  15703. int KEY_KP_6;
  15704. int KEY_KP_7;
  15705. int KEY_KP_8;
  15706. int KEY_KP_9;
  15707. int KEY_KP_DIVIDE;
  15708. int KEY_KP_ENTER;
  15709. int KEY_KP_MINUS;
  15710. int KEY_KP_MULTIPLY;
  15711. int KEY_KP_PERIOD;
  15712. int KEY_KP_PLUS;
  15713. int KEY_L;
  15714. int KEY_LALT;
  15715. int KEY_LCTRL;
  15716. int KEY_LEFT;
  15717. int KEY_LGUI;
  15718. int KEY_LSHIFT;
  15719. int KEY_M;
  15720. int KEY_N;
  15721. int KEY_NUMLOCKCLEAR;
  15722. int KEY_O;
  15723. int KEY_P;
  15724. int KEY_PAGEDOWN;
  15725. int KEY_PAGEUP;
  15726. int KEY_PAUSE;
  15727. int KEY_PRINTSCREEN;
  15728. int KEY_Q;
  15729. int KEY_R;
  15730. int KEY_RALT;
  15731. int KEY_RCTRL;
  15732. int KEY_RETURN;
  15733. int KEY_RETURN2;
  15734. int KEY_RGUI;
  15735. int KEY_RIGHT;
  15736. int KEY_RSHIFT;
  15737. int KEY_S;
  15738. int KEY_SCROLLLOCK;
  15739. int KEY_SELECT;
  15740. int KEY_SHIFT;
  15741. int KEY_SPACE;
  15742. int KEY_T;
  15743. int KEY_TAB;
  15744. int KEY_U;
  15745. int KEY_UNKNOWN;
  15746. int KEY_UP;
  15747. int KEY_V;
  15748. int KEY_W;
  15749. int KEY_X;
  15750. int KEY_Y;
  15751. int KEY_Z;
  15752. uint LAST_LOCAL_ID;
  15753. uint LAST_REPLICATED_ID;
  15754. int LOG_DEBUG;
  15755. int LOG_ERROR;
  15756. int LOG_INFO;
  15757. int LOG_NONE;
  15758. int LOG_WARNING;
  15759. Color MAGENTA;
  15760. uint MASK_BLENDINDICES;
  15761. uint MASK_BLENDWEIGHTS;
  15762. uint MASK_COLOR;
  15763. uint MASK_CUBETEXCOORD1;
  15764. uint MASK_CUBETEXCOORD2;
  15765. uint MASK_INSTANCEMATRIX1;
  15766. uint MASK_INSTANCEMATRIX2;
  15767. uint MASK_INSTANCEMATRIX3;
  15768. uint MASK_NONE;
  15769. uint MASK_NORMAL;
  15770. uint MASK_OBJECTINDEX;
  15771. uint MASK_POSITION;
  15772. uint MASK_TANGENT;
  15773. uint MASK_TEXCOORD1;
  15774. uint MASK_TEXCOORD2;
  15775. int MOUSEB_LEFT;
  15776. int MOUSEB_MIDDLE;
  15777. int MOUSEB_RIGHT;
  15778. float M_DEGTORAD;
  15779. float M_DEGTORAD_2;
  15780. float M_EPSILON;
  15781. float M_HALF_PI;
  15782. float M_INFINITY;
  15783. float M_LARGE_EPSILON;
  15784. float M_LARGE_VALUE;
  15785. int M_MAX_INT;
  15786. uint M_MAX_UNSIGNED;
  15787. int M_MIN_INT;
  15788. uint M_MIN_UNSIGNED;
  15789. float M_PI;
  15790. float M_RADTODEG;
  15791. uint NPOS;
  15792. float PIXEL_SIZE;
  15793. int QUALITY_HIGH;
  15794. int QUALITY_LOW;
  15795. int QUALITY_MAX;
  15796. int QUALITY_MEDIUM;
  15797. int QUAL_ALT;
  15798. int QUAL_ANY;
  15799. int QUAL_CTRL;
  15800. int QUAL_SHIFT;
  15801. Color RED;
  15802. int SCANCODE_0;
  15803. int SCANCODE_1;
  15804. int SCANCODE_2;
  15805. int SCANCODE_3;
  15806. int SCANCODE_4;
  15807. int SCANCODE_5;
  15808. int SCANCODE_6;
  15809. int SCANCODE_7;
  15810. int SCANCODE_8;
  15811. int SCANCODE_9;
  15812. int SCANCODE_A;
  15813. int SCANCODE_AC_BACK;
  15814. int SCANCODE_AC_BOOKMARKS;
  15815. int SCANCODE_AC_FORWARD;
  15816. int SCANCODE_AC_HOME;
  15817. int SCANCODE_AC_REFRESH;
  15818. int SCANCODE_AC_SEARCH;
  15819. int SCANCODE_AC_STOP;
  15820. int SCANCODE_AGAIN;
  15821. int SCANCODE_ALT;
  15822. int SCANCODE_ALTERASE;
  15823. int SCANCODE_APOSTROPHE;
  15824. int SCANCODE_APP1;
  15825. int SCANCODE_APP2;
  15826. int SCANCODE_APPLICATION;
  15827. int SCANCODE_AUDIOMUTE;
  15828. int SCANCODE_AUDIONEXT;
  15829. int SCANCODE_AUDIOPLAY;
  15830. int SCANCODE_AUDIOPREV;
  15831. int SCANCODE_AUDIOSTOP;
  15832. int SCANCODE_B;
  15833. int SCANCODE_BACKSLASH;
  15834. int SCANCODE_BACKSPACE;
  15835. int SCANCODE_BRIGHTNESSDOWN;
  15836. int SCANCODE_BRIGHTNESSUP;
  15837. int SCANCODE_C;
  15838. int SCANCODE_CALCULATOR;
  15839. int SCANCODE_CANCEL;
  15840. int SCANCODE_CAPSLOCK;
  15841. int SCANCODE_CLEAR;
  15842. int SCANCODE_CLEARAGAIN;
  15843. int SCANCODE_COMMA;
  15844. int SCANCODE_COMPUTER;
  15845. int SCANCODE_COPY;
  15846. int SCANCODE_CRSEL;
  15847. int SCANCODE_CTRL;
  15848. int SCANCODE_CURRENCYSUBUNIT;
  15849. int SCANCODE_CURRENCYUNIT;
  15850. int SCANCODE_CUT;
  15851. int SCANCODE_D;
  15852. int SCANCODE_DECIMALSEPARATOR;
  15853. int SCANCODE_DELETE;
  15854. int SCANCODE_DISPLAYSWITCH;
  15855. int SCANCODE_DOWN;
  15856. int SCANCODE_E;
  15857. int SCANCODE_EJECT;
  15858. int SCANCODE_END;
  15859. int SCANCODE_EQUALS;
  15860. int SCANCODE_ESCAPE;
  15861. int SCANCODE_EXECUTE;
  15862. int SCANCODE_EXSEL;
  15863. int SCANCODE_F;
  15864. int SCANCODE_F1;
  15865. int SCANCODE_F10;
  15866. int SCANCODE_F11;
  15867. int SCANCODE_F12;
  15868. int SCANCODE_F13;
  15869. int SCANCODE_F14;
  15870. int SCANCODE_F15;
  15871. int SCANCODE_F16;
  15872. int SCANCODE_F17;
  15873. int SCANCODE_F18;
  15874. int SCANCODE_F19;
  15875. int SCANCODE_F2;
  15876. int SCANCODE_F20;
  15877. int SCANCODE_F21;
  15878. int SCANCODE_F22;
  15879. int SCANCODE_F23;
  15880. int SCANCODE_F24;
  15881. int SCANCODE_F3;
  15882. int SCANCODE_F4;
  15883. int SCANCODE_F5;
  15884. int SCANCODE_F6;
  15885. int SCANCODE_F7;
  15886. int SCANCODE_F8;
  15887. int SCANCODE_F9;
  15888. int SCANCODE_FIND;
  15889. int SCANCODE_G;
  15890. int SCANCODE_GRAVE;
  15891. int SCANCODE_GUI;
  15892. int SCANCODE_H;
  15893. int SCANCODE_HELP;
  15894. int SCANCODE_HOME;
  15895. int SCANCODE_I;
  15896. int SCANCODE_INSERT;
  15897. int SCANCODE_INTERNATIONAL1;
  15898. int SCANCODE_INTERNATIONAL2;
  15899. int SCANCODE_INTERNATIONAL3;
  15900. int SCANCODE_INTERNATIONAL4;
  15901. int SCANCODE_INTERNATIONAL5;
  15902. int SCANCODE_INTERNATIONAL6;
  15903. int SCANCODE_INTERNATIONAL7;
  15904. int SCANCODE_INTERNATIONAL8;
  15905. int SCANCODE_INTERNATIONAL9;
  15906. int SCANCODE_J;
  15907. int SCANCODE_K;
  15908. int SCANCODE_KBDILLUMDOWN;
  15909. int SCANCODE_KBDILLUMTOGGLE;
  15910. int SCANCODE_KBDILLUMUP;
  15911. int SCANCODE_KP_0;
  15912. int SCANCODE_KP_00;
  15913. int SCANCODE_KP_000;
  15914. int SCANCODE_KP_1;
  15915. int SCANCODE_KP_2;
  15916. int SCANCODE_KP_3;
  15917. int SCANCODE_KP_4;
  15918. int SCANCODE_KP_5;
  15919. int SCANCODE_KP_6;
  15920. int SCANCODE_KP_7;
  15921. int SCANCODE_KP_8;
  15922. int SCANCODE_KP_9;
  15923. int SCANCODE_KP_A;
  15924. int SCANCODE_KP_AMPERSAND;
  15925. int SCANCODE_KP_AT;
  15926. int SCANCODE_KP_B;
  15927. int SCANCODE_KP_BACKSPACE;
  15928. int SCANCODE_KP_BINARY;
  15929. int SCANCODE_KP_C;
  15930. int SCANCODE_KP_CLEAR;
  15931. int SCANCODE_KP_CLEARENTRY;
  15932. int SCANCODE_KP_COLON;
  15933. int SCANCODE_KP_COMMA;
  15934. int SCANCODE_KP_D;
  15935. int SCANCODE_KP_DBLAMPERSAND;
  15936. int SCANCODE_KP_DBLVERTICALBAR;
  15937. int SCANCODE_KP_DECIMAL;
  15938. int SCANCODE_KP_DIVIDE;
  15939. int SCANCODE_KP_E;
  15940. int SCANCODE_KP_ENTER;
  15941. int SCANCODE_KP_EQUALS;
  15942. int SCANCODE_KP_EQUALSAS400;
  15943. int SCANCODE_KP_EXCLAM;
  15944. int SCANCODE_KP_F;
  15945. int SCANCODE_KP_GREATER;
  15946. int SCANCODE_KP_HASH;
  15947. int SCANCODE_KP_HEXADECIMAL;
  15948. int SCANCODE_KP_LEFTBRACE;
  15949. int SCANCODE_KP_LEFTPAREN;
  15950. int SCANCODE_KP_LESS;
  15951. int SCANCODE_KP_MEMADD;
  15952. int SCANCODE_KP_MEMCLEAR;
  15953. int SCANCODE_KP_MEMDIVIDE;
  15954. int SCANCODE_KP_MEMMULTIPLY;
  15955. int SCANCODE_KP_MEMRECALL;
  15956. int SCANCODE_KP_MEMSTORE;
  15957. int SCANCODE_KP_MEMSUBTRACT;
  15958. int SCANCODE_KP_MINUS;
  15959. int SCANCODE_KP_MULTIPLY;
  15960. int SCANCODE_KP_OCTAL;
  15961. int SCANCODE_KP_PERCENT;
  15962. int SCANCODE_KP_PERIOD;
  15963. int SCANCODE_KP_PLUS;
  15964. int SCANCODE_KP_PLUSMINUS;
  15965. int SCANCODE_KP_POWER;
  15966. int SCANCODE_KP_RIGHTBRACE;
  15967. int SCANCODE_KP_RIGHTPAREN;
  15968. int SCANCODE_KP_SPACE;
  15969. int SCANCODE_KP_TAB;
  15970. int SCANCODE_KP_VERTICALBAR;
  15971. int SCANCODE_KP_XOR;
  15972. int SCANCODE_L;
  15973. int SCANCODE_LALT;
  15974. int SCANCODE_LANG1;
  15975. int SCANCODE_LANG2;
  15976. int SCANCODE_LANG3;
  15977. int SCANCODE_LANG4;
  15978. int SCANCODE_LANG5;
  15979. int SCANCODE_LANG6;
  15980. int SCANCODE_LANG7;
  15981. int SCANCODE_LANG8;
  15982. int SCANCODE_LANG9;
  15983. int SCANCODE_LCTRL;
  15984. int SCANCODE_LEFT;
  15985. int SCANCODE_LEFTBRACKET;
  15986. int SCANCODE_LGUI;
  15987. int SCANCODE_LSHIFT;
  15988. int SCANCODE_M;
  15989. int SCANCODE_MAIL;
  15990. int SCANCODE_MEDIASELECT;
  15991. int SCANCODE_MENU;
  15992. int SCANCODE_MINUS;
  15993. int SCANCODE_MODE;
  15994. int SCANCODE_MUTE;
  15995. int SCANCODE_N;
  15996. int SCANCODE_NONUSBACKSLASH;
  15997. int SCANCODE_NONUSHASH;
  15998. int SCANCODE_NUMLOCKCLEAR;
  15999. int SCANCODE_O;
  16000. int SCANCODE_OPER;
  16001. int SCANCODE_OUT;
  16002. int SCANCODE_P;
  16003. int SCANCODE_PAGEDOWN;
  16004. int SCANCODE_PAGEUP;
  16005. int SCANCODE_PASTE;
  16006. int SCANCODE_PAUSE;
  16007. int SCANCODE_PERIOD;
  16008. int SCANCODE_POWER;
  16009. int SCANCODE_PRINTSCREEN;
  16010. int SCANCODE_PRIOR;
  16011. int SCANCODE_Q;
  16012. int SCANCODE_R;
  16013. int SCANCODE_RALT;
  16014. int SCANCODE_RCTRL;
  16015. int SCANCODE_RETURN;
  16016. int SCANCODE_RETURN2;
  16017. int SCANCODE_RGUI;
  16018. int SCANCODE_RIGHT;
  16019. int SCANCODE_RIGHTBRACKET;
  16020. int SCANCODE_RSHIFT;
  16021. int SCANCODE_S;
  16022. int SCANCODE_SCROLLLOCK;
  16023. int SCANCODE_SELECT;
  16024. int SCANCODE_SEMICOLON;
  16025. int SCANCODE_SEPARATOR;
  16026. int SCANCODE_SHIFT;
  16027. int SCANCODE_SLASH;
  16028. int SCANCODE_SLEEP;
  16029. int SCANCODE_SPACE;
  16030. int SCANCODE_STOP;
  16031. int SCANCODE_SYSREQ;
  16032. int SCANCODE_T;
  16033. int SCANCODE_TAB;
  16034. int SCANCODE_THOUSANDSSEPARATOR;
  16035. int SCANCODE_U;
  16036. int SCANCODE_UNDO;
  16037. int SCANCODE_UNKNOWN;
  16038. int SCANCODE_UP;
  16039. int SCANCODE_V;
  16040. int SCANCODE_VOLUMEDOWN;
  16041. int SCANCODE_VOLUMEUP;
  16042. int SCANCODE_W;
  16043. int SCANCODE_WWW;
  16044. int SCANCODE_X;
  16045. int SCANCODE_Y;
  16046. int SCANCODE_Z;
  16047. uint SCAN_DIRS;
  16048. uint SCAN_FILES;
  16049. uint SCAN_HIDDEN;
  16050. String SOUND_AMBIENT;
  16051. String SOUND_EFFECT;
  16052. String SOUND_MASTER;
  16053. String SOUND_MUSIC;
  16054. String SOUND_VOICE;
  16055. Color TRANSPARENT;
  16056. uint VO_DISABLE_OCCLUSION;
  16057. uint VO_DISABLE_SHADOWS;
  16058. uint VO_LOW_MATERIAL_QUALITY;
  16059. uint VO_NONE;
  16060. Color WHITE;
  16061. Color YELLOW;