MathLuaAPI.cpp 634 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078
  1. /*
  2. ** Lua binding: Math
  3. ** Generated automatically by tolua++-1.0.92 on 07/02/13 20:27:49.
  4. */
  5. //
  6. // Copyright (c) 2008-2013 the Urho3D project.
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining a copy
  9. // of this software and associated documentation files (the "Software"), to deal
  10. // in the Software without restriction, including without limitation the rights
  11. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. // copies of the Software, and to permit persons to whom the Software is
  13. // furnished to do so, subject to the following conditions:
  14. //
  15. // The above copyright notice and this permission notice shall be included in
  16. // all copies or substantial portions of the Software.
  17. //
  18. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. // THE SOFTWARE.
  25. //
  26. #include "Precompiled.h"
  27. #include "tolua++.h"
  28. /* Exported function */
  29. TOLUA_API int tolua_Math_open (lua_State* tolua_S);
  30. #define TOLUA_RELEASE
  31. #include "MathLuaAPI.h"
  32. #include "AreaAllocator.h"
  33. #include "BoundingBox.h"
  34. #include "Color.h"
  35. #include "Frustum.h"
  36. #include "MathDefs.h"
  37. #include "Matrix3.h"
  38. #include "Matrix3x4.h"
  39. #include "Matrix4.h"
  40. #include "Plane.h"
  41. #include "Polyhedron.h"
  42. #include "Quaternion.h"
  43. #include "Random.h"
  44. #include "Ray.h"
  45. #include "Rect.h"
  46. #include "Sphere.h"
  47. #include "StringHash.h"
  48. #include "Vector2.h"
  49. #include "Vector3.h"
  50. #include "Vector4.h"
  51. using namespace Urho3D;
  52. #pragma warning(disable:4800)
  53. /* function to release collected object via destructor */
  54. #ifdef __cplusplus
  55. static int tolua_collect_Quaternion (lua_State* tolua_S)
  56. {
  57. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  58. Mtolua_delete(self);
  59. return 0;
  60. }
  61. static int tolua_collect_Color (lua_State* tolua_S)
  62. {
  63. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  64. Mtolua_delete(self);
  65. return 0;
  66. }
  67. static int tolua_collect_ShortStringHash (lua_State* tolua_S)
  68. {
  69. ShortStringHash* self = (ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  70. Mtolua_delete(self);
  71. return 0;
  72. }
  73. static int tolua_collect_StringHash (lua_State* tolua_S)
  74. {
  75. StringHash* self = (StringHash*) tolua_tousertype(tolua_S,1,0);
  76. Mtolua_delete(self);
  77. return 0;
  78. }
  79. static int tolua_collect_Vector3 (lua_State* tolua_S)
  80. {
  81. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  82. Mtolua_delete(self);
  83. return 0;
  84. }
  85. static int tolua_collect_Sphere (lua_State* tolua_S)
  86. {
  87. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  88. Mtolua_delete(self);
  89. return 0;
  90. }
  91. static int tolua_collect_Vector4 (lua_State* tolua_S)
  92. {
  93. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  94. Mtolua_delete(self);
  95. return 0;
  96. }
  97. static int tolua_collect_IntRect (lua_State* tolua_S)
  98. {
  99. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  100. Mtolua_delete(self);
  101. return 0;
  102. }
  103. static int tolua_collect_Matrix3x4 (lua_State* tolua_S)
  104. {
  105. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  106. Mtolua_delete(self);
  107. return 0;
  108. }
  109. static int tolua_collect_String (lua_State* tolua_S)
  110. {
  111. String* self = (String*) tolua_tousertype(tolua_S,1,0);
  112. Mtolua_delete(self);
  113. return 0;
  114. }
  115. static int tolua_collect_Matrix3 (lua_State* tolua_S)
  116. {
  117. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  118. Mtolua_delete(self);
  119. return 0;
  120. }
  121. static int tolua_collect_Plane (lua_State* tolua_S)
  122. {
  123. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  124. Mtolua_delete(self);
  125. return 0;
  126. }
  127. static int tolua_collect_Polyhedron (lua_State* tolua_S)
  128. {
  129. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  130. Mtolua_delete(self);
  131. return 0;
  132. }
  133. static int tolua_collect_Ray (lua_State* tolua_S)
  134. {
  135. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  136. Mtolua_delete(self);
  137. return 0;
  138. }
  139. static int tolua_collect_Rect (lua_State* tolua_S)
  140. {
  141. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  142. Mtolua_delete(self);
  143. return 0;
  144. }
  145. static int tolua_collect_Frustum (lua_State* tolua_S)
  146. {
  147. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  148. Mtolua_delete(self);
  149. return 0;
  150. }
  151. static int tolua_collect_Vector2 (lua_State* tolua_S)
  152. {
  153. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  154. Mtolua_delete(self);
  155. return 0;
  156. }
  157. static int tolua_collect_BoundingBox (lua_State* tolua_S)
  158. {
  159. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  160. Mtolua_delete(self);
  161. return 0;
  162. }
  163. static int tolua_collect_AreaAllocator (lua_State* tolua_S)
  164. {
  165. AreaAllocator* self = (AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  166. Mtolua_delete(self);
  167. return 0;
  168. }
  169. static int tolua_collect_Matrix4 (lua_State* tolua_S)
  170. {
  171. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  172. Mtolua_delete(self);
  173. return 0;
  174. }
  175. static int tolua_collect_IntVector2 (lua_State* tolua_S)
  176. {
  177. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  178. Mtolua_delete(self);
  179. return 0;
  180. }
  181. #endif
  182. /* function to register type */
  183. static void tolua_reg_types (lua_State* tolua_S)
  184. {
  185. tolua_usertype(tolua_S,"String");
  186. tolua_usertype(tolua_S,"AreaAllocator");
  187. tolua_usertype(tolua_S,"Vector4");
  188. tolua_usertype(tolua_S,"Vector3");
  189. tolua_usertype(tolua_S,"BoundingBox");
  190. tolua_usertype(tolua_S,"IntVector2");
  191. tolua_usertype(tolua_S,"Matrix3x4");
  192. tolua_usertype(tolua_S,"IntRect");
  193. tolua_usertype(tolua_S,"Quaternion");
  194. tolua_usertype(tolua_S,"StringHash");
  195. tolua_usertype(tolua_S,"Matrix3");
  196. tolua_usertype(tolua_S,"Plane");
  197. tolua_usertype(tolua_S,"Polyhedron");
  198. tolua_usertype(tolua_S,"Ray");
  199. tolua_usertype(tolua_S,"Rect");
  200. tolua_usertype(tolua_S,"Frustum");
  201. tolua_usertype(tolua_S,"Vector2");
  202. tolua_usertype(tolua_S,"Sphere");
  203. tolua_usertype(tolua_S,"Color");
  204. tolua_usertype(tolua_S,"Matrix4");
  205. tolua_usertype(tolua_S,"ShortStringHash");
  206. }
  207. /* method: new of class AreaAllocator */
  208. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new00
  209. static int tolua_Math_AreaAllocator_new00(lua_State* tolua_S)
  210. {
  211. #ifndef TOLUA_RELEASE
  212. tolua_Error tolua_err;
  213. if (
  214. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  215. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  216. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  217. !tolua_isnoobj(tolua_S,4,&tolua_err)
  218. )
  219. goto tolua_lerror;
  220. else
  221. #endif
  222. {
  223. int width = ((int) tolua_tonumber(tolua_S,2,0));
  224. int height = ((int) tolua_tonumber(tolua_S,3,0));
  225. {
  226. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height));
  227. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  228. }
  229. }
  230. return 1;
  231. #ifndef TOLUA_RELEASE
  232. tolua_lerror:
  233. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  234. return 0;
  235. #endif
  236. }
  237. #endif //#ifndef TOLUA_DISABLE
  238. /* method: new_local of class AreaAllocator */
  239. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new00_local
  240. static int tolua_Math_AreaAllocator_new00_local(lua_State* tolua_S)
  241. {
  242. #ifndef TOLUA_RELEASE
  243. tolua_Error tolua_err;
  244. if (
  245. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  246. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  247. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  248. !tolua_isnoobj(tolua_S,4,&tolua_err)
  249. )
  250. goto tolua_lerror;
  251. else
  252. #endif
  253. {
  254. int width = ((int) tolua_tonumber(tolua_S,2,0));
  255. int height = ((int) tolua_tonumber(tolua_S,3,0));
  256. {
  257. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height));
  258. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  259. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  260. }
  261. }
  262. return 1;
  263. #ifndef TOLUA_RELEASE
  264. tolua_lerror:
  265. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  266. return 0;
  267. #endif
  268. }
  269. #endif //#ifndef TOLUA_DISABLE
  270. /* method: new of class AreaAllocator */
  271. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new01
  272. static int tolua_Math_AreaAllocator_new01(lua_State* tolua_S)
  273. {
  274. tolua_Error tolua_err;
  275. if (
  276. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  277. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  278. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  279. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  280. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  281. !tolua_isnoobj(tolua_S,6,&tolua_err)
  282. )
  283. goto tolua_lerror;
  284. else
  285. {
  286. int width = ((int) tolua_tonumber(tolua_S,2,0));
  287. int height = ((int) tolua_tonumber(tolua_S,3,0));
  288. int maxWidth = ((int) tolua_tonumber(tolua_S,4,0));
  289. int maxHeight = ((int) tolua_tonumber(tolua_S,5,0));
  290. {
  291. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height,maxWidth,maxHeight));
  292. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  293. }
  294. }
  295. return 1;
  296. tolua_lerror:
  297. return tolua_Math_AreaAllocator_new00(tolua_S);
  298. }
  299. #endif //#ifndef TOLUA_DISABLE
  300. /* method: new_local of class AreaAllocator */
  301. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new01_local
  302. static int tolua_Math_AreaAllocator_new01_local(lua_State* tolua_S)
  303. {
  304. tolua_Error tolua_err;
  305. if (
  306. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  307. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  308. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  309. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  310. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  311. !tolua_isnoobj(tolua_S,6,&tolua_err)
  312. )
  313. goto tolua_lerror;
  314. else
  315. {
  316. int width = ((int) tolua_tonumber(tolua_S,2,0));
  317. int height = ((int) tolua_tonumber(tolua_S,3,0));
  318. int maxWidth = ((int) tolua_tonumber(tolua_S,4,0));
  319. int maxHeight = ((int) tolua_tonumber(tolua_S,5,0));
  320. {
  321. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height,maxWidth,maxHeight));
  322. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  323. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  324. }
  325. }
  326. return 1;
  327. tolua_lerror:
  328. return tolua_Math_AreaAllocator_new00_local(tolua_S);
  329. }
  330. #endif //#ifndef TOLUA_DISABLE
  331. /* method: Reset of class AreaAllocator */
  332. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_Reset00
  333. static int tolua_Math_AreaAllocator_Reset00(lua_State* tolua_S)
  334. {
  335. #ifndef TOLUA_RELEASE
  336. tolua_Error tolua_err;
  337. if (
  338. !tolua_isusertype(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  339. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  340. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  341. !tolua_isnoobj(tolua_S,4,&tolua_err)
  342. )
  343. goto tolua_lerror;
  344. else
  345. #endif
  346. {
  347. AreaAllocator* self = (AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  348. int width = ((int) tolua_tonumber(tolua_S,2,0));
  349. int height = ((int) tolua_tonumber(tolua_S,3,0));
  350. #ifndef TOLUA_RELEASE
  351. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Reset'", NULL);
  352. #endif
  353. {
  354. self->Reset(width,height);
  355. }
  356. }
  357. return 0;
  358. #ifndef TOLUA_RELEASE
  359. tolua_lerror:
  360. tolua_error(tolua_S,"#ferror in function 'Reset'.",&tolua_err);
  361. return 0;
  362. #endif
  363. }
  364. #endif //#ifndef TOLUA_DISABLE
  365. /* method: Allocate of class AreaAllocator */
  366. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_Allocate00
  367. static int tolua_Math_AreaAllocator_Allocate00(lua_State* tolua_S)
  368. {
  369. #ifndef TOLUA_RELEASE
  370. tolua_Error tolua_err;
  371. if (
  372. !tolua_isusertype(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  373. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  374. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  375. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  376. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  377. !tolua_isnoobj(tolua_S,6,&tolua_err)
  378. )
  379. goto tolua_lerror;
  380. else
  381. #endif
  382. {
  383. AreaAllocator* self = (AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  384. int width = ((int) tolua_tonumber(tolua_S,2,0));
  385. int height = ((int) tolua_tonumber(tolua_S,3,0));
  386. int x = ((int) tolua_tonumber(tolua_S,4,0));
  387. int y = ((int) tolua_tonumber(tolua_S,5,0));
  388. #ifndef TOLUA_RELEASE
  389. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Allocate'", NULL);
  390. #endif
  391. {
  392. bool tolua_ret = (bool) self->Allocate(width,height,x,y);
  393. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  394. tolua_pushnumber(tolua_S,(lua_Number)x);
  395. tolua_pushnumber(tolua_S,(lua_Number)y);
  396. }
  397. }
  398. return 3;
  399. #ifndef TOLUA_RELEASE
  400. tolua_lerror:
  401. tolua_error(tolua_S,"#ferror in function 'Allocate'.",&tolua_err);
  402. return 0;
  403. #endif
  404. }
  405. #endif //#ifndef TOLUA_DISABLE
  406. /* method: GetWidth of class AreaAllocator */
  407. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_GetWidth00
  408. static int tolua_Math_AreaAllocator_GetWidth00(lua_State* tolua_S)
  409. {
  410. #ifndef TOLUA_RELEASE
  411. tolua_Error tolua_err;
  412. if (
  413. !tolua_isusertype(tolua_S,1,"const AreaAllocator",0,&tolua_err) ||
  414. !tolua_isnoobj(tolua_S,2,&tolua_err)
  415. )
  416. goto tolua_lerror;
  417. else
  418. #endif
  419. {
  420. const AreaAllocator* self = (const AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  421. #ifndef TOLUA_RELEASE
  422. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL);
  423. #endif
  424. {
  425. int tolua_ret = (int) self->GetWidth();
  426. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  427. }
  428. }
  429. return 1;
  430. #ifndef TOLUA_RELEASE
  431. tolua_lerror:
  432. tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err);
  433. return 0;
  434. #endif
  435. }
  436. #endif //#ifndef TOLUA_DISABLE
  437. /* method: GetHeight of class AreaAllocator */
  438. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_GetHeight00
  439. static int tolua_Math_AreaAllocator_GetHeight00(lua_State* tolua_S)
  440. {
  441. #ifndef TOLUA_RELEASE
  442. tolua_Error tolua_err;
  443. if (
  444. !tolua_isusertype(tolua_S,1,"const AreaAllocator",0,&tolua_err) ||
  445. !tolua_isnoobj(tolua_S,2,&tolua_err)
  446. )
  447. goto tolua_lerror;
  448. else
  449. #endif
  450. {
  451. const AreaAllocator* self = (const AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  452. #ifndef TOLUA_RELEASE
  453. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL);
  454. #endif
  455. {
  456. int tolua_ret = (int) self->GetHeight();
  457. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  458. }
  459. }
  460. return 1;
  461. #ifndef TOLUA_RELEASE
  462. tolua_lerror:
  463. tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err);
  464. return 0;
  465. #endif
  466. }
  467. #endif //#ifndef TOLUA_DISABLE
  468. /* method: new of class BoundingBox */
  469. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new00
  470. static int tolua_Math_BoundingBox_new00(lua_State* tolua_S)
  471. {
  472. #ifndef TOLUA_RELEASE
  473. tolua_Error tolua_err;
  474. if (
  475. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  476. !tolua_isnoobj(tolua_S,2,&tolua_err)
  477. )
  478. goto tolua_lerror;
  479. else
  480. #endif
  481. {
  482. {
  483. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)());
  484. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  485. }
  486. }
  487. return 1;
  488. #ifndef TOLUA_RELEASE
  489. tolua_lerror:
  490. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  491. return 0;
  492. #endif
  493. }
  494. #endif //#ifndef TOLUA_DISABLE
  495. /* method: new_local of class BoundingBox */
  496. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new00_local
  497. static int tolua_Math_BoundingBox_new00_local(lua_State* tolua_S)
  498. {
  499. #ifndef TOLUA_RELEASE
  500. tolua_Error tolua_err;
  501. if (
  502. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  503. !tolua_isnoobj(tolua_S,2,&tolua_err)
  504. )
  505. goto tolua_lerror;
  506. else
  507. #endif
  508. {
  509. {
  510. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)());
  511. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  512. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  513. }
  514. }
  515. return 1;
  516. #ifndef TOLUA_RELEASE
  517. tolua_lerror:
  518. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  519. return 0;
  520. #endif
  521. }
  522. #endif //#ifndef TOLUA_DISABLE
  523. /* method: new of class BoundingBox */
  524. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new01
  525. static int tolua_Math_BoundingBox_new01(lua_State* tolua_S)
  526. {
  527. tolua_Error tolua_err;
  528. if (
  529. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  530. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  531. !tolua_isnoobj(tolua_S,3,&tolua_err)
  532. )
  533. goto tolua_lerror;
  534. else
  535. {
  536. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  537. {
  538. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*box));
  539. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  540. }
  541. }
  542. return 1;
  543. tolua_lerror:
  544. return tolua_Math_BoundingBox_new00(tolua_S);
  545. }
  546. #endif //#ifndef TOLUA_DISABLE
  547. /* method: new_local of class BoundingBox */
  548. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new01_local
  549. static int tolua_Math_BoundingBox_new01_local(lua_State* tolua_S)
  550. {
  551. tolua_Error tolua_err;
  552. if (
  553. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  554. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  555. !tolua_isnoobj(tolua_S,3,&tolua_err)
  556. )
  557. goto tolua_lerror;
  558. else
  559. {
  560. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  561. {
  562. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*box));
  563. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  564. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  565. }
  566. }
  567. return 1;
  568. tolua_lerror:
  569. return tolua_Math_BoundingBox_new00_local(tolua_S);
  570. }
  571. #endif //#ifndef TOLUA_DISABLE
  572. /* method: new of class BoundingBox */
  573. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new02
  574. static int tolua_Math_BoundingBox_new02(lua_State* tolua_S)
  575. {
  576. tolua_Error tolua_err;
  577. if (
  578. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  579. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  580. !tolua_isnoobj(tolua_S,3,&tolua_err)
  581. )
  582. goto tolua_lerror;
  583. else
  584. {
  585. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  586. {
  587. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*rect));
  588. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  589. }
  590. }
  591. return 1;
  592. tolua_lerror:
  593. return tolua_Math_BoundingBox_new01(tolua_S);
  594. }
  595. #endif //#ifndef TOLUA_DISABLE
  596. /* method: new_local of class BoundingBox */
  597. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new02_local
  598. static int tolua_Math_BoundingBox_new02_local(lua_State* tolua_S)
  599. {
  600. tolua_Error tolua_err;
  601. if (
  602. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  603. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  604. !tolua_isnoobj(tolua_S,3,&tolua_err)
  605. )
  606. goto tolua_lerror;
  607. else
  608. {
  609. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  610. {
  611. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*rect));
  612. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  613. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  614. }
  615. }
  616. return 1;
  617. tolua_lerror:
  618. return tolua_Math_BoundingBox_new01_local(tolua_S);
  619. }
  620. #endif //#ifndef TOLUA_DISABLE
  621. /* method: new of class BoundingBox */
  622. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new03
  623. static int tolua_Math_BoundingBox_new03(lua_State* tolua_S)
  624. {
  625. tolua_Error tolua_err;
  626. if (
  627. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  628. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  629. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  630. !tolua_isnoobj(tolua_S,4,&tolua_err)
  631. )
  632. goto tolua_lerror;
  633. else
  634. {
  635. const Vector3* min = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  636. const Vector3* max = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  637. {
  638. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*min,*max));
  639. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  640. }
  641. }
  642. return 1;
  643. tolua_lerror:
  644. return tolua_Math_BoundingBox_new02(tolua_S);
  645. }
  646. #endif //#ifndef TOLUA_DISABLE
  647. /* method: new_local of class BoundingBox */
  648. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new03_local
  649. static int tolua_Math_BoundingBox_new03_local(lua_State* tolua_S)
  650. {
  651. tolua_Error tolua_err;
  652. if (
  653. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  654. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  655. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  656. !tolua_isnoobj(tolua_S,4,&tolua_err)
  657. )
  658. goto tolua_lerror;
  659. else
  660. {
  661. const Vector3* min = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  662. const Vector3* max = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  663. {
  664. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*min,*max));
  665. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  666. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  667. }
  668. }
  669. return 1;
  670. tolua_lerror:
  671. return tolua_Math_BoundingBox_new02_local(tolua_S);
  672. }
  673. #endif //#ifndef TOLUA_DISABLE
  674. /* method: new of class BoundingBox */
  675. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new04
  676. static int tolua_Math_BoundingBox_new04(lua_State* tolua_S)
  677. {
  678. tolua_Error tolua_err;
  679. if (
  680. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  681. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  682. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  683. !tolua_isnoobj(tolua_S,4,&tolua_err)
  684. )
  685. goto tolua_lerror;
  686. else
  687. {
  688. float min = ((float) tolua_tonumber(tolua_S,2,0));
  689. float max = ((float) tolua_tonumber(tolua_S,3,0));
  690. {
  691. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(min,max));
  692. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  693. }
  694. }
  695. return 1;
  696. tolua_lerror:
  697. return tolua_Math_BoundingBox_new03(tolua_S);
  698. }
  699. #endif //#ifndef TOLUA_DISABLE
  700. /* method: new_local of class BoundingBox */
  701. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new04_local
  702. static int tolua_Math_BoundingBox_new04_local(lua_State* tolua_S)
  703. {
  704. tolua_Error tolua_err;
  705. if (
  706. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  707. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  708. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  709. !tolua_isnoobj(tolua_S,4,&tolua_err)
  710. )
  711. goto tolua_lerror;
  712. else
  713. {
  714. float min = ((float) tolua_tonumber(tolua_S,2,0));
  715. float max = ((float) tolua_tonumber(tolua_S,3,0));
  716. {
  717. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(min,max));
  718. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  719. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  720. }
  721. }
  722. return 1;
  723. tolua_lerror:
  724. return tolua_Math_BoundingBox_new03_local(tolua_S);
  725. }
  726. #endif //#ifndef TOLUA_DISABLE
  727. /* method: new of class BoundingBox */
  728. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new05
  729. static int tolua_Math_BoundingBox_new05(lua_State* tolua_S)
  730. {
  731. tolua_Error tolua_err;
  732. if (
  733. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  734. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  735. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  736. !tolua_isnoobj(tolua_S,4,&tolua_err)
  737. )
  738. goto tolua_lerror;
  739. else
  740. {
  741. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  742. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  743. {
  744. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(vertices,count));
  745. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  746. }
  747. }
  748. return 1;
  749. tolua_lerror:
  750. return tolua_Math_BoundingBox_new04(tolua_S);
  751. }
  752. #endif //#ifndef TOLUA_DISABLE
  753. /* method: new_local of class BoundingBox */
  754. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new05_local
  755. static int tolua_Math_BoundingBox_new05_local(lua_State* tolua_S)
  756. {
  757. tolua_Error tolua_err;
  758. if (
  759. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  760. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  761. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  762. !tolua_isnoobj(tolua_S,4,&tolua_err)
  763. )
  764. goto tolua_lerror;
  765. else
  766. {
  767. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  768. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  769. {
  770. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(vertices,count));
  771. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  772. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  773. }
  774. }
  775. return 1;
  776. tolua_lerror:
  777. return tolua_Math_BoundingBox_new04_local(tolua_S);
  778. }
  779. #endif //#ifndef TOLUA_DISABLE
  780. /* method: new of class BoundingBox */
  781. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new06
  782. static int tolua_Math_BoundingBox_new06(lua_State* tolua_S)
  783. {
  784. tolua_Error tolua_err;
  785. if (
  786. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  787. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  788. !tolua_isnoobj(tolua_S,3,&tolua_err)
  789. )
  790. goto tolua_lerror;
  791. else
  792. {
  793. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  794. {
  795. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*frustum));
  796. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  797. }
  798. }
  799. return 1;
  800. tolua_lerror:
  801. return tolua_Math_BoundingBox_new05(tolua_S);
  802. }
  803. #endif //#ifndef TOLUA_DISABLE
  804. /* method: new_local of class BoundingBox */
  805. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new06_local
  806. static int tolua_Math_BoundingBox_new06_local(lua_State* tolua_S)
  807. {
  808. tolua_Error tolua_err;
  809. if (
  810. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  811. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  812. !tolua_isnoobj(tolua_S,3,&tolua_err)
  813. )
  814. goto tolua_lerror;
  815. else
  816. {
  817. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  818. {
  819. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*frustum));
  820. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  821. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  822. }
  823. }
  824. return 1;
  825. tolua_lerror:
  826. return tolua_Math_BoundingBox_new05_local(tolua_S);
  827. }
  828. #endif //#ifndef TOLUA_DISABLE
  829. /* method: new of class BoundingBox */
  830. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new07
  831. static int tolua_Math_BoundingBox_new07(lua_State* tolua_S)
  832. {
  833. tolua_Error tolua_err;
  834. if (
  835. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  836. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  837. !tolua_isnoobj(tolua_S,3,&tolua_err)
  838. )
  839. goto tolua_lerror;
  840. else
  841. {
  842. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  843. {
  844. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*poly));
  845. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  846. }
  847. }
  848. return 1;
  849. tolua_lerror:
  850. return tolua_Math_BoundingBox_new06(tolua_S);
  851. }
  852. #endif //#ifndef TOLUA_DISABLE
  853. /* method: new_local of class BoundingBox */
  854. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new07_local
  855. static int tolua_Math_BoundingBox_new07_local(lua_State* tolua_S)
  856. {
  857. tolua_Error tolua_err;
  858. if (
  859. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  860. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  861. !tolua_isnoobj(tolua_S,3,&tolua_err)
  862. )
  863. goto tolua_lerror;
  864. else
  865. {
  866. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  867. {
  868. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*poly));
  869. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  870. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  871. }
  872. }
  873. return 1;
  874. tolua_lerror:
  875. return tolua_Math_BoundingBox_new06_local(tolua_S);
  876. }
  877. #endif //#ifndef TOLUA_DISABLE
  878. /* method: new of class BoundingBox */
  879. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new08
  880. static int tolua_Math_BoundingBox_new08(lua_State* tolua_S)
  881. {
  882. tolua_Error tolua_err;
  883. if (
  884. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  885. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  886. !tolua_isnoobj(tolua_S,3,&tolua_err)
  887. )
  888. goto tolua_lerror;
  889. else
  890. {
  891. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  892. {
  893. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*sphere));
  894. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  895. }
  896. }
  897. return 1;
  898. tolua_lerror:
  899. return tolua_Math_BoundingBox_new07(tolua_S);
  900. }
  901. #endif //#ifndef TOLUA_DISABLE
  902. /* method: new_local of class BoundingBox */
  903. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new08_local
  904. static int tolua_Math_BoundingBox_new08_local(lua_State* tolua_S)
  905. {
  906. tolua_Error tolua_err;
  907. if (
  908. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  909. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  910. !tolua_isnoobj(tolua_S,3,&tolua_err)
  911. )
  912. goto tolua_lerror;
  913. else
  914. {
  915. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  916. {
  917. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*sphere));
  918. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  919. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  920. }
  921. }
  922. return 1;
  923. tolua_lerror:
  924. return tolua_Math_BoundingBox_new07_local(tolua_S);
  925. }
  926. #endif //#ifndef TOLUA_DISABLE
  927. /* method: operator== of class BoundingBox */
  928. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox__eq00
  929. static int tolua_Math_BoundingBox__eq00(lua_State* tolua_S)
  930. {
  931. #ifndef TOLUA_RELEASE
  932. tolua_Error tolua_err;
  933. if (
  934. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  935. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  936. !tolua_isnoobj(tolua_S,3,&tolua_err)
  937. )
  938. goto tolua_lerror;
  939. else
  940. #endif
  941. {
  942. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  943. const BoundingBox* rhs = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  944. #ifndef TOLUA_RELEASE
  945. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  946. #endif
  947. {
  948. bool tolua_ret = (bool) self->operator==(*rhs);
  949. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  950. }
  951. }
  952. return 1;
  953. #ifndef TOLUA_RELEASE
  954. tolua_lerror:
  955. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  956. return 0;
  957. #endif
  958. }
  959. #endif //#ifndef TOLUA_DISABLE
  960. /* method: Define of class BoundingBox */
  961. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define00
  962. static int tolua_Math_BoundingBox_Define00(lua_State* tolua_S)
  963. {
  964. #ifndef TOLUA_RELEASE
  965. tolua_Error tolua_err;
  966. if (
  967. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  968. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  969. !tolua_isnoobj(tolua_S,3,&tolua_err)
  970. )
  971. goto tolua_lerror;
  972. else
  973. #endif
  974. {
  975. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  976. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  977. #ifndef TOLUA_RELEASE
  978. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  979. #endif
  980. {
  981. self->Define(*box);
  982. }
  983. }
  984. return 0;
  985. #ifndef TOLUA_RELEASE
  986. tolua_lerror:
  987. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  988. return 0;
  989. #endif
  990. }
  991. #endif //#ifndef TOLUA_DISABLE
  992. /* method: Define of class BoundingBox */
  993. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define01
  994. static int tolua_Math_BoundingBox_Define01(lua_State* tolua_S)
  995. {
  996. tolua_Error tolua_err;
  997. if (
  998. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  999. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  1000. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1001. )
  1002. goto tolua_lerror;
  1003. else
  1004. {
  1005. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1006. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  1007. #ifndef TOLUA_RELEASE
  1008. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1009. #endif
  1010. {
  1011. self->Define(*rect);
  1012. }
  1013. }
  1014. return 0;
  1015. tolua_lerror:
  1016. return tolua_Math_BoundingBox_Define00(tolua_S);
  1017. }
  1018. #endif //#ifndef TOLUA_DISABLE
  1019. /* method: Define of class BoundingBox */
  1020. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define02
  1021. static int tolua_Math_BoundingBox_Define02(lua_State* tolua_S)
  1022. {
  1023. tolua_Error tolua_err;
  1024. if (
  1025. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1026. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1027. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  1028. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1029. )
  1030. goto tolua_lerror;
  1031. else
  1032. {
  1033. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1034. const Vector3* min = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1035. const Vector3* max = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  1036. #ifndef TOLUA_RELEASE
  1037. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1038. #endif
  1039. {
  1040. self->Define(*min,*max);
  1041. }
  1042. }
  1043. return 0;
  1044. tolua_lerror:
  1045. return tolua_Math_BoundingBox_Define01(tolua_S);
  1046. }
  1047. #endif //#ifndef TOLUA_DISABLE
  1048. /* method: Define of class BoundingBox */
  1049. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define03
  1050. static int tolua_Math_BoundingBox_Define03(lua_State* tolua_S)
  1051. {
  1052. tolua_Error tolua_err;
  1053. if (
  1054. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1055. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1056. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1057. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1058. )
  1059. goto tolua_lerror;
  1060. else
  1061. {
  1062. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1063. float min = ((float) tolua_tonumber(tolua_S,2,0));
  1064. float max = ((float) tolua_tonumber(tolua_S,3,0));
  1065. #ifndef TOLUA_RELEASE
  1066. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1067. #endif
  1068. {
  1069. self->Define(min,max);
  1070. }
  1071. }
  1072. return 0;
  1073. tolua_lerror:
  1074. return tolua_Math_BoundingBox_Define02(tolua_S);
  1075. }
  1076. #endif //#ifndef TOLUA_DISABLE
  1077. /* method: Define of class BoundingBox */
  1078. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define04
  1079. static int tolua_Math_BoundingBox_Define04(lua_State* tolua_S)
  1080. {
  1081. tolua_Error tolua_err;
  1082. if (
  1083. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1084. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1085. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1086. )
  1087. goto tolua_lerror;
  1088. else
  1089. {
  1090. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1091. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1092. #ifndef TOLUA_RELEASE
  1093. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1094. #endif
  1095. {
  1096. self->Define(*point);
  1097. }
  1098. }
  1099. return 0;
  1100. tolua_lerror:
  1101. return tolua_Math_BoundingBox_Define03(tolua_S);
  1102. }
  1103. #endif //#ifndef TOLUA_DISABLE
  1104. /* method: Merge of class BoundingBox */
  1105. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge00
  1106. static int tolua_Math_BoundingBox_Merge00(lua_State* tolua_S)
  1107. {
  1108. #ifndef TOLUA_RELEASE
  1109. tolua_Error tolua_err;
  1110. if (
  1111. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1112. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1113. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1114. )
  1115. goto tolua_lerror;
  1116. else
  1117. #endif
  1118. {
  1119. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1120. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1121. #ifndef TOLUA_RELEASE
  1122. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1123. #endif
  1124. {
  1125. self->Merge(*point);
  1126. }
  1127. }
  1128. return 0;
  1129. #ifndef TOLUA_RELEASE
  1130. tolua_lerror:
  1131. tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err);
  1132. return 0;
  1133. #endif
  1134. }
  1135. #endif //#ifndef TOLUA_DISABLE
  1136. /* method: Merge of class BoundingBox */
  1137. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge01
  1138. static int tolua_Math_BoundingBox_Merge01(lua_State* tolua_S)
  1139. {
  1140. tolua_Error tolua_err;
  1141. if (
  1142. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1143. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1144. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1145. )
  1146. goto tolua_lerror;
  1147. else
  1148. {
  1149. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1150. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1151. #ifndef TOLUA_RELEASE
  1152. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1153. #endif
  1154. {
  1155. self->Merge(*box);
  1156. }
  1157. }
  1158. return 0;
  1159. tolua_lerror:
  1160. return tolua_Math_BoundingBox_Merge00(tolua_S);
  1161. }
  1162. #endif //#ifndef TOLUA_DISABLE
  1163. /* method: Define of class BoundingBox */
  1164. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define05
  1165. static int tolua_Math_BoundingBox_Define05(lua_State* tolua_S)
  1166. {
  1167. tolua_Error tolua_err;
  1168. if (
  1169. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1170. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  1171. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1172. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1173. )
  1174. goto tolua_lerror;
  1175. else
  1176. {
  1177. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1178. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1179. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  1180. #ifndef TOLUA_RELEASE
  1181. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1182. #endif
  1183. {
  1184. self->Define(vertices,count);
  1185. }
  1186. }
  1187. return 0;
  1188. tolua_lerror:
  1189. return tolua_Math_BoundingBox_Define04(tolua_S);
  1190. }
  1191. #endif //#ifndef TOLUA_DISABLE
  1192. /* method: Define of class BoundingBox */
  1193. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define06
  1194. static int tolua_Math_BoundingBox_Define06(lua_State* tolua_S)
  1195. {
  1196. tolua_Error tolua_err;
  1197. if (
  1198. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1199. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  1200. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1201. )
  1202. goto tolua_lerror;
  1203. else
  1204. {
  1205. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1206. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  1207. #ifndef TOLUA_RELEASE
  1208. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1209. #endif
  1210. {
  1211. self->Define(*frustum);
  1212. }
  1213. }
  1214. return 0;
  1215. tolua_lerror:
  1216. return tolua_Math_BoundingBox_Define05(tolua_S);
  1217. }
  1218. #endif //#ifndef TOLUA_DISABLE
  1219. /* method: Define of class BoundingBox */
  1220. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define07
  1221. static int tolua_Math_BoundingBox_Define07(lua_State* tolua_S)
  1222. {
  1223. tolua_Error tolua_err;
  1224. if (
  1225. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1226. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  1227. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1228. )
  1229. goto tolua_lerror;
  1230. else
  1231. {
  1232. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1233. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  1234. #ifndef TOLUA_RELEASE
  1235. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1236. #endif
  1237. {
  1238. self->Define(*poly);
  1239. }
  1240. }
  1241. return 0;
  1242. tolua_lerror:
  1243. return tolua_Math_BoundingBox_Define06(tolua_S);
  1244. }
  1245. #endif //#ifndef TOLUA_DISABLE
  1246. /* method: Define of class BoundingBox */
  1247. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define08
  1248. static int tolua_Math_BoundingBox_Define08(lua_State* tolua_S)
  1249. {
  1250. tolua_Error tolua_err;
  1251. if (
  1252. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1253. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1254. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1255. )
  1256. goto tolua_lerror;
  1257. else
  1258. {
  1259. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1260. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1261. #ifndef TOLUA_RELEASE
  1262. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1263. #endif
  1264. {
  1265. self->Define(*sphere);
  1266. }
  1267. }
  1268. return 0;
  1269. tolua_lerror:
  1270. return tolua_Math_BoundingBox_Define07(tolua_S);
  1271. }
  1272. #endif //#ifndef TOLUA_DISABLE
  1273. /* method: Merge of class BoundingBox */
  1274. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge02
  1275. static int tolua_Math_BoundingBox_Merge02(lua_State* tolua_S)
  1276. {
  1277. tolua_Error tolua_err;
  1278. if (
  1279. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1280. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  1281. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1282. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1283. )
  1284. goto tolua_lerror;
  1285. else
  1286. {
  1287. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1288. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1289. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  1290. #ifndef TOLUA_RELEASE
  1291. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1292. #endif
  1293. {
  1294. self->Merge(vertices,count);
  1295. }
  1296. }
  1297. return 0;
  1298. tolua_lerror:
  1299. return tolua_Math_BoundingBox_Merge01(tolua_S);
  1300. }
  1301. #endif //#ifndef TOLUA_DISABLE
  1302. /* method: Merge of class BoundingBox */
  1303. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge03
  1304. static int tolua_Math_BoundingBox_Merge03(lua_State* tolua_S)
  1305. {
  1306. tolua_Error tolua_err;
  1307. if (
  1308. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1309. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  1310. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1311. )
  1312. goto tolua_lerror;
  1313. else
  1314. {
  1315. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1316. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  1317. #ifndef TOLUA_RELEASE
  1318. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1319. #endif
  1320. {
  1321. self->Merge(*frustum);
  1322. }
  1323. }
  1324. return 0;
  1325. tolua_lerror:
  1326. return tolua_Math_BoundingBox_Merge02(tolua_S);
  1327. }
  1328. #endif //#ifndef TOLUA_DISABLE
  1329. /* method: Merge of class BoundingBox */
  1330. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge04
  1331. static int tolua_Math_BoundingBox_Merge04(lua_State* tolua_S)
  1332. {
  1333. tolua_Error tolua_err;
  1334. if (
  1335. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1336. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  1337. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1338. )
  1339. goto tolua_lerror;
  1340. else
  1341. {
  1342. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1343. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  1344. #ifndef TOLUA_RELEASE
  1345. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1346. #endif
  1347. {
  1348. self->Merge(*poly);
  1349. }
  1350. }
  1351. return 0;
  1352. tolua_lerror:
  1353. return tolua_Math_BoundingBox_Merge03(tolua_S);
  1354. }
  1355. #endif //#ifndef TOLUA_DISABLE
  1356. /* method: Merge of class BoundingBox */
  1357. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge05
  1358. static int tolua_Math_BoundingBox_Merge05(lua_State* tolua_S)
  1359. {
  1360. tolua_Error tolua_err;
  1361. if (
  1362. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1363. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1364. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1365. )
  1366. goto tolua_lerror;
  1367. else
  1368. {
  1369. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1370. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1371. #ifndef TOLUA_RELEASE
  1372. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1373. #endif
  1374. {
  1375. self->Merge(*sphere);
  1376. }
  1377. }
  1378. return 0;
  1379. tolua_lerror:
  1380. return tolua_Math_BoundingBox_Merge04(tolua_S);
  1381. }
  1382. #endif //#ifndef TOLUA_DISABLE
  1383. /* method: Clip of class BoundingBox */
  1384. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Clip00
  1385. static int tolua_Math_BoundingBox_Clip00(lua_State* tolua_S)
  1386. {
  1387. #ifndef TOLUA_RELEASE
  1388. tolua_Error tolua_err;
  1389. if (
  1390. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1391. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1392. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1393. )
  1394. goto tolua_lerror;
  1395. else
  1396. #endif
  1397. {
  1398. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1399. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1400. #ifndef TOLUA_RELEASE
  1401. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  1402. #endif
  1403. {
  1404. self->Clip(*box);
  1405. }
  1406. }
  1407. return 0;
  1408. #ifndef TOLUA_RELEASE
  1409. tolua_lerror:
  1410. tolua_error(tolua_S,"#ferror in function 'Clip'.",&tolua_err);
  1411. return 0;
  1412. #endif
  1413. }
  1414. #endif //#ifndef TOLUA_DISABLE
  1415. /* method: Transform of class BoundingBox */
  1416. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transform00
  1417. static int tolua_Math_BoundingBox_Transform00(lua_State* tolua_S)
  1418. {
  1419. #ifndef TOLUA_RELEASE
  1420. tolua_Error tolua_err;
  1421. if (
  1422. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1423. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  1424. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1425. )
  1426. goto tolua_lerror;
  1427. else
  1428. #endif
  1429. {
  1430. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1431. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  1432. #ifndef TOLUA_RELEASE
  1433. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  1434. #endif
  1435. {
  1436. self->Transform(*transform);
  1437. }
  1438. }
  1439. return 0;
  1440. #ifndef TOLUA_RELEASE
  1441. tolua_lerror:
  1442. tolua_error(tolua_S,"#ferror in function 'Transform'.",&tolua_err);
  1443. return 0;
  1444. #endif
  1445. }
  1446. #endif //#ifndef TOLUA_DISABLE
  1447. /* method: Transform of class BoundingBox */
  1448. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transform01
  1449. static int tolua_Math_BoundingBox_Transform01(lua_State* tolua_S)
  1450. {
  1451. tolua_Error tolua_err;
  1452. if (
  1453. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1454. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  1455. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1456. )
  1457. goto tolua_lerror;
  1458. else
  1459. {
  1460. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1461. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  1462. #ifndef TOLUA_RELEASE
  1463. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  1464. #endif
  1465. {
  1466. self->Transform(*transform);
  1467. }
  1468. }
  1469. return 0;
  1470. tolua_lerror:
  1471. return tolua_Math_BoundingBox_Transform00(tolua_S);
  1472. }
  1473. #endif //#ifndef TOLUA_DISABLE
  1474. /* method: Clear of class BoundingBox */
  1475. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Clear00
  1476. static int tolua_Math_BoundingBox_Clear00(lua_State* tolua_S)
  1477. {
  1478. #ifndef TOLUA_RELEASE
  1479. tolua_Error tolua_err;
  1480. if (
  1481. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1482. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1483. )
  1484. goto tolua_lerror;
  1485. else
  1486. #endif
  1487. {
  1488. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1489. #ifndef TOLUA_RELEASE
  1490. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  1491. #endif
  1492. {
  1493. self->Clear();
  1494. }
  1495. }
  1496. return 0;
  1497. #ifndef TOLUA_RELEASE
  1498. tolua_lerror:
  1499. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  1500. return 0;
  1501. #endif
  1502. }
  1503. #endif //#ifndef TOLUA_DISABLE
  1504. /* method: Center of class BoundingBox */
  1505. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Center00
  1506. static int tolua_Math_BoundingBox_Center00(lua_State* tolua_S)
  1507. {
  1508. #ifndef TOLUA_RELEASE
  1509. tolua_Error tolua_err;
  1510. if (
  1511. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1512. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1513. )
  1514. goto tolua_lerror;
  1515. else
  1516. #endif
  1517. {
  1518. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1519. #ifndef TOLUA_RELEASE
  1520. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Center'", NULL);
  1521. #endif
  1522. {
  1523. Vector3 tolua_ret = (Vector3) self->Center();
  1524. {
  1525. #ifdef __cplusplus
  1526. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  1527. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1528. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1529. #else
  1530. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  1531. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1532. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1533. #endif
  1534. }
  1535. }
  1536. }
  1537. return 1;
  1538. #ifndef TOLUA_RELEASE
  1539. tolua_lerror:
  1540. tolua_error(tolua_S,"#ferror in function 'Center'.",&tolua_err);
  1541. return 0;
  1542. #endif
  1543. }
  1544. #endif //#ifndef TOLUA_DISABLE
  1545. /* method: Size of class BoundingBox */
  1546. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Size00
  1547. static int tolua_Math_BoundingBox_Size00(lua_State* tolua_S)
  1548. {
  1549. #ifndef TOLUA_RELEASE
  1550. tolua_Error tolua_err;
  1551. if (
  1552. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1553. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1554. )
  1555. goto tolua_lerror;
  1556. else
  1557. #endif
  1558. {
  1559. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1560. #ifndef TOLUA_RELEASE
  1561. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL);
  1562. #endif
  1563. {
  1564. Vector3 tolua_ret = (Vector3) self->Size();
  1565. {
  1566. #ifdef __cplusplus
  1567. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  1568. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1569. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1570. #else
  1571. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  1572. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1573. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1574. #endif
  1575. }
  1576. }
  1577. }
  1578. return 1;
  1579. #ifndef TOLUA_RELEASE
  1580. tolua_lerror:
  1581. tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err);
  1582. return 0;
  1583. #endif
  1584. }
  1585. #endif //#ifndef TOLUA_DISABLE
  1586. /* method: HalfSize of class BoundingBox */
  1587. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_HalfSize00
  1588. static int tolua_Math_BoundingBox_HalfSize00(lua_State* tolua_S)
  1589. {
  1590. #ifndef TOLUA_RELEASE
  1591. tolua_Error tolua_err;
  1592. if (
  1593. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1594. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1595. )
  1596. goto tolua_lerror;
  1597. else
  1598. #endif
  1599. {
  1600. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1601. #ifndef TOLUA_RELEASE
  1602. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HalfSize'", NULL);
  1603. #endif
  1604. {
  1605. Vector3 tolua_ret = (Vector3) self->HalfSize();
  1606. {
  1607. #ifdef __cplusplus
  1608. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  1609. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1610. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1611. #else
  1612. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  1613. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1614. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1615. #endif
  1616. }
  1617. }
  1618. }
  1619. return 1;
  1620. #ifndef TOLUA_RELEASE
  1621. tolua_lerror:
  1622. tolua_error(tolua_S,"#ferror in function 'HalfSize'.",&tolua_err);
  1623. return 0;
  1624. #endif
  1625. }
  1626. #endif //#ifndef TOLUA_DISABLE
  1627. /* method: Transformed of class BoundingBox */
  1628. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transformed00
  1629. static int tolua_Math_BoundingBox_Transformed00(lua_State* tolua_S)
  1630. {
  1631. #ifndef TOLUA_RELEASE
  1632. tolua_Error tolua_err;
  1633. if (
  1634. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1635. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  1636. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1637. )
  1638. goto tolua_lerror;
  1639. else
  1640. #endif
  1641. {
  1642. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1643. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  1644. #ifndef TOLUA_RELEASE
  1645. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  1646. #endif
  1647. {
  1648. BoundingBox tolua_ret = (BoundingBox) self->Transformed(*transform);
  1649. {
  1650. #ifdef __cplusplus
  1651. void* tolua_obj = Mtolua_new((BoundingBox)(tolua_ret));
  1652. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1653. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1654. #else
  1655. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BoundingBox));
  1656. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1657. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1658. #endif
  1659. }
  1660. }
  1661. }
  1662. return 1;
  1663. #ifndef TOLUA_RELEASE
  1664. tolua_lerror:
  1665. tolua_error(tolua_S,"#ferror in function 'Transformed'.",&tolua_err);
  1666. return 0;
  1667. #endif
  1668. }
  1669. #endif //#ifndef TOLUA_DISABLE
  1670. /* method: Transformed of class BoundingBox */
  1671. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transformed01
  1672. static int tolua_Math_BoundingBox_Transformed01(lua_State* tolua_S)
  1673. {
  1674. tolua_Error tolua_err;
  1675. if (
  1676. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1677. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  1678. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1679. )
  1680. goto tolua_lerror;
  1681. else
  1682. {
  1683. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1684. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  1685. #ifndef TOLUA_RELEASE
  1686. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  1687. #endif
  1688. {
  1689. BoundingBox tolua_ret = (BoundingBox) self->Transformed(*transform);
  1690. {
  1691. #ifdef __cplusplus
  1692. void* tolua_obj = Mtolua_new((BoundingBox)(tolua_ret));
  1693. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1694. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1695. #else
  1696. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BoundingBox));
  1697. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1698. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1699. #endif
  1700. }
  1701. }
  1702. }
  1703. return 1;
  1704. tolua_lerror:
  1705. return tolua_Math_BoundingBox_Transformed00(tolua_S);
  1706. }
  1707. #endif //#ifndef TOLUA_DISABLE
  1708. /* method: Projected of class BoundingBox */
  1709. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Projected00
  1710. static int tolua_Math_BoundingBox_Projected00(lua_State* tolua_S)
  1711. {
  1712. #ifndef TOLUA_RELEASE
  1713. tolua_Error tolua_err;
  1714. if (
  1715. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1716. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  1717. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1718. )
  1719. goto tolua_lerror;
  1720. else
  1721. #endif
  1722. {
  1723. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1724. const Matrix4* projection = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  1725. #ifndef TOLUA_RELEASE
  1726. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Projected'", NULL);
  1727. #endif
  1728. {
  1729. Rect tolua_ret = (Rect) self->Projected(*projection);
  1730. {
  1731. #ifdef __cplusplus
  1732. void* tolua_obj = Mtolua_new((Rect)(tolua_ret));
  1733. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  1734. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1735. #else
  1736. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Rect));
  1737. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  1738. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1739. #endif
  1740. }
  1741. }
  1742. }
  1743. return 1;
  1744. #ifndef TOLUA_RELEASE
  1745. tolua_lerror:
  1746. tolua_error(tolua_S,"#ferror in function 'Projected'.",&tolua_err);
  1747. return 0;
  1748. #endif
  1749. }
  1750. #endif //#ifndef TOLUA_DISABLE
  1751. /* method: IsInside of class BoundingBox */
  1752. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInside00
  1753. static int tolua_Math_BoundingBox_IsInside00(lua_State* tolua_S)
  1754. {
  1755. #ifndef TOLUA_RELEASE
  1756. tolua_Error tolua_err;
  1757. if (
  1758. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1759. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1760. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1761. )
  1762. goto tolua_lerror;
  1763. else
  1764. #endif
  1765. {
  1766. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1767. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1768. #ifndef TOLUA_RELEASE
  1769. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  1770. #endif
  1771. {
  1772. Intersection tolua_ret = (Intersection) self->IsInside(*point);
  1773. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1774. }
  1775. }
  1776. return 1;
  1777. #ifndef TOLUA_RELEASE
  1778. tolua_lerror:
  1779. tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err);
  1780. return 0;
  1781. #endif
  1782. }
  1783. #endif //#ifndef TOLUA_DISABLE
  1784. /* method: IsInside of class BoundingBox */
  1785. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInside01
  1786. static int tolua_Math_BoundingBox_IsInside01(lua_State* tolua_S)
  1787. {
  1788. tolua_Error tolua_err;
  1789. if (
  1790. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1791. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1792. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1793. )
  1794. goto tolua_lerror;
  1795. else
  1796. {
  1797. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1798. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1799. #ifndef TOLUA_RELEASE
  1800. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  1801. #endif
  1802. {
  1803. Intersection tolua_ret = (Intersection) self->IsInside(*box);
  1804. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1805. }
  1806. }
  1807. return 1;
  1808. tolua_lerror:
  1809. return tolua_Math_BoundingBox_IsInside00(tolua_S);
  1810. }
  1811. #endif //#ifndef TOLUA_DISABLE
  1812. /* method: IsInsideFast of class BoundingBox */
  1813. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInsideFast00
  1814. static int tolua_Math_BoundingBox_IsInsideFast00(lua_State* tolua_S)
  1815. {
  1816. #ifndef TOLUA_RELEASE
  1817. tolua_Error tolua_err;
  1818. if (
  1819. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1820. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1821. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1822. )
  1823. goto tolua_lerror;
  1824. else
  1825. #endif
  1826. {
  1827. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1828. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1829. #ifndef TOLUA_RELEASE
  1830. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  1831. #endif
  1832. {
  1833. Intersection tolua_ret = (Intersection) self->IsInsideFast(*box);
  1834. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1835. }
  1836. }
  1837. return 1;
  1838. #ifndef TOLUA_RELEASE
  1839. tolua_lerror:
  1840. tolua_error(tolua_S,"#ferror in function 'IsInsideFast'.",&tolua_err);
  1841. return 0;
  1842. #endif
  1843. }
  1844. #endif //#ifndef TOLUA_DISABLE
  1845. /* method: IsInside of class BoundingBox */
  1846. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInside02
  1847. static int tolua_Math_BoundingBox_IsInside02(lua_State* tolua_S)
  1848. {
  1849. tolua_Error tolua_err;
  1850. if (
  1851. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1852. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1853. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1854. )
  1855. goto tolua_lerror;
  1856. else
  1857. {
  1858. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1859. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1860. #ifndef TOLUA_RELEASE
  1861. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  1862. #endif
  1863. {
  1864. Intersection tolua_ret = (Intersection) self->IsInside(*sphere);
  1865. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1866. }
  1867. }
  1868. return 1;
  1869. tolua_lerror:
  1870. return tolua_Math_BoundingBox_IsInside01(tolua_S);
  1871. }
  1872. #endif //#ifndef TOLUA_DISABLE
  1873. /* method: IsInsideFast of class BoundingBox */
  1874. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInsideFast01
  1875. static int tolua_Math_BoundingBox_IsInsideFast01(lua_State* tolua_S)
  1876. {
  1877. tolua_Error tolua_err;
  1878. if (
  1879. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1880. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1881. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1882. )
  1883. goto tolua_lerror;
  1884. else
  1885. {
  1886. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1887. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1888. #ifndef TOLUA_RELEASE
  1889. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  1890. #endif
  1891. {
  1892. Intersection tolua_ret = (Intersection) self->IsInsideFast(*sphere);
  1893. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1894. }
  1895. }
  1896. return 1;
  1897. tolua_lerror:
  1898. return tolua_Math_BoundingBox_IsInsideFast00(tolua_S);
  1899. }
  1900. #endif //#ifndef TOLUA_DISABLE
  1901. /* method: ToString of class BoundingBox */
  1902. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_ToString00
  1903. static int tolua_Math_BoundingBox_ToString00(lua_State* tolua_S)
  1904. {
  1905. #ifndef TOLUA_RELEASE
  1906. tolua_Error tolua_err;
  1907. if (
  1908. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1909. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1910. )
  1911. goto tolua_lerror;
  1912. else
  1913. #endif
  1914. {
  1915. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1916. #ifndef TOLUA_RELEASE
  1917. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  1918. #endif
  1919. {
  1920. String tolua_ret = (String) self->ToString();
  1921. {
  1922. #ifdef __cplusplus
  1923. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  1924. tolua_pushusertype(tolua_S,tolua_obj,"String");
  1925. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1926. #else
  1927. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  1928. tolua_pushusertype(tolua_S,tolua_obj,"String");
  1929. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1930. #endif
  1931. }
  1932. }
  1933. }
  1934. return 1;
  1935. #ifndef TOLUA_RELEASE
  1936. tolua_lerror:
  1937. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  1938. return 0;
  1939. #endif
  1940. }
  1941. #endif //#ifndef TOLUA_DISABLE
  1942. /* get function: min_ of class BoundingBox */
  1943. #ifndef TOLUA_DISABLE_tolua_get_BoundingBox_min
  1944. static int tolua_get_BoundingBox_min(lua_State* tolua_S)
  1945. {
  1946. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1947. #ifndef TOLUA_RELEASE
  1948. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  1949. #endif
  1950. tolua_pushusertype(tolua_S,(void*)&self->min_,"Vector3");
  1951. return 1;
  1952. }
  1953. #endif //#ifndef TOLUA_DISABLE
  1954. /* set function: min_ of class BoundingBox */
  1955. #ifndef TOLUA_DISABLE_tolua_set_BoundingBox_min
  1956. static int tolua_set_BoundingBox_min(lua_State* tolua_S)
  1957. {
  1958. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1959. #ifndef TOLUA_RELEASE
  1960. tolua_Error tolua_err;
  1961. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  1962. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  1963. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  1964. #endif
  1965. self->min_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  1966. ;
  1967. return 0;
  1968. }
  1969. #endif //#ifndef TOLUA_DISABLE
  1970. /* get function: max_ of class BoundingBox */
  1971. #ifndef TOLUA_DISABLE_tolua_get_BoundingBox_max
  1972. static int tolua_get_BoundingBox_max(lua_State* tolua_S)
  1973. {
  1974. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1975. #ifndef TOLUA_RELEASE
  1976. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  1977. #endif
  1978. tolua_pushusertype(tolua_S,(void*)&self->max_,"Vector3");
  1979. return 1;
  1980. }
  1981. #endif //#ifndef TOLUA_DISABLE
  1982. /* set function: max_ of class BoundingBox */
  1983. #ifndef TOLUA_DISABLE_tolua_set_BoundingBox_max
  1984. static int tolua_set_BoundingBox_max(lua_State* tolua_S)
  1985. {
  1986. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1987. #ifndef TOLUA_RELEASE
  1988. tolua_Error tolua_err;
  1989. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  1990. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  1991. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  1992. #endif
  1993. self->max_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  1994. ;
  1995. return 0;
  1996. }
  1997. #endif //#ifndef TOLUA_DISABLE
  1998. /* method: new of class Color */
  1999. #ifndef TOLUA_DISABLE_tolua_Math_Color_new00
  2000. static int tolua_Math_Color_new00(lua_State* tolua_S)
  2001. {
  2002. #ifndef TOLUA_RELEASE
  2003. tolua_Error tolua_err;
  2004. if (
  2005. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2006. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2007. )
  2008. goto tolua_lerror;
  2009. else
  2010. #endif
  2011. {
  2012. {
  2013. Color* tolua_ret = (Color*) Mtolua_new((Color)());
  2014. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2015. }
  2016. }
  2017. return 1;
  2018. #ifndef TOLUA_RELEASE
  2019. tolua_lerror:
  2020. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2021. return 0;
  2022. #endif
  2023. }
  2024. #endif //#ifndef TOLUA_DISABLE
  2025. /* method: new_local of class Color */
  2026. #ifndef TOLUA_DISABLE_tolua_Math_Color_new00_local
  2027. static int tolua_Math_Color_new00_local(lua_State* tolua_S)
  2028. {
  2029. #ifndef TOLUA_RELEASE
  2030. tolua_Error tolua_err;
  2031. if (
  2032. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2033. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2034. )
  2035. goto tolua_lerror;
  2036. else
  2037. #endif
  2038. {
  2039. {
  2040. Color* tolua_ret = (Color*) Mtolua_new((Color)());
  2041. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2042. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2043. }
  2044. }
  2045. return 1;
  2046. #ifndef TOLUA_RELEASE
  2047. tolua_lerror:
  2048. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2049. return 0;
  2050. #endif
  2051. }
  2052. #endif //#ifndef TOLUA_DISABLE
  2053. /* method: new of class Color */
  2054. #ifndef TOLUA_DISABLE_tolua_Math_Color_new01
  2055. static int tolua_Math_Color_new01(lua_State* tolua_S)
  2056. {
  2057. tolua_Error tolua_err;
  2058. if (
  2059. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2060. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2061. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2062. )
  2063. goto tolua_lerror;
  2064. else
  2065. {
  2066. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2067. {
  2068. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color));
  2069. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2070. }
  2071. }
  2072. return 1;
  2073. tolua_lerror:
  2074. return tolua_Math_Color_new00(tolua_S);
  2075. }
  2076. #endif //#ifndef TOLUA_DISABLE
  2077. /* method: new_local of class Color */
  2078. #ifndef TOLUA_DISABLE_tolua_Math_Color_new01_local
  2079. static int tolua_Math_Color_new01_local(lua_State* tolua_S)
  2080. {
  2081. tolua_Error tolua_err;
  2082. if (
  2083. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2084. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2085. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2086. )
  2087. goto tolua_lerror;
  2088. else
  2089. {
  2090. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2091. {
  2092. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color));
  2093. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2094. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2095. }
  2096. }
  2097. return 1;
  2098. tolua_lerror:
  2099. return tolua_Math_Color_new00_local(tolua_S);
  2100. }
  2101. #endif //#ifndef TOLUA_DISABLE
  2102. /* method: new of class Color */
  2103. #ifndef TOLUA_DISABLE_tolua_Math_Color_new02
  2104. static int tolua_Math_Color_new02(lua_State* tolua_S)
  2105. {
  2106. tolua_Error tolua_err;
  2107. if (
  2108. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2109. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2110. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2111. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2112. )
  2113. goto tolua_lerror;
  2114. else
  2115. {
  2116. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2117. float a = ((float) tolua_tonumber(tolua_S,3,0));
  2118. {
  2119. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color,a));
  2120. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2121. }
  2122. }
  2123. return 1;
  2124. tolua_lerror:
  2125. return tolua_Math_Color_new01(tolua_S);
  2126. }
  2127. #endif //#ifndef TOLUA_DISABLE
  2128. /* method: new_local of class Color */
  2129. #ifndef TOLUA_DISABLE_tolua_Math_Color_new02_local
  2130. static int tolua_Math_Color_new02_local(lua_State* tolua_S)
  2131. {
  2132. tolua_Error tolua_err;
  2133. if (
  2134. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2135. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2136. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2137. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2138. )
  2139. goto tolua_lerror;
  2140. else
  2141. {
  2142. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2143. float a = ((float) tolua_tonumber(tolua_S,3,0));
  2144. {
  2145. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color,a));
  2146. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2147. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2148. }
  2149. }
  2150. return 1;
  2151. tolua_lerror:
  2152. return tolua_Math_Color_new01_local(tolua_S);
  2153. }
  2154. #endif //#ifndef TOLUA_DISABLE
  2155. /* method: new of class Color */
  2156. #ifndef TOLUA_DISABLE_tolua_Math_Color_new03
  2157. static int tolua_Math_Color_new03(lua_State* tolua_S)
  2158. {
  2159. tolua_Error tolua_err;
  2160. if (
  2161. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2162. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2163. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2164. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2165. !tolua_isnoobj(tolua_S,5,&tolua_err)
  2166. )
  2167. goto tolua_lerror;
  2168. else
  2169. {
  2170. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2171. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2172. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2173. {
  2174. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b));
  2175. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2176. }
  2177. }
  2178. return 1;
  2179. tolua_lerror:
  2180. return tolua_Math_Color_new02(tolua_S);
  2181. }
  2182. #endif //#ifndef TOLUA_DISABLE
  2183. /* method: new_local of class Color */
  2184. #ifndef TOLUA_DISABLE_tolua_Math_Color_new03_local
  2185. static int tolua_Math_Color_new03_local(lua_State* tolua_S)
  2186. {
  2187. tolua_Error tolua_err;
  2188. if (
  2189. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2190. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2191. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2192. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2193. !tolua_isnoobj(tolua_S,5,&tolua_err)
  2194. )
  2195. goto tolua_lerror;
  2196. else
  2197. {
  2198. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2199. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2200. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2201. {
  2202. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b));
  2203. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2204. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2205. }
  2206. }
  2207. return 1;
  2208. tolua_lerror:
  2209. return tolua_Math_Color_new02_local(tolua_S);
  2210. }
  2211. #endif //#ifndef TOLUA_DISABLE
  2212. /* method: new of class Color */
  2213. #ifndef TOLUA_DISABLE_tolua_Math_Color_new04
  2214. static int tolua_Math_Color_new04(lua_State* tolua_S)
  2215. {
  2216. tolua_Error tolua_err;
  2217. if (
  2218. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2219. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2220. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2221. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2222. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2223. !tolua_isnoobj(tolua_S,6,&tolua_err)
  2224. )
  2225. goto tolua_lerror;
  2226. else
  2227. {
  2228. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2229. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2230. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2231. float a = ((float) tolua_tonumber(tolua_S,5,0));
  2232. {
  2233. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b,a));
  2234. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2235. }
  2236. }
  2237. return 1;
  2238. tolua_lerror:
  2239. return tolua_Math_Color_new03(tolua_S);
  2240. }
  2241. #endif //#ifndef TOLUA_DISABLE
  2242. /* method: new_local of class Color */
  2243. #ifndef TOLUA_DISABLE_tolua_Math_Color_new04_local
  2244. static int tolua_Math_Color_new04_local(lua_State* tolua_S)
  2245. {
  2246. tolua_Error tolua_err;
  2247. if (
  2248. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2249. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2250. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2251. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2252. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2253. !tolua_isnoobj(tolua_S,6,&tolua_err)
  2254. )
  2255. goto tolua_lerror;
  2256. else
  2257. {
  2258. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2259. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2260. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2261. float a = ((float) tolua_tonumber(tolua_S,5,0));
  2262. {
  2263. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b,a));
  2264. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2265. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2266. }
  2267. }
  2268. return 1;
  2269. tolua_lerror:
  2270. return tolua_Math_Color_new03_local(tolua_S);
  2271. }
  2272. #endif //#ifndef TOLUA_DISABLE
  2273. /* method: operator== of class Color */
  2274. #ifndef TOLUA_DISABLE_tolua_Math_Color__eq00
  2275. static int tolua_Math_Color__eq00(lua_State* tolua_S)
  2276. {
  2277. #ifndef TOLUA_RELEASE
  2278. tolua_Error tolua_err;
  2279. if (
  2280. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2281. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2282. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2283. )
  2284. goto tolua_lerror;
  2285. else
  2286. #endif
  2287. {
  2288. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2289. const Color* rhs = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2290. #ifndef TOLUA_RELEASE
  2291. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  2292. #endif
  2293. {
  2294. bool tolua_ret = (bool) self->operator==(*rhs);
  2295. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  2296. }
  2297. }
  2298. return 1;
  2299. #ifndef TOLUA_RELEASE
  2300. tolua_lerror:
  2301. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  2302. return 0;
  2303. #endif
  2304. }
  2305. #endif //#ifndef TOLUA_DISABLE
  2306. /* method: operator* of class Color */
  2307. #ifndef TOLUA_DISABLE_tolua_Math_Color__mul00
  2308. static int tolua_Math_Color__mul00(lua_State* tolua_S)
  2309. {
  2310. #ifndef TOLUA_RELEASE
  2311. tolua_Error tolua_err;
  2312. if (
  2313. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2314. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2315. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2316. )
  2317. goto tolua_lerror;
  2318. else
  2319. #endif
  2320. {
  2321. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2322. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  2323. #ifndef TOLUA_RELEASE
  2324. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  2325. #endif
  2326. {
  2327. Color tolua_ret = (Color) self->operator*(rhs);
  2328. {
  2329. #ifdef __cplusplus
  2330. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  2331. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2332. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2333. #else
  2334. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  2335. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2336. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2337. #endif
  2338. }
  2339. }
  2340. }
  2341. return 1;
  2342. #ifndef TOLUA_RELEASE
  2343. tolua_lerror:
  2344. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  2345. return 0;
  2346. #endif
  2347. }
  2348. #endif //#ifndef TOLUA_DISABLE
  2349. /* method: operator+ of class Color */
  2350. #ifndef TOLUA_DISABLE_tolua_Math_Color__add00
  2351. static int tolua_Math_Color__add00(lua_State* tolua_S)
  2352. {
  2353. #ifndef TOLUA_RELEASE
  2354. tolua_Error tolua_err;
  2355. if (
  2356. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2357. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2358. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2359. )
  2360. goto tolua_lerror;
  2361. else
  2362. #endif
  2363. {
  2364. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2365. const Color* rhs = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2366. #ifndef TOLUA_RELEASE
  2367. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  2368. #endif
  2369. {
  2370. Color tolua_ret = (Color) self->operator+(*rhs);
  2371. {
  2372. #ifdef __cplusplus
  2373. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  2374. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2375. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2376. #else
  2377. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  2378. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2379. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2380. #endif
  2381. }
  2382. }
  2383. }
  2384. return 1;
  2385. #ifndef TOLUA_RELEASE
  2386. tolua_lerror:
  2387. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  2388. return 0;
  2389. #endif
  2390. }
  2391. #endif //#ifndef TOLUA_DISABLE
  2392. /* method: RGBValues of class Color */
  2393. #ifndef TOLUA_DISABLE_tolua_Math_Color_RGBValues00
  2394. static int tolua_Math_Color_RGBValues00(lua_State* tolua_S)
  2395. {
  2396. #ifndef TOLUA_RELEASE
  2397. tolua_Error tolua_err;
  2398. if (
  2399. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2400. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2401. )
  2402. goto tolua_lerror;
  2403. else
  2404. #endif
  2405. {
  2406. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2407. #ifndef TOLUA_RELEASE
  2408. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RGBValues'", NULL);
  2409. #endif
  2410. {
  2411. Vector3 tolua_ret = (Vector3) self->RGBValues();
  2412. {
  2413. #ifdef __cplusplus
  2414. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  2415. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2416. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2417. #else
  2418. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  2419. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2420. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2421. #endif
  2422. }
  2423. }
  2424. }
  2425. return 1;
  2426. #ifndef TOLUA_RELEASE
  2427. tolua_lerror:
  2428. tolua_error(tolua_S,"#ferror in function 'RGBValues'.",&tolua_err);
  2429. return 0;
  2430. #endif
  2431. }
  2432. #endif //#ifndef TOLUA_DISABLE
  2433. /* method: Intensity of class Color */
  2434. #ifndef TOLUA_DISABLE_tolua_Math_Color_Intensity00
  2435. static int tolua_Math_Color_Intensity00(lua_State* tolua_S)
  2436. {
  2437. #ifndef TOLUA_RELEASE
  2438. tolua_Error tolua_err;
  2439. if (
  2440. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2441. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2442. )
  2443. goto tolua_lerror;
  2444. else
  2445. #endif
  2446. {
  2447. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2448. #ifndef TOLUA_RELEASE
  2449. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Intensity'", NULL);
  2450. #endif
  2451. {
  2452. float tolua_ret = (float) self->Intensity();
  2453. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2454. }
  2455. }
  2456. return 1;
  2457. #ifndef TOLUA_RELEASE
  2458. tolua_lerror:
  2459. tolua_error(tolua_S,"#ferror in function 'Intensity'.",&tolua_err);
  2460. return 0;
  2461. #endif
  2462. }
  2463. #endif //#ifndef TOLUA_DISABLE
  2464. /* method: Lerp of class Color */
  2465. #ifndef TOLUA_DISABLE_tolua_Math_Color_Lerp00
  2466. static int tolua_Math_Color_Lerp00(lua_State* tolua_S)
  2467. {
  2468. #ifndef TOLUA_RELEASE
  2469. tolua_Error tolua_err;
  2470. if (
  2471. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2472. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2473. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2474. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2475. )
  2476. goto tolua_lerror;
  2477. else
  2478. #endif
  2479. {
  2480. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2481. const Color* rhs = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2482. float t = ((float) tolua_tonumber(tolua_S,3,0));
  2483. #ifndef TOLUA_RELEASE
  2484. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  2485. #endif
  2486. {
  2487. Color tolua_ret = (Color) self->Lerp(*rhs,t);
  2488. {
  2489. #ifdef __cplusplus
  2490. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  2491. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2492. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2493. #else
  2494. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  2495. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2496. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2497. #endif
  2498. }
  2499. }
  2500. }
  2501. return 1;
  2502. #ifndef TOLUA_RELEASE
  2503. tolua_lerror:
  2504. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  2505. return 0;
  2506. #endif
  2507. }
  2508. #endif //#ifndef TOLUA_DISABLE
  2509. /* method: ToUInt of class Color */
  2510. #ifndef TOLUA_DISABLE_tolua_Math_Color_ToUInt00
  2511. static int tolua_Math_Color_ToUInt00(lua_State* tolua_S)
  2512. {
  2513. #ifndef TOLUA_RELEASE
  2514. tolua_Error tolua_err;
  2515. if (
  2516. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2517. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2518. )
  2519. goto tolua_lerror;
  2520. else
  2521. #endif
  2522. {
  2523. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2524. #ifndef TOLUA_RELEASE
  2525. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToUInt'", NULL);
  2526. #endif
  2527. {
  2528. unsigned tolua_ret = (unsigned) self->ToUInt();
  2529. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2530. }
  2531. }
  2532. return 1;
  2533. #ifndef TOLUA_RELEASE
  2534. tolua_lerror:
  2535. tolua_error(tolua_S,"#ferror in function 'ToUInt'.",&tolua_err);
  2536. return 0;
  2537. #endif
  2538. }
  2539. #endif //#ifndef TOLUA_DISABLE
  2540. /* method: ToVector4 of class Color */
  2541. #ifndef TOLUA_DISABLE_tolua_Math_Color_ToVector400
  2542. static int tolua_Math_Color_ToVector400(lua_State* tolua_S)
  2543. {
  2544. #ifndef TOLUA_RELEASE
  2545. tolua_Error tolua_err;
  2546. if (
  2547. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2548. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2549. )
  2550. goto tolua_lerror;
  2551. else
  2552. #endif
  2553. {
  2554. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2555. #ifndef TOLUA_RELEASE
  2556. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToVector4'", NULL);
  2557. #endif
  2558. {
  2559. Vector4 tolua_ret = (Vector4) self->ToVector4();
  2560. {
  2561. #ifdef __cplusplus
  2562. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  2563. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2564. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2565. #else
  2566. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  2567. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2568. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2569. #endif
  2570. }
  2571. }
  2572. }
  2573. return 1;
  2574. #ifndef TOLUA_RELEASE
  2575. tolua_lerror:
  2576. tolua_error(tolua_S,"#ferror in function 'ToVector4'.",&tolua_err);
  2577. return 0;
  2578. #endif
  2579. }
  2580. #endif //#ifndef TOLUA_DISABLE
  2581. /* method: ToString of class Color */
  2582. #ifndef TOLUA_DISABLE_tolua_Math_Color_ToString00
  2583. static int tolua_Math_Color_ToString00(lua_State* tolua_S)
  2584. {
  2585. #ifndef TOLUA_RELEASE
  2586. tolua_Error tolua_err;
  2587. if (
  2588. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2589. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2590. )
  2591. goto tolua_lerror;
  2592. else
  2593. #endif
  2594. {
  2595. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2596. #ifndef TOLUA_RELEASE
  2597. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  2598. #endif
  2599. {
  2600. String tolua_ret = (String) self->ToString();
  2601. {
  2602. #ifdef __cplusplus
  2603. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  2604. tolua_pushusertype(tolua_S,tolua_obj,"String");
  2605. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2606. #else
  2607. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  2608. tolua_pushusertype(tolua_S,tolua_obj,"String");
  2609. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2610. #endif
  2611. }
  2612. }
  2613. }
  2614. return 1;
  2615. #ifndef TOLUA_RELEASE
  2616. tolua_lerror:
  2617. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  2618. return 0;
  2619. #endif
  2620. }
  2621. #endif //#ifndef TOLUA_DISABLE
  2622. /* get function: r_ of class Color */
  2623. #ifndef TOLUA_DISABLE_tolua_get_Color_r
  2624. static int tolua_get_Color_r(lua_State* tolua_S)
  2625. {
  2626. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2627. #ifndef TOLUA_RELEASE
  2628. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'r_'",NULL);
  2629. #endif
  2630. tolua_pushnumber(tolua_S,(lua_Number)self->r_);
  2631. return 1;
  2632. }
  2633. #endif //#ifndef TOLUA_DISABLE
  2634. /* set function: r_ of class Color */
  2635. #ifndef TOLUA_DISABLE_tolua_set_Color_r
  2636. static int tolua_set_Color_r(lua_State* tolua_S)
  2637. {
  2638. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2639. #ifndef TOLUA_RELEASE
  2640. tolua_Error tolua_err;
  2641. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'r_'",NULL);
  2642. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2643. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2644. #endif
  2645. self->r_ = ((float) tolua_tonumber(tolua_S,2,0))
  2646. ;
  2647. return 0;
  2648. }
  2649. #endif //#ifndef TOLUA_DISABLE
  2650. /* get function: g_ of class Color */
  2651. #ifndef TOLUA_DISABLE_tolua_get_Color_g
  2652. static int tolua_get_Color_g(lua_State* tolua_S)
  2653. {
  2654. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2655. #ifndef TOLUA_RELEASE
  2656. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'g_'",NULL);
  2657. #endif
  2658. tolua_pushnumber(tolua_S,(lua_Number)self->g_);
  2659. return 1;
  2660. }
  2661. #endif //#ifndef TOLUA_DISABLE
  2662. /* set function: g_ of class Color */
  2663. #ifndef TOLUA_DISABLE_tolua_set_Color_g
  2664. static int tolua_set_Color_g(lua_State* tolua_S)
  2665. {
  2666. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2667. #ifndef TOLUA_RELEASE
  2668. tolua_Error tolua_err;
  2669. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'g_'",NULL);
  2670. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2671. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2672. #endif
  2673. self->g_ = ((float) tolua_tonumber(tolua_S,2,0))
  2674. ;
  2675. return 0;
  2676. }
  2677. #endif //#ifndef TOLUA_DISABLE
  2678. /* get function: b_ of class Color */
  2679. #ifndef TOLUA_DISABLE_tolua_get_Color_b
  2680. static int tolua_get_Color_b(lua_State* tolua_S)
  2681. {
  2682. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2683. #ifndef TOLUA_RELEASE
  2684. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'b_'",NULL);
  2685. #endif
  2686. tolua_pushnumber(tolua_S,(lua_Number)self->b_);
  2687. return 1;
  2688. }
  2689. #endif //#ifndef TOLUA_DISABLE
  2690. /* set function: b_ of class Color */
  2691. #ifndef TOLUA_DISABLE_tolua_set_Color_b
  2692. static int tolua_set_Color_b(lua_State* tolua_S)
  2693. {
  2694. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2695. #ifndef TOLUA_RELEASE
  2696. tolua_Error tolua_err;
  2697. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'b_'",NULL);
  2698. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2699. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2700. #endif
  2701. self->b_ = ((float) tolua_tonumber(tolua_S,2,0))
  2702. ;
  2703. return 0;
  2704. }
  2705. #endif //#ifndef TOLUA_DISABLE
  2706. /* get function: a_ of class Color */
  2707. #ifndef TOLUA_DISABLE_tolua_get_Color_a
  2708. static int tolua_get_Color_a(lua_State* tolua_S)
  2709. {
  2710. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2711. #ifndef TOLUA_RELEASE
  2712. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'a_'",NULL);
  2713. #endif
  2714. tolua_pushnumber(tolua_S,(lua_Number)self->a_);
  2715. return 1;
  2716. }
  2717. #endif //#ifndef TOLUA_DISABLE
  2718. /* set function: a_ of class Color */
  2719. #ifndef TOLUA_DISABLE_tolua_set_Color_a
  2720. static int tolua_set_Color_a(lua_State* tolua_S)
  2721. {
  2722. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2723. #ifndef TOLUA_RELEASE
  2724. tolua_Error tolua_err;
  2725. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'a_'",NULL);
  2726. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2727. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2728. #endif
  2729. self->a_ = ((float) tolua_tonumber(tolua_S,2,0))
  2730. ;
  2731. return 0;
  2732. }
  2733. #endif //#ifndef TOLUA_DISABLE
  2734. /* get function: WHITE of class Color */
  2735. #ifndef TOLUA_DISABLE_tolua_get_Color_WHITE
  2736. static int tolua_get_Color_WHITE(lua_State* tolua_S)
  2737. {
  2738. tolua_pushusertype(tolua_S,(void*)&Color::WHITE,"const Color");
  2739. return 1;
  2740. }
  2741. #endif //#ifndef TOLUA_DISABLE
  2742. /* get function: YELLOW of class Color */
  2743. #ifndef TOLUA_DISABLE_tolua_get_Color_YELLOW
  2744. static int tolua_get_Color_YELLOW(lua_State* tolua_S)
  2745. {
  2746. tolua_pushusertype(tolua_S,(void*)&Color::YELLOW,"const Color");
  2747. return 1;
  2748. }
  2749. #endif //#ifndef TOLUA_DISABLE
  2750. /* get function: RED of class Color */
  2751. #ifndef TOLUA_DISABLE_tolua_get_Color_RED
  2752. static int tolua_get_Color_RED(lua_State* tolua_S)
  2753. {
  2754. tolua_pushusertype(tolua_S,(void*)&Color::RED,"const Color");
  2755. return 1;
  2756. }
  2757. #endif //#ifndef TOLUA_DISABLE
  2758. /* get function: GREEN of class Color */
  2759. #ifndef TOLUA_DISABLE_tolua_get_Color_GREEN
  2760. static int tolua_get_Color_GREEN(lua_State* tolua_S)
  2761. {
  2762. tolua_pushusertype(tolua_S,(void*)&Color::GREEN,"const Color");
  2763. return 1;
  2764. }
  2765. #endif //#ifndef TOLUA_DISABLE
  2766. /* get function: BLUE of class Color */
  2767. #ifndef TOLUA_DISABLE_tolua_get_Color_BLUE
  2768. static int tolua_get_Color_BLUE(lua_State* tolua_S)
  2769. {
  2770. tolua_pushusertype(tolua_S,(void*)&Color::BLUE,"const Color");
  2771. return 1;
  2772. }
  2773. #endif //#ifndef TOLUA_DISABLE
  2774. /* get function: BLACK of class Color */
  2775. #ifndef TOLUA_DISABLE_tolua_get_Color_BLACK
  2776. static int tolua_get_Color_BLACK(lua_State* tolua_S)
  2777. {
  2778. tolua_pushusertype(tolua_S,(void*)&Color::BLACK,"const Color");
  2779. return 1;
  2780. }
  2781. #endif //#ifndef TOLUA_DISABLE
  2782. /* get function: TRANSPARENT of class Color */
  2783. #ifndef TOLUA_DISABLE_tolua_get_Color_TRANSPARENT
  2784. static int tolua_get_Color_TRANSPARENT(lua_State* tolua_S)
  2785. {
  2786. tolua_pushusertype(tolua_S,(void*)&Color::TRANSPARENT,"const Color");
  2787. return 1;
  2788. }
  2789. #endif //#ifndef TOLUA_DISABLE
  2790. /* get function: NUM_FRUSTUM_PLANES */
  2791. #ifndef TOLUA_DISABLE_tolua_get_NUM_FRUSTUM_PLANES
  2792. static int tolua_get_NUM_FRUSTUM_PLANES(lua_State* tolua_S)
  2793. {
  2794. tolua_pushnumber(tolua_S,(lua_Number)NUM_FRUSTUM_PLANES);
  2795. return 1;
  2796. }
  2797. #endif //#ifndef TOLUA_DISABLE
  2798. /* get function: NUM_FRUSTUM_VERTICES */
  2799. #ifndef TOLUA_DISABLE_tolua_get_NUM_FRUSTUM_VERTICES
  2800. static int tolua_get_NUM_FRUSTUM_VERTICES(lua_State* tolua_S)
  2801. {
  2802. tolua_pushnumber(tolua_S,(lua_Number)NUM_FRUSTUM_VERTICES);
  2803. return 1;
  2804. }
  2805. #endif //#ifndef TOLUA_DISABLE
  2806. /* method: new of class Frustum */
  2807. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new00
  2808. static int tolua_Math_Frustum_new00(lua_State* tolua_S)
  2809. {
  2810. #ifndef TOLUA_RELEASE
  2811. tolua_Error tolua_err;
  2812. if (
  2813. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2814. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2815. )
  2816. goto tolua_lerror;
  2817. else
  2818. #endif
  2819. {
  2820. {
  2821. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)());
  2822. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2823. }
  2824. }
  2825. return 1;
  2826. #ifndef TOLUA_RELEASE
  2827. tolua_lerror:
  2828. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2829. return 0;
  2830. #endif
  2831. }
  2832. #endif //#ifndef TOLUA_DISABLE
  2833. /* method: new_local of class Frustum */
  2834. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new00_local
  2835. static int tolua_Math_Frustum_new00_local(lua_State* tolua_S)
  2836. {
  2837. #ifndef TOLUA_RELEASE
  2838. tolua_Error tolua_err;
  2839. if (
  2840. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2841. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2842. )
  2843. goto tolua_lerror;
  2844. else
  2845. #endif
  2846. {
  2847. {
  2848. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)());
  2849. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2850. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2851. }
  2852. }
  2853. return 1;
  2854. #ifndef TOLUA_RELEASE
  2855. tolua_lerror:
  2856. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2857. return 0;
  2858. #endif
  2859. }
  2860. #endif //#ifndef TOLUA_DISABLE
  2861. /* method: new of class Frustum */
  2862. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new01
  2863. static int tolua_Math_Frustum_new01(lua_State* tolua_S)
  2864. {
  2865. tolua_Error tolua_err;
  2866. if (
  2867. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2868. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  2869. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2870. )
  2871. goto tolua_lerror;
  2872. else
  2873. {
  2874. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  2875. {
  2876. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)(*frustum));
  2877. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2878. }
  2879. }
  2880. return 1;
  2881. tolua_lerror:
  2882. return tolua_Math_Frustum_new00(tolua_S);
  2883. }
  2884. #endif //#ifndef TOLUA_DISABLE
  2885. /* method: new_local of class Frustum */
  2886. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new01_local
  2887. static int tolua_Math_Frustum_new01_local(lua_State* tolua_S)
  2888. {
  2889. tolua_Error tolua_err;
  2890. if (
  2891. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2892. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  2893. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2894. )
  2895. goto tolua_lerror;
  2896. else
  2897. {
  2898. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  2899. {
  2900. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)(*frustum));
  2901. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2902. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2903. }
  2904. }
  2905. return 1;
  2906. tolua_lerror:
  2907. return tolua_Math_Frustum_new00_local(tolua_S);
  2908. }
  2909. #endif //#ifndef TOLUA_DISABLE
  2910. /* method: Define of class Frustum */
  2911. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define00
  2912. static int tolua_Math_Frustum_Define00(lua_State* tolua_S)
  2913. {
  2914. #ifndef TOLUA_RELEASE
  2915. tolua_Error tolua_err;
  2916. if (
  2917. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2918. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2919. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2920. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2921. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2922. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  2923. !tolua_isnoobj(tolua_S,7,&tolua_err)
  2924. )
  2925. goto tolua_lerror;
  2926. else
  2927. #endif
  2928. {
  2929. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2930. float fov = ((float) tolua_tonumber(tolua_S,2,0));
  2931. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  2932. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  2933. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  2934. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  2935. #ifndef TOLUA_RELEASE
  2936. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2937. #endif
  2938. {
  2939. self->Define(fov,aspectRatio,zoom,nearZ,farZ);
  2940. }
  2941. }
  2942. return 0;
  2943. #ifndef TOLUA_RELEASE
  2944. tolua_lerror:
  2945. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  2946. return 0;
  2947. #endif
  2948. }
  2949. #endif //#ifndef TOLUA_DISABLE
  2950. /* method: Define of class Frustum */
  2951. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define01
  2952. static int tolua_Math_Frustum_Define01(lua_State* tolua_S)
  2953. {
  2954. tolua_Error tolua_err;
  2955. if (
  2956. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2957. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2958. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2959. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2960. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2961. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  2962. (tolua_isvaluenil(tolua_S,7,&tolua_err) || !tolua_isusertype(tolua_S,7,"const Matrix3x4",0,&tolua_err)) ||
  2963. !tolua_isnoobj(tolua_S,8,&tolua_err)
  2964. )
  2965. goto tolua_lerror;
  2966. else
  2967. {
  2968. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2969. float fov = ((float) tolua_tonumber(tolua_S,2,0));
  2970. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  2971. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  2972. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  2973. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  2974. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,7,0));
  2975. #ifndef TOLUA_RELEASE
  2976. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2977. #endif
  2978. {
  2979. self->Define(fov,aspectRatio,zoom,nearZ,farZ,*transform);
  2980. }
  2981. }
  2982. return 0;
  2983. tolua_lerror:
  2984. return tolua_Math_Frustum_Define00(tolua_S);
  2985. }
  2986. #endif //#ifndef TOLUA_DISABLE
  2987. /* method: Define of class Frustum */
  2988. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define02
  2989. static int tolua_Math_Frustum_Define02(lua_State* tolua_S)
  2990. {
  2991. tolua_Error tolua_err;
  2992. if (
  2993. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2994. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  2995. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  2996. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2997. )
  2998. goto tolua_lerror;
  2999. else
  3000. {
  3001. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3002. const Vector3* near = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  3003. const Vector3* far = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  3004. #ifndef TOLUA_RELEASE
  3005. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  3006. #endif
  3007. {
  3008. self->Define(*near,*far);
  3009. }
  3010. }
  3011. return 0;
  3012. tolua_lerror:
  3013. return tolua_Math_Frustum_Define01(tolua_S);
  3014. }
  3015. #endif //#ifndef TOLUA_DISABLE
  3016. /* method: Define of class Frustum */
  3017. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define03
  3018. static int tolua_Math_Frustum_Define03(lua_State* tolua_S)
  3019. {
  3020. tolua_Error tolua_err;
  3021. if (
  3022. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3023. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  3024. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  3025. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Matrix3x4",0,&tolua_err)) ||
  3026. !tolua_isnoobj(tolua_S,5,&tolua_err)
  3027. )
  3028. goto tolua_lerror;
  3029. else
  3030. {
  3031. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3032. const Vector3* near = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  3033. const Vector3* far = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  3034. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,4,0));
  3035. #ifndef TOLUA_RELEASE
  3036. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  3037. #endif
  3038. {
  3039. self->Define(*near,*far,*transform);
  3040. }
  3041. }
  3042. return 0;
  3043. tolua_lerror:
  3044. return tolua_Math_Frustum_Define02(tolua_S);
  3045. }
  3046. #endif //#ifndef TOLUA_DISABLE
  3047. /* method: Define of class Frustum */
  3048. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define04
  3049. static int tolua_Math_Frustum_Define04(lua_State* tolua_S)
  3050. {
  3051. tolua_Error tolua_err;
  3052. if (
  3053. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3054. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  3055. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3056. )
  3057. goto tolua_lerror;
  3058. else
  3059. {
  3060. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3061. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3062. #ifndef TOLUA_RELEASE
  3063. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  3064. #endif
  3065. {
  3066. self->Define(*box);
  3067. }
  3068. }
  3069. return 0;
  3070. tolua_lerror:
  3071. return tolua_Math_Frustum_Define03(tolua_S);
  3072. }
  3073. #endif //#ifndef TOLUA_DISABLE
  3074. /* method: Define of class Frustum */
  3075. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define05
  3076. static int tolua_Math_Frustum_Define05(lua_State* tolua_S)
  3077. {
  3078. tolua_Error tolua_err;
  3079. if (
  3080. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3081. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  3082. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Matrix3x4",0,&tolua_err)) ||
  3083. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3084. )
  3085. goto tolua_lerror;
  3086. else
  3087. {
  3088. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3089. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3090. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,3,0));
  3091. #ifndef TOLUA_RELEASE
  3092. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  3093. #endif
  3094. {
  3095. self->Define(*box,*transform);
  3096. }
  3097. }
  3098. return 0;
  3099. tolua_lerror:
  3100. return tolua_Math_Frustum_Define04(tolua_S);
  3101. }
  3102. #endif //#ifndef TOLUA_DISABLE
  3103. /* method: DefineOrtho of class Frustum */
  3104. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_DefineOrtho00
  3105. static int tolua_Math_Frustum_DefineOrtho00(lua_State* tolua_S)
  3106. {
  3107. #ifndef TOLUA_RELEASE
  3108. tolua_Error tolua_err;
  3109. if (
  3110. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3111. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3112. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3113. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  3114. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  3115. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  3116. !tolua_isnoobj(tolua_S,7,&tolua_err)
  3117. )
  3118. goto tolua_lerror;
  3119. else
  3120. #endif
  3121. {
  3122. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3123. float orthoSize = ((float) tolua_tonumber(tolua_S,2,0));
  3124. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  3125. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  3126. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  3127. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  3128. #ifndef TOLUA_RELEASE
  3129. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DefineOrtho'", NULL);
  3130. #endif
  3131. {
  3132. self->DefineOrtho(orthoSize,aspectRatio,zoom,nearZ,farZ);
  3133. }
  3134. }
  3135. return 0;
  3136. #ifndef TOLUA_RELEASE
  3137. tolua_lerror:
  3138. tolua_error(tolua_S,"#ferror in function 'DefineOrtho'.",&tolua_err);
  3139. return 0;
  3140. #endif
  3141. }
  3142. #endif //#ifndef TOLUA_DISABLE
  3143. /* method: DefineOrtho of class Frustum */
  3144. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_DefineOrtho01
  3145. static int tolua_Math_Frustum_DefineOrtho01(lua_State* tolua_S)
  3146. {
  3147. tolua_Error tolua_err;
  3148. if (
  3149. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3150. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3151. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3152. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  3153. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  3154. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  3155. (tolua_isvaluenil(tolua_S,7,&tolua_err) || !tolua_isusertype(tolua_S,7,"const Matrix3x4",0,&tolua_err)) ||
  3156. !tolua_isnoobj(tolua_S,8,&tolua_err)
  3157. )
  3158. goto tolua_lerror;
  3159. else
  3160. {
  3161. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3162. float orthoSize = ((float) tolua_tonumber(tolua_S,2,0));
  3163. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  3164. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  3165. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  3166. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  3167. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,7,0));
  3168. #ifndef TOLUA_RELEASE
  3169. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DefineOrtho'", NULL);
  3170. #endif
  3171. {
  3172. self->DefineOrtho(orthoSize,aspectRatio,zoom,nearZ,farZ,*transform);
  3173. }
  3174. }
  3175. return 0;
  3176. tolua_lerror:
  3177. return tolua_Math_Frustum_DefineOrtho00(tolua_S);
  3178. }
  3179. #endif //#ifndef TOLUA_DISABLE
  3180. /* method: Transform of class Frustum */
  3181. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transform00
  3182. static int tolua_Math_Frustum_Transform00(lua_State* tolua_S)
  3183. {
  3184. #ifndef TOLUA_RELEASE
  3185. tolua_Error tolua_err;
  3186. if (
  3187. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3188. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  3189. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3190. )
  3191. goto tolua_lerror;
  3192. else
  3193. #endif
  3194. {
  3195. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3196. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  3197. #ifndef TOLUA_RELEASE
  3198. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  3199. #endif
  3200. {
  3201. self->Transform(*transform);
  3202. }
  3203. }
  3204. return 0;
  3205. #ifndef TOLUA_RELEASE
  3206. tolua_lerror:
  3207. tolua_error(tolua_S,"#ferror in function 'Transform'.",&tolua_err);
  3208. return 0;
  3209. #endif
  3210. }
  3211. #endif //#ifndef TOLUA_DISABLE
  3212. /* method: Transform of class Frustum */
  3213. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transform01
  3214. static int tolua_Math_Frustum_Transform01(lua_State* tolua_S)
  3215. {
  3216. tolua_Error tolua_err;
  3217. if (
  3218. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3219. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  3220. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3221. )
  3222. goto tolua_lerror;
  3223. else
  3224. {
  3225. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3226. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  3227. #ifndef TOLUA_RELEASE
  3228. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  3229. #endif
  3230. {
  3231. self->Transform(*transform);
  3232. }
  3233. }
  3234. return 0;
  3235. tolua_lerror:
  3236. return tolua_Math_Frustum_Transform00(tolua_S);
  3237. }
  3238. #endif //#ifndef TOLUA_DISABLE
  3239. /* method: IsInside of class Frustum */
  3240. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInside00
  3241. static int tolua_Math_Frustum_IsInside00(lua_State* tolua_S)
  3242. {
  3243. #ifndef TOLUA_RELEASE
  3244. tolua_Error tolua_err;
  3245. if (
  3246. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3247. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  3248. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3249. )
  3250. goto tolua_lerror;
  3251. else
  3252. #endif
  3253. {
  3254. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3255. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  3256. #ifndef TOLUA_RELEASE
  3257. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  3258. #endif
  3259. {
  3260. Intersection tolua_ret = (Intersection) self->IsInside(*point);
  3261. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3262. }
  3263. }
  3264. return 1;
  3265. #ifndef TOLUA_RELEASE
  3266. tolua_lerror:
  3267. tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err);
  3268. return 0;
  3269. #endif
  3270. }
  3271. #endif //#ifndef TOLUA_DISABLE
  3272. /* method: IsInside of class Frustum */
  3273. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInside01
  3274. static int tolua_Math_Frustum_IsInside01(lua_State* tolua_S)
  3275. {
  3276. tolua_Error tolua_err;
  3277. if (
  3278. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3279. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  3280. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3281. )
  3282. goto tolua_lerror;
  3283. else
  3284. {
  3285. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3286. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  3287. #ifndef TOLUA_RELEASE
  3288. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  3289. #endif
  3290. {
  3291. Intersection tolua_ret = (Intersection) self->IsInside(*sphere);
  3292. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3293. }
  3294. }
  3295. return 1;
  3296. tolua_lerror:
  3297. return tolua_Math_Frustum_IsInside00(tolua_S);
  3298. }
  3299. #endif //#ifndef TOLUA_DISABLE
  3300. /* method: IsInsideFast of class Frustum */
  3301. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInsideFast00
  3302. static int tolua_Math_Frustum_IsInsideFast00(lua_State* tolua_S)
  3303. {
  3304. #ifndef TOLUA_RELEASE
  3305. tolua_Error tolua_err;
  3306. if (
  3307. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3308. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  3309. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3310. )
  3311. goto tolua_lerror;
  3312. else
  3313. #endif
  3314. {
  3315. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3316. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  3317. #ifndef TOLUA_RELEASE
  3318. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  3319. #endif
  3320. {
  3321. Intersection tolua_ret = (Intersection) self->IsInsideFast(*sphere);
  3322. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3323. }
  3324. }
  3325. return 1;
  3326. #ifndef TOLUA_RELEASE
  3327. tolua_lerror:
  3328. tolua_error(tolua_S,"#ferror in function 'IsInsideFast'.",&tolua_err);
  3329. return 0;
  3330. #endif
  3331. }
  3332. #endif //#ifndef TOLUA_DISABLE
  3333. /* method: IsInside of class Frustum */
  3334. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInside02
  3335. static int tolua_Math_Frustum_IsInside02(lua_State* tolua_S)
  3336. {
  3337. tolua_Error tolua_err;
  3338. if (
  3339. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3340. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  3341. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3342. )
  3343. goto tolua_lerror;
  3344. else
  3345. {
  3346. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3347. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3348. #ifndef TOLUA_RELEASE
  3349. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  3350. #endif
  3351. {
  3352. Intersection tolua_ret = (Intersection) self->IsInside(*box);
  3353. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3354. }
  3355. }
  3356. return 1;
  3357. tolua_lerror:
  3358. return tolua_Math_Frustum_IsInside01(tolua_S);
  3359. }
  3360. #endif //#ifndef TOLUA_DISABLE
  3361. /* method: IsInsideFast of class Frustum */
  3362. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInsideFast01
  3363. static int tolua_Math_Frustum_IsInsideFast01(lua_State* tolua_S)
  3364. {
  3365. tolua_Error tolua_err;
  3366. if (
  3367. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3368. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  3369. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3370. )
  3371. goto tolua_lerror;
  3372. else
  3373. {
  3374. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3375. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3376. #ifndef TOLUA_RELEASE
  3377. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  3378. #endif
  3379. {
  3380. Intersection tolua_ret = (Intersection) self->IsInsideFast(*box);
  3381. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3382. }
  3383. }
  3384. return 1;
  3385. tolua_lerror:
  3386. return tolua_Math_Frustum_IsInsideFast00(tolua_S);
  3387. }
  3388. #endif //#ifndef TOLUA_DISABLE
  3389. /* method: Distance of class Frustum */
  3390. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Distance00
  3391. static int tolua_Math_Frustum_Distance00(lua_State* tolua_S)
  3392. {
  3393. #ifndef TOLUA_RELEASE
  3394. tolua_Error tolua_err;
  3395. if (
  3396. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3397. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  3398. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3399. )
  3400. goto tolua_lerror;
  3401. else
  3402. #endif
  3403. {
  3404. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3405. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  3406. #ifndef TOLUA_RELEASE
  3407. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  3408. #endif
  3409. {
  3410. float tolua_ret = (float) self->Distance(*point);
  3411. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3412. }
  3413. }
  3414. return 1;
  3415. #ifndef TOLUA_RELEASE
  3416. tolua_lerror:
  3417. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  3418. return 0;
  3419. #endif
  3420. }
  3421. #endif //#ifndef TOLUA_DISABLE
  3422. /* method: Transformed of class Frustum */
  3423. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transformed00
  3424. static int tolua_Math_Frustum_Transformed00(lua_State* tolua_S)
  3425. {
  3426. #ifndef TOLUA_RELEASE
  3427. tolua_Error tolua_err;
  3428. if (
  3429. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3430. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  3431. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3432. )
  3433. goto tolua_lerror;
  3434. else
  3435. #endif
  3436. {
  3437. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3438. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  3439. #ifndef TOLUA_RELEASE
  3440. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  3441. #endif
  3442. {
  3443. Frustum tolua_ret = (Frustum) self->Transformed(*transform);
  3444. {
  3445. #ifdef __cplusplus
  3446. void* tolua_obj = Mtolua_new((Frustum)(tolua_ret));
  3447. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3448. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3449. #else
  3450. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Frustum));
  3451. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3452. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3453. #endif
  3454. }
  3455. }
  3456. }
  3457. return 1;
  3458. #ifndef TOLUA_RELEASE
  3459. tolua_lerror:
  3460. tolua_error(tolua_S,"#ferror in function 'Transformed'.",&tolua_err);
  3461. return 0;
  3462. #endif
  3463. }
  3464. #endif //#ifndef TOLUA_DISABLE
  3465. /* method: Transformed of class Frustum */
  3466. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transformed01
  3467. static int tolua_Math_Frustum_Transformed01(lua_State* tolua_S)
  3468. {
  3469. tolua_Error tolua_err;
  3470. if (
  3471. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3472. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  3473. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3474. )
  3475. goto tolua_lerror;
  3476. else
  3477. {
  3478. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3479. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  3480. #ifndef TOLUA_RELEASE
  3481. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  3482. #endif
  3483. {
  3484. Frustum tolua_ret = (Frustum) self->Transformed(*transform);
  3485. {
  3486. #ifdef __cplusplus
  3487. void* tolua_obj = Mtolua_new((Frustum)(tolua_ret));
  3488. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3489. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3490. #else
  3491. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Frustum));
  3492. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3493. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3494. #endif
  3495. }
  3496. }
  3497. }
  3498. return 1;
  3499. tolua_lerror:
  3500. return tolua_Math_Frustum_Transformed00(tolua_S);
  3501. }
  3502. #endif //#ifndef TOLUA_DISABLE
  3503. /* method: Projected of class Frustum */
  3504. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Projected00
  3505. static int tolua_Math_Frustum_Projected00(lua_State* tolua_S)
  3506. {
  3507. #ifndef TOLUA_RELEASE
  3508. tolua_Error tolua_err;
  3509. if (
  3510. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3511. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  3512. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3513. )
  3514. goto tolua_lerror;
  3515. else
  3516. #endif
  3517. {
  3518. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3519. const Matrix4* transform = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  3520. #ifndef TOLUA_RELEASE
  3521. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Projected'", NULL);
  3522. #endif
  3523. {
  3524. Rect tolua_ret = (Rect) self->Projected(*transform);
  3525. {
  3526. #ifdef __cplusplus
  3527. void* tolua_obj = Mtolua_new((Rect)(tolua_ret));
  3528. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  3529. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3530. #else
  3531. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Rect));
  3532. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  3533. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3534. #endif
  3535. }
  3536. }
  3537. }
  3538. return 1;
  3539. #ifndef TOLUA_RELEASE
  3540. tolua_lerror:
  3541. tolua_error(tolua_S,"#ferror in function 'Projected'.",&tolua_err);
  3542. return 0;
  3543. #endif
  3544. }
  3545. #endif //#ifndef TOLUA_DISABLE
  3546. /* method: UpdatePlanes of class Frustum */
  3547. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_UpdatePlanes00
  3548. static int tolua_Math_Frustum_UpdatePlanes00(lua_State* tolua_S)
  3549. {
  3550. #ifndef TOLUA_RELEASE
  3551. tolua_Error tolua_err;
  3552. if (
  3553. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3554. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3555. )
  3556. goto tolua_lerror;
  3557. else
  3558. #endif
  3559. {
  3560. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3561. #ifndef TOLUA_RELEASE
  3562. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdatePlanes'", NULL);
  3563. #endif
  3564. {
  3565. self->UpdatePlanes();
  3566. }
  3567. }
  3568. return 0;
  3569. #ifndef TOLUA_RELEASE
  3570. tolua_lerror:
  3571. tolua_error(tolua_S,"#ferror in function 'UpdatePlanes'.",&tolua_err);
  3572. return 0;
  3573. #endif
  3574. }
  3575. #endif //#ifndef TOLUA_DISABLE
  3576. /* get function: M_PI */
  3577. #ifndef TOLUA_DISABLE_tolua_get_M_PI
  3578. static int tolua_get_M_PI(lua_State* tolua_S)
  3579. {
  3580. tolua_pushnumber(tolua_S,(lua_Number)M_PI);
  3581. return 1;
  3582. }
  3583. #endif //#ifndef TOLUA_DISABLE
  3584. /* get function: M_MIN_INT */
  3585. #ifndef TOLUA_DISABLE_tolua_get_M_MIN_INT
  3586. static int tolua_get_M_MIN_INT(lua_State* tolua_S)
  3587. {
  3588. tolua_pushnumber(tolua_S,(lua_Number)M_MIN_INT);
  3589. return 1;
  3590. }
  3591. #endif //#ifndef TOLUA_DISABLE
  3592. /* get function: M_MAX_INT */
  3593. #ifndef TOLUA_DISABLE_tolua_get_M_MAX_INT
  3594. static int tolua_get_M_MAX_INT(lua_State* tolua_S)
  3595. {
  3596. tolua_pushnumber(tolua_S,(lua_Number)M_MAX_INT);
  3597. return 1;
  3598. }
  3599. #endif //#ifndef TOLUA_DISABLE
  3600. /* get function: M_MIN_UNSIGNED */
  3601. #ifndef TOLUA_DISABLE_tolua_get_M_MIN_UNSIGNED
  3602. static int tolua_get_M_MIN_UNSIGNED(lua_State* tolua_S)
  3603. {
  3604. tolua_pushnumber(tolua_S,(lua_Number)M_MIN_UNSIGNED);
  3605. return 1;
  3606. }
  3607. #endif //#ifndef TOLUA_DISABLE
  3608. /* get function: M_MAX_UNSIGNED */
  3609. #ifndef TOLUA_DISABLE_tolua_get_M_MAX_UNSIGNED
  3610. static int tolua_get_M_MAX_UNSIGNED(lua_State* tolua_S)
  3611. {
  3612. tolua_pushnumber(tolua_S,(lua_Number)M_MAX_UNSIGNED);
  3613. return 1;
  3614. }
  3615. #endif //#ifndef TOLUA_DISABLE
  3616. /* get function: M_EPSILON */
  3617. #ifndef TOLUA_DISABLE_tolua_get_M_EPSILON
  3618. static int tolua_get_M_EPSILON(lua_State* tolua_S)
  3619. {
  3620. tolua_pushnumber(tolua_S,(lua_Number)M_EPSILON);
  3621. return 1;
  3622. }
  3623. #endif //#ifndef TOLUA_DISABLE
  3624. /* get function: M_LARGE_EPSILON */
  3625. #ifndef TOLUA_DISABLE_tolua_get_M_LARGE_EPSILON
  3626. static int tolua_get_M_LARGE_EPSILON(lua_State* tolua_S)
  3627. {
  3628. tolua_pushnumber(tolua_S,(lua_Number)M_LARGE_EPSILON);
  3629. return 1;
  3630. }
  3631. #endif //#ifndef TOLUA_DISABLE
  3632. /* get function: M_MIN_NEARCLIP */
  3633. #ifndef TOLUA_DISABLE_tolua_get_M_MIN_NEARCLIP
  3634. static int tolua_get_M_MIN_NEARCLIP(lua_State* tolua_S)
  3635. {
  3636. tolua_pushnumber(tolua_S,(lua_Number)M_MIN_NEARCLIP);
  3637. return 1;
  3638. }
  3639. #endif //#ifndef TOLUA_DISABLE
  3640. /* get function: M_MAX_FOV */
  3641. #ifndef TOLUA_DISABLE_tolua_get_M_MAX_FOV
  3642. static int tolua_get_M_MAX_FOV(lua_State* tolua_S)
  3643. {
  3644. tolua_pushnumber(tolua_S,(lua_Number)M_MAX_FOV);
  3645. return 1;
  3646. }
  3647. #endif //#ifndef TOLUA_DISABLE
  3648. /* get function: M_LARGE_VALUE */
  3649. #ifndef TOLUA_DISABLE_tolua_get_M_LARGE_VALUE
  3650. static int tolua_get_M_LARGE_VALUE(lua_State* tolua_S)
  3651. {
  3652. tolua_pushnumber(tolua_S,(lua_Number)M_LARGE_VALUE);
  3653. return 1;
  3654. }
  3655. #endif //#ifndef TOLUA_DISABLE
  3656. /* get function: M_INFINITY */
  3657. #ifndef TOLUA_DISABLE_tolua_get_M_INFINITY
  3658. static int tolua_get_M_INFINITY(lua_State* tolua_S)
  3659. {
  3660. tolua_pushnumber(tolua_S,(lua_Number)M_INFINITY);
  3661. return 1;
  3662. }
  3663. #endif //#ifndef TOLUA_DISABLE
  3664. /* get function: M_DEGTORAD */
  3665. #ifndef TOLUA_DISABLE_tolua_get_M_DEGTORAD
  3666. static int tolua_get_M_DEGTORAD(lua_State* tolua_S)
  3667. {
  3668. tolua_pushnumber(tolua_S,(lua_Number)M_DEGTORAD);
  3669. return 1;
  3670. }
  3671. #endif //#ifndef TOLUA_DISABLE
  3672. /* get function: M_DEGTORAD_2 */
  3673. #ifndef TOLUA_DISABLE_tolua_get_M_DEGTORAD_2
  3674. static int tolua_get_M_DEGTORAD_2(lua_State* tolua_S)
  3675. {
  3676. tolua_pushnumber(tolua_S,(lua_Number)M_DEGTORAD_2);
  3677. return 1;
  3678. }
  3679. #endif //#ifndef TOLUA_DISABLE
  3680. /* get function: M_RADTODEG */
  3681. #ifndef TOLUA_DISABLE_tolua_get_M_RADTODEG
  3682. static int tolua_get_M_RADTODEG(lua_State* tolua_S)
  3683. {
  3684. tolua_pushnumber(tolua_S,(lua_Number)M_RADTODEG);
  3685. return 1;
  3686. }
  3687. #endif //#ifndef TOLUA_DISABLE
  3688. /* function: Lerp */
  3689. #ifndef TOLUA_DISABLE_tolua_Math_Lerp00
  3690. static int tolua_Math_Lerp00(lua_State* tolua_S)
  3691. {
  3692. #ifndef TOLUA_RELEASE
  3693. tolua_Error tolua_err;
  3694. if (
  3695. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3696. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3697. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3698. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3699. )
  3700. goto tolua_lerror;
  3701. else
  3702. #endif
  3703. {
  3704. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3705. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3706. float t = ((float) tolua_tonumber(tolua_S,3,0));
  3707. {
  3708. float tolua_ret = (float) Lerp(lhs,rhs,t);
  3709. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3710. }
  3711. }
  3712. return 1;
  3713. #ifndef TOLUA_RELEASE
  3714. tolua_lerror:
  3715. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  3716. return 0;
  3717. #endif
  3718. }
  3719. #endif //#ifndef TOLUA_DISABLE
  3720. /* function: Min */
  3721. #ifndef TOLUA_DISABLE_tolua_Math_Min00
  3722. static int tolua_Math_Min00(lua_State* tolua_S)
  3723. {
  3724. #ifndef TOLUA_RELEASE
  3725. tolua_Error tolua_err;
  3726. if (
  3727. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3728. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3729. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3730. )
  3731. goto tolua_lerror;
  3732. else
  3733. #endif
  3734. {
  3735. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3736. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3737. {
  3738. float tolua_ret = (float) Min(lhs,rhs);
  3739. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3740. }
  3741. }
  3742. return 1;
  3743. #ifndef TOLUA_RELEASE
  3744. tolua_lerror:
  3745. tolua_error(tolua_S,"#ferror in function 'Min'.",&tolua_err);
  3746. return 0;
  3747. #endif
  3748. }
  3749. #endif //#ifndef TOLUA_DISABLE
  3750. /* function: Max */
  3751. #ifndef TOLUA_DISABLE_tolua_Math_Max00
  3752. static int tolua_Math_Max00(lua_State* tolua_S)
  3753. {
  3754. #ifndef TOLUA_RELEASE
  3755. tolua_Error tolua_err;
  3756. if (
  3757. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3758. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3759. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3760. )
  3761. goto tolua_lerror;
  3762. else
  3763. #endif
  3764. {
  3765. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3766. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3767. {
  3768. float tolua_ret = (float) Max(lhs,rhs);
  3769. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3770. }
  3771. }
  3772. return 1;
  3773. #ifndef TOLUA_RELEASE
  3774. tolua_lerror:
  3775. tolua_error(tolua_S,"#ferror in function 'Max'.",&tolua_err);
  3776. return 0;
  3777. #endif
  3778. }
  3779. #endif //#ifndef TOLUA_DISABLE
  3780. /* function: Abs */
  3781. #ifndef TOLUA_DISABLE_tolua_Math_Abs00
  3782. static int tolua_Math_Abs00(lua_State* tolua_S)
  3783. {
  3784. #ifndef TOLUA_RELEASE
  3785. tolua_Error tolua_err;
  3786. if (
  3787. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3788. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3789. )
  3790. goto tolua_lerror;
  3791. else
  3792. #endif
  3793. {
  3794. float value = ((float) tolua_tonumber(tolua_S,1,0));
  3795. {
  3796. float tolua_ret = (float) Abs(value);
  3797. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3798. }
  3799. }
  3800. return 1;
  3801. #ifndef TOLUA_RELEASE
  3802. tolua_lerror:
  3803. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  3804. return 0;
  3805. #endif
  3806. }
  3807. #endif //#ifndef TOLUA_DISABLE
  3808. /* function: Clamp */
  3809. #ifndef TOLUA_DISABLE_tolua_Math_Clamp00
  3810. static int tolua_Math_Clamp00(lua_State* tolua_S)
  3811. {
  3812. #ifndef TOLUA_RELEASE
  3813. tolua_Error tolua_err;
  3814. if (
  3815. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3816. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3817. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3818. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3819. )
  3820. goto tolua_lerror;
  3821. else
  3822. #endif
  3823. {
  3824. float value = ((float) tolua_tonumber(tolua_S,1,0));
  3825. float min = ((float) tolua_tonumber(tolua_S,2,0));
  3826. float max = ((float) tolua_tonumber(tolua_S,3,0));
  3827. {
  3828. float tolua_ret = (float) Clamp(value,min,max);
  3829. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3830. }
  3831. }
  3832. return 1;
  3833. #ifndef TOLUA_RELEASE
  3834. tolua_lerror:
  3835. tolua_error(tolua_S,"#ferror in function 'Clamp'.",&tolua_err);
  3836. return 0;
  3837. #endif
  3838. }
  3839. #endif //#ifndef TOLUA_DISABLE
  3840. /* function: Equals */
  3841. #ifndef TOLUA_DISABLE_tolua_Math_Equals00
  3842. static int tolua_Math_Equals00(lua_State* tolua_S)
  3843. {
  3844. #ifndef TOLUA_RELEASE
  3845. tolua_Error tolua_err;
  3846. if (
  3847. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3848. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3849. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3850. )
  3851. goto tolua_lerror;
  3852. else
  3853. #endif
  3854. {
  3855. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3856. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3857. {
  3858. bool tolua_ret = (bool) Equals(lhs,rhs);
  3859. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3860. }
  3861. }
  3862. return 1;
  3863. #ifndef TOLUA_RELEASE
  3864. tolua_lerror:
  3865. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  3866. return 0;
  3867. #endif
  3868. }
  3869. #endif //#ifndef TOLUA_DISABLE
  3870. /* function: Min */
  3871. #ifndef TOLUA_DISABLE_tolua_Math_Min01
  3872. static int tolua_Math_Min01(lua_State* tolua_S)
  3873. {
  3874. tolua_Error tolua_err;
  3875. if (
  3876. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3877. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3878. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3879. )
  3880. goto tolua_lerror;
  3881. else
  3882. {
  3883. int lhs = ((int) tolua_tonumber(tolua_S,1,0));
  3884. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  3885. {
  3886. int tolua_ret = (int) Min(lhs,rhs);
  3887. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3888. }
  3889. }
  3890. return 1;
  3891. tolua_lerror:
  3892. return tolua_Math_Min00(tolua_S);
  3893. }
  3894. #endif //#ifndef TOLUA_DISABLE
  3895. /* function: Max */
  3896. #ifndef TOLUA_DISABLE_tolua_Math_Max01
  3897. static int tolua_Math_Max01(lua_State* tolua_S)
  3898. {
  3899. tolua_Error tolua_err;
  3900. if (
  3901. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3902. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3903. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3904. )
  3905. goto tolua_lerror;
  3906. else
  3907. {
  3908. int lhs = ((int) tolua_tonumber(tolua_S,1,0));
  3909. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  3910. {
  3911. int tolua_ret = (int) Max(lhs,rhs);
  3912. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3913. }
  3914. }
  3915. return 1;
  3916. tolua_lerror:
  3917. return tolua_Math_Max00(tolua_S);
  3918. }
  3919. #endif //#ifndef TOLUA_DISABLE
  3920. /* function: Abs */
  3921. #ifndef TOLUA_DISABLE_tolua_Math_Abs01
  3922. static int tolua_Math_Abs01(lua_State* tolua_S)
  3923. {
  3924. tolua_Error tolua_err;
  3925. if (
  3926. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3927. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3928. )
  3929. goto tolua_lerror;
  3930. else
  3931. {
  3932. int value = ((int) tolua_tonumber(tolua_S,1,0));
  3933. {
  3934. int tolua_ret = (int) Abs(value);
  3935. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3936. }
  3937. }
  3938. return 1;
  3939. tolua_lerror:
  3940. return tolua_Math_Abs00(tolua_S);
  3941. }
  3942. #endif //#ifndef TOLUA_DISABLE
  3943. /* function: Clamp */
  3944. #ifndef TOLUA_DISABLE_tolua_Math_Clamp01
  3945. static int tolua_Math_Clamp01(lua_State* tolua_S)
  3946. {
  3947. tolua_Error tolua_err;
  3948. if (
  3949. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3950. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3951. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3952. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3953. )
  3954. goto tolua_lerror;
  3955. else
  3956. {
  3957. int value = ((int) tolua_tonumber(tolua_S,1,0));
  3958. int min = ((int) tolua_tonumber(tolua_S,2,0));
  3959. int max = ((int) tolua_tonumber(tolua_S,3,0));
  3960. {
  3961. int tolua_ret = (int) Clamp(value,min,max);
  3962. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3963. }
  3964. }
  3965. return 1;
  3966. tolua_lerror:
  3967. return tolua_Math_Clamp00(tolua_S);
  3968. }
  3969. #endif //#ifndef TOLUA_DISABLE
  3970. /* function: IsPowerOfTwo */
  3971. #ifndef TOLUA_DISABLE_tolua_Math_IsPowerOfTwo00
  3972. static int tolua_Math_IsPowerOfTwo00(lua_State* tolua_S)
  3973. {
  3974. #ifndef TOLUA_RELEASE
  3975. tolua_Error tolua_err;
  3976. if (
  3977. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3978. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3979. )
  3980. goto tolua_lerror;
  3981. else
  3982. #endif
  3983. {
  3984. unsigned value = ((unsigned) tolua_tonumber(tolua_S,1,0));
  3985. {
  3986. bool tolua_ret = (bool) IsPowerOfTwo(value);
  3987. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3988. }
  3989. }
  3990. return 1;
  3991. #ifndef TOLUA_RELEASE
  3992. tolua_lerror:
  3993. tolua_error(tolua_S,"#ferror in function 'IsPowerOfTwo'.",&tolua_err);
  3994. return 0;
  3995. #endif
  3996. }
  3997. #endif //#ifndef TOLUA_DISABLE
  3998. /* function: NextPowerOfTwo */
  3999. #ifndef TOLUA_DISABLE_tolua_Math_NextPowerOfTwo00
  4000. static int tolua_Math_NextPowerOfTwo00(lua_State* tolua_S)
  4001. {
  4002. #ifndef TOLUA_RELEASE
  4003. tolua_Error tolua_err;
  4004. if (
  4005. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  4006. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4007. )
  4008. goto tolua_lerror;
  4009. else
  4010. #endif
  4011. {
  4012. unsigned value = ((unsigned) tolua_tonumber(tolua_S,1,0));
  4013. {
  4014. unsigned tolua_ret = (unsigned) NextPowerOfTwo(value);
  4015. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4016. }
  4017. }
  4018. return 1;
  4019. #ifndef TOLUA_RELEASE
  4020. tolua_lerror:
  4021. tolua_error(tolua_S,"#ferror in function 'NextPowerOfTwo'.",&tolua_err);
  4022. return 0;
  4023. #endif
  4024. }
  4025. #endif //#ifndef TOLUA_DISABLE
  4026. /* function: SDBMHash */
  4027. #ifndef TOLUA_DISABLE_tolua_Math_SDBMHash00
  4028. static int tolua_Math_SDBMHash00(lua_State* tolua_S)
  4029. {
  4030. #ifndef TOLUA_RELEASE
  4031. tolua_Error tolua_err;
  4032. if (
  4033. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  4034. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4035. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4036. )
  4037. goto tolua_lerror;
  4038. else
  4039. #endif
  4040. {
  4041. unsigned hash = ((unsigned) tolua_tonumber(tolua_S,1,0));
  4042. unsigned char c = ((unsigned char) tolua_tonumber(tolua_S,2,0));
  4043. {
  4044. unsigned tolua_ret = (unsigned) SDBMHash(hash,c);
  4045. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4046. }
  4047. }
  4048. return 1;
  4049. #ifndef TOLUA_RELEASE
  4050. tolua_lerror:
  4051. tolua_error(tolua_S,"#ferror in function 'SDBMHash'.",&tolua_err);
  4052. return 0;
  4053. #endif
  4054. }
  4055. #endif //#ifndef TOLUA_DISABLE
  4056. /* function: Random */
  4057. #ifndef TOLUA_DISABLE_tolua_Math_Random00
  4058. static int tolua_Math_Random00(lua_State* tolua_S)
  4059. {
  4060. #ifndef TOLUA_RELEASE
  4061. tolua_Error tolua_err;
  4062. if (
  4063. !tolua_isnoobj(tolua_S,1,&tolua_err)
  4064. )
  4065. goto tolua_lerror;
  4066. else
  4067. #endif
  4068. {
  4069. {
  4070. float tolua_ret = (float) Random();
  4071. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4072. }
  4073. }
  4074. return 1;
  4075. #ifndef TOLUA_RELEASE
  4076. tolua_lerror:
  4077. tolua_error(tolua_S,"#ferror in function 'Random'.",&tolua_err);
  4078. return 0;
  4079. #endif
  4080. }
  4081. #endif //#ifndef TOLUA_DISABLE
  4082. /* function: Random */
  4083. #ifndef TOLUA_DISABLE_tolua_Math_Random01
  4084. static int tolua_Math_Random01(lua_State* tolua_S)
  4085. {
  4086. tolua_Error tolua_err;
  4087. if (
  4088. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  4089. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4090. )
  4091. goto tolua_lerror;
  4092. else
  4093. {
  4094. float range = ((float) tolua_tonumber(tolua_S,1,0));
  4095. {
  4096. float tolua_ret = (float) Random(range);
  4097. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4098. }
  4099. }
  4100. return 1;
  4101. tolua_lerror:
  4102. return tolua_Math_Random00(tolua_S);
  4103. }
  4104. #endif //#ifndef TOLUA_DISABLE
  4105. /* function: Random */
  4106. #ifndef TOLUA_DISABLE_tolua_Math_RandomInt00
  4107. static int tolua_Math_RandomInt00(lua_State* tolua_S)
  4108. {
  4109. #ifndef TOLUA_RELEASE
  4110. tolua_Error tolua_err;
  4111. if (
  4112. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  4113. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4114. )
  4115. goto tolua_lerror;
  4116. else
  4117. #endif
  4118. {
  4119. int range = ((int) tolua_tonumber(tolua_S,1,0));
  4120. {
  4121. int tolua_ret = (int) Random(range);
  4122. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4123. }
  4124. }
  4125. return 1;
  4126. #ifndef TOLUA_RELEASE
  4127. tolua_lerror:
  4128. tolua_error(tolua_S,"#ferror in function 'RandomInt'.",&tolua_err);
  4129. return 0;
  4130. #endif
  4131. }
  4132. #endif //#ifndef TOLUA_DISABLE
  4133. /* method: new of class Matrix3 */
  4134. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new00
  4135. static int tolua_Math_Matrix3_new00(lua_State* tolua_S)
  4136. {
  4137. #ifndef TOLUA_RELEASE
  4138. tolua_Error tolua_err;
  4139. if (
  4140. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4141. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4142. )
  4143. goto tolua_lerror;
  4144. else
  4145. #endif
  4146. {
  4147. {
  4148. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)());
  4149. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4150. }
  4151. }
  4152. return 1;
  4153. #ifndef TOLUA_RELEASE
  4154. tolua_lerror:
  4155. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  4156. return 0;
  4157. #endif
  4158. }
  4159. #endif //#ifndef TOLUA_DISABLE
  4160. /* method: new_local of class Matrix3 */
  4161. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new00_local
  4162. static int tolua_Math_Matrix3_new00_local(lua_State* tolua_S)
  4163. {
  4164. #ifndef TOLUA_RELEASE
  4165. tolua_Error tolua_err;
  4166. if (
  4167. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4168. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4169. )
  4170. goto tolua_lerror;
  4171. else
  4172. #endif
  4173. {
  4174. {
  4175. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)());
  4176. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4177. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4178. }
  4179. }
  4180. return 1;
  4181. #ifndef TOLUA_RELEASE
  4182. tolua_lerror:
  4183. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  4184. return 0;
  4185. #endif
  4186. }
  4187. #endif //#ifndef TOLUA_DISABLE
  4188. /* method: new of class Matrix3 */
  4189. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new01
  4190. static int tolua_Math_Matrix3_new01(lua_State* tolua_S)
  4191. {
  4192. tolua_Error tolua_err;
  4193. if (
  4194. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4195. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4196. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4197. )
  4198. goto tolua_lerror;
  4199. else
  4200. {
  4201. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4202. {
  4203. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(*matrix));
  4204. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4205. }
  4206. }
  4207. return 1;
  4208. tolua_lerror:
  4209. return tolua_Math_Matrix3_new00(tolua_S);
  4210. }
  4211. #endif //#ifndef TOLUA_DISABLE
  4212. /* method: new_local of class Matrix3 */
  4213. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new01_local
  4214. static int tolua_Math_Matrix3_new01_local(lua_State* tolua_S)
  4215. {
  4216. tolua_Error tolua_err;
  4217. if (
  4218. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4219. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4220. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4221. )
  4222. goto tolua_lerror;
  4223. else
  4224. {
  4225. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4226. {
  4227. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(*matrix));
  4228. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4229. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4230. }
  4231. }
  4232. return 1;
  4233. tolua_lerror:
  4234. return tolua_Math_Matrix3_new00_local(tolua_S);
  4235. }
  4236. #endif //#ifndef TOLUA_DISABLE
  4237. /* method: new of class Matrix3 */
  4238. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new02
  4239. static int tolua_Math_Matrix3_new02(lua_State* tolua_S)
  4240. {
  4241. tolua_Error tolua_err;
  4242. if (
  4243. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4244. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4245. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  4246. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  4247. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  4248. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  4249. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  4250. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  4251. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  4252. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  4253. !tolua_isnoobj(tolua_S,11,&tolua_err)
  4254. )
  4255. goto tolua_lerror;
  4256. else
  4257. {
  4258. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  4259. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  4260. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  4261. float v10 = ((float) tolua_tonumber(tolua_S,5,0));
  4262. float v11 = ((float) tolua_tonumber(tolua_S,6,0));
  4263. float v12 = ((float) tolua_tonumber(tolua_S,7,0));
  4264. float v20 = ((float) tolua_tonumber(tolua_S,8,0));
  4265. float v21 = ((float) tolua_tonumber(tolua_S,9,0));
  4266. float v22 = ((float) tolua_tonumber(tolua_S,10,0));
  4267. {
  4268. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(v00,v01,v02,v10,v11,v12,v20,v21,v22));
  4269. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4270. }
  4271. }
  4272. return 1;
  4273. tolua_lerror:
  4274. return tolua_Math_Matrix3_new01(tolua_S);
  4275. }
  4276. #endif //#ifndef TOLUA_DISABLE
  4277. /* method: new_local of class Matrix3 */
  4278. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new02_local
  4279. static int tolua_Math_Matrix3_new02_local(lua_State* tolua_S)
  4280. {
  4281. tolua_Error tolua_err;
  4282. if (
  4283. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4284. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4285. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  4286. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  4287. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  4288. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  4289. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  4290. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  4291. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  4292. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  4293. !tolua_isnoobj(tolua_S,11,&tolua_err)
  4294. )
  4295. goto tolua_lerror;
  4296. else
  4297. {
  4298. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  4299. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  4300. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  4301. float v10 = ((float) tolua_tonumber(tolua_S,5,0));
  4302. float v11 = ((float) tolua_tonumber(tolua_S,6,0));
  4303. float v12 = ((float) tolua_tonumber(tolua_S,7,0));
  4304. float v20 = ((float) tolua_tonumber(tolua_S,8,0));
  4305. float v21 = ((float) tolua_tonumber(tolua_S,9,0));
  4306. float v22 = ((float) tolua_tonumber(tolua_S,10,0));
  4307. {
  4308. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(v00,v01,v02,v10,v11,v12,v20,v21,v22));
  4309. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4310. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4311. }
  4312. }
  4313. return 1;
  4314. tolua_lerror:
  4315. return tolua_Math_Matrix3_new01_local(tolua_S);
  4316. }
  4317. #endif //#ifndef TOLUA_DISABLE
  4318. /* method: operator== of class Matrix3 */
  4319. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__eq00
  4320. static int tolua_Math_Matrix3__eq00(lua_State* tolua_S)
  4321. {
  4322. #ifndef TOLUA_RELEASE
  4323. tolua_Error tolua_err;
  4324. if (
  4325. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4326. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4327. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4328. )
  4329. goto tolua_lerror;
  4330. else
  4331. #endif
  4332. {
  4333. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4334. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4335. #ifndef TOLUA_RELEASE
  4336. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  4337. #endif
  4338. {
  4339. bool tolua_ret = (bool) self->operator==(*rhs);
  4340. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  4341. }
  4342. }
  4343. return 1;
  4344. #ifndef TOLUA_RELEASE
  4345. tolua_lerror:
  4346. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  4347. return 0;
  4348. #endif
  4349. }
  4350. #endif //#ifndef TOLUA_DISABLE
  4351. /* method: operator* of class Matrix3 */
  4352. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__mul00
  4353. static int tolua_Math_Matrix3__mul00(lua_State* tolua_S)
  4354. {
  4355. #ifndef TOLUA_RELEASE
  4356. tolua_Error tolua_err;
  4357. if (
  4358. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4359. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4360. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4361. )
  4362. goto tolua_lerror;
  4363. else
  4364. #endif
  4365. {
  4366. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4367. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4368. #ifndef TOLUA_RELEASE
  4369. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  4370. #endif
  4371. {
  4372. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  4373. {
  4374. #ifdef __cplusplus
  4375. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  4376. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4377. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4378. #else
  4379. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  4380. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4381. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4382. #endif
  4383. }
  4384. }
  4385. }
  4386. return 1;
  4387. #ifndef TOLUA_RELEASE
  4388. tolua_lerror:
  4389. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  4390. return 0;
  4391. #endif
  4392. }
  4393. #endif //#ifndef TOLUA_DISABLE
  4394. /* method: operator+ of class Matrix3 */
  4395. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__add00
  4396. static int tolua_Math_Matrix3__add00(lua_State* tolua_S)
  4397. {
  4398. #ifndef TOLUA_RELEASE
  4399. tolua_Error tolua_err;
  4400. if (
  4401. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4402. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4403. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4404. )
  4405. goto tolua_lerror;
  4406. else
  4407. #endif
  4408. {
  4409. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4410. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4411. #ifndef TOLUA_RELEASE
  4412. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  4413. #endif
  4414. {
  4415. Matrix3 tolua_ret = (Matrix3) self->operator+(*rhs);
  4416. {
  4417. #ifdef __cplusplus
  4418. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4419. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4420. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4421. #else
  4422. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4423. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4424. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4425. #endif
  4426. }
  4427. }
  4428. }
  4429. return 1;
  4430. #ifndef TOLUA_RELEASE
  4431. tolua_lerror:
  4432. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  4433. return 0;
  4434. #endif
  4435. }
  4436. #endif //#ifndef TOLUA_DISABLE
  4437. /* method: operator- of class Matrix3 */
  4438. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__sub00
  4439. static int tolua_Math_Matrix3__sub00(lua_State* tolua_S)
  4440. {
  4441. #ifndef TOLUA_RELEASE
  4442. tolua_Error tolua_err;
  4443. if (
  4444. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4445. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4446. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4447. )
  4448. goto tolua_lerror;
  4449. else
  4450. #endif
  4451. {
  4452. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4453. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4454. #ifndef TOLUA_RELEASE
  4455. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  4456. #endif
  4457. {
  4458. Matrix3 tolua_ret = (Matrix3) self->operator-(*rhs);
  4459. {
  4460. #ifdef __cplusplus
  4461. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4462. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4463. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4464. #else
  4465. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4466. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4467. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4468. #endif
  4469. }
  4470. }
  4471. }
  4472. return 1;
  4473. #ifndef TOLUA_RELEASE
  4474. tolua_lerror:
  4475. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  4476. return 0;
  4477. #endif
  4478. }
  4479. #endif //#ifndef TOLUA_DISABLE
  4480. /* method: operator* of class Matrix3 */
  4481. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__mul01
  4482. static int tolua_Math_Matrix3__mul01(lua_State* tolua_S)
  4483. {
  4484. tolua_Error tolua_err;
  4485. if (
  4486. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4487. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4488. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4489. )
  4490. goto tolua_lerror;
  4491. else
  4492. {
  4493. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4494. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  4495. #ifndef TOLUA_RELEASE
  4496. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  4497. #endif
  4498. {
  4499. Matrix3 tolua_ret = (Matrix3) self->operator*(rhs);
  4500. {
  4501. #ifdef __cplusplus
  4502. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4503. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4504. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4505. #else
  4506. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4507. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4508. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4509. #endif
  4510. }
  4511. }
  4512. }
  4513. return 1;
  4514. tolua_lerror:
  4515. return tolua_Math_Matrix3__mul00(tolua_S);
  4516. }
  4517. #endif //#ifndef TOLUA_DISABLE
  4518. /* method: operator* of class Matrix3 */
  4519. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__mul02
  4520. static int tolua_Math_Matrix3__mul02(lua_State* tolua_S)
  4521. {
  4522. tolua_Error tolua_err;
  4523. if (
  4524. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4525. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4526. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4527. )
  4528. goto tolua_lerror;
  4529. else
  4530. {
  4531. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4532. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4533. #ifndef TOLUA_RELEASE
  4534. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  4535. #endif
  4536. {
  4537. Matrix3 tolua_ret = (Matrix3) self->operator*(*rhs);
  4538. {
  4539. #ifdef __cplusplus
  4540. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4541. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4542. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4543. #else
  4544. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4545. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4546. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4547. #endif
  4548. }
  4549. }
  4550. }
  4551. return 1;
  4552. tolua_lerror:
  4553. return tolua_Math_Matrix3__mul01(tolua_S);
  4554. }
  4555. #endif //#ifndef TOLUA_DISABLE
  4556. /* method: SetScale of class Matrix3 */
  4557. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_SetScale00
  4558. static int tolua_Math_Matrix3_SetScale00(lua_State* tolua_S)
  4559. {
  4560. #ifndef TOLUA_RELEASE
  4561. tolua_Error tolua_err;
  4562. if (
  4563. !tolua_isusertype(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4564. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4565. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4566. )
  4567. goto tolua_lerror;
  4568. else
  4569. #endif
  4570. {
  4571. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4572. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4573. #ifndef TOLUA_RELEASE
  4574. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  4575. #endif
  4576. {
  4577. self->SetScale(*scale);
  4578. }
  4579. }
  4580. return 0;
  4581. #ifndef TOLUA_RELEASE
  4582. tolua_lerror:
  4583. tolua_error(tolua_S,"#ferror in function 'SetScale'.",&tolua_err);
  4584. return 0;
  4585. #endif
  4586. }
  4587. #endif //#ifndef TOLUA_DISABLE
  4588. /* method: SetScale of class Matrix3 */
  4589. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_SetScale01
  4590. static int tolua_Math_Matrix3_SetScale01(lua_State* tolua_S)
  4591. {
  4592. tolua_Error tolua_err;
  4593. if (
  4594. !tolua_isusertype(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4595. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4596. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4597. )
  4598. goto tolua_lerror;
  4599. else
  4600. {
  4601. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4602. float scale = ((float) tolua_tonumber(tolua_S,2,0));
  4603. #ifndef TOLUA_RELEASE
  4604. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  4605. #endif
  4606. {
  4607. self->SetScale(scale);
  4608. }
  4609. }
  4610. return 0;
  4611. tolua_lerror:
  4612. return tolua_Math_Matrix3_SetScale00(tolua_S);
  4613. }
  4614. #endif //#ifndef TOLUA_DISABLE
  4615. /* method: Scale of class Matrix3 */
  4616. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Scale00
  4617. static int tolua_Math_Matrix3_Scale00(lua_State* tolua_S)
  4618. {
  4619. #ifndef TOLUA_RELEASE
  4620. tolua_Error tolua_err;
  4621. if (
  4622. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4623. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4624. )
  4625. goto tolua_lerror;
  4626. else
  4627. #endif
  4628. {
  4629. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4630. #ifndef TOLUA_RELEASE
  4631. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL);
  4632. #endif
  4633. {
  4634. Vector3 tolua_ret = (Vector3) self->Scale();
  4635. {
  4636. #ifdef __cplusplus
  4637. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  4638. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4639. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4640. #else
  4641. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  4642. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4643. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4644. #endif
  4645. }
  4646. }
  4647. }
  4648. return 1;
  4649. #ifndef TOLUA_RELEASE
  4650. tolua_lerror:
  4651. tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err);
  4652. return 0;
  4653. #endif
  4654. }
  4655. #endif //#ifndef TOLUA_DISABLE
  4656. /* method: Transpose of class Matrix3 */
  4657. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Transpose00
  4658. static int tolua_Math_Matrix3_Transpose00(lua_State* tolua_S)
  4659. {
  4660. #ifndef TOLUA_RELEASE
  4661. tolua_Error tolua_err;
  4662. if (
  4663. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4664. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4665. )
  4666. goto tolua_lerror;
  4667. else
  4668. #endif
  4669. {
  4670. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4671. #ifndef TOLUA_RELEASE
  4672. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transpose'", NULL);
  4673. #endif
  4674. {
  4675. Matrix3 tolua_ret = (Matrix3) self->Transpose();
  4676. {
  4677. #ifdef __cplusplus
  4678. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4679. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4680. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4681. #else
  4682. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4683. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4684. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4685. #endif
  4686. }
  4687. }
  4688. }
  4689. return 1;
  4690. #ifndef TOLUA_RELEASE
  4691. tolua_lerror:
  4692. tolua_error(tolua_S,"#ferror in function 'Transpose'.",&tolua_err);
  4693. return 0;
  4694. #endif
  4695. }
  4696. #endif //#ifndef TOLUA_DISABLE
  4697. /* method: Scaled of class Matrix3 */
  4698. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Scaled00
  4699. static int tolua_Math_Matrix3_Scaled00(lua_State* tolua_S)
  4700. {
  4701. #ifndef TOLUA_RELEASE
  4702. tolua_Error tolua_err;
  4703. if (
  4704. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4705. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4706. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4707. )
  4708. goto tolua_lerror;
  4709. else
  4710. #endif
  4711. {
  4712. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4713. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4714. #ifndef TOLUA_RELEASE
  4715. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scaled'", NULL);
  4716. #endif
  4717. {
  4718. Matrix3 tolua_ret = (Matrix3) self->Scaled(*scale);
  4719. {
  4720. #ifdef __cplusplus
  4721. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4722. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4723. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4724. #else
  4725. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4726. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4727. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4728. #endif
  4729. }
  4730. }
  4731. }
  4732. return 1;
  4733. #ifndef TOLUA_RELEASE
  4734. tolua_lerror:
  4735. tolua_error(tolua_S,"#ferror in function 'Scaled'.",&tolua_err);
  4736. return 0;
  4737. #endif
  4738. }
  4739. #endif //#ifndef TOLUA_DISABLE
  4740. /* method: Equals of class Matrix3 */
  4741. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Equals00
  4742. static int tolua_Math_Matrix3_Equals00(lua_State* tolua_S)
  4743. {
  4744. #ifndef TOLUA_RELEASE
  4745. tolua_Error tolua_err;
  4746. if (
  4747. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4748. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4749. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4750. )
  4751. goto tolua_lerror;
  4752. else
  4753. #endif
  4754. {
  4755. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4756. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4757. #ifndef TOLUA_RELEASE
  4758. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  4759. #endif
  4760. {
  4761. bool tolua_ret = (bool) self->Equals(*rhs);
  4762. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  4763. }
  4764. }
  4765. return 1;
  4766. #ifndef TOLUA_RELEASE
  4767. tolua_lerror:
  4768. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  4769. return 0;
  4770. #endif
  4771. }
  4772. #endif //#ifndef TOLUA_DISABLE
  4773. /* method: Inverse of class Matrix3 */
  4774. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Inverse00
  4775. static int tolua_Math_Matrix3_Inverse00(lua_State* tolua_S)
  4776. {
  4777. #ifndef TOLUA_RELEASE
  4778. tolua_Error tolua_err;
  4779. if (
  4780. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4781. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4782. )
  4783. goto tolua_lerror;
  4784. else
  4785. #endif
  4786. {
  4787. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4788. #ifndef TOLUA_RELEASE
  4789. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  4790. #endif
  4791. {
  4792. Matrix3 tolua_ret = (Matrix3) self->Inverse();
  4793. {
  4794. #ifdef __cplusplus
  4795. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4796. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4797. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4798. #else
  4799. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4800. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4801. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4802. #endif
  4803. }
  4804. }
  4805. }
  4806. return 1;
  4807. #ifndef TOLUA_RELEASE
  4808. tolua_lerror:
  4809. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  4810. return 0;
  4811. #endif
  4812. }
  4813. #endif //#ifndef TOLUA_DISABLE
  4814. /* get function: m00_ of class Matrix3 */
  4815. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m00
  4816. static int tolua_get_Matrix3_m00(lua_State* tolua_S)
  4817. {
  4818. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4819. #ifndef TOLUA_RELEASE
  4820. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  4821. #endif
  4822. tolua_pushnumber(tolua_S,(lua_Number)self->m00_);
  4823. return 1;
  4824. }
  4825. #endif //#ifndef TOLUA_DISABLE
  4826. /* set function: m00_ of class Matrix3 */
  4827. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m00
  4828. static int tolua_set_Matrix3_m00(lua_State* tolua_S)
  4829. {
  4830. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4831. #ifndef TOLUA_RELEASE
  4832. tolua_Error tolua_err;
  4833. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  4834. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4835. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4836. #endif
  4837. self->m00_ = ((float) tolua_tonumber(tolua_S,2,0))
  4838. ;
  4839. return 0;
  4840. }
  4841. #endif //#ifndef TOLUA_DISABLE
  4842. /* get function: m01_ of class Matrix3 */
  4843. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m01
  4844. static int tolua_get_Matrix3_m01(lua_State* tolua_S)
  4845. {
  4846. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4847. #ifndef TOLUA_RELEASE
  4848. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  4849. #endif
  4850. tolua_pushnumber(tolua_S,(lua_Number)self->m01_);
  4851. return 1;
  4852. }
  4853. #endif //#ifndef TOLUA_DISABLE
  4854. /* set function: m01_ of class Matrix3 */
  4855. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m01
  4856. static int tolua_set_Matrix3_m01(lua_State* tolua_S)
  4857. {
  4858. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4859. #ifndef TOLUA_RELEASE
  4860. tolua_Error tolua_err;
  4861. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  4862. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4863. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4864. #endif
  4865. self->m01_ = ((float) tolua_tonumber(tolua_S,2,0))
  4866. ;
  4867. return 0;
  4868. }
  4869. #endif //#ifndef TOLUA_DISABLE
  4870. /* get function: m02_ of class Matrix3 */
  4871. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m02
  4872. static int tolua_get_Matrix3_m02(lua_State* tolua_S)
  4873. {
  4874. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4875. #ifndef TOLUA_RELEASE
  4876. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  4877. #endif
  4878. tolua_pushnumber(tolua_S,(lua_Number)self->m02_);
  4879. return 1;
  4880. }
  4881. #endif //#ifndef TOLUA_DISABLE
  4882. /* set function: m02_ of class Matrix3 */
  4883. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m02
  4884. static int tolua_set_Matrix3_m02(lua_State* tolua_S)
  4885. {
  4886. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4887. #ifndef TOLUA_RELEASE
  4888. tolua_Error tolua_err;
  4889. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  4890. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4891. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4892. #endif
  4893. self->m02_ = ((float) tolua_tonumber(tolua_S,2,0))
  4894. ;
  4895. return 0;
  4896. }
  4897. #endif //#ifndef TOLUA_DISABLE
  4898. /* get function: m10_ of class Matrix3 */
  4899. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m10
  4900. static int tolua_get_Matrix3_m10(lua_State* tolua_S)
  4901. {
  4902. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4903. #ifndef TOLUA_RELEASE
  4904. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  4905. #endif
  4906. tolua_pushnumber(tolua_S,(lua_Number)self->m10_);
  4907. return 1;
  4908. }
  4909. #endif //#ifndef TOLUA_DISABLE
  4910. /* set function: m10_ of class Matrix3 */
  4911. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m10
  4912. static int tolua_set_Matrix3_m10(lua_State* tolua_S)
  4913. {
  4914. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4915. #ifndef TOLUA_RELEASE
  4916. tolua_Error tolua_err;
  4917. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  4918. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4919. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4920. #endif
  4921. self->m10_ = ((float) tolua_tonumber(tolua_S,2,0))
  4922. ;
  4923. return 0;
  4924. }
  4925. #endif //#ifndef TOLUA_DISABLE
  4926. /* get function: m11_ of class Matrix3 */
  4927. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m11
  4928. static int tolua_get_Matrix3_m11(lua_State* tolua_S)
  4929. {
  4930. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4931. #ifndef TOLUA_RELEASE
  4932. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  4933. #endif
  4934. tolua_pushnumber(tolua_S,(lua_Number)self->m11_);
  4935. return 1;
  4936. }
  4937. #endif //#ifndef TOLUA_DISABLE
  4938. /* set function: m11_ of class Matrix3 */
  4939. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m11
  4940. static int tolua_set_Matrix3_m11(lua_State* tolua_S)
  4941. {
  4942. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4943. #ifndef TOLUA_RELEASE
  4944. tolua_Error tolua_err;
  4945. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  4946. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4947. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4948. #endif
  4949. self->m11_ = ((float) tolua_tonumber(tolua_S,2,0))
  4950. ;
  4951. return 0;
  4952. }
  4953. #endif //#ifndef TOLUA_DISABLE
  4954. /* get function: m12_ of class Matrix3 */
  4955. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m12
  4956. static int tolua_get_Matrix3_m12(lua_State* tolua_S)
  4957. {
  4958. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4959. #ifndef TOLUA_RELEASE
  4960. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  4961. #endif
  4962. tolua_pushnumber(tolua_S,(lua_Number)self->m12_);
  4963. return 1;
  4964. }
  4965. #endif //#ifndef TOLUA_DISABLE
  4966. /* set function: m12_ of class Matrix3 */
  4967. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m12
  4968. static int tolua_set_Matrix3_m12(lua_State* tolua_S)
  4969. {
  4970. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4971. #ifndef TOLUA_RELEASE
  4972. tolua_Error tolua_err;
  4973. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  4974. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4975. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4976. #endif
  4977. self->m12_ = ((float) tolua_tonumber(tolua_S,2,0))
  4978. ;
  4979. return 0;
  4980. }
  4981. #endif //#ifndef TOLUA_DISABLE
  4982. /* get function: m20_ of class Matrix3 */
  4983. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m20
  4984. static int tolua_get_Matrix3_m20(lua_State* tolua_S)
  4985. {
  4986. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4987. #ifndef TOLUA_RELEASE
  4988. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  4989. #endif
  4990. tolua_pushnumber(tolua_S,(lua_Number)self->m20_);
  4991. return 1;
  4992. }
  4993. #endif //#ifndef TOLUA_DISABLE
  4994. /* set function: m20_ of class Matrix3 */
  4995. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m20
  4996. static int tolua_set_Matrix3_m20(lua_State* tolua_S)
  4997. {
  4998. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4999. #ifndef TOLUA_RELEASE
  5000. tolua_Error tolua_err;
  5001. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  5002. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  5003. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  5004. #endif
  5005. self->m20_ = ((float) tolua_tonumber(tolua_S,2,0))
  5006. ;
  5007. return 0;
  5008. }
  5009. #endif //#ifndef TOLUA_DISABLE
  5010. /* get function: m21_ of class Matrix3 */
  5011. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m21
  5012. static int tolua_get_Matrix3_m21(lua_State* tolua_S)
  5013. {
  5014. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  5015. #ifndef TOLUA_RELEASE
  5016. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  5017. #endif
  5018. tolua_pushnumber(tolua_S,(lua_Number)self->m21_);
  5019. return 1;
  5020. }
  5021. #endif //#ifndef TOLUA_DISABLE
  5022. /* set function: m21_ of class Matrix3 */
  5023. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m21
  5024. static int tolua_set_Matrix3_m21(lua_State* tolua_S)
  5025. {
  5026. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  5027. #ifndef TOLUA_RELEASE
  5028. tolua_Error tolua_err;
  5029. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  5030. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  5031. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  5032. #endif
  5033. self->m21_ = ((float) tolua_tonumber(tolua_S,2,0))
  5034. ;
  5035. return 0;
  5036. }
  5037. #endif //#ifndef TOLUA_DISABLE
  5038. /* get function: m22_ of class Matrix3 */
  5039. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m22
  5040. static int tolua_get_Matrix3_m22(lua_State* tolua_S)
  5041. {
  5042. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  5043. #ifndef TOLUA_RELEASE
  5044. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  5045. #endif
  5046. tolua_pushnumber(tolua_S,(lua_Number)self->m22_);
  5047. return 1;
  5048. }
  5049. #endif //#ifndef TOLUA_DISABLE
  5050. /* set function: m22_ of class Matrix3 */
  5051. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m22
  5052. static int tolua_set_Matrix3_m22(lua_State* tolua_S)
  5053. {
  5054. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  5055. #ifndef TOLUA_RELEASE
  5056. tolua_Error tolua_err;
  5057. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  5058. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  5059. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  5060. #endif
  5061. self->m22_ = ((float) tolua_tonumber(tolua_S,2,0))
  5062. ;
  5063. return 0;
  5064. }
  5065. #endif //#ifndef TOLUA_DISABLE
  5066. /* method: BulkTranspose of class Matrix3 */
  5067. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_BulkTranspose00
  5068. static int tolua_Math_Matrix3_BulkTranspose00(lua_State* tolua_S)
  5069. {
  5070. #ifndef TOLUA_RELEASE
  5071. tolua_Error tolua_err;
  5072. if (
  5073. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  5074. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5075. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  5076. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5077. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5078. )
  5079. goto tolua_lerror;
  5080. else
  5081. #endif
  5082. {
  5083. float dest = ((float) tolua_tonumber(tolua_S,2,0));
  5084. const float src = ((const float) tolua_tonumber(tolua_S,3,0));
  5085. unsigned count = ((unsigned) tolua_tonumber(tolua_S,4,0));
  5086. {
  5087. Matrix3::BulkTranspose(&dest,&src,count);
  5088. tolua_pushnumber(tolua_S,(lua_Number)dest);
  5089. tolua_pushnumber(tolua_S,(lua_Number)src);
  5090. }
  5091. }
  5092. return 2;
  5093. #ifndef TOLUA_RELEASE
  5094. tolua_lerror:
  5095. tolua_error(tolua_S,"#ferror in function 'BulkTranspose'.",&tolua_err);
  5096. return 0;
  5097. #endif
  5098. }
  5099. #endif //#ifndef TOLUA_DISABLE
  5100. /* get function: ZERO of class Matrix3 */
  5101. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_ZERO
  5102. static int tolua_get_Matrix3_ZERO(lua_State* tolua_S)
  5103. {
  5104. tolua_pushusertype(tolua_S,(void*)&Matrix3::ZERO,"const Matrix3");
  5105. return 1;
  5106. }
  5107. #endif //#ifndef TOLUA_DISABLE
  5108. /* get function: IDENTITY of class Matrix3 */
  5109. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_IDENTITY
  5110. static int tolua_get_Matrix3_IDENTITY(lua_State* tolua_S)
  5111. {
  5112. tolua_pushusertype(tolua_S,(void*)&Matrix3::IDENTITY,"const Matrix3");
  5113. return 1;
  5114. }
  5115. #endif //#ifndef TOLUA_DISABLE
  5116. /* method: new of class Matrix3x4 */
  5117. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new00
  5118. static int tolua_Math_Matrix3x4_new00(lua_State* tolua_S)
  5119. {
  5120. #ifndef TOLUA_RELEASE
  5121. tolua_Error tolua_err;
  5122. if (
  5123. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5124. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5125. )
  5126. goto tolua_lerror;
  5127. else
  5128. #endif
  5129. {
  5130. {
  5131. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)());
  5132. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5133. }
  5134. }
  5135. return 1;
  5136. #ifndef TOLUA_RELEASE
  5137. tolua_lerror:
  5138. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  5139. return 0;
  5140. #endif
  5141. }
  5142. #endif //#ifndef TOLUA_DISABLE
  5143. /* method: new_local of class Matrix3x4 */
  5144. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new00_local
  5145. static int tolua_Math_Matrix3x4_new00_local(lua_State* tolua_S)
  5146. {
  5147. #ifndef TOLUA_RELEASE
  5148. tolua_Error tolua_err;
  5149. if (
  5150. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5151. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5152. )
  5153. goto tolua_lerror;
  5154. else
  5155. #endif
  5156. {
  5157. {
  5158. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)());
  5159. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5160. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5161. }
  5162. }
  5163. return 1;
  5164. #ifndef TOLUA_RELEASE
  5165. tolua_lerror:
  5166. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  5167. return 0;
  5168. #endif
  5169. }
  5170. #endif //#ifndef TOLUA_DISABLE
  5171. /* method: new of class Matrix3x4 */
  5172. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new01
  5173. static int tolua_Math_Matrix3x4_new01(lua_State* tolua_S)
  5174. {
  5175. tolua_Error tolua_err;
  5176. if (
  5177. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5178. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5179. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5180. )
  5181. goto tolua_lerror;
  5182. else
  5183. {
  5184. const Matrix3x4* matrix = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5185. {
  5186. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5187. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5188. }
  5189. }
  5190. return 1;
  5191. tolua_lerror:
  5192. return tolua_Math_Matrix3x4_new00(tolua_S);
  5193. }
  5194. #endif //#ifndef TOLUA_DISABLE
  5195. /* method: new_local of class Matrix3x4 */
  5196. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new01_local
  5197. static int tolua_Math_Matrix3x4_new01_local(lua_State* tolua_S)
  5198. {
  5199. tolua_Error tolua_err;
  5200. if (
  5201. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5202. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5203. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5204. )
  5205. goto tolua_lerror;
  5206. else
  5207. {
  5208. const Matrix3x4* matrix = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5209. {
  5210. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5211. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5212. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5213. }
  5214. }
  5215. return 1;
  5216. tolua_lerror:
  5217. return tolua_Math_Matrix3x4_new00_local(tolua_S);
  5218. }
  5219. #endif //#ifndef TOLUA_DISABLE
  5220. /* method: new of class Matrix3x4 */
  5221. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new02
  5222. static int tolua_Math_Matrix3x4_new02(lua_State* tolua_S)
  5223. {
  5224. tolua_Error tolua_err;
  5225. if (
  5226. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5227. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  5228. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5229. )
  5230. goto tolua_lerror;
  5231. else
  5232. {
  5233. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  5234. {
  5235. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5236. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5237. }
  5238. }
  5239. return 1;
  5240. tolua_lerror:
  5241. return tolua_Math_Matrix3x4_new01(tolua_S);
  5242. }
  5243. #endif //#ifndef TOLUA_DISABLE
  5244. /* method: new_local of class Matrix3x4 */
  5245. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new02_local
  5246. static int tolua_Math_Matrix3x4_new02_local(lua_State* tolua_S)
  5247. {
  5248. tolua_Error tolua_err;
  5249. if (
  5250. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5251. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  5252. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5253. )
  5254. goto tolua_lerror;
  5255. else
  5256. {
  5257. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  5258. {
  5259. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5260. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5261. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5262. }
  5263. }
  5264. return 1;
  5265. tolua_lerror:
  5266. return tolua_Math_Matrix3x4_new01_local(tolua_S);
  5267. }
  5268. #endif //#ifndef TOLUA_DISABLE
  5269. /* method: new of class Matrix3x4 */
  5270. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new03
  5271. static int tolua_Math_Matrix3x4_new03(lua_State* tolua_S)
  5272. {
  5273. tolua_Error tolua_err;
  5274. if (
  5275. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5276. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  5277. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5278. )
  5279. goto tolua_lerror;
  5280. else
  5281. {
  5282. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  5283. {
  5284. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5285. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5286. }
  5287. }
  5288. return 1;
  5289. tolua_lerror:
  5290. return tolua_Math_Matrix3x4_new02(tolua_S);
  5291. }
  5292. #endif //#ifndef TOLUA_DISABLE
  5293. /* method: new_local of class Matrix3x4 */
  5294. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new03_local
  5295. static int tolua_Math_Matrix3x4_new03_local(lua_State* tolua_S)
  5296. {
  5297. tolua_Error tolua_err;
  5298. if (
  5299. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5300. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  5301. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5302. )
  5303. goto tolua_lerror;
  5304. else
  5305. {
  5306. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  5307. {
  5308. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5309. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5310. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5311. }
  5312. }
  5313. return 1;
  5314. tolua_lerror:
  5315. return tolua_Math_Matrix3x4_new02_local(tolua_S);
  5316. }
  5317. #endif //#ifndef TOLUA_DISABLE
  5318. /* method: new of class Matrix3x4 */
  5319. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new04
  5320. static int tolua_Math_Matrix3x4_new04(lua_State* tolua_S)
  5321. {
  5322. tolua_Error tolua_err;
  5323. if (
  5324. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5325. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5326. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  5327. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5328. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  5329. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  5330. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  5331. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  5332. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  5333. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  5334. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  5335. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  5336. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  5337. !tolua_isnoobj(tolua_S,14,&tolua_err)
  5338. )
  5339. goto tolua_lerror;
  5340. else
  5341. {
  5342. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  5343. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  5344. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  5345. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  5346. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  5347. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  5348. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  5349. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  5350. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  5351. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  5352. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  5353. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  5354. {
  5355. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23));
  5356. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5357. }
  5358. }
  5359. return 1;
  5360. tolua_lerror:
  5361. return tolua_Math_Matrix3x4_new03(tolua_S);
  5362. }
  5363. #endif //#ifndef TOLUA_DISABLE
  5364. /* method: new_local of class Matrix3x4 */
  5365. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new04_local
  5366. static int tolua_Math_Matrix3x4_new04_local(lua_State* tolua_S)
  5367. {
  5368. tolua_Error tolua_err;
  5369. if (
  5370. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5371. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5372. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  5373. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5374. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  5375. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  5376. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  5377. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  5378. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  5379. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  5380. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  5381. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  5382. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  5383. !tolua_isnoobj(tolua_S,14,&tolua_err)
  5384. )
  5385. goto tolua_lerror;
  5386. else
  5387. {
  5388. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  5389. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  5390. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  5391. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  5392. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  5393. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  5394. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  5395. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  5396. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  5397. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  5398. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  5399. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  5400. {
  5401. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23));
  5402. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5403. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5404. }
  5405. }
  5406. return 1;
  5407. tolua_lerror:
  5408. return tolua_Math_Matrix3x4_new03_local(tolua_S);
  5409. }
  5410. #endif //#ifndef TOLUA_DISABLE
  5411. /* method: new of class Matrix3x4 */
  5412. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new05
  5413. static int tolua_Math_Matrix3x4_new05(lua_State* tolua_S)
  5414. {
  5415. tolua_Error tolua_err;
  5416. if (
  5417. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5418. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5419. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5420. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5421. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5422. )
  5423. goto tolua_lerror;
  5424. else
  5425. {
  5426. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5427. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5428. float scale = ((float) tolua_tonumber(tolua_S,4,0));
  5429. {
  5430. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,scale));
  5431. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5432. }
  5433. }
  5434. return 1;
  5435. tolua_lerror:
  5436. return tolua_Math_Matrix3x4_new04(tolua_S);
  5437. }
  5438. #endif //#ifndef TOLUA_DISABLE
  5439. /* method: new_local of class Matrix3x4 */
  5440. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new05_local
  5441. static int tolua_Math_Matrix3x4_new05_local(lua_State* tolua_S)
  5442. {
  5443. tolua_Error tolua_err;
  5444. if (
  5445. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5446. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5447. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5448. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5449. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5450. )
  5451. goto tolua_lerror;
  5452. else
  5453. {
  5454. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5455. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5456. float scale = ((float) tolua_tonumber(tolua_S,4,0));
  5457. {
  5458. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,scale));
  5459. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5460. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5461. }
  5462. }
  5463. return 1;
  5464. tolua_lerror:
  5465. return tolua_Math_Matrix3x4_new04_local(tolua_S);
  5466. }
  5467. #endif //#ifndef TOLUA_DISABLE
  5468. /* method: new of class Matrix3x4 */
  5469. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new06
  5470. static int tolua_Math_Matrix3x4_new06(lua_State* tolua_S)
  5471. {
  5472. tolua_Error tolua_err;
  5473. if (
  5474. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5475. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5476. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5477. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  5478. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5479. )
  5480. goto tolua_lerror;
  5481. else
  5482. {
  5483. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5484. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5485. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  5486. {
  5487. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,*scale));
  5488. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5489. }
  5490. }
  5491. return 1;
  5492. tolua_lerror:
  5493. return tolua_Math_Matrix3x4_new05(tolua_S);
  5494. }
  5495. #endif //#ifndef TOLUA_DISABLE
  5496. /* method: new_local of class Matrix3x4 */
  5497. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new06_local
  5498. static int tolua_Math_Matrix3x4_new06_local(lua_State* tolua_S)
  5499. {
  5500. tolua_Error tolua_err;
  5501. if (
  5502. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5503. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5504. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5505. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  5506. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5507. )
  5508. goto tolua_lerror;
  5509. else
  5510. {
  5511. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5512. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5513. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  5514. {
  5515. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,*scale));
  5516. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5517. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5518. }
  5519. }
  5520. return 1;
  5521. tolua_lerror:
  5522. return tolua_Math_Matrix3x4_new05_local(tolua_S);
  5523. }
  5524. #endif //#ifndef TOLUA_DISABLE
  5525. /* method: operator== of class Matrix3x4 */
  5526. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__eq00
  5527. static int tolua_Math_Matrix3x4__eq00(lua_State* tolua_S)
  5528. {
  5529. #ifndef TOLUA_RELEASE
  5530. tolua_Error tolua_err;
  5531. if (
  5532. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5533. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5534. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5535. )
  5536. goto tolua_lerror;
  5537. else
  5538. #endif
  5539. {
  5540. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5541. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5542. #ifndef TOLUA_RELEASE
  5543. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  5544. #endif
  5545. {
  5546. bool tolua_ret = (bool) self->operator==(*rhs);
  5547. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  5548. }
  5549. }
  5550. return 1;
  5551. #ifndef TOLUA_RELEASE
  5552. tolua_lerror:
  5553. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  5554. return 0;
  5555. #endif
  5556. }
  5557. #endif //#ifndef TOLUA_DISABLE
  5558. /* method: operator* of class Matrix3x4 */
  5559. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul00
  5560. static int tolua_Math_Matrix3x4__mul00(lua_State* tolua_S)
  5561. {
  5562. #ifndef TOLUA_RELEASE
  5563. tolua_Error tolua_err;
  5564. if (
  5565. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5566. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5567. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5568. )
  5569. goto tolua_lerror;
  5570. else
  5571. #endif
  5572. {
  5573. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5574. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5575. #ifndef TOLUA_RELEASE
  5576. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5577. #endif
  5578. {
  5579. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  5580. {
  5581. #ifdef __cplusplus
  5582. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5583. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5584. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5585. #else
  5586. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5587. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5588. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5589. #endif
  5590. }
  5591. }
  5592. }
  5593. return 1;
  5594. #ifndef TOLUA_RELEASE
  5595. tolua_lerror:
  5596. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  5597. return 0;
  5598. #endif
  5599. }
  5600. #endif //#ifndef TOLUA_DISABLE
  5601. /* method: operator* of class Matrix3x4 */
  5602. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul01
  5603. static int tolua_Math_Matrix3x4__mul01(lua_State* tolua_S)
  5604. {
  5605. tolua_Error tolua_err;
  5606. if (
  5607. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5608. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  5609. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5610. )
  5611. goto tolua_lerror;
  5612. else
  5613. {
  5614. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5615. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  5616. #ifndef TOLUA_RELEASE
  5617. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5618. #endif
  5619. {
  5620. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  5621. {
  5622. #ifdef __cplusplus
  5623. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5624. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5625. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5626. #else
  5627. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5628. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5629. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5630. #endif
  5631. }
  5632. }
  5633. }
  5634. return 1;
  5635. tolua_lerror:
  5636. return tolua_Math_Matrix3x4__mul00(tolua_S);
  5637. }
  5638. #endif //#ifndef TOLUA_DISABLE
  5639. /* method: operator+ of class Matrix3x4 */
  5640. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__add00
  5641. static int tolua_Math_Matrix3x4__add00(lua_State* tolua_S)
  5642. {
  5643. #ifndef TOLUA_RELEASE
  5644. tolua_Error tolua_err;
  5645. if (
  5646. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5647. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5648. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5649. )
  5650. goto tolua_lerror;
  5651. else
  5652. #endif
  5653. {
  5654. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5655. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5656. #ifndef TOLUA_RELEASE
  5657. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  5658. #endif
  5659. {
  5660. Matrix3x4 tolua_ret = (Matrix3x4) self->operator+(*rhs);
  5661. {
  5662. #ifdef __cplusplus
  5663. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5664. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5665. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5666. #else
  5667. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5668. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5669. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5670. #endif
  5671. }
  5672. }
  5673. }
  5674. return 1;
  5675. #ifndef TOLUA_RELEASE
  5676. tolua_lerror:
  5677. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  5678. return 0;
  5679. #endif
  5680. }
  5681. #endif //#ifndef TOLUA_DISABLE
  5682. /* method: operator- of class Matrix3x4 */
  5683. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__sub00
  5684. static int tolua_Math_Matrix3x4__sub00(lua_State* tolua_S)
  5685. {
  5686. #ifndef TOLUA_RELEASE
  5687. tolua_Error tolua_err;
  5688. if (
  5689. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5690. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5691. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5692. )
  5693. goto tolua_lerror;
  5694. else
  5695. #endif
  5696. {
  5697. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5698. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5699. #ifndef TOLUA_RELEASE
  5700. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  5701. #endif
  5702. {
  5703. Matrix3x4 tolua_ret = (Matrix3x4) self->operator-(*rhs);
  5704. {
  5705. #ifdef __cplusplus
  5706. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5707. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5708. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5709. #else
  5710. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5711. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5712. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5713. #endif
  5714. }
  5715. }
  5716. }
  5717. return 1;
  5718. #ifndef TOLUA_RELEASE
  5719. tolua_lerror:
  5720. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  5721. return 0;
  5722. #endif
  5723. }
  5724. #endif //#ifndef TOLUA_DISABLE
  5725. /* method: operator* of class Matrix3x4 */
  5726. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul02
  5727. static int tolua_Math_Matrix3x4__mul02(lua_State* tolua_S)
  5728. {
  5729. tolua_Error tolua_err;
  5730. if (
  5731. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5732. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5733. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5734. )
  5735. goto tolua_lerror;
  5736. else
  5737. {
  5738. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5739. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  5740. #ifndef TOLUA_RELEASE
  5741. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5742. #endif
  5743. {
  5744. Matrix3x4 tolua_ret = (Matrix3x4) self->operator*(rhs);
  5745. {
  5746. #ifdef __cplusplus
  5747. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5748. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5749. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5750. #else
  5751. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5752. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5753. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5754. #endif
  5755. }
  5756. }
  5757. }
  5758. return 1;
  5759. tolua_lerror:
  5760. return tolua_Math_Matrix3x4__mul01(tolua_S);
  5761. }
  5762. #endif //#ifndef TOLUA_DISABLE
  5763. /* method: operator* of class Matrix3x4 */
  5764. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul03
  5765. static int tolua_Math_Matrix3x4__mul03(lua_State* tolua_S)
  5766. {
  5767. tolua_Error tolua_err;
  5768. if (
  5769. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5770. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5771. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5772. )
  5773. goto tolua_lerror;
  5774. else
  5775. {
  5776. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5777. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5778. #ifndef TOLUA_RELEASE
  5779. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5780. #endif
  5781. {
  5782. Matrix3x4 tolua_ret = (Matrix3x4) self->operator*(*rhs);
  5783. {
  5784. #ifdef __cplusplus
  5785. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5786. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5787. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5788. #else
  5789. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5790. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5791. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5792. #endif
  5793. }
  5794. }
  5795. }
  5796. return 1;
  5797. tolua_lerror:
  5798. return tolua_Math_Matrix3x4__mul02(tolua_S);
  5799. }
  5800. #endif //#ifndef TOLUA_DISABLE
  5801. /* method: operator* of class Matrix3x4 */
  5802. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul04
  5803. static int tolua_Math_Matrix3x4__mul04(lua_State* tolua_S)
  5804. {
  5805. tolua_Error tolua_err;
  5806. if (
  5807. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5808. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  5809. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5810. )
  5811. goto tolua_lerror;
  5812. else
  5813. {
  5814. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5815. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  5816. #ifndef TOLUA_RELEASE
  5817. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5818. #endif
  5819. {
  5820. Matrix4 tolua_ret = (Matrix4) self->operator*(*rhs);
  5821. {
  5822. #ifdef __cplusplus
  5823. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  5824. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  5825. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5826. #else
  5827. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  5828. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  5829. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5830. #endif
  5831. }
  5832. }
  5833. }
  5834. return 1;
  5835. tolua_lerror:
  5836. return tolua_Math_Matrix3x4__mul03(tolua_S);
  5837. }
  5838. #endif //#ifndef TOLUA_DISABLE
  5839. /* method: SetTranslation of class Matrix3x4 */
  5840. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetTranslation00
  5841. static int tolua_Math_Matrix3x4_SetTranslation00(lua_State* tolua_S)
  5842. {
  5843. #ifndef TOLUA_RELEASE
  5844. tolua_Error tolua_err;
  5845. if (
  5846. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5847. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5848. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5849. )
  5850. goto tolua_lerror;
  5851. else
  5852. #endif
  5853. {
  5854. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5855. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5856. #ifndef TOLUA_RELEASE
  5857. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTranslation'", NULL);
  5858. #endif
  5859. {
  5860. self->SetTranslation(*translation);
  5861. }
  5862. }
  5863. return 0;
  5864. #ifndef TOLUA_RELEASE
  5865. tolua_lerror:
  5866. tolua_error(tolua_S,"#ferror in function 'SetTranslation'.",&tolua_err);
  5867. return 0;
  5868. #endif
  5869. }
  5870. #endif //#ifndef TOLUA_DISABLE
  5871. /* method: SetRotation of class Matrix3x4 */
  5872. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetRotation00
  5873. static int tolua_Math_Matrix3x4_SetRotation00(lua_State* tolua_S)
  5874. {
  5875. #ifndef TOLUA_RELEASE
  5876. tolua_Error tolua_err;
  5877. if (
  5878. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5879. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  5880. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5881. )
  5882. goto tolua_lerror;
  5883. else
  5884. #endif
  5885. {
  5886. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5887. const Matrix3* rotation = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  5888. #ifndef TOLUA_RELEASE
  5889. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  5890. #endif
  5891. {
  5892. self->SetRotation(*rotation);
  5893. }
  5894. }
  5895. return 0;
  5896. #ifndef TOLUA_RELEASE
  5897. tolua_lerror:
  5898. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  5899. return 0;
  5900. #endif
  5901. }
  5902. #endif //#ifndef TOLUA_DISABLE
  5903. /* method: SetScale of class Matrix3x4 */
  5904. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetScale00
  5905. static int tolua_Math_Matrix3x4_SetScale00(lua_State* tolua_S)
  5906. {
  5907. #ifndef TOLUA_RELEASE
  5908. tolua_Error tolua_err;
  5909. if (
  5910. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5911. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5912. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5913. )
  5914. goto tolua_lerror;
  5915. else
  5916. #endif
  5917. {
  5918. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5919. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5920. #ifndef TOLUA_RELEASE
  5921. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  5922. #endif
  5923. {
  5924. self->SetScale(*scale);
  5925. }
  5926. }
  5927. return 0;
  5928. #ifndef TOLUA_RELEASE
  5929. tolua_lerror:
  5930. tolua_error(tolua_S,"#ferror in function 'SetScale'.",&tolua_err);
  5931. return 0;
  5932. #endif
  5933. }
  5934. #endif //#ifndef TOLUA_DISABLE
  5935. /* method: SetScale of class Matrix3x4 */
  5936. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetScale01
  5937. static int tolua_Math_Matrix3x4_SetScale01(lua_State* tolua_S)
  5938. {
  5939. tolua_Error tolua_err;
  5940. if (
  5941. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5942. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5943. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5944. )
  5945. goto tolua_lerror;
  5946. else
  5947. {
  5948. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5949. float scale = ((float) tolua_tonumber(tolua_S,2,0));
  5950. #ifndef TOLUA_RELEASE
  5951. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  5952. #endif
  5953. {
  5954. self->SetScale(scale);
  5955. }
  5956. }
  5957. return 0;
  5958. tolua_lerror:
  5959. return tolua_Math_Matrix3x4_SetScale00(tolua_S);
  5960. }
  5961. #endif //#ifndef TOLUA_DISABLE
  5962. /* method: ToMatrix3 of class Matrix3x4 */
  5963. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_ToMatrix300
  5964. static int tolua_Math_Matrix3x4_ToMatrix300(lua_State* tolua_S)
  5965. {
  5966. #ifndef TOLUA_RELEASE
  5967. tolua_Error tolua_err;
  5968. if (
  5969. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5970. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5971. )
  5972. goto tolua_lerror;
  5973. else
  5974. #endif
  5975. {
  5976. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5977. #ifndef TOLUA_RELEASE
  5978. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToMatrix3'", NULL);
  5979. #endif
  5980. {
  5981. Matrix3 tolua_ret = (Matrix3) self->ToMatrix3();
  5982. {
  5983. #ifdef __cplusplus
  5984. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  5985. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  5986. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5987. #else
  5988. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  5989. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  5990. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5991. #endif
  5992. }
  5993. }
  5994. }
  5995. return 1;
  5996. #ifndef TOLUA_RELEASE
  5997. tolua_lerror:
  5998. tolua_error(tolua_S,"#ferror in function 'ToMatrix3'.",&tolua_err);
  5999. return 0;
  6000. #endif
  6001. }
  6002. #endif //#ifndef TOLUA_DISABLE
  6003. /* method: RotationMatrix of class Matrix3x4 */
  6004. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_RotationMatrix00
  6005. static int tolua_Math_Matrix3x4_RotationMatrix00(lua_State* tolua_S)
  6006. {
  6007. #ifndef TOLUA_RELEASE
  6008. tolua_Error tolua_err;
  6009. if (
  6010. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6011. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6012. )
  6013. goto tolua_lerror;
  6014. else
  6015. #endif
  6016. {
  6017. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6018. #ifndef TOLUA_RELEASE
  6019. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotationMatrix'", NULL);
  6020. #endif
  6021. {
  6022. Matrix3 tolua_ret = (Matrix3) self->RotationMatrix();
  6023. {
  6024. #ifdef __cplusplus
  6025. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  6026. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  6027. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6028. #else
  6029. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  6030. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  6031. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6032. #endif
  6033. }
  6034. }
  6035. }
  6036. return 1;
  6037. #ifndef TOLUA_RELEASE
  6038. tolua_lerror:
  6039. tolua_error(tolua_S,"#ferror in function 'RotationMatrix'.",&tolua_err);
  6040. return 0;
  6041. #endif
  6042. }
  6043. #endif //#ifndef TOLUA_DISABLE
  6044. /* method: Translation of class Matrix3x4 */
  6045. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Translation00
  6046. static int tolua_Math_Matrix3x4_Translation00(lua_State* tolua_S)
  6047. {
  6048. #ifndef TOLUA_RELEASE
  6049. tolua_Error tolua_err;
  6050. if (
  6051. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6052. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6053. )
  6054. goto tolua_lerror;
  6055. else
  6056. #endif
  6057. {
  6058. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6059. #ifndef TOLUA_RELEASE
  6060. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Translation'", NULL);
  6061. #endif
  6062. {
  6063. Vector3 tolua_ret = (Vector3) self->Translation();
  6064. {
  6065. #ifdef __cplusplus
  6066. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  6067. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6068. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6069. #else
  6070. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  6071. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6072. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6073. #endif
  6074. }
  6075. }
  6076. }
  6077. return 1;
  6078. #ifndef TOLUA_RELEASE
  6079. tolua_lerror:
  6080. tolua_error(tolua_S,"#ferror in function 'Translation'.",&tolua_err);
  6081. return 0;
  6082. #endif
  6083. }
  6084. #endif //#ifndef TOLUA_DISABLE
  6085. /* method: Rotation of class Matrix3x4 */
  6086. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Rotation00
  6087. static int tolua_Math_Matrix3x4_Rotation00(lua_State* tolua_S)
  6088. {
  6089. #ifndef TOLUA_RELEASE
  6090. tolua_Error tolua_err;
  6091. if (
  6092. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6093. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6094. )
  6095. goto tolua_lerror;
  6096. else
  6097. #endif
  6098. {
  6099. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6100. #ifndef TOLUA_RELEASE
  6101. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Rotation'", NULL);
  6102. #endif
  6103. {
  6104. Quaternion tolua_ret = (Quaternion) self->Rotation();
  6105. {
  6106. #ifdef __cplusplus
  6107. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  6108. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  6109. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6110. #else
  6111. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  6112. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  6113. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6114. #endif
  6115. }
  6116. }
  6117. }
  6118. return 1;
  6119. #ifndef TOLUA_RELEASE
  6120. tolua_lerror:
  6121. tolua_error(tolua_S,"#ferror in function 'Rotation'.",&tolua_err);
  6122. return 0;
  6123. #endif
  6124. }
  6125. #endif //#ifndef TOLUA_DISABLE
  6126. /* method: Scale of class Matrix3x4 */
  6127. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Scale00
  6128. static int tolua_Math_Matrix3x4_Scale00(lua_State* tolua_S)
  6129. {
  6130. #ifndef TOLUA_RELEASE
  6131. tolua_Error tolua_err;
  6132. if (
  6133. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6134. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6135. )
  6136. goto tolua_lerror;
  6137. else
  6138. #endif
  6139. {
  6140. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6141. #ifndef TOLUA_RELEASE
  6142. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL);
  6143. #endif
  6144. {
  6145. Vector3 tolua_ret = (Vector3) self->Scale();
  6146. {
  6147. #ifdef __cplusplus
  6148. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  6149. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6150. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6151. #else
  6152. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  6153. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6154. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6155. #endif
  6156. }
  6157. }
  6158. }
  6159. return 1;
  6160. #ifndef TOLUA_RELEASE
  6161. tolua_lerror:
  6162. tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err);
  6163. return 0;
  6164. #endif
  6165. }
  6166. #endif //#ifndef TOLUA_DISABLE
  6167. /* method: Equals of class Matrix3x4 */
  6168. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Equals00
  6169. static int tolua_Math_Matrix3x4_Equals00(lua_State* tolua_S)
  6170. {
  6171. #ifndef TOLUA_RELEASE
  6172. tolua_Error tolua_err;
  6173. if (
  6174. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6175. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  6176. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6177. )
  6178. goto tolua_lerror;
  6179. else
  6180. #endif
  6181. {
  6182. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6183. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  6184. #ifndef TOLUA_RELEASE
  6185. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  6186. #endif
  6187. {
  6188. bool tolua_ret = (bool) self->Equals(*rhs);
  6189. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  6190. }
  6191. }
  6192. return 1;
  6193. #ifndef TOLUA_RELEASE
  6194. tolua_lerror:
  6195. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  6196. return 0;
  6197. #endif
  6198. }
  6199. #endif //#ifndef TOLUA_DISABLE
  6200. /* method: Decompose of class Matrix3x4 */
  6201. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Decompose00
  6202. static int tolua_Math_Matrix3x4_Decompose00(lua_State* tolua_S)
  6203. {
  6204. #ifndef TOLUA_RELEASE
  6205. tolua_Error tolua_err;
  6206. if (
  6207. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6208. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  6209. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"Quaternion",0,&tolua_err)) ||
  6210. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"Vector3",0,&tolua_err)) ||
  6211. !tolua_isnoobj(tolua_S,5,&tolua_err)
  6212. )
  6213. goto tolua_lerror;
  6214. else
  6215. #endif
  6216. {
  6217. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6218. Vector3* translation = ((Vector3*) tolua_tousertype(tolua_S,2,0));
  6219. Quaternion* rotation = ((Quaternion*) tolua_tousertype(tolua_S,3,0));
  6220. Vector3* scale = ((Vector3*) tolua_tousertype(tolua_S,4,0));
  6221. #ifndef TOLUA_RELEASE
  6222. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Decompose'", NULL);
  6223. #endif
  6224. {
  6225. self->Decompose(*translation,*rotation,*scale);
  6226. }
  6227. }
  6228. return 0;
  6229. #ifndef TOLUA_RELEASE
  6230. tolua_lerror:
  6231. tolua_error(tolua_S,"#ferror in function 'Decompose'.",&tolua_err);
  6232. return 0;
  6233. #endif
  6234. }
  6235. #endif //#ifndef TOLUA_DISABLE
  6236. /* method: Inverse of class Matrix3x4 */
  6237. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Inverse00
  6238. static int tolua_Math_Matrix3x4_Inverse00(lua_State* tolua_S)
  6239. {
  6240. #ifndef TOLUA_RELEASE
  6241. tolua_Error tolua_err;
  6242. if (
  6243. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6244. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6245. )
  6246. goto tolua_lerror;
  6247. else
  6248. #endif
  6249. {
  6250. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6251. #ifndef TOLUA_RELEASE
  6252. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  6253. #endif
  6254. {
  6255. Matrix3x4 tolua_ret = (Matrix3x4) self->Inverse();
  6256. {
  6257. #ifdef __cplusplus
  6258. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  6259. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  6260. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6261. #else
  6262. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  6263. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  6264. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6265. #endif
  6266. }
  6267. }
  6268. }
  6269. return 1;
  6270. #ifndef TOLUA_RELEASE
  6271. tolua_lerror:
  6272. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  6273. return 0;
  6274. #endif
  6275. }
  6276. #endif //#ifndef TOLUA_DISABLE
  6277. /* get function: m00_ of class Matrix3x4 */
  6278. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m00
  6279. static int tolua_get_Matrix3x4_m00(lua_State* tolua_S)
  6280. {
  6281. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6282. #ifndef TOLUA_RELEASE
  6283. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  6284. #endif
  6285. tolua_pushnumber(tolua_S,(lua_Number)self->m00_);
  6286. return 1;
  6287. }
  6288. #endif //#ifndef TOLUA_DISABLE
  6289. /* set function: m00_ of class Matrix3x4 */
  6290. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m00
  6291. static int tolua_set_Matrix3x4_m00(lua_State* tolua_S)
  6292. {
  6293. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6294. #ifndef TOLUA_RELEASE
  6295. tolua_Error tolua_err;
  6296. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  6297. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6298. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6299. #endif
  6300. self->m00_ = ((float) tolua_tonumber(tolua_S,2,0))
  6301. ;
  6302. return 0;
  6303. }
  6304. #endif //#ifndef TOLUA_DISABLE
  6305. /* get function: m01_ of class Matrix3x4 */
  6306. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m01
  6307. static int tolua_get_Matrix3x4_m01(lua_State* tolua_S)
  6308. {
  6309. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6310. #ifndef TOLUA_RELEASE
  6311. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  6312. #endif
  6313. tolua_pushnumber(tolua_S,(lua_Number)self->m01_);
  6314. return 1;
  6315. }
  6316. #endif //#ifndef TOLUA_DISABLE
  6317. /* set function: m01_ of class Matrix3x4 */
  6318. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m01
  6319. static int tolua_set_Matrix3x4_m01(lua_State* tolua_S)
  6320. {
  6321. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6322. #ifndef TOLUA_RELEASE
  6323. tolua_Error tolua_err;
  6324. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  6325. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6326. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6327. #endif
  6328. self->m01_ = ((float) tolua_tonumber(tolua_S,2,0))
  6329. ;
  6330. return 0;
  6331. }
  6332. #endif //#ifndef TOLUA_DISABLE
  6333. /* get function: m02_ of class Matrix3x4 */
  6334. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m02
  6335. static int tolua_get_Matrix3x4_m02(lua_State* tolua_S)
  6336. {
  6337. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6338. #ifndef TOLUA_RELEASE
  6339. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  6340. #endif
  6341. tolua_pushnumber(tolua_S,(lua_Number)self->m02_);
  6342. return 1;
  6343. }
  6344. #endif //#ifndef TOLUA_DISABLE
  6345. /* set function: m02_ of class Matrix3x4 */
  6346. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m02
  6347. static int tolua_set_Matrix3x4_m02(lua_State* tolua_S)
  6348. {
  6349. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6350. #ifndef TOLUA_RELEASE
  6351. tolua_Error tolua_err;
  6352. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  6353. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6354. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6355. #endif
  6356. self->m02_ = ((float) tolua_tonumber(tolua_S,2,0))
  6357. ;
  6358. return 0;
  6359. }
  6360. #endif //#ifndef TOLUA_DISABLE
  6361. /* get function: m03_ of class Matrix3x4 */
  6362. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m03
  6363. static int tolua_get_Matrix3x4_m03(lua_State* tolua_S)
  6364. {
  6365. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6366. #ifndef TOLUA_RELEASE
  6367. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  6368. #endif
  6369. tolua_pushnumber(tolua_S,(lua_Number)self->m03_);
  6370. return 1;
  6371. }
  6372. #endif //#ifndef TOLUA_DISABLE
  6373. /* set function: m03_ of class Matrix3x4 */
  6374. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m03
  6375. static int tolua_set_Matrix3x4_m03(lua_State* tolua_S)
  6376. {
  6377. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6378. #ifndef TOLUA_RELEASE
  6379. tolua_Error tolua_err;
  6380. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  6381. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6382. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6383. #endif
  6384. self->m03_ = ((float) tolua_tonumber(tolua_S,2,0))
  6385. ;
  6386. return 0;
  6387. }
  6388. #endif //#ifndef TOLUA_DISABLE
  6389. /* get function: m10_ of class Matrix3x4 */
  6390. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m10
  6391. static int tolua_get_Matrix3x4_m10(lua_State* tolua_S)
  6392. {
  6393. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6394. #ifndef TOLUA_RELEASE
  6395. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  6396. #endif
  6397. tolua_pushnumber(tolua_S,(lua_Number)self->m10_);
  6398. return 1;
  6399. }
  6400. #endif //#ifndef TOLUA_DISABLE
  6401. /* set function: m10_ of class Matrix3x4 */
  6402. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m10
  6403. static int tolua_set_Matrix3x4_m10(lua_State* tolua_S)
  6404. {
  6405. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6406. #ifndef TOLUA_RELEASE
  6407. tolua_Error tolua_err;
  6408. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  6409. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6410. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6411. #endif
  6412. self->m10_ = ((float) tolua_tonumber(tolua_S,2,0))
  6413. ;
  6414. return 0;
  6415. }
  6416. #endif //#ifndef TOLUA_DISABLE
  6417. /* get function: m11_ of class Matrix3x4 */
  6418. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m11
  6419. static int tolua_get_Matrix3x4_m11(lua_State* tolua_S)
  6420. {
  6421. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6422. #ifndef TOLUA_RELEASE
  6423. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  6424. #endif
  6425. tolua_pushnumber(tolua_S,(lua_Number)self->m11_);
  6426. return 1;
  6427. }
  6428. #endif //#ifndef TOLUA_DISABLE
  6429. /* set function: m11_ of class Matrix3x4 */
  6430. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m11
  6431. static int tolua_set_Matrix3x4_m11(lua_State* tolua_S)
  6432. {
  6433. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6434. #ifndef TOLUA_RELEASE
  6435. tolua_Error tolua_err;
  6436. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  6437. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6438. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6439. #endif
  6440. self->m11_ = ((float) tolua_tonumber(tolua_S,2,0))
  6441. ;
  6442. return 0;
  6443. }
  6444. #endif //#ifndef TOLUA_DISABLE
  6445. /* get function: m12_ of class Matrix3x4 */
  6446. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m12
  6447. static int tolua_get_Matrix3x4_m12(lua_State* tolua_S)
  6448. {
  6449. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6450. #ifndef TOLUA_RELEASE
  6451. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  6452. #endif
  6453. tolua_pushnumber(tolua_S,(lua_Number)self->m12_);
  6454. return 1;
  6455. }
  6456. #endif //#ifndef TOLUA_DISABLE
  6457. /* set function: m12_ of class Matrix3x4 */
  6458. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m12
  6459. static int tolua_set_Matrix3x4_m12(lua_State* tolua_S)
  6460. {
  6461. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6462. #ifndef TOLUA_RELEASE
  6463. tolua_Error tolua_err;
  6464. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  6465. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6466. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6467. #endif
  6468. self->m12_ = ((float) tolua_tonumber(tolua_S,2,0))
  6469. ;
  6470. return 0;
  6471. }
  6472. #endif //#ifndef TOLUA_DISABLE
  6473. /* get function: m13_ of class Matrix3x4 */
  6474. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m13
  6475. static int tolua_get_Matrix3x4_m13(lua_State* tolua_S)
  6476. {
  6477. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6478. #ifndef TOLUA_RELEASE
  6479. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  6480. #endif
  6481. tolua_pushnumber(tolua_S,(lua_Number)self->m13_);
  6482. return 1;
  6483. }
  6484. #endif //#ifndef TOLUA_DISABLE
  6485. /* set function: m13_ of class Matrix3x4 */
  6486. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m13
  6487. static int tolua_set_Matrix3x4_m13(lua_State* tolua_S)
  6488. {
  6489. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6490. #ifndef TOLUA_RELEASE
  6491. tolua_Error tolua_err;
  6492. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  6493. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6494. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6495. #endif
  6496. self->m13_ = ((float) tolua_tonumber(tolua_S,2,0))
  6497. ;
  6498. return 0;
  6499. }
  6500. #endif //#ifndef TOLUA_DISABLE
  6501. /* get function: m20_ of class Matrix3x4 */
  6502. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m20
  6503. static int tolua_get_Matrix3x4_m20(lua_State* tolua_S)
  6504. {
  6505. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6506. #ifndef TOLUA_RELEASE
  6507. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  6508. #endif
  6509. tolua_pushnumber(tolua_S,(lua_Number)self->m20_);
  6510. return 1;
  6511. }
  6512. #endif //#ifndef TOLUA_DISABLE
  6513. /* set function: m20_ of class Matrix3x4 */
  6514. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m20
  6515. static int tolua_set_Matrix3x4_m20(lua_State* tolua_S)
  6516. {
  6517. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6518. #ifndef TOLUA_RELEASE
  6519. tolua_Error tolua_err;
  6520. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  6521. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6522. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6523. #endif
  6524. self->m20_ = ((float) tolua_tonumber(tolua_S,2,0))
  6525. ;
  6526. return 0;
  6527. }
  6528. #endif //#ifndef TOLUA_DISABLE
  6529. /* get function: m21_ of class Matrix3x4 */
  6530. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m21
  6531. static int tolua_get_Matrix3x4_m21(lua_State* tolua_S)
  6532. {
  6533. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6534. #ifndef TOLUA_RELEASE
  6535. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  6536. #endif
  6537. tolua_pushnumber(tolua_S,(lua_Number)self->m21_);
  6538. return 1;
  6539. }
  6540. #endif //#ifndef TOLUA_DISABLE
  6541. /* set function: m21_ of class Matrix3x4 */
  6542. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m21
  6543. static int tolua_set_Matrix3x4_m21(lua_State* tolua_S)
  6544. {
  6545. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6546. #ifndef TOLUA_RELEASE
  6547. tolua_Error tolua_err;
  6548. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  6549. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6550. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6551. #endif
  6552. self->m21_ = ((float) tolua_tonumber(tolua_S,2,0))
  6553. ;
  6554. return 0;
  6555. }
  6556. #endif //#ifndef TOLUA_DISABLE
  6557. /* get function: m22_ of class Matrix3x4 */
  6558. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m22
  6559. static int tolua_get_Matrix3x4_m22(lua_State* tolua_S)
  6560. {
  6561. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6562. #ifndef TOLUA_RELEASE
  6563. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  6564. #endif
  6565. tolua_pushnumber(tolua_S,(lua_Number)self->m22_);
  6566. return 1;
  6567. }
  6568. #endif //#ifndef TOLUA_DISABLE
  6569. /* set function: m22_ of class Matrix3x4 */
  6570. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m22
  6571. static int tolua_set_Matrix3x4_m22(lua_State* tolua_S)
  6572. {
  6573. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6574. #ifndef TOLUA_RELEASE
  6575. tolua_Error tolua_err;
  6576. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  6577. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6578. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6579. #endif
  6580. self->m22_ = ((float) tolua_tonumber(tolua_S,2,0))
  6581. ;
  6582. return 0;
  6583. }
  6584. #endif //#ifndef TOLUA_DISABLE
  6585. /* get function: m23_ of class Matrix3x4 */
  6586. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m23
  6587. static int tolua_get_Matrix3x4_m23(lua_State* tolua_S)
  6588. {
  6589. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6590. #ifndef TOLUA_RELEASE
  6591. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  6592. #endif
  6593. tolua_pushnumber(tolua_S,(lua_Number)self->m23_);
  6594. return 1;
  6595. }
  6596. #endif //#ifndef TOLUA_DISABLE
  6597. /* set function: m23_ of class Matrix3x4 */
  6598. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m23
  6599. static int tolua_set_Matrix3x4_m23(lua_State* tolua_S)
  6600. {
  6601. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6602. #ifndef TOLUA_RELEASE
  6603. tolua_Error tolua_err;
  6604. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  6605. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6606. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6607. #endif
  6608. self->m23_ = ((float) tolua_tonumber(tolua_S,2,0))
  6609. ;
  6610. return 0;
  6611. }
  6612. #endif //#ifndef TOLUA_DISABLE
  6613. /* get function: ZERO of class Matrix3x4 */
  6614. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_ZERO
  6615. static int tolua_get_Matrix3x4_ZERO(lua_State* tolua_S)
  6616. {
  6617. tolua_pushusertype(tolua_S,(void*)&Matrix3x4::ZERO,"const Matrix3x4");
  6618. return 1;
  6619. }
  6620. #endif //#ifndef TOLUA_DISABLE
  6621. /* get function: IDENTITY of class Matrix3x4 */
  6622. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_IDENTITY
  6623. static int tolua_get_Matrix3x4_IDENTITY(lua_State* tolua_S)
  6624. {
  6625. tolua_pushusertype(tolua_S,(void*)&Matrix3x4::IDENTITY,"const Matrix3x4");
  6626. return 1;
  6627. }
  6628. #endif //#ifndef TOLUA_DISABLE
  6629. /* method: new of class Matrix4 */
  6630. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new00
  6631. static int tolua_Math_Matrix4_new00(lua_State* tolua_S)
  6632. {
  6633. #ifndef TOLUA_RELEASE
  6634. tolua_Error tolua_err;
  6635. if (
  6636. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6637. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6638. )
  6639. goto tolua_lerror;
  6640. else
  6641. #endif
  6642. {
  6643. {
  6644. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)());
  6645. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6646. }
  6647. }
  6648. return 1;
  6649. #ifndef TOLUA_RELEASE
  6650. tolua_lerror:
  6651. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  6652. return 0;
  6653. #endif
  6654. }
  6655. #endif //#ifndef TOLUA_DISABLE
  6656. /* method: new_local of class Matrix4 */
  6657. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new00_local
  6658. static int tolua_Math_Matrix4_new00_local(lua_State* tolua_S)
  6659. {
  6660. #ifndef TOLUA_RELEASE
  6661. tolua_Error tolua_err;
  6662. if (
  6663. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6664. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6665. )
  6666. goto tolua_lerror;
  6667. else
  6668. #endif
  6669. {
  6670. {
  6671. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)());
  6672. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6673. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6674. }
  6675. }
  6676. return 1;
  6677. #ifndef TOLUA_RELEASE
  6678. tolua_lerror:
  6679. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  6680. return 0;
  6681. #endif
  6682. }
  6683. #endif //#ifndef TOLUA_DISABLE
  6684. /* method: new of class Matrix4 */
  6685. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new01
  6686. static int tolua_Math_Matrix4_new01(lua_State* tolua_S)
  6687. {
  6688. tolua_Error tolua_err;
  6689. if (
  6690. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6691. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6692. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6693. )
  6694. goto tolua_lerror;
  6695. else
  6696. {
  6697. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6698. {
  6699. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6700. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6701. }
  6702. }
  6703. return 1;
  6704. tolua_lerror:
  6705. return tolua_Math_Matrix4_new00(tolua_S);
  6706. }
  6707. #endif //#ifndef TOLUA_DISABLE
  6708. /* method: new_local of class Matrix4 */
  6709. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new01_local
  6710. static int tolua_Math_Matrix4_new01_local(lua_State* tolua_S)
  6711. {
  6712. tolua_Error tolua_err;
  6713. if (
  6714. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6715. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6716. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6717. )
  6718. goto tolua_lerror;
  6719. else
  6720. {
  6721. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6722. {
  6723. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6724. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6725. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6726. }
  6727. }
  6728. return 1;
  6729. tolua_lerror:
  6730. return tolua_Math_Matrix4_new00_local(tolua_S);
  6731. }
  6732. #endif //#ifndef TOLUA_DISABLE
  6733. /* method: new of class Matrix4 */
  6734. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new02
  6735. static int tolua_Math_Matrix4_new02(lua_State* tolua_S)
  6736. {
  6737. tolua_Error tolua_err;
  6738. if (
  6739. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6740. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  6741. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6742. )
  6743. goto tolua_lerror;
  6744. else
  6745. {
  6746. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  6747. {
  6748. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6749. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6750. }
  6751. }
  6752. return 1;
  6753. tolua_lerror:
  6754. return tolua_Math_Matrix4_new01(tolua_S);
  6755. }
  6756. #endif //#ifndef TOLUA_DISABLE
  6757. /* method: new_local of class Matrix4 */
  6758. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new02_local
  6759. static int tolua_Math_Matrix4_new02_local(lua_State* tolua_S)
  6760. {
  6761. tolua_Error tolua_err;
  6762. if (
  6763. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6764. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  6765. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6766. )
  6767. goto tolua_lerror;
  6768. else
  6769. {
  6770. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  6771. {
  6772. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6773. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6774. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6775. }
  6776. }
  6777. return 1;
  6778. tolua_lerror:
  6779. return tolua_Math_Matrix4_new01_local(tolua_S);
  6780. }
  6781. #endif //#ifndef TOLUA_DISABLE
  6782. /* method: new of class Matrix4 */
  6783. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new03
  6784. static int tolua_Math_Matrix4_new03(lua_State* tolua_S)
  6785. {
  6786. tolua_Error tolua_err;
  6787. if (
  6788. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6789. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  6790. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  6791. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  6792. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  6793. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  6794. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  6795. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  6796. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  6797. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  6798. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  6799. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  6800. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  6801. !tolua_isnumber(tolua_S,14,0,&tolua_err) ||
  6802. !tolua_isnumber(tolua_S,15,0,&tolua_err) ||
  6803. !tolua_isnumber(tolua_S,16,0,&tolua_err) ||
  6804. !tolua_isnumber(tolua_S,17,0,&tolua_err) ||
  6805. !tolua_isnoobj(tolua_S,18,&tolua_err)
  6806. )
  6807. goto tolua_lerror;
  6808. else
  6809. {
  6810. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  6811. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  6812. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  6813. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  6814. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  6815. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  6816. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  6817. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  6818. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  6819. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  6820. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  6821. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  6822. float v30 = ((float) tolua_tonumber(tolua_S,14,0));
  6823. float v31 = ((float) tolua_tonumber(tolua_S,15,0));
  6824. float v32 = ((float) tolua_tonumber(tolua_S,16,0));
  6825. float v33 = ((float) tolua_tonumber(tolua_S,17,0));
  6826. {
  6827. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23,v30,v31,v32,v33));
  6828. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6829. }
  6830. }
  6831. return 1;
  6832. tolua_lerror:
  6833. return tolua_Math_Matrix4_new02(tolua_S);
  6834. }
  6835. #endif //#ifndef TOLUA_DISABLE
  6836. /* method: new_local of class Matrix4 */
  6837. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new03_local
  6838. static int tolua_Math_Matrix4_new03_local(lua_State* tolua_S)
  6839. {
  6840. tolua_Error tolua_err;
  6841. if (
  6842. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6843. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  6844. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  6845. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  6846. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  6847. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  6848. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  6849. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  6850. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  6851. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  6852. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  6853. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  6854. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  6855. !tolua_isnumber(tolua_S,14,0,&tolua_err) ||
  6856. !tolua_isnumber(tolua_S,15,0,&tolua_err) ||
  6857. !tolua_isnumber(tolua_S,16,0,&tolua_err) ||
  6858. !tolua_isnumber(tolua_S,17,0,&tolua_err) ||
  6859. !tolua_isnoobj(tolua_S,18,&tolua_err)
  6860. )
  6861. goto tolua_lerror;
  6862. else
  6863. {
  6864. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  6865. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  6866. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  6867. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  6868. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  6869. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  6870. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  6871. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  6872. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  6873. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  6874. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  6875. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  6876. float v30 = ((float) tolua_tonumber(tolua_S,14,0));
  6877. float v31 = ((float) tolua_tonumber(tolua_S,15,0));
  6878. float v32 = ((float) tolua_tonumber(tolua_S,16,0));
  6879. float v33 = ((float) tolua_tonumber(tolua_S,17,0));
  6880. {
  6881. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23,v30,v31,v32,v33));
  6882. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6883. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6884. }
  6885. }
  6886. return 1;
  6887. tolua_lerror:
  6888. return tolua_Math_Matrix4_new02_local(tolua_S);
  6889. }
  6890. #endif //#ifndef TOLUA_DISABLE
  6891. /* method: operator== of class Matrix4 */
  6892. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__eq00
  6893. static int tolua_Math_Matrix4__eq00(lua_State* tolua_S)
  6894. {
  6895. #ifndef TOLUA_RELEASE
  6896. tolua_Error tolua_err;
  6897. if (
  6898. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6899. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6900. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6901. )
  6902. goto tolua_lerror;
  6903. else
  6904. #endif
  6905. {
  6906. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6907. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6908. #ifndef TOLUA_RELEASE
  6909. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  6910. #endif
  6911. {
  6912. bool tolua_ret = (bool) self->operator==(*rhs);
  6913. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  6914. }
  6915. }
  6916. return 1;
  6917. #ifndef TOLUA_RELEASE
  6918. tolua_lerror:
  6919. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  6920. return 0;
  6921. #endif
  6922. }
  6923. #endif //#ifndef TOLUA_DISABLE
  6924. /* method: operator== of class Matrix4 */
  6925. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__eq01
  6926. static int tolua_Math_Matrix4__eq01(lua_State* tolua_S)
  6927. {
  6928. tolua_Error tolua_err;
  6929. if (
  6930. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6931. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6932. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6933. )
  6934. goto tolua_lerror;
  6935. else
  6936. {
  6937. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6938. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6939. #ifndef TOLUA_RELEASE
  6940. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  6941. #endif
  6942. {
  6943. bool tolua_ret = (bool) self->operator==(*rhs);
  6944. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  6945. }
  6946. }
  6947. return 1;
  6948. tolua_lerror:
  6949. return tolua_Math_Matrix4__eq00(tolua_S);
  6950. }
  6951. #endif //#ifndef TOLUA_DISABLE
  6952. /* method: operator* of class Matrix4 */
  6953. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul00
  6954. static int tolua_Math_Matrix4__mul00(lua_State* tolua_S)
  6955. {
  6956. #ifndef TOLUA_RELEASE
  6957. tolua_Error tolua_err;
  6958. if (
  6959. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6960. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  6961. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6962. )
  6963. goto tolua_lerror;
  6964. else
  6965. #endif
  6966. {
  6967. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6968. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  6969. #ifndef TOLUA_RELEASE
  6970. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  6971. #endif
  6972. {
  6973. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  6974. {
  6975. #ifdef __cplusplus
  6976. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  6977. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6978. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6979. #else
  6980. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  6981. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6982. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6983. #endif
  6984. }
  6985. }
  6986. }
  6987. return 1;
  6988. #ifndef TOLUA_RELEASE
  6989. tolua_lerror:
  6990. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  6991. return 0;
  6992. #endif
  6993. }
  6994. #endif //#ifndef TOLUA_DISABLE
  6995. /* method: operator* of class Matrix4 */
  6996. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul01
  6997. static int tolua_Math_Matrix4__mul01(lua_State* tolua_S)
  6998. {
  6999. tolua_Error tolua_err;
  7000. if (
  7001. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7002. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  7003. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7004. )
  7005. goto tolua_lerror;
  7006. else
  7007. {
  7008. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7009. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  7010. #ifndef TOLUA_RELEASE
  7011. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  7012. #endif
  7013. {
  7014. Vector4 tolua_ret = (Vector4) self->operator*(*rhs);
  7015. {
  7016. #ifdef __cplusplus
  7017. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  7018. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  7019. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7020. #else
  7021. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  7022. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  7023. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7024. #endif
  7025. }
  7026. }
  7027. }
  7028. return 1;
  7029. tolua_lerror:
  7030. return tolua_Math_Matrix4__mul00(tolua_S);
  7031. }
  7032. #endif //#ifndef TOLUA_DISABLE
  7033. /* method: operator+ of class Matrix4 */
  7034. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__add00
  7035. static int tolua_Math_Matrix4__add00(lua_State* tolua_S)
  7036. {
  7037. #ifndef TOLUA_RELEASE
  7038. tolua_Error tolua_err;
  7039. if (
  7040. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7041. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  7042. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7043. )
  7044. goto tolua_lerror;
  7045. else
  7046. #endif
  7047. {
  7048. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7049. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  7050. #ifndef TOLUA_RELEASE
  7051. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  7052. #endif
  7053. {
  7054. Matrix4 tolua_ret = (Matrix4) self->operator+(*rhs);
  7055. {
  7056. #ifdef __cplusplus
  7057. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7058. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7059. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7060. #else
  7061. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7062. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7063. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7064. #endif
  7065. }
  7066. }
  7067. }
  7068. return 1;
  7069. #ifndef TOLUA_RELEASE
  7070. tolua_lerror:
  7071. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  7072. return 0;
  7073. #endif
  7074. }
  7075. #endif //#ifndef TOLUA_DISABLE
  7076. /* method: operator- of class Matrix4 */
  7077. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__sub00
  7078. static int tolua_Math_Matrix4__sub00(lua_State* tolua_S)
  7079. {
  7080. #ifndef TOLUA_RELEASE
  7081. tolua_Error tolua_err;
  7082. if (
  7083. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7084. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  7085. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7086. )
  7087. goto tolua_lerror;
  7088. else
  7089. #endif
  7090. {
  7091. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7092. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  7093. #ifndef TOLUA_RELEASE
  7094. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  7095. #endif
  7096. {
  7097. Matrix4 tolua_ret = (Matrix4) self->operator-(*rhs);
  7098. {
  7099. #ifdef __cplusplus
  7100. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7101. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7102. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7103. #else
  7104. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7105. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7106. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7107. #endif
  7108. }
  7109. }
  7110. }
  7111. return 1;
  7112. #ifndef TOLUA_RELEASE
  7113. tolua_lerror:
  7114. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  7115. return 0;
  7116. #endif
  7117. }
  7118. #endif //#ifndef TOLUA_DISABLE
  7119. /* method: operator* of class Matrix4 */
  7120. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul02
  7121. static int tolua_Math_Matrix4__mul02(lua_State* tolua_S)
  7122. {
  7123. tolua_Error tolua_err;
  7124. if (
  7125. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7126. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  7127. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7128. )
  7129. goto tolua_lerror;
  7130. else
  7131. {
  7132. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7133. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  7134. #ifndef TOLUA_RELEASE
  7135. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  7136. #endif
  7137. {
  7138. Matrix4 tolua_ret = (Matrix4) self->operator*(rhs);
  7139. {
  7140. #ifdef __cplusplus
  7141. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7142. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7143. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7144. #else
  7145. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7146. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7147. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7148. #endif
  7149. }
  7150. }
  7151. }
  7152. return 1;
  7153. tolua_lerror:
  7154. return tolua_Math_Matrix4__mul01(tolua_S);
  7155. }
  7156. #endif //#ifndef TOLUA_DISABLE
  7157. /* method: operator* of class Matrix4 */
  7158. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul03
  7159. static int tolua_Math_Matrix4__mul03(lua_State* tolua_S)
  7160. {
  7161. tolua_Error tolua_err;
  7162. if (
  7163. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7164. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  7165. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7166. )
  7167. goto tolua_lerror;
  7168. else
  7169. {
  7170. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7171. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  7172. #ifndef TOLUA_RELEASE
  7173. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  7174. #endif
  7175. {
  7176. Matrix4 tolua_ret = (Matrix4) self->operator*(*rhs);
  7177. {
  7178. #ifdef __cplusplus
  7179. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7180. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7181. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7182. #else
  7183. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7184. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7185. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7186. #endif
  7187. }
  7188. }
  7189. }
  7190. return 1;
  7191. tolua_lerror:
  7192. return tolua_Math_Matrix4__mul02(tolua_S);
  7193. }
  7194. #endif //#ifndef TOLUA_DISABLE
  7195. /* method: SetTranslation of class Matrix4 */
  7196. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetTranslation00
  7197. static int tolua_Math_Matrix4_SetTranslation00(lua_State* tolua_S)
  7198. {
  7199. #ifndef TOLUA_RELEASE
  7200. tolua_Error tolua_err;
  7201. if (
  7202. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7203. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  7204. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7205. )
  7206. goto tolua_lerror;
  7207. else
  7208. #endif
  7209. {
  7210. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7211. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  7212. #ifndef TOLUA_RELEASE
  7213. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTranslation'", NULL);
  7214. #endif
  7215. {
  7216. self->SetTranslation(*translation);
  7217. }
  7218. }
  7219. return 0;
  7220. #ifndef TOLUA_RELEASE
  7221. tolua_lerror:
  7222. tolua_error(tolua_S,"#ferror in function 'SetTranslation'.",&tolua_err);
  7223. return 0;
  7224. #endif
  7225. }
  7226. #endif //#ifndef TOLUA_DISABLE
  7227. /* method: SetRotation of class Matrix4 */
  7228. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetRotation00
  7229. static int tolua_Math_Matrix4_SetRotation00(lua_State* tolua_S)
  7230. {
  7231. #ifndef TOLUA_RELEASE
  7232. tolua_Error tolua_err;
  7233. if (
  7234. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7235. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  7236. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7237. )
  7238. goto tolua_lerror;
  7239. else
  7240. #endif
  7241. {
  7242. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7243. const Matrix3* rotation = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  7244. #ifndef TOLUA_RELEASE
  7245. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  7246. #endif
  7247. {
  7248. self->SetRotation(*rotation);
  7249. }
  7250. }
  7251. return 0;
  7252. #ifndef TOLUA_RELEASE
  7253. tolua_lerror:
  7254. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  7255. return 0;
  7256. #endif
  7257. }
  7258. #endif //#ifndef TOLUA_DISABLE
  7259. /* method: SetScale of class Matrix4 */
  7260. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetScale00
  7261. static int tolua_Math_Matrix4_SetScale00(lua_State* tolua_S)
  7262. {
  7263. #ifndef TOLUA_RELEASE
  7264. tolua_Error tolua_err;
  7265. if (
  7266. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7267. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  7268. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7269. )
  7270. goto tolua_lerror;
  7271. else
  7272. #endif
  7273. {
  7274. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7275. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  7276. #ifndef TOLUA_RELEASE
  7277. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  7278. #endif
  7279. {
  7280. self->SetScale(*scale);
  7281. }
  7282. }
  7283. return 0;
  7284. #ifndef TOLUA_RELEASE
  7285. tolua_lerror:
  7286. tolua_error(tolua_S,"#ferror in function 'SetScale'.",&tolua_err);
  7287. return 0;
  7288. #endif
  7289. }
  7290. #endif //#ifndef TOLUA_DISABLE
  7291. /* method: SetScale of class Matrix4 */
  7292. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetScale01
  7293. static int tolua_Math_Matrix4_SetScale01(lua_State* tolua_S)
  7294. {
  7295. tolua_Error tolua_err;
  7296. if (
  7297. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7298. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  7299. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7300. )
  7301. goto tolua_lerror;
  7302. else
  7303. {
  7304. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7305. float scale = ((float) tolua_tonumber(tolua_S,2,0));
  7306. #ifndef TOLUA_RELEASE
  7307. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  7308. #endif
  7309. {
  7310. self->SetScale(scale);
  7311. }
  7312. }
  7313. return 0;
  7314. tolua_lerror:
  7315. return tolua_Math_Matrix4_SetScale00(tolua_S);
  7316. }
  7317. #endif //#ifndef TOLUA_DISABLE
  7318. /* method: ToMatrix3 of class Matrix4 */
  7319. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_ToMatrix300
  7320. static int tolua_Math_Matrix4_ToMatrix300(lua_State* tolua_S)
  7321. {
  7322. #ifndef TOLUA_RELEASE
  7323. tolua_Error tolua_err;
  7324. if (
  7325. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7326. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7327. )
  7328. goto tolua_lerror;
  7329. else
  7330. #endif
  7331. {
  7332. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7333. #ifndef TOLUA_RELEASE
  7334. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToMatrix3'", NULL);
  7335. #endif
  7336. {
  7337. Matrix3 tolua_ret = (Matrix3) self->ToMatrix3();
  7338. {
  7339. #ifdef __cplusplus
  7340. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  7341. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7342. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7343. #else
  7344. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  7345. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7346. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7347. #endif
  7348. }
  7349. }
  7350. }
  7351. return 1;
  7352. #ifndef TOLUA_RELEASE
  7353. tolua_lerror:
  7354. tolua_error(tolua_S,"#ferror in function 'ToMatrix3'.",&tolua_err);
  7355. return 0;
  7356. #endif
  7357. }
  7358. #endif //#ifndef TOLUA_DISABLE
  7359. /* method: RotationMatrix of class Matrix4 */
  7360. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_RotationMatrix00
  7361. static int tolua_Math_Matrix4_RotationMatrix00(lua_State* tolua_S)
  7362. {
  7363. #ifndef TOLUA_RELEASE
  7364. tolua_Error tolua_err;
  7365. if (
  7366. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7367. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7368. )
  7369. goto tolua_lerror;
  7370. else
  7371. #endif
  7372. {
  7373. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7374. #ifndef TOLUA_RELEASE
  7375. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotationMatrix'", NULL);
  7376. #endif
  7377. {
  7378. Matrix3 tolua_ret = (Matrix3) self->RotationMatrix();
  7379. {
  7380. #ifdef __cplusplus
  7381. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  7382. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7383. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7384. #else
  7385. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  7386. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7387. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7388. #endif
  7389. }
  7390. }
  7391. }
  7392. return 1;
  7393. #ifndef TOLUA_RELEASE
  7394. tolua_lerror:
  7395. tolua_error(tolua_S,"#ferror in function 'RotationMatrix'.",&tolua_err);
  7396. return 0;
  7397. #endif
  7398. }
  7399. #endif //#ifndef TOLUA_DISABLE
  7400. /* method: Translation of class Matrix4 */
  7401. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Translation00
  7402. static int tolua_Math_Matrix4_Translation00(lua_State* tolua_S)
  7403. {
  7404. #ifndef TOLUA_RELEASE
  7405. tolua_Error tolua_err;
  7406. if (
  7407. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7408. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7409. )
  7410. goto tolua_lerror;
  7411. else
  7412. #endif
  7413. {
  7414. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7415. #ifndef TOLUA_RELEASE
  7416. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Translation'", NULL);
  7417. #endif
  7418. {
  7419. Vector3 tolua_ret = (Vector3) self->Translation();
  7420. {
  7421. #ifdef __cplusplus
  7422. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  7423. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7424. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7425. #else
  7426. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  7427. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7428. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7429. #endif
  7430. }
  7431. }
  7432. }
  7433. return 1;
  7434. #ifndef TOLUA_RELEASE
  7435. tolua_lerror:
  7436. tolua_error(tolua_S,"#ferror in function 'Translation'.",&tolua_err);
  7437. return 0;
  7438. #endif
  7439. }
  7440. #endif //#ifndef TOLUA_DISABLE
  7441. /* method: Rotation of class Matrix4 */
  7442. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Rotation00
  7443. static int tolua_Math_Matrix4_Rotation00(lua_State* tolua_S)
  7444. {
  7445. #ifndef TOLUA_RELEASE
  7446. tolua_Error tolua_err;
  7447. if (
  7448. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7449. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7450. )
  7451. goto tolua_lerror;
  7452. else
  7453. #endif
  7454. {
  7455. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7456. #ifndef TOLUA_RELEASE
  7457. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Rotation'", NULL);
  7458. #endif
  7459. {
  7460. Quaternion tolua_ret = (Quaternion) self->Rotation();
  7461. {
  7462. #ifdef __cplusplus
  7463. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  7464. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  7465. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7466. #else
  7467. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  7468. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  7469. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7470. #endif
  7471. }
  7472. }
  7473. }
  7474. return 1;
  7475. #ifndef TOLUA_RELEASE
  7476. tolua_lerror:
  7477. tolua_error(tolua_S,"#ferror in function 'Rotation'.",&tolua_err);
  7478. return 0;
  7479. #endif
  7480. }
  7481. #endif //#ifndef TOLUA_DISABLE
  7482. /* method: Scale of class Matrix4 */
  7483. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Scale00
  7484. static int tolua_Math_Matrix4_Scale00(lua_State* tolua_S)
  7485. {
  7486. #ifndef TOLUA_RELEASE
  7487. tolua_Error tolua_err;
  7488. if (
  7489. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7490. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7491. )
  7492. goto tolua_lerror;
  7493. else
  7494. #endif
  7495. {
  7496. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7497. #ifndef TOLUA_RELEASE
  7498. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL);
  7499. #endif
  7500. {
  7501. Vector3 tolua_ret = (Vector3) self->Scale();
  7502. {
  7503. #ifdef __cplusplus
  7504. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  7505. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7506. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7507. #else
  7508. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  7509. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7510. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7511. #endif
  7512. }
  7513. }
  7514. }
  7515. return 1;
  7516. #ifndef TOLUA_RELEASE
  7517. tolua_lerror:
  7518. tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err);
  7519. return 0;
  7520. #endif
  7521. }
  7522. #endif //#ifndef TOLUA_DISABLE
  7523. /* method: Transpose of class Matrix4 */
  7524. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Transpose00
  7525. static int tolua_Math_Matrix4_Transpose00(lua_State* tolua_S)
  7526. {
  7527. #ifndef TOLUA_RELEASE
  7528. tolua_Error tolua_err;
  7529. if (
  7530. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7531. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7532. )
  7533. goto tolua_lerror;
  7534. else
  7535. #endif
  7536. {
  7537. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7538. #ifndef TOLUA_RELEASE
  7539. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transpose'", NULL);
  7540. #endif
  7541. {
  7542. Matrix4 tolua_ret = (Matrix4) self->Transpose();
  7543. {
  7544. #ifdef __cplusplus
  7545. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7546. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7547. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7548. #else
  7549. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7550. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7551. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7552. #endif
  7553. }
  7554. }
  7555. }
  7556. return 1;
  7557. #ifndef TOLUA_RELEASE
  7558. tolua_lerror:
  7559. tolua_error(tolua_S,"#ferror in function 'Transpose'.",&tolua_err);
  7560. return 0;
  7561. #endif
  7562. }
  7563. #endif //#ifndef TOLUA_DISABLE
  7564. /* method: Equals of class Matrix4 */
  7565. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Equals00
  7566. static int tolua_Math_Matrix4_Equals00(lua_State* tolua_S)
  7567. {
  7568. #ifndef TOLUA_RELEASE
  7569. tolua_Error tolua_err;
  7570. if (
  7571. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7572. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  7573. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7574. )
  7575. goto tolua_lerror;
  7576. else
  7577. #endif
  7578. {
  7579. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7580. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  7581. #ifndef TOLUA_RELEASE
  7582. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  7583. #endif
  7584. {
  7585. bool tolua_ret = (bool) self->Equals(*rhs);
  7586. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  7587. }
  7588. }
  7589. return 1;
  7590. #ifndef TOLUA_RELEASE
  7591. tolua_lerror:
  7592. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  7593. return 0;
  7594. #endif
  7595. }
  7596. #endif //#ifndef TOLUA_DISABLE
  7597. /* method: Decompose of class Matrix4 */
  7598. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Decompose00
  7599. static int tolua_Math_Matrix4_Decompose00(lua_State* tolua_S)
  7600. {
  7601. #ifndef TOLUA_RELEASE
  7602. tolua_Error tolua_err;
  7603. if (
  7604. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7605. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  7606. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"Quaternion",0,&tolua_err)) ||
  7607. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"Vector3",0,&tolua_err)) ||
  7608. !tolua_isnoobj(tolua_S,5,&tolua_err)
  7609. )
  7610. goto tolua_lerror;
  7611. else
  7612. #endif
  7613. {
  7614. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7615. Vector3* translation = ((Vector3*) tolua_tousertype(tolua_S,2,0));
  7616. Quaternion* rotation = ((Quaternion*) tolua_tousertype(tolua_S,3,0));
  7617. Vector3* scale = ((Vector3*) tolua_tousertype(tolua_S,4,0));
  7618. #ifndef TOLUA_RELEASE
  7619. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Decompose'", NULL);
  7620. #endif
  7621. {
  7622. self->Decompose(*translation,*rotation,*scale);
  7623. }
  7624. }
  7625. return 0;
  7626. #ifndef TOLUA_RELEASE
  7627. tolua_lerror:
  7628. tolua_error(tolua_S,"#ferror in function 'Decompose'.",&tolua_err);
  7629. return 0;
  7630. #endif
  7631. }
  7632. #endif //#ifndef TOLUA_DISABLE
  7633. /* method: Inverse of class Matrix4 */
  7634. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Inverse00
  7635. static int tolua_Math_Matrix4_Inverse00(lua_State* tolua_S)
  7636. {
  7637. #ifndef TOLUA_RELEASE
  7638. tolua_Error tolua_err;
  7639. if (
  7640. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7641. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7642. )
  7643. goto tolua_lerror;
  7644. else
  7645. #endif
  7646. {
  7647. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7648. #ifndef TOLUA_RELEASE
  7649. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  7650. #endif
  7651. {
  7652. Matrix4 tolua_ret = (Matrix4) self->Inverse();
  7653. {
  7654. #ifdef __cplusplus
  7655. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7656. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7657. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7658. #else
  7659. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7660. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7661. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7662. #endif
  7663. }
  7664. }
  7665. }
  7666. return 1;
  7667. #ifndef TOLUA_RELEASE
  7668. tolua_lerror:
  7669. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  7670. return 0;
  7671. #endif
  7672. }
  7673. #endif //#ifndef TOLUA_DISABLE
  7674. /* get function: m00_ of class Matrix4 */
  7675. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m00
  7676. static int tolua_get_Matrix4_m00(lua_State* tolua_S)
  7677. {
  7678. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7679. #ifndef TOLUA_RELEASE
  7680. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  7681. #endif
  7682. tolua_pushnumber(tolua_S,(lua_Number)self->m00_);
  7683. return 1;
  7684. }
  7685. #endif //#ifndef TOLUA_DISABLE
  7686. /* set function: m00_ of class Matrix4 */
  7687. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m00
  7688. static int tolua_set_Matrix4_m00(lua_State* tolua_S)
  7689. {
  7690. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7691. #ifndef TOLUA_RELEASE
  7692. tolua_Error tolua_err;
  7693. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  7694. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7695. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7696. #endif
  7697. self->m00_ = ((float) tolua_tonumber(tolua_S,2,0))
  7698. ;
  7699. return 0;
  7700. }
  7701. #endif //#ifndef TOLUA_DISABLE
  7702. /* get function: m01_ of class Matrix4 */
  7703. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m01
  7704. static int tolua_get_Matrix4_m01(lua_State* tolua_S)
  7705. {
  7706. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7707. #ifndef TOLUA_RELEASE
  7708. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  7709. #endif
  7710. tolua_pushnumber(tolua_S,(lua_Number)self->m01_);
  7711. return 1;
  7712. }
  7713. #endif //#ifndef TOLUA_DISABLE
  7714. /* set function: m01_ of class Matrix4 */
  7715. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m01
  7716. static int tolua_set_Matrix4_m01(lua_State* tolua_S)
  7717. {
  7718. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7719. #ifndef TOLUA_RELEASE
  7720. tolua_Error tolua_err;
  7721. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  7722. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7723. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7724. #endif
  7725. self->m01_ = ((float) tolua_tonumber(tolua_S,2,0))
  7726. ;
  7727. return 0;
  7728. }
  7729. #endif //#ifndef TOLUA_DISABLE
  7730. /* get function: m02_ of class Matrix4 */
  7731. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m02
  7732. static int tolua_get_Matrix4_m02(lua_State* tolua_S)
  7733. {
  7734. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7735. #ifndef TOLUA_RELEASE
  7736. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  7737. #endif
  7738. tolua_pushnumber(tolua_S,(lua_Number)self->m02_);
  7739. return 1;
  7740. }
  7741. #endif //#ifndef TOLUA_DISABLE
  7742. /* set function: m02_ of class Matrix4 */
  7743. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m02
  7744. static int tolua_set_Matrix4_m02(lua_State* tolua_S)
  7745. {
  7746. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7747. #ifndef TOLUA_RELEASE
  7748. tolua_Error tolua_err;
  7749. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  7750. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7751. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7752. #endif
  7753. self->m02_ = ((float) tolua_tonumber(tolua_S,2,0))
  7754. ;
  7755. return 0;
  7756. }
  7757. #endif //#ifndef TOLUA_DISABLE
  7758. /* get function: m03_ of class Matrix4 */
  7759. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m03
  7760. static int tolua_get_Matrix4_m03(lua_State* tolua_S)
  7761. {
  7762. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7763. #ifndef TOLUA_RELEASE
  7764. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  7765. #endif
  7766. tolua_pushnumber(tolua_S,(lua_Number)self->m03_);
  7767. return 1;
  7768. }
  7769. #endif //#ifndef TOLUA_DISABLE
  7770. /* set function: m03_ of class Matrix4 */
  7771. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m03
  7772. static int tolua_set_Matrix4_m03(lua_State* tolua_S)
  7773. {
  7774. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7775. #ifndef TOLUA_RELEASE
  7776. tolua_Error tolua_err;
  7777. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  7778. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7779. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7780. #endif
  7781. self->m03_ = ((float) tolua_tonumber(tolua_S,2,0))
  7782. ;
  7783. return 0;
  7784. }
  7785. #endif //#ifndef TOLUA_DISABLE
  7786. /* get function: m10_ of class Matrix4 */
  7787. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m10
  7788. static int tolua_get_Matrix4_m10(lua_State* tolua_S)
  7789. {
  7790. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7791. #ifndef TOLUA_RELEASE
  7792. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  7793. #endif
  7794. tolua_pushnumber(tolua_S,(lua_Number)self->m10_);
  7795. return 1;
  7796. }
  7797. #endif //#ifndef TOLUA_DISABLE
  7798. /* set function: m10_ of class Matrix4 */
  7799. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m10
  7800. static int tolua_set_Matrix4_m10(lua_State* tolua_S)
  7801. {
  7802. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7803. #ifndef TOLUA_RELEASE
  7804. tolua_Error tolua_err;
  7805. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  7806. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7807. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7808. #endif
  7809. self->m10_ = ((float) tolua_tonumber(tolua_S,2,0))
  7810. ;
  7811. return 0;
  7812. }
  7813. #endif //#ifndef TOLUA_DISABLE
  7814. /* get function: m11_ of class Matrix4 */
  7815. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m11
  7816. static int tolua_get_Matrix4_m11(lua_State* tolua_S)
  7817. {
  7818. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7819. #ifndef TOLUA_RELEASE
  7820. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  7821. #endif
  7822. tolua_pushnumber(tolua_S,(lua_Number)self->m11_);
  7823. return 1;
  7824. }
  7825. #endif //#ifndef TOLUA_DISABLE
  7826. /* set function: m11_ of class Matrix4 */
  7827. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m11
  7828. static int tolua_set_Matrix4_m11(lua_State* tolua_S)
  7829. {
  7830. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7831. #ifndef TOLUA_RELEASE
  7832. tolua_Error tolua_err;
  7833. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  7834. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7835. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7836. #endif
  7837. self->m11_ = ((float) tolua_tonumber(tolua_S,2,0))
  7838. ;
  7839. return 0;
  7840. }
  7841. #endif //#ifndef TOLUA_DISABLE
  7842. /* get function: m12_ of class Matrix4 */
  7843. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m12
  7844. static int tolua_get_Matrix4_m12(lua_State* tolua_S)
  7845. {
  7846. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7847. #ifndef TOLUA_RELEASE
  7848. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  7849. #endif
  7850. tolua_pushnumber(tolua_S,(lua_Number)self->m12_);
  7851. return 1;
  7852. }
  7853. #endif //#ifndef TOLUA_DISABLE
  7854. /* set function: m12_ of class Matrix4 */
  7855. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m12
  7856. static int tolua_set_Matrix4_m12(lua_State* tolua_S)
  7857. {
  7858. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7859. #ifndef TOLUA_RELEASE
  7860. tolua_Error tolua_err;
  7861. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  7862. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7863. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7864. #endif
  7865. self->m12_ = ((float) tolua_tonumber(tolua_S,2,0))
  7866. ;
  7867. return 0;
  7868. }
  7869. #endif //#ifndef TOLUA_DISABLE
  7870. /* get function: m13_ of class Matrix4 */
  7871. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m13
  7872. static int tolua_get_Matrix4_m13(lua_State* tolua_S)
  7873. {
  7874. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7875. #ifndef TOLUA_RELEASE
  7876. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  7877. #endif
  7878. tolua_pushnumber(tolua_S,(lua_Number)self->m13_);
  7879. return 1;
  7880. }
  7881. #endif //#ifndef TOLUA_DISABLE
  7882. /* set function: m13_ of class Matrix4 */
  7883. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m13
  7884. static int tolua_set_Matrix4_m13(lua_State* tolua_S)
  7885. {
  7886. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7887. #ifndef TOLUA_RELEASE
  7888. tolua_Error tolua_err;
  7889. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  7890. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7891. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7892. #endif
  7893. self->m13_ = ((float) tolua_tonumber(tolua_S,2,0))
  7894. ;
  7895. return 0;
  7896. }
  7897. #endif //#ifndef TOLUA_DISABLE
  7898. /* get function: m20_ of class Matrix4 */
  7899. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m20
  7900. static int tolua_get_Matrix4_m20(lua_State* tolua_S)
  7901. {
  7902. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7903. #ifndef TOLUA_RELEASE
  7904. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  7905. #endif
  7906. tolua_pushnumber(tolua_S,(lua_Number)self->m20_);
  7907. return 1;
  7908. }
  7909. #endif //#ifndef TOLUA_DISABLE
  7910. /* set function: m20_ of class Matrix4 */
  7911. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m20
  7912. static int tolua_set_Matrix4_m20(lua_State* tolua_S)
  7913. {
  7914. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7915. #ifndef TOLUA_RELEASE
  7916. tolua_Error tolua_err;
  7917. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  7918. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7919. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7920. #endif
  7921. self->m20_ = ((float) tolua_tonumber(tolua_S,2,0))
  7922. ;
  7923. return 0;
  7924. }
  7925. #endif //#ifndef TOLUA_DISABLE
  7926. /* get function: m21_ of class Matrix4 */
  7927. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m21
  7928. static int tolua_get_Matrix4_m21(lua_State* tolua_S)
  7929. {
  7930. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7931. #ifndef TOLUA_RELEASE
  7932. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  7933. #endif
  7934. tolua_pushnumber(tolua_S,(lua_Number)self->m21_);
  7935. return 1;
  7936. }
  7937. #endif //#ifndef TOLUA_DISABLE
  7938. /* set function: m21_ of class Matrix4 */
  7939. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m21
  7940. static int tolua_set_Matrix4_m21(lua_State* tolua_S)
  7941. {
  7942. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7943. #ifndef TOLUA_RELEASE
  7944. tolua_Error tolua_err;
  7945. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  7946. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7947. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7948. #endif
  7949. self->m21_ = ((float) tolua_tonumber(tolua_S,2,0))
  7950. ;
  7951. return 0;
  7952. }
  7953. #endif //#ifndef TOLUA_DISABLE
  7954. /* get function: m22_ of class Matrix4 */
  7955. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m22
  7956. static int tolua_get_Matrix4_m22(lua_State* tolua_S)
  7957. {
  7958. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7959. #ifndef TOLUA_RELEASE
  7960. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  7961. #endif
  7962. tolua_pushnumber(tolua_S,(lua_Number)self->m22_);
  7963. return 1;
  7964. }
  7965. #endif //#ifndef TOLUA_DISABLE
  7966. /* set function: m22_ of class Matrix4 */
  7967. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m22
  7968. static int tolua_set_Matrix4_m22(lua_State* tolua_S)
  7969. {
  7970. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7971. #ifndef TOLUA_RELEASE
  7972. tolua_Error tolua_err;
  7973. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  7974. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7975. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7976. #endif
  7977. self->m22_ = ((float) tolua_tonumber(tolua_S,2,0))
  7978. ;
  7979. return 0;
  7980. }
  7981. #endif //#ifndef TOLUA_DISABLE
  7982. /* get function: m23_ of class Matrix4 */
  7983. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m23
  7984. static int tolua_get_Matrix4_m23(lua_State* tolua_S)
  7985. {
  7986. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7987. #ifndef TOLUA_RELEASE
  7988. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  7989. #endif
  7990. tolua_pushnumber(tolua_S,(lua_Number)self->m23_);
  7991. return 1;
  7992. }
  7993. #endif //#ifndef TOLUA_DISABLE
  7994. /* set function: m23_ of class Matrix4 */
  7995. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m23
  7996. static int tolua_set_Matrix4_m23(lua_State* tolua_S)
  7997. {
  7998. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7999. #ifndef TOLUA_RELEASE
  8000. tolua_Error tolua_err;
  8001. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  8002. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8003. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8004. #endif
  8005. self->m23_ = ((float) tolua_tonumber(tolua_S,2,0))
  8006. ;
  8007. return 0;
  8008. }
  8009. #endif //#ifndef TOLUA_DISABLE
  8010. /* get function: m30_ of class Matrix4 */
  8011. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m30
  8012. static int tolua_get_Matrix4_m30(lua_State* tolua_S)
  8013. {
  8014. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8015. #ifndef TOLUA_RELEASE
  8016. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm30_'",NULL);
  8017. #endif
  8018. tolua_pushnumber(tolua_S,(lua_Number)self->m30_);
  8019. return 1;
  8020. }
  8021. #endif //#ifndef TOLUA_DISABLE
  8022. /* set function: m30_ of class Matrix4 */
  8023. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m30
  8024. static int tolua_set_Matrix4_m30(lua_State* tolua_S)
  8025. {
  8026. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8027. #ifndef TOLUA_RELEASE
  8028. tolua_Error tolua_err;
  8029. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm30_'",NULL);
  8030. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8031. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8032. #endif
  8033. self->m30_ = ((float) tolua_tonumber(tolua_S,2,0))
  8034. ;
  8035. return 0;
  8036. }
  8037. #endif //#ifndef TOLUA_DISABLE
  8038. /* get function: m31_ of class Matrix4 */
  8039. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m31
  8040. static int tolua_get_Matrix4_m31(lua_State* tolua_S)
  8041. {
  8042. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8043. #ifndef TOLUA_RELEASE
  8044. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm31_'",NULL);
  8045. #endif
  8046. tolua_pushnumber(tolua_S,(lua_Number)self->m31_);
  8047. return 1;
  8048. }
  8049. #endif //#ifndef TOLUA_DISABLE
  8050. /* set function: m31_ of class Matrix4 */
  8051. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m31
  8052. static int tolua_set_Matrix4_m31(lua_State* tolua_S)
  8053. {
  8054. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8055. #ifndef TOLUA_RELEASE
  8056. tolua_Error tolua_err;
  8057. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm31_'",NULL);
  8058. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8059. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8060. #endif
  8061. self->m31_ = ((float) tolua_tonumber(tolua_S,2,0))
  8062. ;
  8063. return 0;
  8064. }
  8065. #endif //#ifndef TOLUA_DISABLE
  8066. /* get function: m32_ of class Matrix4 */
  8067. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m32
  8068. static int tolua_get_Matrix4_m32(lua_State* tolua_S)
  8069. {
  8070. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8071. #ifndef TOLUA_RELEASE
  8072. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm32_'",NULL);
  8073. #endif
  8074. tolua_pushnumber(tolua_S,(lua_Number)self->m32_);
  8075. return 1;
  8076. }
  8077. #endif //#ifndef TOLUA_DISABLE
  8078. /* set function: m32_ of class Matrix4 */
  8079. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m32
  8080. static int tolua_set_Matrix4_m32(lua_State* tolua_S)
  8081. {
  8082. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8083. #ifndef TOLUA_RELEASE
  8084. tolua_Error tolua_err;
  8085. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm32_'",NULL);
  8086. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8087. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8088. #endif
  8089. self->m32_ = ((float) tolua_tonumber(tolua_S,2,0))
  8090. ;
  8091. return 0;
  8092. }
  8093. #endif //#ifndef TOLUA_DISABLE
  8094. /* get function: m33_ of class Matrix4 */
  8095. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m33
  8096. static int tolua_get_Matrix4_m33(lua_State* tolua_S)
  8097. {
  8098. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8099. #ifndef TOLUA_RELEASE
  8100. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm33_'",NULL);
  8101. #endif
  8102. tolua_pushnumber(tolua_S,(lua_Number)self->m33_);
  8103. return 1;
  8104. }
  8105. #endif //#ifndef TOLUA_DISABLE
  8106. /* set function: m33_ of class Matrix4 */
  8107. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m33
  8108. static int tolua_set_Matrix4_m33(lua_State* tolua_S)
  8109. {
  8110. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  8111. #ifndef TOLUA_RELEASE
  8112. tolua_Error tolua_err;
  8113. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm33_'",NULL);
  8114. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8115. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8116. #endif
  8117. self->m33_ = ((float) tolua_tonumber(tolua_S,2,0))
  8118. ;
  8119. return 0;
  8120. }
  8121. #endif //#ifndef TOLUA_DISABLE
  8122. /* method: BulkTranspose of class Matrix4 */
  8123. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_BulkTranspose00
  8124. static int tolua_Math_Matrix4_BulkTranspose00(lua_State* tolua_S)
  8125. {
  8126. #ifndef TOLUA_RELEASE
  8127. tolua_Error tolua_err;
  8128. if (
  8129. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  8130. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  8131. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  8132. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  8133. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8134. )
  8135. goto tolua_lerror;
  8136. else
  8137. #endif
  8138. {
  8139. float dest = ((float) tolua_tonumber(tolua_S,2,0));
  8140. const float src = ((const float) tolua_tonumber(tolua_S,3,0));
  8141. unsigned count = ((unsigned) tolua_tonumber(tolua_S,4,0));
  8142. {
  8143. Matrix4::BulkTranspose(&dest,&src,count);
  8144. tolua_pushnumber(tolua_S,(lua_Number)dest);
  8145. tolua_pushnumber(tolua_S,(lua_Number)src);
  8146. }
  8147. }
  8148. return 2;
  8149. #ifndef TOLUA_RELEASE
  8150. tolua_lerror:
  8151. tolua_error(tolua_S,"#ferror in function 'BulkTranspose'.",&tolua_err);
  8152. return 0;
  8153. #endif
  8154. }
  8155. #endif //#ifndef TOLUA_DISABLE
  8156. /* get function: ZERO of class Matrix4 */
  8157. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_ZERO
  8158. static int tolua_get_Matrix4_ZERO(lua_State* tolua_S)
  8159. {
  8160. tolua_pushusertype(tolua_S,(void*)&Matrix4::ZERO,"const Matrix4");
  8161. return 1;
  8162. }
  8163. #endif //#ifndef TOLUA_DISABLE
  8164. /* get function: IDENTITY of class Matrix4 */
  8165. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_IDENTITY
  8166. static int tolua_get_Matrix4_IDENTITY(lua_State* tolua_S)
  8167. {
  8168. tolua_pushusertype(tolua_S,(void*)&Matrix4::IDENTITY,"const Matrix4");
  8169. return 1;
  8170. }
  8171. #endif //#ifndef TOLUA_DISABLE
  8172. /* method: new of class Plane */
  8173. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new00
  8174. static int tolua_Math_Plane_new00(lua_State* tolua_S)
  8175. {
  8176. #ifndef TOLUA_RELEASE
  8177. tolua_Error tolua_err;
  8178. if (
  8179. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8180. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8181. )
  8182. goto tolua_lerror;
  8183. else
  8184. #endif
  8185. {
  8186. {
  8187. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)());
  8188. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8189. }
  8190. }
  8191. return 1;
  8192. #ifndef TOLUA_RELEASE
  8193. tolua_lerror:
  8194. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8195. return 0;
  8196. #endif
  8197. }
  8198. #endif //#ifndef TOLUA_DISABLE
  8199. /* method: new_local of class Plane */
  8200. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new00_local
  8201. static int tolua_Math_Plane_new00_local(lua_State* tolua_S)
  8202. {
  8203. #ifndef TOLUA_RELEASE
  8204. tolua_Error tolua_err;
  8205. if (
  8206. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8207. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8208. )
  8209. goto tolua_lerror;
  8210. else
  8211. #endif
  8212. {
  8213. {
  8214. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)());
  8215. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8216. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8217. }
  8218. }
  8219. return 1;
  8220. #ifndef TOLUA_RELEASE
  8221. tolua_lerror:
  8222. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8223. return 0;
  8224. #endif
  8225. }
  8226. #endif //#ifndef TOLUA_DISABLE
  8227. /* method: new of class Plane */
  8228. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new01
  8229. static int tolua_Math_Plane_new01(lua_State* tolua_S)
  8230. {
  8231. tolua_Error tolua_err;
  8232. if (
  8233. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8234. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  8235. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8236. )
  8237. goto tolua_lerror;
  8238. else
  8239. {
  8240. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  8241. {
  8242. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*plane));
  8243. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8244. }
  8245. }
  8246. return 1;
  8247. tolua_lerror:
  8248. return tolua_Math_Plane_new00(tolua_S);
  8249. }
  8250. #endif //#ifndef TOLUA_DISABLE
  8251. /* method: new_local of class Plane */
  8252. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new01_local
  8253. static int tolua_Math_Plane_new01_local(lua_State* tolua_S)
  8254. {
  8255. tolua_Error tolua_err;
  8256. if (
  8257. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8258. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  8259. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8260. )
  8261. goto tolua_lerror;
  8262. else
  8263. {
  8264. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  8265. {
  8266. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*plane));
  8267. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8268. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8269. }
  8270. }
  8271. return 1;
  8272. tolua_lerror:
  8273. return tolua_Math_Plane_new00_local(tolua_S);
  8274. }
  8275. #endif //#ifndef TOLUA_DISABLE
  8276. /* method: new of class Plane */
  8277. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new02
  8278. static int tolua_Math_Plane_new02(lua_State* tolua_S)
  8279. {
  8280. tolua_Error tolua_err;
  8281. if (
  8282. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8283. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8284. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8285. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8286. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8287. )
  8288. goto tolua_lerror;
  8289. else
  8290. {
  8291. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8292. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8293. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8294. {
  8295. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*v0,*v1,*v2));
  8296. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8297. }
  8298. }
  8299. return 1;
  8300. tolua_lerror:
  8301. return tolua_Math_Plane_new01(tolua_S);
  8302. }
  8303. #endif //#ifndef TOLUA_DISABLE
  8304. /* method: new_local of class Plane */
  8305. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new02_local
  8306. static int tolua_Math_Plane_new02_local(lua_State* tolua_S)
  8307. {
  8308. tolua_Error tolua_err;
  8309. if (
  8310. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8311. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8312. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8313. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8314. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8315. )
  8316. goto tolua_lerror;
  8317. else
  8318. {
  8319. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8320. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8321. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8322. {
  8323. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*v0,*v1,*v2));
  8324. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8325. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8326. }
  8327. }
  8328. return 1;
  8329. tolua_lerror:
  8330. return tolua_Math_Plane_new01_local(tolua_S);
  8331. }
  8332. #endif //#ifndef TOLUA_DISABLE
  8333. /* method: new of class Plane */
  8334. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new03
  8335. static int tolua_Math_Plane_new03(lua_State* tolua_S)
  8336. {
  8337. tolua_Error tolua_err;
  8338. if (
  8339. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8340. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8341. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8342. !tolua_isnoobj(tolua_S,4,&tolua_err)
  8343. )
  8344. goto tolua_lerror;
  8345. else
  8346. {
  8347. const Vector3* normal = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8348. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8349. {
  8350. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*normal,*point));
  8351. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8352. }
  8353. }
  8354. return 1;
  8355. tolua_lerror:
  8356. return tolua_Math_Plane_new02(tolua_S);
  8357. }
  8358. #endif //#ifndef TOLUA_DISABLE
  8359. /* method: new_local of class Plane */
  8360. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new03_local
  8361. static int tolua_Math_Plane_new03_local(lua_State* tolua_S)
  8362. {
  8363. tolua_Error tolua_err;
  8364. if (
  8365. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8366. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8367. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8368. !tolua_isnoobj(tolua_S,4,&tolua_err)
  8369. )
  8370. goto tolua_lerror;
  8371. else
  8372. {
  8373. const Vector3* normal = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8374. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8375. {
  8376. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*normal,*point));
  8377. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8378. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8379. }
  8380. }
  8381. return 1;
  8382. tolua_lerror:
  8383. return tolua_Math_Plane_new02_local(tolua_S);
  8384. }
  8385. #endif //#ifndef TOLUA_DISABLE
  8386. /* method: Define of class Plane */
  8387. #ifndef TOLUA_DISABLE_tolua_Math_Plane_Define00
  8388. static int tolua_Math_Plane_Define00(lua_State* tolua_S)
  8389. {
  8390. #ifndef TOLUA_RELEASE
  8391. tolua_Error tolua_err;
  8392. if (
  8393. !tolua_isusertype(tolua_S,1,"Plane",0,&tolua_err) ||
  8394. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8395. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8396. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8397. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8398. )
  8399. goto tolua_lerror;
  8400. else
  8401. #endif
  8402. {
  8403. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8404. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8405. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8406. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8407. #ifndef TOLUA_RELEASE
  8408. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8409. #endif
  8410. {
  8411. self->Define(*v0,*v1,*v2);
  8412. }
  8413. }
  8414. return 0;
  8415. #ifndef TOLUA_RELEASE
  8416. tolua_lerror:
  8417. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  8418. return 0;
  8419. #endif
  8420. }
  8421. #endif //#ifndef TOLUA_DISABLE
  8422. /* method: Define of class Plane */
  8423. #ifndef TOLUA_DISABLE_tolua_Math_Plane_Define01
  8424. static int tolua_Math_Plane_Define01(lua_State* tolua_S)
  8425. {
  8426. tolua_Error tolua_err;
  8427. if (
  8428. !tolua_isusertype(tolua_S,1,"Plane",0,&tolua_err) ||
  8429. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8430. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8431. !tolua_isnoobj(tolua_S,4,&tolua_err)
  8432. )
  8433. goto tolua_lerror;
  8434. else
  8435. {
  8436. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8437. const Vector3* normal = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8438. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8439. #ifndef TOLUA_RELEASE
  8440. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8441. #endif
  8442. {
  8443. self->Define(*normal,*point);
  8444. }
  8445. }
  8446. return 0;
  8447. tolua_lerror:
  8448. return tolua_Math_Plane_Define00(tolua_S);
  8449. }
  8450. #endif //#ifndef TOLUA_DISABLE
  8451. /* method: Distance of class Plane */
  8452. #ifndef TOLUA_DISABLE_tolua_Math_Plane_Distance00
  8453. static int tolua_Math_Plane_Distance00(lua_State* tolua_S)
  8454. {
  8455. #ifndef TOLUA_RELEASE
  8456. tolua_Error tolua_err;
  8457. if (
  8458. !tolua_isusertype(tolua_S,1,"const Plane",0,&tolua_err) ||
  8459. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8460. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8461. )
  8462. goto tolua_lerror;
  8463. else
  8464. #endif
  8465. {
  8466. const Plane* self = (const Plane*) tolua_tousertype(tolua_S,1,0);
  8467. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8468. #ifndef TOLUA_RELEASE
  8469. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  8470. #endif
  8471. {
  8472. float tolua_ret = (float) self->Distance(*point);
  8473. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  8474. }
  8475. }
  8476. return 1;
  8477. #ifndef TOLUA_RELEASE
  8478. tolua_lerror:
  8479. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  8480. return 0;
  8481. #endif
  8482. }
  8483. #endif //#ifndef TOLUA_DISABLE
  8484. /* get function: normal_ of class Plane */
  8485. #ifndef TOLUA_DISABLE_tolua_get_Plane_normal
  8486. static int tolua_get_Plane_normal(lua_State* tolua_S)
  8487. {
  8488. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8489. #ifndef TOLUA_RELEASE
  8490. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal_'",NULL);
  8491. #endif
  8492. tolua_pushusertype(tolua_S,(void*)&self->normal_,"Vector3");
  8493. return 1;
  8494. }
  8495. #endif //#ifndef TOLUA_DISABLE
  8496. /* set function: normal_ of class Plane */
  8497. #ifndef TOLUA_DISABLE_tolua_set_Plane_normal
  8498. static int tolua_set_Plane_normal(lua_State* tolua_S)
  8499. {
  8500. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8501. #ifndef TOLUA_RELEASE
  8502. tolua_Error tolua_err;
  8503. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal_'",NULL);
  8504. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  8505. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8506. #endif
  8507. self->normal_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  8508. ;
  8509. return 0;
  8510. }
  8511. #endif //#ifndef TOLUA_DISABLE
  8512. /* get function: absNormal_ of class Plane */
  8513. #ifndef TOLUA_DISABLE_tolua_get_Plane_absNormal
  8514. static int tolua_get_Plane_absNormal(lua_State* tolua_S)
  8515. {
  8516. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8517. #ifndef TOLUA_RELEASE
  8518. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'absNormal_'",NULL);
  8519. #endif
  8520. tolua_pushusertype(tolua_S,(void*)&self->absNormal_,"Vector3");
  8521. return 1;
  8522. }
  8523. #endif //#ifndef TOLUA_DISABLE
  8524. /* set function: absNormal_ of class Plane */
  8525. #ifndef TOLUA_DISABLE_tolua_set_Plane_absNormal
  8526. static int tolua_set_Plane_absNormal(lua_State* tolua_S)
  8527. {
  8528. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8529. #ifndef TOLUA_RELEASE
  8530. tolua_Error tolua_err;
  8531. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'absNormal_'",NULL);
  8532. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  8533. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8534. #endif
  8535. self->absNormal_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  8536. ;
  8537. return 0;
  8538. }
  8539. #endif //#ifndef TOLUA_DISABLE
  8540. /* get function: intercept_ of class Plane */
  8541. #ifndef TOLUA_DISABLE_tolua_get_Plane_intercept
  8542. static int tolua_get_Plane_intercept(lua_State* tolua_S)
  8543. {
  8544. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8545. #ifndef TOLUA_RELEASE
  8546. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'intercept_'",NULL);
  8547. #endif
  8548. tolua_pushnumber(tolua_S,(lua_Number)self->intercept_);
  8549. return 1;
  8550. }
  8551. #endif //#ifndef TOLUA_DISABLE
  8552. /* set function: intercept_ of class Plane */
  8553. #ifndef TOLUA_DISABLE_tolua_set_Plane_intercept
  8554. static int tolua_set_Plane_intercept(lua_State* tolua_S)
  8555. {
  8556. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8557. #ifndef TOLUA_RELEASE
  8558. tolua_Error tolua_err;
  8559. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'intercept_'",NULL);
  8560. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8561. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8562. #endif
  8563. self->intercept_ = ((float) tolua_tonumber(tolua_S,2,0))
  8564. ;
  8565. return 0;
  8566. }
  8567. #endif //#ifndef TOLUA_DISABLE
  8568. /* method: new of class Polyhedron */
  8569. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new00
  8570. static int tolua_Math_Polyhedron_new00(lua_State* tolua_S)
  8571. {
  8572. #ifndef TOLUA_RELEASE
  8573. tolua_Error tolua_err;
  8574. if (
  8575. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8576. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8577. )
  8578. goto tolua_lerror;
  8579. else
  8580. #endif
  8581. {
  8582. {
  8583. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)());
  8584. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8585. }
  8586. }
  8587. return 1;
  8588. #ifndef TOLUA_RELEASE
  8589. tolua_lerror:
  8590. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8591. return 0;
  8592. #endif
  8593. }
  8594. #endif //#ifndef TOLUA_DISABLE
  8595. /* method: new_local of class Polyhedron */
  8596. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new00_local
  8597. static int tolua_Math_Polyhedron_new00_local(lua_State* tolua_S)
  8598. {
  8599. #ifndef TOLUA_RELEASE
  8600. tolua_Error tolua_err;
  8601. if (
  8602. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8603. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8604. )
  8605. goto tolua_lerror;
  8606. else
  8607. #endif
  8608. {
  8609. {
  8610. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)());
  8611. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8612. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8613. }
  8614. }
  8615. return 1;
  8616. #ifndef TOLUA_RELEASE
  8617. tolua_lerror:
  8618. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8619. return 0;
  8620. #endif
  8621. }
  8622. #endif //#ifndef TOLUA_DISABLE
  8623. /* method: new of class Polyhedron */
  8624. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new01
  8625. static int tolua_Math_Polyhedron_new01(lua_State* tolua_S)
  8626. {
  8627. tolua_Error tolua_err;
  8628. if (
  8629. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8630. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  8631. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8632. )
  8633. goto tolua_lerror;
  8634. else
  8635. {
  8636. const Polyhedron* polyhedron = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  8637. {
  8638. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*polyhedron));
  8639. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8640. }
  8641. }
  8642. return 1;
  8643. tolua_lerror:
  8644. return tolua_Math_Polyhedron_new00(tolua_S);
  8645. }
  8646. #endif //#ifndef TOLUA_DISABLE
  8647. /* method: new_local of class Polyhedron */
  8648. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new01_local
  8649. static int tolua_Math_Polyhedron_new01_local(lua_State* tolua_S)
  8650. {
  8651. tolua_Error tolua_err;
  8652. if (
  8653. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8654. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  8655. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8656. )
  8657. goto tolua_lerror;
  8658. else
  8659. {
  8660. const Polyhedron* polyhedron = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  8661. {
  8662. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*polyhedron));
  8663. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8664. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8665. }
  8666. }
  8667. return 1;
  8668. tolua_lerror:
  8669. return tolua_Math_Polyhedron_new00_local(tolua_S);
  8670. }
  8671. #endif //#ifndef TOLUA_DISABLE
  8672. /* method: new of class Polyhedron */
  8673. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new02
  8674. static int tolua_Math_Polyhedron_new02(lua_State* tolua_S)
  8675. {
  8676. tolua_Error tolua_err;
  8677. if (
  8678. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8679. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8680. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8681. )
  8682. goto tolua_lerror;
  8683. else
  8684. {
  8685. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8686. {
  8687. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*box));
  8688. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8689. }
  8690. }
  8691. return 1;
  8692. tolua_lerror:
  8693. return tolua_Math_Polyhedron_new01(tolua_S);
  8694. }
  8695. #endif //#ifndef TOLUA_DISABLE
  8696. /* method: new_local of class Polyhedron */
  8697. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new02_local
  8698. static int tolua_Math_Polyhedron_new02_local(lua_State* tolua_S)
  8699. {
  8700. tolua_Error tolua_err;
  8701. if (
  8702. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8703. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8704. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8705. )
  8706. goto tolua_lerror;
  8707. else
  8708. {
  8709. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8710. {
  8711. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*box));
  8712. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8713. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8714. }
  8715. }
  8716. return 1;
  8717. tolua_lerror:
  8718. return tolua_Math_Polyhedron_new01_local(tolua_S);
  8719. }
  8720. #endif //#ifndef TOLUA_DISABLE
  8721. /* method: new of class Polyhedron */
  8722. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new03
  8723. static int tolua_Math_Polyhedron_new03(lua_State* tolua_S)
  8724. {
  8725. tolua_Error tolua_err;
  8726. if (
  8727. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8728. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8729. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8730. )
  8731. goto tolua_lerror;
  8732. else
  8733. {
  8734. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8735. {
  8736. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*frustum));
  8737. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8738. }
  8739. }
  8740. return 1;
  8741. tolua_lerror:
  8742. return tolua_Math_Polyhedron_new02(tolua_S);
  8743. }
  8744. #endif //#ifndef TOLUA_DISABLE
  8745. /* method: new_local of class Polyhedron */
  8746. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new03_local
  8747. static int tolua_Math_Polyhedron_new03_local(lua_State* tolua_S)
  8748. {
  8749. tolua_Error tolua_err;
  8750. if (
  8751. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8752. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8753. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8754. )
  8755. goto tolua_lerror;
  8756. else
  8757. {
  8758. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8759. {
  8760. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*frustum));
  8761. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8762. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8763. }
  8764. }
  8765. return 1;
  8766. tolua_lerror:
  8767. return tolua_Math_Polyhedron_new02_local(tolua_S);
  8768. }
  8769. #endif //#ifndef TOLUA_DISABLE
  8770. /* method: delete of class Polyhedron */
  8771. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_delete00
  8772. static int tolua_Math_Polyhedron_delete00(lua_State* tolua_S)
  8773. {
  8774. #ifndef TOLUA_RELEASE
  8775. tolua_Error tolua_err;
  8776. if (
  8777. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8778. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8779. )
  8780. goto tolua_lerror;
  8781. else
  8782. #endif
  8783. {
  8784. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8785. #ifndef TOLUA_RELEASE
  8786. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
  8787. #endif
  8788. Mtolua_delete(self);
  8789. }
  8790. return 0;
  8791. #ifndef TOLUA_RELEASE
  8792. tolua_lerror:
  8793. tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
  8794. return 0;
  8795. #endif
  8796. }
  8797. #endif //#ifndef TOLUA_DISABLE
  8798. /* method: Define of class Polyhedron */
  8799. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Define00
  8800. static int tolua_Math_Polyhedron_Define00(lua_State* tolua_S)
  8801. {
  8802. #ifndef TOLUA_RELEASE
  8803. tolua_Error tolua_err;
  8804. if (
  8805. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8806. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8807. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8808. )
  8809. goto tolua_lerror;
  8810. else
  8811. #endif
  8812. {
  8813. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8814. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8815. #ifndef TOLUA_RELEASE
  8816. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8817. #endif
  8818. {
  8819. self->Define(*box);
  8820. }
  8821. }
  8822. return 0;
  8823. #ifndef TOLUA_RELEASE
  8824. tolua_lerror:
  8825. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  8826. return 0;
  8827. #endif
  8828. }
  8829. #endif //#ifndef TOLUA_DISABLE
  8830. /* method: Define of class Polyhedron */
  8831. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Define01
  8832. static int tolua_Math_Polyhedron_Define01(lua_State* tolua_S)
  8833. {
  8834. tolua_Error tolua_err;
  8835. if (
  8836. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8837. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8838. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8839. )
  8840. goto tolua_lerror;
  8841. else
  8842. {
  8843. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8844. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8845. #ifndef TOLUA_RELEASE
  8846. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8847. #endif
  8848. {
  8849. self->Define(*frustum);
  8850. }
  8851. }
  8852. return 0;
  8853. tolua_lerror:
  8854. return tolua_Math_Polyhedron_Define00(tolua_S);
  8855. }
  8856. #endif //#ifndef TOLUA_DISABLE
  8857. /* method: AddFace of class Polyhedron */
  8858. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_AddFace00
  8859. static int tolua_Math_Polyhedron_AddFace00(lua_State* tolua_S)
  8860. {
  8861. #ifndef TOLUA_RELEASE
  8862. tolua_Error tolua_err;
  8863. if (
  8864. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8865. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8866. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8867. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8868. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8869. )
  8870. goto tolua_lerror;
  8871. else
  8872. #endif
  8873. {
  8874. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8875. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8876. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8877. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8878. #ifndef TOLUA_RELEASE
  8879. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddFace'", NULL);
  8880. #endif
  8881. {
  8882. self->AddFace(*v0,*v1,*v2);
  8883. }
  8884. }
  8885. return 0;
  8886. #ifndef TOLUA_RELEASE
  8887. tolua_lerror:
  8888. tolua_error(tolua_S,"#ferror in function 'AddFace'.",&tolua_err);
  8889. return 0;
  8890. #endif
  8891. }
  8892. #endif //#ifndef TOLUA_DISABLE
  8893. /* method: AddFace of class Polyhedron */
  8894. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_AddFace01
  8895. static int tolua_Math_Polyhedron_AddFace01(lua_State* tolua_S)
  8896. {
  8897. tolua_Error tolua_err;
  8898. if (
  8899. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8900. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8901. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8902. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8903. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) ||
  8904. !tolua_isnoobj(tolua_S,6,&tolua_err)
  8905. )
  8906. goto tolua_lerror;
  8907. else
  8908. {
  8909. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8910. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8911. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8912. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8913. const Vector3* v3 = ((const Vector3*) tolua_tousertype(tolua_S,5,0));
  8914. #ifndef TOLUA_RELEASE
  8915. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddFace'", NULL);
  8916. #endif
  8917. {
  8918. self->AddFace(*v0,*v1,*v2,*v3);
  8919. }
  8920. }
  8921. return 0;
  8922. tolua_lerror:
  8923. return tolua_Math_Polyhedron_AddFace00(tolua_S);
  8924. }
  8925. #endif //#ifndef TOLUA_DISABLE
  8926. /* method: Clip of class Polyhedron */
  8927. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clip00
  8928. static int tolua_Math_Polyhedron_Clip00(lua_State* tolua_S)
  8929. {
  8930. #ifndef TOLUA_RELEASE
  8931. tolua_Error tolua_err;
  8932. if (
  8933. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8934. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  8935. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8936. )
  8937. goto tolua_lerror;
  8938. else
  8939. #endif
  8940. {
  8941. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8942. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  8943. #ifndef TOLUA_RELEASE
  8944. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  8945. #endif
  8946. {
  8947. self->Clip(*plane);
  8948. }
  8949. }
  8950. return 0;
  8951. #ifndef TOLUA_RELEASE
  8952. tolua_lerror:
  8953. tolua_error(tolua_S,"#ferror in function 'Clip'.",&tolua_err);
  8954. return 0;
  8955. #endif
  8956. }
  8957. #endif //#ifndef TOLUA_DISABLE
  8958. /* method: Clip of class Polyhedron */
  8959. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clip01
  8960. static int tolua_Math_Polyhedron_Clip01(lua_State* tolua_S)
  8961. {
  8962. tolua_Error tolua_err;
  8963. if (
  8964. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8965. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8966. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8967. )
  8968. goto tolua_lerror;
  8969. else
  8970. {
  8971. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8972. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8973. #ifndef TOLUA_RELEASE
  8974. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  8975. #endif
  8976. {
  8977. self->Clip(*box);
  8978. }
  8979. }
  8980. return 0;
  8981. tolua_lerror:
  8982. return tolua_Math_Polyhedron_Clip00(tolua_S);
  8983. }
  8984. #endif //#ifndef TOLUA_DISABLE
  8985. /* method: Clip of class Polyhedron */
  8986. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clip02
  8987. static int tolua_Math_Polyhedron_Clip02(lua_State* tolua_S)
  8988. {
  8989. tolua_Error tolua_err;
  8990. if (
  8991. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8992. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8993. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8994. )
  8995. goto tolua_lerror;
  8996. else
  8997. {
  8998. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8999. const Frustum* box = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  9000. #ifndef TOLUA_RELEASE
  9001. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  9002. #endif
  9003. {
  9004. self->Clip(*box);
  9005. }
  9006. }
  9007. return 0;
  9008. tolua_lerror:
  9009. return tolua_Math_Polyhedron_Clip01(tolua_S);
  9010. }
  9011. #endif //#ifndef TOLUA_DISABLE
  9012. /* method: Clear of class Polyhedron */
  9013. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clear00
  9014. static int tolua_Math_Polyhedron_Clear00(lua_State* tolua_S)
  9015. {
  9016. #ifndef TOLUA_RELEASE
  9017. tolua_Error tolua_err;
  9018. if (
  9019. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  9020. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9021. )
  9022. goto tolua_lerror;
  9023. else
  9024. #endif
  9025. {
  9026. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9027. #ifndef TOLUA_RELEASE
  9028. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  9029. #endif
  9030. {
  9031. self->Clear();
  9032. }
  9033. }
  9034. return 0;
  9035. #ifndef TOLUA_RELEASE
  9036. tolua_lerror:
  9037. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  9038. return 0;
  9039. #endif
  9040. }
  9041. #endif //#ifndef TOLUA_DISABLE
  9042. /* method: Transform of class Polyhedron */
  9043. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transform00
  9044. static int tolua_Math_Polyhedron_Transform00(lua_State* tolua_S)
  9045. {
  9046. #ifndef TOLUA_RELEASE
  9047. tolua_Error tolua_err;
  9048. if (
  9049. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  9050. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9051. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9052. )
  9053. goto tolua_lerror;
  9054. else
  9055. #endif
  9056. {
  9057. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9058. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9059. #ifndef TOLUA_RELEASE
  9060. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  9061. #endif
  9062. {
  9063. self->Transform(*transform);
  9064. }
  9065. }
  9066. return 0;
  9067. #ifndef TOLUA_RELEASE
  9068. tolua_lerror:
  9069. tolua_error(tolua_S,"#ferror in function 'Transform'.",&tolua_err);
  9070. return 0;
  9071. #endif
  9072. }
  9073. #endif //#ifndef TOLUA_DISABLE
  9074. /* method: Transform of class Polyhedron */
  9075. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transform01
  9076. static int tolua_Math_Polyhedron_Transform01(lua_State* tolua_S)
  9077. {
  9078. tolua_Error tolua_err;
  9079. if (
  9080. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  9081. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  9082. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9083. )
  9084. goto tolua_lerror;
  9085. else
  9086. {
  9087. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9088. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  9089. #ifndef TOLUA_RELEASE
  9090. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  9091. #endif
  9092. {
  9093. self->Transform(*transform);
  9094. }
  9095. }
  9096. return 0;
  9097. tolua_lerror:
  9098. return tolua_Math_Polyhedron_Transform00(tolua_S);
  9099. }
  9100. #endif //#ifndef TOLUA_DISABLE
  9101. /* method: Transformed of class Polyhedron */
  9102. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transformed00
  9103. static int tolua_Math_Polyhedron_Transformed00(lua_State* tolua_S)
  9104. {
  9105. #ifndef TOLUA_RELEASE
  9106. tolua_Error tolua_err;
  9107. if (
  9108. !tolua_isusertype(tolua_S,1,"const Polyhedron",0,&tolua_err) ||
  9109. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9110. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9111. )
  9112. goto tolua_lerror;
  9113. else
  9114. #endif
  9115. {
  9116. const Polyhedron* self = (const Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9117. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9118. #ifndef TOLUA_RELEASE
  9119. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  9120. #endif
  9121. {
  9122. Polyhedron tolua_ret = (Polyhedron) self->Transformed(*transform);
  9123. {
  9124. #ifdef __cplusplus
  9125. void* tolua_obj = Mtolua_new((Polyhedron)(tolua_ret));
  9126. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9127. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9128. #else
  9129. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Polyhedron));
  9130. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9131. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9132. #endif
  9133. }
  9134. }
  9135. }
  9136. return 1;
  9137. #ifndef TOLUA_RELEASE
  9138. tolua_lerror:
  9139. tolua_error(tolua_S,"#ferror in function 'Transformed'.",&tolua_err);
  9140. return 0;
  9141. #endif
  9142. }
  9143. #endif //#ifndef TOLUA_DISABLE
  9144. /* method: Transformed of class Polyhedron */
  9145. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transformed01
  9146. static int tolua_Math_Polyhedron_Transformed01(lua_State* tolua_S)
  9147. {
  9148. tolua_Error tolua_err;
  9149. if (
  9150. !tolua_isusertype(tolua_S,1,"const Polyhedron",0,&tolua_err) ||
  9151. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  9152. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9153. )
  9154. goto tolua_lerror;
  9155. else
  9156. {
  9157. const Polyhedron* self = (const Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9158. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  9159. #ifndef TOLUA_RELEASE
  9160. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  9161. #endif
  9162. {
  9163. Polyhedron tolua_ret = (Polyhedron) self->Transformed(*transform);
  9164. {
  9165. #ifdef __cplusplus
  9166. void* tolua_obj = Mtolua_new((Polyhedron)(tolua_ret));
  9167. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9168. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9169. #else
  9170. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Polyhedron));
  9171. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9172. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9173. #endif
  9174. }
  9175. }
  9176. }
  9177. return 1;
  9178. tolua_lerror:
  9179. return tolua_Math_Polyhedron_Transformed00(tolua_S);
  9180. }
  9181. #endif //#ifndef TOLUA_DISABLE
  9182. /* method: Empty of class Polyhedron */
  9183. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Empty00
  9184. static int tolua_Math_Polyhedron_Empty00(lua_State* tolua_S)
  9185. {
  9186. #ifndef TOLUA_RELEASE
  9187. tolua_Error tolua_err;
  9188. if (
  9189. !tolua_isusertype(tolua_S,1,"const Polyhedron",0,&tolua_err) ||
  9190. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9191. )
  9192. goto tolua_lerror;
  9193. else
  9194. #endif
  9195. {
  9196. const Polyhedron* self = (const Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9197. #ifndef TOLUA_RELEASE
  9198. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Empty'", NULL);
  9199. #endif
  9200. {
  9201. bool tolua_ret = (bool) self->Empty();
  9202. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  9203. }
  9204. }
  9205. return 1;
  9206. #ifndef TOLUA_RELEASE
  9207. tolua_lerror:
  9208. tolua_error(tolua_S,"#ferror in function 'Empty'.",&tolua_err);
  9209. return 0;
  9210. #endif
  9211. }
  9212. #endif //#ifndef TOLUA_DISABLE
  9213. /* method: new of class Quaternion */
  9214. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new00
  9215. static int tolua_Math_Quaternion_new00(lua_State* tolua_S)
  9216. {
  9217. #ifndef TOLUA_RELEASE
  9218. tolua_Error tolua_err;
  9219. if (
  9220. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9221. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9222. )
  9223. goto tolua_lerror;
  9224. else
  9225. #endif
  9226. {
  9227. {
  9228. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)());
  9229. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9230. }
  9231. }
  9232. return 1;
  9233. #ifndef TOLUA_RELEASE
  9234. tolua_lerror:
  9235. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  9236. return 0;
  9237. #endif
  9238. }
  9239. #endif //#ifndef TOLUA_DISABLE
  9240. /* method: new_local of class Quaternion */
  9241. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new00_local
  9242. static int tolua_Math_Quaternion_new00_local(lua_State* tolua_S)
  9243. {
  9244. #ifndef TOLUA_RELEASE
  9245. tolua_Error tolua_err;
  9246. if (
  9247. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9248. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9249. )
  9250. goto tolua_lerror;
  9251. else
  9252. #endif
  9253. {
  9254. {
  9255. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)());
  9256. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9257. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9258. }
  9259. }
  9260. return 1;
  9261. #ifndef TOLUA_RELEASE
  9262. tolua_lerror:
  9263. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  9264. return 0;
  9265. #endif
  9266. }
  9267. #endif //#ifndef TOLUA_DISABLE
  9268. /* method: new of class Quaternion */
  9269. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new01
  9270. static int tolua_Math_Quaternion_new01(lua_State* tolua_S)
  9271. {
  9272. tolua_Error tolua_err;
  9273. if (
  9274. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9275. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9276. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9277. )
  9278. goto tolua_lerror;
  9279. else
  9280. {
  9281. const Quaternion* quat = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9282. {
  9283. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*quat));
  9284. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9285. }
  9286. }
  9287. return 1;
  9288. tolua_lerror:
  9289. return tolua_Math_Quaternion_new00(tolua_S);
  9290. }
  9291. #endif //#ifndef TOLUA_DISABLE
  9292. /* method: new_local of class Quaternion */
  9293. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new01_local
  9294. static int tolua_Math_Quaternion_new01_local(lua_State* tolua_S)
  9295. {
  9296. tolua_Error tolua_err;
  9297. if (
  9298. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9299. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9300. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9301. )
  9302. goto tolua_lerror;
  9303. else
  9304. {
  9305. const Quaternion* quat = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9306. {
  9307. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*quat));
  9308. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9309. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9310. }
  9311. }
  9312. return 1;
  9313. tolua_lerror:
  9314. return tolua_Math_Quaternion_new00_local(tolua_S);
  9315. }
  9316. #endif //#ifndef TOLUA_DISABLE
  9317. /* method: new of class Quaternion */
  9318. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new02
  9319. static int tolua_Math_Quaternion_new02(lua_State* tolua_S)
  9320. {
  9321. tolua_Error tolua_err;
  9322. if (
  9323. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9324. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9325. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9326. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9327. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  9328. !tolua_isnoobj(tolua_S,6,&tolua_err)
  9329. )
  9330. goto tolua_lerror;
  9331. else
  9332. {
  9333. float w = ((float) tolua_tonumber(tolua_S,2,0));
  9334. float x = ((float) tolua_tonumber(tolua_S,3,0));
  9335. float y = ((float) tolua_tonumber(tolua_S,4,0));
  9336. float z = ((float) tolua_tonumber(tolua_S,5,0));
  9337. {
  9338. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(w,x,y,z));
  9339. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9340. }
  9341. }
  9342. return 1;
  9343. tolua_lerror:
  9344. return tolua_Math_Quaternion_new01(tolua_S);
  9345. }
  9346. #endif //#ifndef TOLUA_DISABLE
  9347. /* method: new_local of class Quaternion */
  9348. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new02_local
  9349. static int tolua_Math_Quaternion_new02_local(lua_State* tolua_S)
  9350. {
  9351. tolua_Error tolua_err;
  9352. if (
  9353. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9354. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9355. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9356. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9357. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  9358. !tolua_isnoobj(tolua_S,6,&tolua_err)
  9359. )
  9360. goto tolua_lerror;
  9361. else
  9362. {
  9363. float w = ((float) tolua_tonumber(tolua_S,2,0));
  9364. float x = ((float) tolua_tonumber(tolua_S,3,0));
  9365. float y = ((float) tolua_tonumber(tolua_S,4,0));
  9366. float z = ((float) tolua_tonumber(tolua_S,5,0));
  9367. {
  9368. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(w,x,y,z));
  9369. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9370. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9371. }
  9372. }
  9373. return 1;
  9374. tolua_lerror:
  9375. return tolua_Math_Quaternion_new01_local(tolua_S);
  9376. }
  9377. #endif //#ifndef TOLUA_DISABLE
  9378. /* method: new of class Quaternion */
  9379. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new03
  9380. static int tolua_Math_Quaternion_new03(lua_State* tolua_S)
  9381. {
  9382. tolua_Error tolua_err;
  9383. if (
  9384. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9385. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9386. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9387. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9388. )
  9389. goto tolua_lerror;
  9390. else
  9391. {
  9392. float angle = ((float) tolua_tonumber(tolua_S,2,0));
  9393. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9394. {
  9395. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(angle,*axis));
  9396. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9397. }
  9398. }
  9399. return 1;
  9400. tolua_lerror:
  9401. return tolua_Math_Quaternion_new02(tolua_S);
  9402. }
  9403. #endif //#ifndef TOLUA_DISABLE
  9404. /* method: new_local of class Quaternion */
  9405. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new03_local
  9406. static int tolua_Math_Quaternion_new03_local(lua_State* tolua_S)
  9407. {
  9408. tolua_Error tolua_err;
  9409. if (
  9410. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9411. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9412. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9413. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9414. )
  9415. goto tolua_lerror;
  9416. else
  9417. {
  9418. float angle = ((float) tolua_tonumber(tolua_S,2,0));
  9419. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9420. {
  9421. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(angle,*axis));
  9422. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9423. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9424. }
  9425. }
  9426. return 1;
  9427. tolua_lerror:
  9428. return tolua_Math_Quaternion_new02_local(tolua_S);
  9429. }
  9430. #endif //#ifndef TOLUA_DISABLE
  9431. /* method: new of class Quaternion */
  9432. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new04
  9433. static int tolua_Math_Quaternion_new04(lua_State* tolua_S)
  9434. {
  9435. tolua_Error tolua_err;
  9436. if (
  9437. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9438. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9439. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9440. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9441. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9442. )
  9443. goto tolua_lerror;
  9444. else
  9445. {
  9446. float x = ((float) tolua_tonumber(tolua_S,2,0));
  9447. float y = ((float) tolua_tonumber(tolua_S,3,0));
  9448. float z = ((float) tolua_tonumber(tolua_S,4,0));
  9449. {
  9450. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(x,y,z));
  9451. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9452. }
  9453. }
  9454. return 1;
  9455. tolua_lerror:
  9456. return tolua_Math_Quaternion_new03(tolua_S);
  9457. }
  9458. #endif //#ifndef TOLUA_DISABLE
  9459. /* method: new_local of class Quaternion */
  9460. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new04_local
  9461. static int tolua_Math_Quaternion_new04_local(lua_State* tolua_S)
  9462. {
  9463. tolua_Error tolua_err;
  9464. if (
  9465. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9466. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9467. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9468. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9469. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9470. )
  9471. goto tolua_lerror;
  9472. else
  9473. {
  9474. float x = ((float) tolua_tonumber(tolua_S,2,0));
  9475. float y = ((float) tolua_tonumber(tolua_S,3,0));
  9476. float z = ((float) tolua_tonumber(tolua_S,4,0));
  9477. {
  9478. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(x,y,z));
  9479. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9480. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9481. }
  9482. }
  9483. return 1;
  9484. tolua_lerror:
  9485. return tolua_Math_Quaternion_new03_local(tolua_S);
  9486. }
  9487. #endif //#ifndef TOLUA_DISABLE
  9488. /* method: new of class Quaternion */
  9489. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new05
  9490. static int tolua_Math_Quaternion_new05(lua_State* tolua_S)
  9491. {
  9492. tolua_Error tolua_err;
  9493. if (
  9494. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9495. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9496. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9497. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9498. )
  9499. goto tolua_lerror;
  9500. else
  9501. {
  9502. const Vector3* start = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9503. const Vector3* end = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9504. {
  9505. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*start,*end));
  9506. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9507. }
  9508. }
  9509. return 1;
  9510. tolua_lerror:
  9511. return tolua_Math_Quaternion_new04(tolua_S);
  9512. }
  9513. #endif //#ifndef TOLUA_DISABLE
  9514. /* method: new_local of class Quaternion */
  9515. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new05_local
  9516. static int tolua_Math_Quaternion_new05_local(lua_State* tolua_S)
  9517. {
  9518. tolua_Error tolua_err;
  9519. if (
  9520. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9521. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9522. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9523. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9524. )
  9525. goto tolua_lerror;
  9526. else
  9527. {
  9528. const Vector3* start = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9529. const Vector3* end = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9530. {
  9531. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*start,*end));
  9532. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9533. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9534. }
  9535. }
  9536. return 1;
  9537. tolua_lerror:
  9538. return tolua_Math_Quaternion_new04_local(tolua_S);
  9539. }
  9540. #endif //#ifndef TOLUA_DISABLE
  9541. /* method: new of class Quaternion */
  9542. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new06
  9543. static int tolua_Math_Quaternion_new06(lua_State* tolua_S)
  9544. {
  9545. tolua_Error tolua_err;
  9546. if (
  9547. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9548. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9549. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9550. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  9551. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9552. )
  9553. goto tolua_lerror;
  9554. else
  9555. {
  9556. const Vector3* xAxis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9557. const Vector3* yAxis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9558. const Vector3* zAxis = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  9559. {
  9560. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*xAxis,*yAxis,*zAxis));
  9561. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9562. }
  9563. }
  9564. return 1;
  9565. tolua_lerror:
  9566. return tolua_Math_Quaternion_new05(tolua_S);
  9567. }
  9568. #endif //#ifndef TOLUA_DISABLE
  9569. /* method: new_local of class Quaternion */
  9570. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new06_local
  9571. static int tolua_Math_Quaternion_new06_local(lua_State* tolua_S)
  9572. {
  9573. tolua_Error tolua_err;
  9574. if (
  9575. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9576. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9577. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9578. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  9579. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9580. )
  9581. goto tolua_lerror;
  9582. else
  9583. {
  9584. const Vector3* xAxis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9585. const Vector3* yAxis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9586. const Vector3* zAxis = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  9587. {
  9588. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*xAxis,*yAxis,*zAxis));
  9589. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9590. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9591. }
  9592. }
  9593. return 1;
  9594. tolua_lerror:
  9595. return tolua_Math_Quaternion_new05_local(tolua_S);
  9596. }
  9597. #endif //#ifndef TOLUA_DISABLE
  9598. /* method: new of class Quaternion */
  9599. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new07
  9600. static int tolua_Math_Quaternion_new07(lua_State* tolua_S)
  9601. {
  9602. tolua_Error tolua_err;
  9603. if (
  9604. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9605. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9606. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9607. )
  9608. goto tolua_lerror;
  9609. else
  9610. {
  9611. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9612. {
  9613. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*matrix));
  9614. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9615. }
  9616. }
  9617. return 1;
  9618. tolua_lerror:
  9619. return tolua_Math_Quaternion_new06(tolua_S);
  9620. }
  9621. #endif //#ifndef TOLUA_DISABLE
  9622. /* method: new_local of class Quaternion */
  9623. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new07_local
  9624. static int tolua_Math_Quaternion_new07_local(lua_State* tolua_S)
  9625. {
  9626. tolua_Error tolua_err;
  9627. if (
  9628. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9629. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9630. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9631. )
  9632. goto tolua_lerror;
  9633. else
  9634. {
  9635. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9636. {
  9637. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*matrix));
  9638. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9639. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9640. }
  9641. }
  9642. return 1;
  9643. tolua_lerror:
  9644. return tolua_Math_Quaternion_new06_local(tolua_S);
  9645. }
  9646. #endif //#ifndef TOLUA_DISABLE
  9647. /* method: operator== of class Quaternion */
  9648. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__eq00
  9649. static int tolua_Math_Quaternion__eq00(lua_State* tolua_S)
  9650. {
  9651. #ifndef TOLUA_RELEASE
  9652. tolua_Error tolua_err;
  9653. if (
  9654. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9655. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9656. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9657. )
  9658. goto tolua_lerror;
  9659. else
  9660. #endif
  9661. {
  9662. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9663. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9664. #ifndef TOLUA_RELEASE
  9665. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  9666. #endif
  9667. {
  9668. bool tolua_ret = (bool) self->operator==(*rhs);
  9669. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  9670. }
  9671. }
  9672. return 1;
  9673. #ifndef TOLUA_RELEASE
  9674. tolua_lerror:
  9675. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  9676. return 0;
  9677. #endif
  9678. }
  9679. #endif //#ifndef TOLUA_DISABLE
  9680. /* method: operator* of class Quaternion */
  9681. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul00
  9682. static int tolua_Math_Quaternion__mul00(lua_State* tolua_S)
  9683. {
  9684. #ifndef TOLUA_RELEASE
  9685. tolua_Error tolua_err;
  9686. if (
  9687. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9688. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9689. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9690. )
  9691. goto tolua_lerror;
  9692. else
  9693. #endif
  9694. {
  9695. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9696. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  9697. #ifndef TOLUA_RELEASE
  9698. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  9699. #endif
  9700. {
  9701. Quaternion tolua_ret = (Quaternion) self->operator*(rhs);
  9702. {
  9703. #ifdef __cplusplus
  9704. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9705. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9706. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9707. #else
  9708. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9709. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9710. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9711. #endif
  9712. }
  9713. }
  9714. }
  9715. return 1;
  9716. #ifndef TOLUA_RELEASE
  9717. tolua_lerror:
  9718. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  9719. return 0;
  9720. #endif
  9721. }
  9722. #endif //#ifndef TOLUA_DISABLE
  9723. /* method: operator- of class Quaternion */
  9724. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__sub00
  9725. static int tolua_Math_Quaternion__sub00(lua_State* tolua_S)
  9726. {
  9727. #ifndef TOLUA_RELEASE
  9728. tolua_Error tolua_err;
  9729. if (
  9730. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9731. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9732. )
  9733. goto tolua_lerror;
  9734. else
  9735. #endif
  9736. {
  9737. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9738. #ifndef TOLUA_RELEASE
  9739. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  9740. #endif
  9741. {
  9742. Quaternion tolua_ret = (Quaternion) self->operator-();
  9743. {
  9744. #ifdef __cplusplus
  9745. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9746. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9747. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9748. #else
  9749. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9750. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9751. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9752. #endif
  9753. }
  9754. }
  9755. }
  9756. return 1;
  9757. #ifndef TOLUA_RELEASE
  9758. tolua_lerror:
  9759. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  9760. return 0;
  9761. #endif
  9762. }
  9763. #endif //#ifndef TOLUA_DISABLE
  9764. /* method: operator== of class Quaternion */
  9765. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__eq01
  9766. static int tolua_Math_Quaternion__eq01(lua_State* tolua_S)
  9767. {
  9768. tolua_Error tolua_err;
  9769. if (
  9770. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9771. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9772. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9773. )
  9774. goto tolua_lerror;
  9775. else
  9776. {
  9777. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9778. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9779. #ifndef TOLUA_RELEASE
  9780. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  9781. #endif
  9782. {
  9783. bool tolua_ret = (bool) self->operator==(*rhs);
  9784. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  9785. }
  9786. }
  9787. return 1;
  9788. tolua_lerror:
  9789. return tolua_Math_Quaternion__eq00(tolua_S);
  9790. }
  9791. #endif //#ifndef TOLUA_DISABLE
  9792. /* method: operator* of class Quaternion */
  9793. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul01
  9794. static int tolua_Math_Quaternion__mul01(lua_State* tolua_S)
  9795. {
  9796. tolua_Error tolua_err;
  9797. if (
  9798. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9799. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9800. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9801. )
  9802. goto tolua_lerror;
  9803. else
  9804. {
  9805. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9806. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  9807. #ifndef TOLUA_RELEASE
  9808. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  9809. #endif
  9810. {
  9811. Quaternion tolua_ret = (Quaternion) self->operator*(rhs);
  9812. {
  9813. #ifdef __cplusplus
  9814. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9815. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9816. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9817. #else
  9818. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9819. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9820. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9821. #endif
  9822. }
  9823. }
  9824. }
  9825. return 1;
  9826. tolua_lerror:
  9827. return tolua_Math_Quaternion__mul00(tolua_S);
  9828. }
  9829. #endif //#ifndef TOLUA_DISABLE
  9830. /* method: operator- of class Quaternion */
  9831. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__sub01
  9832. static int tolua_Math_Quaternion__sub01(lua_State* tolua_S)
  9833. {
  9834. tolua_Error tolua_err;
  9835. if (
  9836. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9837. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9838. )
  9839. goto tolua_lerror;
  9840. else
  9841. {
  9842. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9843. #ifndef TOLUA_RELEASE
  9844. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  9845. #endif
  9846. {
  9847. Quaternion tolua_ret = (Quaternion) self->operator-();
  9848. {
  9849. #ifdef __cplusplus
  9850. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9851. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9852. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9853. #else
  9854. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9855. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9856. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9857. #endif
  9858. }
  9859. }
  9860. }
  9861. return 1;
  9862. tolua_lerror:
  9863. return tolua_Math_Quaternion__sub00(tolua_S);
  9864. }
  9865. #endif //#ifndef TOLUA_DISABLE
  9866. /* method: operator+ of class Quaternion */
  9867. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__add00
  9868. static int tolua_Math_Quaternion__add00(lua_State* tolua_S)
  9869. {
  9870. #ifndef TOLUA_RELEASE
  9871. tolua_Error tolua_err;
  9872. if (
  9873. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9874. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9875. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9876. )
  9877. goto tolua_lerror;
  9878. else
  9879. #endif
  9880. {
  9881. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9882. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9883. #ifndef TOLUA_RELEASE
  9884. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  9885. #endif
  9886. {
  9887. Quaternion tolua_ret = (Quaternion) self->operator+(*rhs);
  9888. {
  9889. #ifdef __cplusplus
  9890. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9891. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9892. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9893. #else
  9894. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9895. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9896. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9897. #endif
  9898. }
  9899. }
  9900. }
  9901. return 1;
  9902. #ifndef TOLUA_RELEASE
  9903. tolua_lerror:
  9904. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  9905. return 0;
  9906. #endif
  9907. }
  9908. #endif //#ifndef TOLUA_DISABLE
  9909. /* method: operator- of class Quaternion */
  9910. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__sub02
  9911. static int tolua_Math_Quaternion__sub02(lua_State* tolua_S)
  9912. {
  9913. tolua_Error tolua_err;
  9914. if (
  9915. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9916. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9917. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9918. )
  9919. goto tolua_lerror;
  9920. else
  9921. {
  9922. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9923. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9924. #ifndef TOLUA_RELEASE
  9925. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  9926. #endif
  9927. {
  9928. Quaternion tolua_ret = (Quaternion) self->operator-(*rhs);
  9929. {
  9930. #ifdef __cplusplus
  9931. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9932. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9933. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9934. #else
  9935. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9936. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9937. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9938. #endif
  9939. }
  9940. }
  9941. }
  9942. return 1;
  9943. tolua_lerror:
  9944. return tolua_Math_Quaternion__sub01(tolua_S);
  9945. }
  9946. #endif //#ifndef TOLUA_DISABLE
  9947. /* method: operator* of class Quaternion */
  9948. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul02
  9949. static int tolua_Math_Quaternion__mul02(lua_State* tolua_S)
  9950. {
  9951. tolua_Error tolua_err;
  9952. if (
  9953. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9954. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9955. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9956. )
  9957. goto tolua_lerror;
  9958. else
  9959. {
  9960. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9961. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9962. #ifndef TOLUA_RELEASE
  9963. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  9964. #endif
  9965. {
  9966. Quaternion tolua_ret = (Quaternion) self->operator*(*rhs);
  9967. {
  9968. #ifdef __cplusplus
  9969. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9970. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9971. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9972. #else
  9973. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9974. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9975. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9976. #endif
  9977. }
  9978. }
  9979. }
  9980. return 1;
  9981. tolua_lerror:
  9982. return tolua_Math_Quaternion__mul01(tolua_S);
  9983. }
  9984. #endif //#ifndef TOLUA_DISABLE
  9985. /* method: operator* of class Quaternion */
  9986. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul03
  9987. static int tolua_Math_Quaternion__mul03(lua_State* tolua_S)
  9988. {
  9989. tolua_Error tolua_err;
  9990. if (
  9991. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9992. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9993. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9994. )
  9995. goto tolua_lerror;
  9996. else
  9997. {
  9998. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9999. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10000. #ifndef TOLUA_RELEASE
  10001. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  10002. #endif
  10003. {
  10004. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  10005. {
  10006. #ifdef __cplusplus
  10007. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  10008. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10009. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10010. #else
  10011. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  10012. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10013. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10014. #endif
  10015. }
  10016. }
  10017. }
  10018. return 1;
  10019. tolua_lerror:
  10020. return tolua_Math_Quaternion__mul02(tolua_S);
  10021. }
  10022. #endif //#ifndef TOLUA_DISABLE
  10023. /* method: FromAngleAxis of class Quaternion */
  10024. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromAngleAxis00
  10025. static int tolua_Math_Quaternion_FromAngleAxis00(lua_State* tolua_S)
  10026. {
  10027. #ifndef TOLUA_RELEASE
  10028. tolua_Error tolua_err;
  10029. if (
  10030. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  10031. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  10032. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10033. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10034. )
  10035. goto tolua_lerror;
  10036. else
  10037. #endif
  10038. {
  10039. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10040. float angle = ((float) tolua_tonumber(tolua_S,2,0));
  10041. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10042. #ifndef TOLUA_RELEASE
  10043. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromAngleAxis'", NULL);
  10044. #endif
  10045. {
  10046. self->FromAngleAxis(angle,*axis);
  10047. }
  10048. }
  10049. return 0;
  10050. #ifndef TOLUA_RELEASE
  10051. tolua_lerror:
  10052. tolua_error(tolua_S,"#ferror in function 'FromAngleAxis'.",&tolua_err);
  10053. return 0;
  10054. #endif
  10055. }
  10056. #endif //#ifndef TOLUA_DISABLE
  10057. /* method: FromEulerAngles of class Quaternion */
  10058. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromEulerAngles00
  10059. static int tolua_Math_Quaternion_FromEulerAngles00(lua_State* tolua_S)
  10060. {
  10061. #ifndef TOLUA_RELEASE
  10062. tolua_Error tolua_err;
  10063. if (
  10064. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  10065. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  10066. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  10067. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  10068. !tolua_isnoobj(tolua_S,5,&tolua_err)
  10069. )
  10070. goto tolua_lerror;
  10071. else
  10072. #endif
  10073. {
  10074. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10075. float x = ((float) tolua_tonumber(tolua_S,2,0));
  10076. float y = ((float) tolua_tonumber(tolua_S,3,0));
  10077. float z = ((float) tolua_tonumber(tolua_S,4,0));
  10078. #ifndef TOLUA_RELEASE
  10079. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromEulerAngles'", NULL);
  10080. #endif
  10081. {
  10082. self->FromEulerAngles(x,y,z);
  10083. }
  10084. }
  10085. return 0;
  10086. #ifndef TOLUA_RELEASE
  10087. tolua_lerror:
  10088. tolua_error(tolua_S,"#ferror in function 'FromEulerAngles'.",&tolua_err);
  10089. return 0;
  10090. #endif
  10091. }
  10092. #endif //#ifndef TOLUA_DISABLE
  10093. /* method: FromRotationTo of class Quaternion */
  10094. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromRotationTo00
  10095. static int tolua_Math_Quaternion_FromRotationTo00(lua_State* tolua_S)
  10096. {
  10097. #ifndef TOLUA_RELEASE
  10098. tolua_Error tolua_err;
  10099. if (
  10100. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  10101. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10102. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10103. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10104. )
  10105. goto tolua_lerror;
  10106. else
  10107. #endif
  10108. {
  10109. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10110. const Vector3* start = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10111. const Vector3* end = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10112. #ifndef TOLUA_RELEASE
  10113. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromRotationTo'", NULL);
  10114. #endif
  10115. {
  10116. self->FromRotationTo(*start,*end);
  10117. }
  10118. }
  10119. return 0;
  10120. #ifndef TOLUA_RELEASE
  10121. tolua_lerror:
  10122. tolua_error(tolua_S,"#ferror in function 'FromRotationTo'.",&tolua_err);
  10123. return 0;
  10124. #endif
  10125. }
  10126. #endif //#ifndef TOLUA_DISABLE
  10127. /* method: FromAxes of class Quaternion */
  10128. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromAxes00
  10129. static int tolua_Math_Quaternion_FromAxes00(lua_State* tolua_S)
  10130. {
  10131. #ifndef TOLUA_RELEASE
  10132. tolua_Error tolua_err;
  10133. if (
  10134. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  10135. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10136. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10137. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  10138. !tolua_isnoobj(tolua_S,5,&tolua_err)
  10139. )
  10140. goto tolua_lerror;
  10141. else
  10142. #endif
  10143. {
  10144. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10145. const Vector3* xAxis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10146. const Vector3* yAxis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10147. const Vector3* zAxis = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  10148. #ifndef TOLUA_RELEASE
  10149. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromAxes'", NULL);
  10150. #endif
  10151. {
  10152. self->FromAxes(*xAxis,*yAxis,*zAxis);
  10153. }
  10154. }
  10155. return 0;
  10156. #ifndef TOLUA_RELEASE
  10157. tolua_lerror:
  10158. tolua_error(tolua_S,"#ferror in function 'FromAxes'.",&tolua_err);
  10159. return 0;
  10160. #endif
  10161. }
  10162. #endif //#ifndef TOLUA_DISABLE
  10163. /* method: FromRotationMatrix of class Quaternion */
  10164. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromRotationMatrix00
  10165. static int tolua_Math_Quaternion_FromRotationMatrix00(lua_State* tolua_S)
  10166. {
  10167. #ifndef TOLUA_RELEASE
  10168. tolua_Error tolua_err;
  10169. if (
  10170. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  10171. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  10172. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10173. )
  10174. goto tolua_lerror;
  10175. else
  10176. #endif
  10177. {
  10178. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10179. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  10180. #ifndef TOLUA_RELEASE
  10181. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromRotationMatrix'", NULL);
  10182. #endif
  10183. {
  10184. self->FromRotationMatrix(*matrix);
  10185. }
  10186. }
  10187. return 0;
  10188. #ifndef TOLUA_RELEASE
  10189. tolua_lerror:
  10190. tolua_error(tolua_S,"#ferror in function 'FromRotationMatrix'.",&tolua_err);
  10191. return 0;
  10192. #endif
  10193. }
  10194. #endif //#ifndef TOLUA_DISABLE
  10195. /* method: Normalize of class Quaternion */
  10196. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Normalize00
  10197. static int tolua_Math_Quaternion_Normalize00(lua_State* tolua_S)
  10198. {
  10199. #ifndef TOLUA_RELEASE
  10200. tolua_Error tolua_err;
  10201. if (
  10202. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  10203. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10204. )
  10205. goto tolua_lerror;
  10206. else
  10207. #endif
  10208. {
  10209. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10210. #ifndef TOLUA_RELEASE
  10211. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
  10212. #endif
  10213. {
  10214. float tolua_ret = (float) self->Normalize();
  10215. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10216. }
  10217. }
  10218. return 1;
  10219. #ifndef TOLUA_RELEASE
  10220. tolua_lerror:
  10221. tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
  10222. return 0;
  10223. #endif
  10224. }
  10225. #endif //#ifndef TOLUA_DISABLE
  10226. /* method: Normalized of class Quaternion */
  10227. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Normalized00
  10228. static int tolua_Math_Quaternion_Normalized00(lua_State* tolua_S)
  10229. {
  10230. #ifndef TOLUA_RELEASE
  10231. tolua_Error tolua_err;
  10232. if (
  10233. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10234. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10235. )
  10236. goto tolua_lerror;
  10237. else
  10238. #endif
  10239. {
  10240. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10241. #ifndef TOLUA_RELEASE
  10242. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalized'", NULL);
  10243. #endif
  10244. {
  10245. Quaternion tolua_ret = (Quaternion) self->Normalized();
  10246. {
  10247. #ifdef __cplusplus
  10248. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10249. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10250. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10251. #else
  10252. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10253. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10254. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10255. #endif
  10256. }
  10257. }
  10258. }
  10259. return 1;
  10260. #ifndef TOLUA_RELEASE
  10261. tolua_lerror:
  10262. tolua_error(tolua_S,"#ferror in function 'Normalized'.",&tolua_err);
  10263. return 0;
  10264. #endif
  10265. }
  10266. #endif //#ifndef TOLUA_DISABLE
  10267. /* method: Inverse of class Quaternion */
  10268. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Inverse00
  10269. static int tolua_Math_Quaternion_Inverse00(lua_State* tolua_S)
  10270. {
  10271. #ifndef TOLUA_RELEASE
  10272. tolua_Error tolua_err;
  10273. if (
  10274. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10275. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10276. )
  10277. goto tolua_lerror;
  10278. else
  10279. #endif
  10280. {
  10281. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10282. #ifndef TOLUA_RELEASE
  10283. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  10284. #endif
  10285. {
  10286. Quaternion tolua_ret = (Quaternion) self->Inverse();
  10287. {
  10288. #ifdef __cplusplus
  10289. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10290. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10291. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10292. #else
  10293. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10294. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10295. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10296. #endif
  10297. }
  10298. }
  10299. }
  10300. return 1;
  10301. #ifndef TOLUA_RELEASE
  10302. tolua_lerror:
  10303. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  10304. return 0;
  10305. #endif
  10306. }
  10307. #endif //#ifndef TOLUA_DISABLE
  10308. /* method: LengthSquared of class Quaternion */
  10309. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_LengthSquared00
  10310. static int tolua_Math_Quaternion_LengthSquared00(lua_State* tolua_S)
  10311. {
  10312. #ifndef TOLUA_RELEASE
  10313. tolua_Error tolua_err;
  10314. if (
  10315. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10316. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10317. )
  10318. goto tolua_lerror;
  10319. else
  10320. #endif
  10321. {
  10322. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10323. #ifndef TOLUA_RELEASE
  10324. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
  10325. #endif
  10326. {
  10327. float tolua_ret = (float) self->LengthSquared();
  10328. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10329. }
  10330. }
  10331. return 1;
  10332. #ifndef TOLUA_RELEASE
  10333. tolua_lerror:
  10334. tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
  10335. return 0;
  10336. #endif
  10337. }
  10338. #endif //#ifndef TOLUA_DISABLE
  10339. /* method: DotProduct of class Quaternion */
  10340. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_DotProduct00
  10341. static int tolua_Math_Quaternion_DotProduct00(lua_State* tolua_S)
  10342. {
  10343. #ifndef TOLUA_RELEASE
  10344. tolua_Error tolua_err;
  10345. if (
  10346. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10347. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  10348. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10349. )
  10350. goto tolua_lerror;
  10351. else
  10352. #endif
  10353. {
  10354. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10355. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  10356. #ifndef TOLUA_RELEASE
  10357. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  10358. #endif
  10359. {
  10360. float tolua_ret = (float) self->DotProduct(*rhs);
  10361. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10362. }
  10363. }
  10364. return 1;
  10365. #ifndef TOLUA_RELEASE
  10366. tolua_lerror:
  10367. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  10368. return 0;
  10369. #endif
  10370. }
  10371. #endif //#ifndef TOLUA_DISABLE
  10372. /* method: Equals of class Quaternion */
  10373. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Equals00
  10374. static int tolua_Math_Quaternion_Equals00(lua_State* tolua_S)
  10375. {
  10376. #ifndef TOLUA_RELEASE
  10377. tolua_Error tolua_err;
  10378. if (
  10379. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10380. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  10381. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10382. )
  10383. goto tolua_lerror;
  10384. else
  10385. #endif
  10386. {
  10387. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10388. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  10389. #ifndef TOLUA_RELEASE
  10390. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  10391. #endif
  10392. {
  10393. bool tolua_ret = (bool) self->Equals(*rhs);
  10394. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  10395. }
  10396. }
  10397. return 1;
  10398. #ifndef TOLUA_RELEASE
  10399. tolua_lerror:
  10400. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  10401. return 0;
  10402. #endif
  10403. }
  10404. #endif //#ifndef TOLUA_DISABLE
  10405. /* method: Conjugate of class Quaternion */
  10406. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Conjugate00
  10407. static int tolua_Math_Quaternion_Conjugate00(lua_State* tolua_S)
  10408. {
  10409. #ifndef TOLUA_RELEASE
  10410. tolua_Error tolua_err;
  10411. if (
  10412. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10413. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10414. )
  10415. goto tolua_lerror;
  10416. else
  10417. #endif
  10418. {
  10419. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10420. #ifndef TOLUA_RELEASE
  10421. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Conjugate'", NULL);
  10422. #endif
  10423. {
  10424. Quaternion tolua_ret = (Quaternion) self->Conjugate();
  10425. {
  10426. #ifdef __cplusplus
  10427. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10428. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10429. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10430. #else
  10431. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10432. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10433. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10434. #endif
  10435. }
  10436. }
  10437. }
  10438. return 1;
  10439. #ifndef TOLUA_RELEASE
  10440. tolua_lerror:
  10441. tolua_error(tolua_S,"#ferror in function 'Conjugate'.",&tolua_err);
  10442. return 0;
  10443. #endif
  10444. }
  10445. #endif //#ifndef TOLUA_DISABLE
  10446. /* method: EulerAngles of class Quaternion */
  10447. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_EulerAngles00
  10448. static int tolua_Math_Quaternion_EulerAngles00(lua_State* tolua_S)
  10449. {
  10450. #ifndef TOLUA_RELEASE
  10451. tolua_Error tolua_err;
  10452. if (
  10453. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10454. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10455. )
  10456. goto tolua_lerror;
  10457. else
  10458. #endif
  10459. {
  10460. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10461. #ifndef TOLUA_RELEASE
  10462. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'EulerAngles'", NULL);
  10463. #endif
  10464. {
  10465. Vector3 tolua_ret = (Vector3) self->EulerAngles();
  10466. {
  10467. #ifdef __cplusplus
  10468. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  10469. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10470. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10471. #else
  10472. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  10473. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10474. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10475. #endif
  10476. }
  10477. }
  10478. }
  10479. return 1;
  10480. #ifndef TOLUA_RELEASE
  10481. tolua_lerror:
  10482. tolua_error(tolua_S,"#ferror in function 'EulerAngles'.",&tolua_err);
  10483. return 0;
  10484. #endif
  10485. }
  10486. #endif //#ifndef TOLUA_DISABLE
  10487. /* method: YawAngle of class Quaternion */
  10488. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_YawAngle00
  10489. static int tolua_Math_Quaternion_YawAngle00(lua_State* tolua_S)
  10490. {
  10491. #ifndef TOLUA_RELEASE
  10492. tolua_Error tolua_err;
  10493. if (
  10494. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10495. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10496. )
  10497. goto tolua_lerror;
  10498. else
  10499. #endif
  10500. {
  10501. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10502. #ifndef TOLUA_RELEASE
  10503. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'YawAngle'", NULL);
  10504. #endif
  10505. {
  10506. float tolua_ret = (float) self->YawAngle();
  10507. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10508. }
  10509. }
  10510. return 1;
  10511. #ifndef TOLUA_RELEASE
  10512. tolua_lerror:
  10513. tolua_error(tolua_S,"#ferror in function 'YawAngle'.",&tolua_err);
  10514. return 0;
  10515. #endif
  10516. }
  10517. #endif //#ifndef TOLUA_DISABLE
  10518. /* method: PitchAngle of class Quaternion */
  10519. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_PitchAngle00
  10520. static int tolua_Math_Quaternion_PitchAngle00(lua_State* tolua_S)
  10521. {
  10522. #ifndef TOLUA_RELEASE
  10523. tolua_Error tolua_err;
  10524. if (
  10525. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10526. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10527. )
  10528. goto tolua_lerror;
  10529. else
  10530. #endif
  10531. {
  10532. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10533. #ifndef TOLUA_RELEASE
  10534. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'PitchAngle'", NULL);
  10535. #endif
  10536. {
  10537. float tolua_ret = (float) self->PitchAngle();
  10538. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10539. }
  10540. }
  10541. return 1;
  10542. #ifndef TOLUA_RELEASE
  10543. tolua_lerror:
  10544. tolua_error(tolua_S,"#ferror in function 'PitchAngle'.",&tolua_err);
  10545. return 0;
  10546. #endif
  10547. }
  10548. #endif //#ifndef TOLUA_DISABLE
  10549. /* method: RollAngle of class Quaternion */
  10550. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_RollAngle00
  10551. static int tolua_Math_Quaternion_RollAngle00(lua_State* tolua_S)
  10552. {
  10553. #ifndef TOLUA_RELEASE
  10554. tolua_Error tolua_err;
  10555. if (
  10556. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10557. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10558. )
  10559. goto tolua_lerror;
  10560. else
  10561. #endif
  10562. {
  10563. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10564. #ifndef TOLUA_RELEASE
  10565. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RollAngle'", NULL);
  10566. #endif
  10567. {
  10568. float tolua_ret = (float) self->RollAngle();
  10569. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10570. }
  10571. }
  10572. return 1;
  10573. #ifndef TOLUA_RELEASE
  10574. tolua_lerror:
  10575. tolua_error(tolua_S,"#ferror in function 'RollAngle'.",&tolua_err);
  10576. return 0;
  10577. #endif
  10578. }
  10579. #endif //#ifndef TOLUA_DISABLE
  10580. /* method: RotationMatrix of class Quaternion */
  10581. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_RotationMatrix00
  10582. static int tolua_Math_Quaternion_RotationMatrix00(lua_State* tolua_S)
  10583. {
  10584. #ifndef TOLUA_RELEASE
  10585. tolua_Error tolua_err;
  10586. if (
  10587. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10588. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10589. )
  10590. goto tolua_lerror;
  10591. else
  10592. #endif
  10593. {
  10594. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10595. #ifndef TOLUA_RELEASE
  10596. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotationMatrix'", NULL);
  10597. #endif
  10598. {
  10599. Matrix3 tolua_ret = (Matrix3) self->RotationMatrix();
  10600. {
  10601. #ifdef __cplusplus
  10602. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  10603. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  10604. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10605. #else
  10606. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  10607. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  10608. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10609. #endif
  10610. }
  10611. }
  10612. }
  10613. return 1;
  10614. #ifndef TOLUA_RELEASE
  10615. tolua_lerror:
  10616. tolua_error(tolua_S,"#ferror in function 'RotationMatrix'.",&tolua_err);
  10617. return 0;
  10618. #endif
  10619. }
  10620. #endif //#ifndef TOLUA_DISABLE
  10621. /* method: Slerp of class Quaternion */
  10622. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Slerp00
  10623. static int tolua_Math_Quaternion_Slerp00(lua_State* tolua_S)
  10624. {
  10625. #ifndef TOLUA_RELEASE
  10626. tolua_Error tolua_err;
  10627. if (
  10628. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10629. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Quaternion",0,&tolua_err)) ||
  10630. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  10631. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10632. )
  10633. goto tolua_lerror;
  10634. else
  10635. #endif
  10636. {
  10637. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10638. Quaternion rhs = *((Quaternion*) tolua_tousertype(tolua_S,2,0));
  10639. float t = ((float) tolua_tonumber(tolua_S,3,0));
  10640. #ifndef TOLUA_RELEASE
  10641. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Slerp'", NULL);
  10642. #endif
  10643. {
  10644. Quaternion tolua_ret = (Quaternion) self->Slerp(rhs,t);
  10645. {
  10646. #ifdef __cplusplus
  10647. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10648. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10649. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10650. #else
  10651. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10652. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10653. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10654. #endif
  10655. }
  10656. }
  10657. }
  10658. return 1;
  10659. #ifndef TOLUA_RELEASE
  10660. tolua_lerror:
  10661. tolua_error(tolua_S,"#ferror in function 'Slerp'.",&tolua_err);
  10662. return 0;
  10663. #endif
  10664. }
  10665. #endif //#ifndef TOLUA_DISABLE
  10666. /* method: ToString of class Quaternion */
  10667. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_ToString00
  10668. static int tolua_Math_Quaternion_ToString00(lua_State* tolua_S)
  10669. {
  10670. #ifndef TOLUA_RELEASE
  10671. tolua_Error tolua_err;
  10672. if (
  10673. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10674. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10675. )
  10676. goto tolua_lerror;
  10677. else
  10678. #endif
  10679. {
  10680. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10681. #ifndef TOLUA_RELEASE
  10682. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  10683. #endif
  10684. {
  10685. String tolua_ret = (String) self->ToString();
  10686. {
  10687. #ifdef __cplusplus
  10688. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  10689. tolua_pushusertype(tolua_S,tolua_obj,"String");
  10690. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10691. #else
  10692. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  10693. tolua_pushusertype(tolua_S,tolua_obj,"String");
  10694. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10695. #endif
  10696. }
  10697. }
  10698. }
  10699. return 1;
  10700. #ifndef TOLUA_RELEASE
  10701. tolua_lerror:
  10702. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  10703. return 0;
  10704. #endif
  10705. }
  10706. #endif //#ifndef TOLUA_DISABLE
  10707. /* get function: w_ of class Quaternion */
  10708. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_w
  10709. static int tolua_get_Quaternion_w(lua_State* tolua_S)
  10710. {
  10711. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10712. #ifndef TOLUA_RELEASE
  10713. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  10714. #endif
  10715. tolua_pushnumber(tolua_S,(lua_Number)self->w_);
  10716. return 1;
  10717. }
  10718. #endif //#ifndef TOLUA_DISABLE
  10719. /* set function: w_ of class Quaternion */
  10720. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_w
  10721. static int tolua_set_Quaternion_w(lua_State* tolua_S)
  10722. {
  10723. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10724. #ifndef TOLUA_RELEASE
  10725. tolua_Error tolua_err;
  10726. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  10727. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10728. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10729. #endif
  10730. self->w_ = ((float) tolua_tonumber(tolua_S,2,0))
  10731. ;
  10732. return 0;
  10733. }
  10734. #endif //#ifndef TOLUA_DISABLE
  10735. /* get function: x_ of class Quaternion */
  10736. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_x
  10737. static int tolua_get_Quaternion_x(lua_State* tolua_S)
  10738. {
  10739. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10740. #ifndef TOLUA_RELEASE
  10741. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  10742. #endif
  10743. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  10744. return 1;
  10745. }
  10746. #endif //#ifndef TOLUA_DISABLE
  10747. /* set function: x_ of class Quaternion */
  10748. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_x
  10749. static int tolua_set_Quaternion_x(lua_State* tolua_S)
  10750. {
  10751. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10752. #ifndef TOLUA_RELEASE
  10753. tolua_Error tolua_err;
  10754. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  10755. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10756. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10757. #endif
  10758. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  10759. ;
  10760. return 0;
  10761. }
  10762. #endif //#ifndef TOLUA_DISABLE
  10763. /* get function: y_ of class Quaternion */
  10764. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_y
  10765. static int tolua_get_Quaternion_y(lua_State* tolua_S)
  10766. {
  10767. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10768. #ifndef TOLUA_RELEASE
  10769. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  10770. #endif
  10771. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  10772. return 1;
  10773. }
  10774. #endif //#ifndef TOLUA_DISABLE
  10775. /* set function: y_ of class Quaternion */
  10776. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_y
  10777. static int tolua_set_Quaternion_y(lua_State* tolua_S)
  10778. {
  10779. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10780. #ifndef TOLUA_RELEASE
  10781. tolua_Error tolua_err;
  10782. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  10783. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10784. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10785. #endif
  10786. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  10787. ;
  10788. return 0;
  10789. }
  10790. #endif //#ifndef TOLUA_DISABLE
  10791. /* get function: z_ of class Quaternion */
  10792. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_z
  10793. static int tolua_get_Quaternion_z(lua_State* tolua_S)
  10794. {
  10795. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10796. #ifndef TOLUA_RELEASE
  10797. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  10798. #endif
  10799. tolua_pushnumber(tolua_S,(lua_Number)self->z_);
  10800. return 1;
  10801. }
  10802. #endif //#ifndef TOLUA_DISABLE
  10803. /* set function: z_ of class Quaternion */
  10804. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_z
  10805. static int tolua_set_Quaternion_z(lua_State* tolua_S)
  10806. {
  10807. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10808. #ifndef TOLUA_RELEASE
  10809. tolua_Error tolua_err;
  10810. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  10811. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10812. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10813. #endif
  10814. self->z_ = ((float) tolua_tonumber(tolua_S,2,0))
  10815. ;
  10816. return 0;
  10817. }
  10818. #endif //#ifndef TOLUA_DISABLE
  10819. /* get function: IDENTITY of class Quaternion */
  10820. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_IDENTITY
  10821. static int tolua_get_Quaternion_IDENTITY(lua_State* tolua_S)
  10822. {
  10823. tolua_pushusertype(tolua_S,(void*)&Quaternion::IDENTITY,"const Quaternion");
  10824. return 1;
  10825. }
  10826. #endif //#ifndef TOLUA_DISABLE
  10827. /* function: SetRandomSeed */
  10828. #ifndef TOLUA_DISABLE_tolua_Math_SetRandomSeed00
  10829. static int tolua_Math_SetRandomSeed00(lua_State* tolua_S)
  10830. {
  10831. #ifndef TOLUA_RELEASE
  10832. tolua_Error tolua_err;
  10833. if (
  10834. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  10835. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10836. )
  10837. goto tolua_lerror;
  10838. else
  10839. #endif
  10840. {
  10841. unsigned seed = ((unsigned) tolua_tonumber(tolua_S,1,0));
  10842. {
  10843. SetRandomSeed(seed);
  10844. }
  10845. }
  10846. return 0;
  10847. #ifndef TOLUA_RELEASE
  10848. tolua_lerror:
  10849. tolua_error(tolua_S,"#ferror in function 'SetRandomSeed'.",&tolua_err);
  10850. return 0;
  10851. #endif
  10852. }
  10853. #endif //#ifndef TOLUA_DISABLE
  10854. /* function: GetRandomSeed */
  10855. #ifndef TOLUA_DISABLE_tolua_Math_GetRandomSeed00
  10856. static int tolua_Math_GetRandomSeed00(lua_State* tolua_S)
  10857. {
  10858. #ifndef TOLUA_RELEASE
  10859. tolua_Error tolua_err;
  10860. if (
  10861. !tolua_isnoobj(tolua_S,1,&tolua_err)
  10862. )
  10863. goto tolua_lerror;
  10864. else
  10865. #endif
  10866. {
  10867. {
  10868. unsigned tolua_ret = (unsigned) GetRandomSeed();
  10869. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10870. }
  10871. }
  10872. return 1;
  10873. #ifndef TOLUA_RELEASE
  10874. tolua_lerror:
  10875. tolua_error(tolua_S,"#ferror in function 'GetRandomSeed'.",&tolua_err);
  10876. return 0;
  10877. #endif
  10878. }
  10879. #endif //#ifndef TOLUA_DISABLE
  10880. /* function: Rand */
  10881. #ifndef TOLUA_DISABLE_tolua_Math_Rand00
  10882. static int tolua_Math_Rand00(lua_State* tolua_S)
  10883. {
  10884. #ifndef TOLUA_RELEASE
  10885. tolua_Error tolua_err;
  10886. if (
  10887. !tolua_isnoobj(tolua_S,1,&tolua_err)
  10888. )
  10889. goto tolua_lerror;
  10890. else
  10891. #endif
  10892. {
  10893. {
  10894. int tolua_ret = (int) Rand();
  10895. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10896. }
  10897. }
  10898. return 1;
  10899. #ifndef TOLUA_RELEASE
  10900. tolua_lerror:
  10901. tolua_error(tolua_S,"#ferror in function 'Rand'.",&tolua_err);
  10902. return 0;
  10903. #endif
  10904. }
  10905. #endif //#ifndef TOLUA_DISABLE
  10906. /* method: new of class Ray */
  10907. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new00
  10908. static int tolua_Math_Ray_new00(lua_State* tolua_S)
  10909. {
  10910. #ifndef TOLUA_RELEASE
  10911. tolua_Error tolua_err;
  10912. if (
  10913. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10914. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10915. )
  10916. goto tolua_lerror;
  10917. else
  10918. #endif
  10919. {
  10920. {
  10921. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)());
  10922. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10923. }
  10924. }
  10925. return 1;
  10926. #ifndef TOLUA_RELEASE
  10927. tolua_lerror:
  10928. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  10929. return 0;
  10930. #endif
  10931. }
  10932. #endif //#ifndef TOLUA_DISABLE
  10933. /* method: new_local of class Ray */
  10934. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new00_local
  10935. static int tolua_Math_Ray_new00_local(lua_State* tolua_S)
  10936. {
  10937. #ifndef TOLUA_RELEASE
  10938. tolua_Error tolua_err;
  10939. if (
  10940. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10941. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10942. )
  10943. goto tolua_lerror;
  10944. else
  10945. #endif
  10946. {
  10947. {
  10948. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)());
  10949. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10950. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10951. }
  10952. }
  10953. return 1;
  10954. #ifndef TOLUA_RELEASE
  10955. tolua_lerror:
  10956. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  10957. return 0;
  10958. #endif
  10959. }
  10960. #endif //#ifndef TOLUA_DISABLE
  10961. /* method: new of class Ray */
  10962. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new01
  10963. static int tolua_Math_Ray_new01(lua_State* tolua_S)
  10964. {
  10965. tolua_Error tolua_err;
  10966. if (
  10967. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10968. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10969. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10970. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10971. )
  10972. goto tolua_lerror;
  10973. else
  10974. {
  10975. const Vector3* origin = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10976. const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10977. {
  10978. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*origin,*direction));
  10979. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10980. }
  10981. }
  10982. return 1;
  10983. tolua_lerror:
  10984. return tolua_Math_Ray_new00(tolua_S);
  10985. }
  10986. #endif //#ifndef TOLUA_DISABLE
  10987. /* method: new_local of class Ray */
  10988. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new01_local
  10989. static int tolua_Math_Ray_new01_local(lua_State* tolua_S)
  10990. {
  10991. tolua_Error tolua_err;
  10992. if (
  10993. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10994. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10995. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10996. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10997. )
  10998. goto tolua_lerror;
  10999. else
  11000. {
  11001. const Vector3* origin = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  11002. const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  11003. {
  11004. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*origin,*direction));
  11005. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  11006. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11007. }
  11008. }
  11009. return 1;
  11010. tolua_lerror:
  11011. return tolua_Math_Ray_new00_local(tolua_S);
  11012. }
  11013. #endif //#ifndef TOLUA_DISABLE
  11014. /* method: new of class Ray */
  11015. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new02
  11016. static int tolua_Math_Ray_new02(lua_State* tolua_S)
  11017. {
  11018. tolua_Error tolua_err;
  11019. if (
  11020. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  11021. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  11022. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11023. )
  11024. goto tolua_lerror;
  11025. else
  11026. {
  11027. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  11028. {
  11029. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*ray));
  11030. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  11031. }
  11032. }
  11033. return 1;
  11034. tolua_lerror:
  11035. return tolua_Math_Ray_new01(tolua_S);
  11036. }
  11037. #endif //#ifndef TOLUA_DISABLE
  11038. /* method: new_local of class Ray */
  11039. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new02_local
  11040. static int tolua_Math_Ray_new02_local(lua_State* tolua_S)
  11041. {
  11042. tolua_Error tolua_err;
  11043. if (
  11044. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  11045. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  11046. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11047. )
  11048. goto tolua_lerror;
  11049. else
  11050. {
  11051. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  11052. {
  11053. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*ray));
  11054. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  11055. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11056. }
  11057. }
  11058. return 1;
  11059. tolua_lerror:
  11060. return tolua_Math_Ray_new01_local(tolua_S);
  11061. }
  11062. #endif //#ifndef TOLUA_DISABLE
  11063. /* method: operator== of class Ray */
  11064. #ifndef TOLUA_DISABLE_tolua_Math_Ray__eq00
  11065. static int tolua_Math_Ray__eq00(lua_State* tolua_S)
  11066. {
  11067. #ifndef TOLUA_RELEASE
  11068. tolua_Error tolua_err;
  11069. if (
  11070. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11071. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  11072. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11073. )
  11074. goto tolua_lerror;
  11075. else
  11076. #endif
  11077. {
  11078. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11079. const Ray* rhs = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  11080. #ifndef TOLUA_RELEASE
  11081. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  11082. #endif
  11083. {
  11084. bool tolua_ret = (bool) self->operator==(*rhs);
  11085. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11086. }
  11087. }
  11088. return 1;
  11089. #ifndef TOLUA_RELEASE
  11090. tolua_lerror:
  11091. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  11092. return 0;
  11093. #endif
  11094. }
  11095. #endif //#ifndef TOLUA_DISABLE
  11096. /* method: Define of class Ray */
  11097. #ifndef TOLUA_DISABLE_tolua_Math_Ray_Define00
  11098. static int tolua_Math_Ray_Define00(lua_State* tolua_S)
  11099. {
  11100. #ifndef TOLUA_RELEASE
  11101. tolua_Error tolua_err;
  11102. if (
  11103. !tolua_isusertype(tolua_S,1,"Ray",0,&tolua_err) ||
  11104. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  11105. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  11106. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11107. )
  11108. goto tolua_lerror;
  11109. else
  11110. #endif
  11111. {
  11112. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11113. const Vector3* origin = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  11114. const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  11115. #ifndef TOLUA_RELEASE
  11116. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11117. #endif
  11118. {
  11119. self->Define(*origin,*direction);
  11120. }
  11121. }
  11122. return 0;
  11123. #ifndef TOLUA_RELEASE
  11124. tolua_lerror:
  11125. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  11126. return 0;
  11127. #endif
  11128. }
  11129. #endif //#ifndef TOLUA_DISABLE
  11130. /* method: Project of class Ray */
  11131. #ifndef TOLUA_DISABLE_tolua_Math_Ray_Project00
  11132. static int tolua_Math_Ray_Project00(lua_State* tolua_S)
  11133. {
  11134. #ifndef TOLUA_RELEASE
  11135. tolua_Error tolua_err;
  11136. if (
  11137. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11138. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  11139. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11140. )
  11141. goto tolua_lerror;
  11142. else
  11143. #endif
  11144. {
  11145. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11146. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  11147. #ifndef TOLUA_RELEASE
  11148. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Project'", NULL);
  11149. #endif
  11150. {
  11151. Vector3 tolua_ret = (Vector3) self->Project(*point);
  11152. {
  11153. #ifdef __cplusplus
  11154. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  11155. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  11156. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11157. #else
  11158. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  11159. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  11160. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11161. #endif
  11162. }
  11163. }
  11164. }
  11165. return 1;
  11166. #ifndef TOLUA_RELEASE
  11167. tolua_lerror:
  11168. tolua_error(tolua_S,"#ferror in function 'Project'.",&tolua_err);
  11169. return 0;
  11170. #endif
  11171. }
  11172. #endif //#ifndef TOLUA_DISABLE
  11173. /* method: Distance of class Ray */
  11174. #ifndef TOLUA_DISABLE_tolua_Math_Ray_Distance00
  11175. static int tolua_Math_Ray_Distance00(lua_State* tolua_S)
  11176. {
  11177. #ifndef TOLUA_RELEASE
  11178. tolua_Error tolua_err;
  11179. if (
  11180. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11181. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  11182. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11183. )
  11184. goto tolua_lerror;
  11185. else
  11186. #endif
  11187. {
  11188. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11189. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  11190. #ifndef TOLUA_RELEASE
  11191. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  11192. #endif
  11193. {
  11194. float tolua_ret = (float) self->Distance(*point);
  11195. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11196. }
  11197. }
  11198. return 1;
  11199. #ifndef TOLUA_RELEASE
  11200. tolua_lerror:
  11201. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  11202. return 0;
  11203. #endif
  11204. }
  11205. #endif //#ifndef TOLUA_DISABLE
  11206. /* method: ClosestPoint of class Ray */
  11207. #ifndef TOLUA_DISABLE_tolua_Math_Ray_ClosestPoint00
  11208. static int tolua_Math_Ray_ClosestPoint00(lua_State* tolua_S)
  11209. {
  11210. #ifndef TOLUA_RELEASE
  11211. tolua_Error tolua_err;
  11212. if (
  11213. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11214. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  11215. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11216. )
  11217. goto tolua_lerror;
  11218. else
  11219. #endif
  11220. {
  11221. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11222. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  11223. #ifndef TOLUA_RELEASE
  11224. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ClosestPoint'", NULL);
  11225. #endif
  11226. {
  11227. Vector3 tolua_ret = (Vector3) self->ClosestPoint(*ray);
  11228. {
  11229. #ifdef __cplusplus
  11230. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  11231. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  11232. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11233. #else
  11234. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  11235. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  11236. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11237. #endif
  11238. }
  11239. }
  11240. }
  11241. return 1;
  11242. #ifndef TOLUA_RELEASE
  11243. tolua_lerror:
  11244. tolua_error(tolua_S,"#ferror in function 'ClosestPoint'.",&tolua_err);
  11245. return 0;
  11246. #endif
  11247. }
  11248. #endif //#ifndef TOLUA_DISABLE
  11249. /* method: HitDistance of class Ray */
  11250. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance00
  11251. static int tolua_Math_Ray_HitDistance00(lua_State* tolua_S)
  11252. {
  11253. #ifndef TOLUA_RELEASE
  11254. tolua_Error tolua_err;
  11255. if (
  11256. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11257. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  11258. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11259. )
  11260. goto tolua_lerror;
  11261. else
  11262. #endif
  11263. {
  11264. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11265. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  11266. #ifndef TOLUA_RELEASE
  11267. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11268. #endif
  11269. {
  11270. float tolua_ret = (float) self->HitDistance(*plane);
  11271. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11272. }
  11273. }
  11274. return 1;
  11275. #ifndef TOLUA_RELEASE
  11276. tolua_lerror:
  11277. tolua_error(tolua_S,"#ferror in function 'HitDistance'.",&tolua_err);
  11278. return 0;
  11279. #endif
  11280. }
  11281. #endif //#ifndef TOLUA_DISABLE
  11282. /* method: HitDistance of class Ray */
  11283. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance01
  11284. static int tolua_Math_Ray_HitDistance01(lua_State* tolua_S)
  11285. {
  11286. tolua_Error tolua_err;
  11287. if (
  11288. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11289. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  11290. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11291. )
  11292. goto tolua_lerror;
  11293. else
  11294. {
  11295. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11296. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  11297. #ifndef TOLUA_RELEASE
  11298. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11299. #endif
  11300. {
  11301. float tolua_ret = (float) self->HitDistance(*box);
  11302. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11303. }
  11304. }
  11305. return 1;
  11306. tolua_lerror:
  11307. return tolua_Math_Ray_HitDistance00(tolua_S);
  11308. }
  11309. #endif //#ifndef TOLUA_DISABLE
  11310. /* method: HitDistance of class Ray */
  11311. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance02
  11312. static int tolua_Math_Ray_HitDistance02(lua_State* tolua_S)
  11313. {
  11314. tolua_Error tolua_err;
  11315. if (
  11316. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11317. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  11318. !tolua_isboolean(tolua_S,3,1,&tolua_err) ||
  11319. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11320. )
  11321. goto tolua_lerror;
  11322. else
  11323. {
  11324. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11325. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  11326. bool solidInside = ((bool) tolua_toboolean(tolua_S,3,true));
  11327. #ifndef TOLUA_RELEASE
  11328. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11329. #endif
  11330. {
  11331. float tolua_ret = (float) self->HitDistance(*frustum,solidInside);
  11332. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11333. }
  11334. }
  11335. return 1;
  11336. tolua_lerror:
  11337. return tolua_Math_Ray_HitDistance01(tolua_S);
  11338. }
  11339. #endif //#ifndef TOLUA_DISABLE
  11340. /* method: HitDistance of class Ray */
  11341. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance03
  11342. static int tolua_Math_Ray_HitDistance03(lua_State* tolua_S)
  11343. {
  11344. tolua_Error tolua_err;
  11345. if (
  11346. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11347. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  11348. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11349. )
  11350. goto tolua_lerror;
  11351. else
  11352. {
  11353. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11354. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  11355. #ifndef TOLUA_RELEASE
  11356. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11357. #endif
  11358. {
  11359. float tolua_ret = (float) self->HitDistance(*sphere);
  11360. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11361. }
  11362. }
  11363. return 1;
  11364. tolua_lerror:
  11365. return tolua_Math_Ray_HitDistance02(tolua_S);
  11366. }
  11367. #endif //#ifndef TOLUA_DISABLE
  11368. /* method: HitDistance of class Ray */
  11369. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance04
  11370. static int tolua_Math_Ray_HitDistance04(lua_State* tolua_S)
  11371. {
  11372. tolua_Error tolua_err;
  11373. if (
  11374. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11375. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  11376. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  11377. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  11378. !tolua_isnoobj(tolua_S,5,&tolua_err)
  11379. )
  11380. goto tolua_lerror;
  11381. else
  11382. {
  11383. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11384. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  11385. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  11386. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  11387. #ifndef TOLUA_RELEASE
  11388. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11389. #endif
  11390. {
  11391. float tolua_ret = (float) self->HitDistance(*v0,*v1,*v2);
  11392. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11393. }
  11394. }
  11395. return 1;
  11396. tolua_lerror:
  11397. return tolua_Math_Ray_HitDistance03(tolua_S);
  11398. }
  11399. #endif //#ifndef TOLUA_DISABLE
  11400. /* method: HitDistance of class Ray */
  11401. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance05
  11402. static int tolua_Math_Ray_HitDistance05(lua_State* tolua_S)
  11403. {
  11404. tolua_Error tolua_err;
  11405. if (
  11406. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11407. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11408. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11409. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11410. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11411. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11412. )
  11413. goto tolua_lerror;
  11414. else
  11415. {
  11416. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11417. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11418. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11419. unsigned vertexStart = ((unsigned) tolua_tonumber(tolua_S,4,0));
  11420. unsigned vertexCount = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11421. #ifndef TOLUA_RELEASE
  11422. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11423. #endif
  11424. {
  11425. float tolua_ret = (float) self->HitDistance(vertexData,vertexSize,vertexStart,vertexCount);
  11426. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11427. }
  11428. }
  11429. return 1;
  11430. tolua_lerror:
  11431. return tolua_Math_Ray_HitDistance04(tolua_S);
  11432. }
  11433. #endif //#ifndef TOLUA_DISABLE
  11434. /* method: HitDistance of class Ray */
  11435. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance06
  11436. static int tolua_Math_Ray_HitDistance06(lua_State* tolua_S)
  11437. {
  11438. tolua_Error tolua_err;
  11439. if (
  11440. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11441. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11442. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11443. !tolua_isuserdata(tolua_S,4,0,&tolua_err) ||
  11444. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11445. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  11446. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  11447. !tolua_isnoobj(tolua_S,8,&tolua_err)
  11448. )
  11449. goto tolua_lerror;
  11450. else
  11451. {
  11452. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11453. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11454. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11455. const void* indexData = ((const void*) tolua_touserdata(tolua_S,4,0));
  11456. unsigned indexSize = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11457. unsigned indexStart = ((unsigned) tolua_tonumber(tolua_S,6,0));
  11458. unsigned indexCount = ((unsigned) tolua_tonumber(tolua_S,7,0));
  11459. #ifndef TOLUA_RELEASE
  11460. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11461. #endif
  11462. {
  11463. float tolua_ret = (float) self->HitDistance(vertexData,vertexSize,indexData,indexSize,indexStart,indexCount);
  11464. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11465. }
  11466. }
  11467. return 1;
  11468. tolua_lerror:
  11469. return tolua_Math_Ray_HitDistance05(tolua_S);
  11470. }
  11471. #endif //#ifndef TOLUA_DISABLE
  11472. /* method: InsideGeometry of class Ray */
  11473. #ifndef TOLUA_DISABLE_tolua_Math_Ray_InsideGeometry00
  11474. static int tolua_Math_Ray_InsideGeometry00(lua_State* tolua_S)
  11475. {
  11476. #ifndef TOLUA_RELEASE
  11477. tolua_Error tolua_err;
  11478. if (
  11479. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11480. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11481. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11482. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11483. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11484. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11485. )
  11486. goto tolua_lerror;
  11487. else
  11488. #endif
  11489. {
  11490. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11491. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11492. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11493. unsigned vertexStart = ((unsigned) tolua_tonumber(tolua_S,4,0));
  11494. unsigned vertexCount = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11495. #ifndef TOLUA_RELEASE
  11496. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'InsideGeometry'", NULL);
  11497. #endif
  11498. {
  11499. bool tolua_ret = (bool) self->InsideGeometry(vertexData,vertexSize,vertexStart,vertexCount);
  11500. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11501. }
  11502. }
  11503. return 1;
  11504. #ifndef TOLUA_RELEASE
  11505. tolua_lerror:
  11506. tolua_error(tolua_S,"#ferror in function 'InsideGeometry'.",&tolua_err);
  11507. return 0;
  11508. #endif
  11509. }
  11510. #endif //#ifndef TOLUA_DISABLE
  11511. /* method: InsideGeometry of class Ray */
  11512. #ifndef TOLUA_DISABLE_tolua_Math_Ray_InsideGeometry01
  11513. static int tolua_Math_Ray_InsideGeometry01(lua_State* tolua_S)
  11514. {
  11515. tolua_Error tolua_err;
  11516. if (
  11517. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11518. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11519. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11520. !tolua_isuserdata(tolua_S,4,0,&tolua_err) ||
  11521. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11522. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  11523. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  11524. !tolua_isnoobj(tolua_S,8,&tolua_err)
  11525. )
  11526. goto tolua_lerror;
  11527. else
  11528. {
  11529. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11530. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11531. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11532. const void* indexData = ((const void*) tolua_touserdata(tolua_S,4,0));
  11533. unsigned indexSize = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11534. unsigned indexStart = ((unsigned) tolua_tonumber(tolua_S,6,0));
  11535. unsigned indexCount = ((unsigned) tolua_tonumber(tolua_S,7,0));
  11536. #ifndef TOLUA_RELEASE
  11537. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'InsideGeometry'", NULL);
  11538. #endif
  11539. {
  11540. bool tolua_ret = (bool) self->InsideGeometry(vertexData,vertexSize,indexData,indexSize,indexStart,indexCount);
  11541. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11542. }
  11543. }
  11544. return 1;
  11545. tolua_lerror:
  11546. return tolua_Math_Ray_InsideGeometry00(tolua_S);
  11547. }
  11548. #endif //#ifndef TOLUA_DISABLE
  11549. /* get function: origin_ of class Ray */
  11550. #ifndef TOLUA_DISABLE_tolua_get_Ray_origin
  11551. static int tolua_get_Ray_origin(lua_State* tolua_S)
  11552. {
  11553. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11554. #ifndef TOLUA_RELEASE
  11555. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'origin_'",NULL);
  11556. #endif
  11557. tolua_pushusertype(tolua_S,(void*)&self->origin_,"Vector3");
  11558. return 1;
  11559. }
  11560. #endif //#ifndef TOLUA_DISABLE
  11561. /* set function: origin_ of class Ray */
  11562. #ifndef TOLUA_DISABLE_tolua_set_Ray_origin
  11563. static int tolua_set_Ray_origin(lua_State* tolua_S)
  11564. {
  11565. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11566. #ifndef TOLUA_RELEASE
  11567. tolua_Error tolua_err;
  11568. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'origin_'",NULL);
  11569. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  11570. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  11571. #endif
  11572. self->origin_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  11573. ;
  11574. return 0;
  11575. }
  11576. #endif //#ifndef TOLUA_DISABLE
  11577. /* get function: direction_ of class Ray */
  11578. #ifndef TOLUA_DISABLE_tolua_get_Ray_direction
  11579. static int tolua_get_Ray_direction(lua_State* tolua_S)
  11580. {
  11581. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11582. #ifndef TOLUA_RELEASE
  11583. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'direction_'",NULL);
  11584. #endif
  11585. tolua_pushusertype(tolua_S,(void*)&self->direction_,"Vector3");
  11586. return 1;
  11587. }
  11588. #endif //#ifndef TOLUA_DISABLE
  11589. /* set function: direction_ of class Ray */
  11590. #ifndef TOLUA_DISABLE_tolua_set_Ray_direction
  11591. static int tolua_set_Ray_direction(lua_State* tolua_S)
  11592. {
  11593. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11594. #ifndef TOLUA_RELEASE
  11595. tolua_Error tolua_err;
  11596. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'direction_'",NULL);
  11597. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  11598. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  11599. #endif
  11600. self->direction_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  11601. ;
  11602. return 0;
  11603. }
  11604. #endif //#ifndef TOLUA_DISABLE
  11605. /* method: new of class Rect */
  11606. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new00
  11607. static int tolua_Math_Rect_new00(lua_State* tolua_S)
  11608. {
  11609. #ifndef TOLUA_RELEASE
  11610. tolua_Error tolua_err;
  11611. if (
  11612. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11613. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11614. )
  11615. goto tolua_lerror;
  11616. else
  11617. #endif
  11618. {
  11619. {
  11620. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)());
  11621. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11622. }
  11623. }
  11624. return 1;
  11625. #ifndef TOLUA_RELEASE
  11626. tolua_lerror:
  11627. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  11628. return 0;
  11629. #endif
  11630. }
  11631. #endif //#ifndef TOLUA_DISABLE
  11632. /* method: new_local of class Rect */
  11633. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new00_local
  11634. static int tolua_Math_Rect_new00_local(lua_State* tolua_S)
  11635. {
  11636. #ifndef TOLUA_RELEASE
  11637. tolua_Error tolua_err;
  11638. if (
  11639. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11640. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11641. )
  11642. goto tolua_lerror;
  11643. else
  11644. #endif
  11645. {
  11646. {
  11647. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)());
  11648. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11649. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11650. }
  11651. }
  11652. return 1;
  11653. #ifndef TOLUA_RELEASE
  11654. tolua_lerror:
  11655. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  11656. return 0;
  11657. #endif
  11658. }
  11659. #endif //#ifndef TOLUA_DISABLE
  11660. /* method: new of class Rect */
  11661. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new01
  11662. static int tolua_Math_Rect_new01(lua_State* tolua_S)
  11663. {
  11664. tolua_Error tolua_err;
  11665. if (
  11666. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11667. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11668. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11669. )
  11670. goto tolua_lerror;
  11671. else
  11672. {
  11673. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11674. {
  11675. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*rect));
  11676. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11677. }
  11678. }
  11679. return 1;
  11680. tolua_lerror:
  11681. return tolua_Math_Rect_new00(tolua_S);
  11682. }
  11683. #endif //#ifndef TOLUA_DISABLE
  11684. /* method: new_local of class Rect */
  11685. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new01_local
  11686. static int tolua_Math_Rect_new01_local(lua_State* tolua_S)
  11687. {
  11688. tolua_Error tolua_err;
  11689. if (
  11690. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11691. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11692. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11693. )
  11694. goto tolua_lerror;
  11695. else
  11696. {
  11697. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11698. {
  11699. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*rect));
  11700. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11701. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11702. }
  11703. }
  11704. return 1;
  11705. tolua_lerror:
  11706. return tolua_Math_Rect_new00_local(tolua_S);
  11707. }
  11708. #endif //#ifndef TOLUA_DISABLE
  11709. /* method: new of class Rect */
  11710. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new02
  11711. static int tolua_Math_Rect_new02(lua_State* tolua_S)
  11712. {
  11713. tolua_Error tolua_err;
  11714. if (
  11715. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11716. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11717. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector2",0,&tolua_err)) ||
  11718. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11719. )
  11720. goto tolua_lerror;
  11721. else
  11722. {
  11723. const Vector2* min = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11724. const Vector2* max = ((const Vector2*) tolua_tousertype(tolua_S,3,0));
  11725. {
  11726. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*min,*max));
  11727. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11728. }
  11729. }
  11730. return 1;
  11731. tolua_lerror:
  11732. return tolua_Math_Rect_new01(tolua_S);
  11733. }
  11734. #endif //#ifndef TOLUA_DISABLE
  11735. /* method: new_local of class Rect */
  11736. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new02_local
  11737. static int tolua_Math_Rect_new02_local(lua_State* tolua_S)
  11738. {
  11739. tolua_Error tolua_err;
  11740. if (
  11741. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11742. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11743. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector2",0,&tolua_err)) ||
  11744. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11745. )
  11746. goto tolua_lerror;
  11747. else
  11748. {
  11749. const Vector2* min = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11750. const Vector2* max = ((const Vector2*) tolua_tousertype(tolua_S,3,0));
  11751. {
  11752. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*min,*max));
  11753. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11754. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11755. }
  11756. }
  11757. return 1;
  11758. tolua_lerror:
  11759. return tolua_Math_Rect_new01_local(tolua_S);
  11760. }
  11761. #endif //#ifndef TOLUA_DISABLE
  11762. /* method: new of class Rect */
  11763. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new03
  11764. static int tolua_Math_Rect_new03(lua_State* tolua_S)
  11765. {
  11766. tolua_Error tolua_err;
  11767. if (
  11768. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11769. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  11770. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11771. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11772. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11773. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11774. )
  11775. goto tolua_lerror;
  11776. else
  11777. {
  11778. float left = ((float) tolua_tonumber(tolua_S,2,0));
  11779. float top = ((float) tolua_tonumber(tolua_S,3,0));
  11780. float right = ((float) tolua_tonumber(tolua_S,4,0));
  11781. float bottom = ((float) tolua_tonumber(tolua_S,5,0));
  11782. {
  11783. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(left,top,right,bottom));
  11784. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11785. }
  11786. }
  11787. return 1;
  11788. tolua_lerror:
  11789. return tolua_Math_Rect_new02(tolua_S);
  11790. }
  11791. #endif //#ifndef TOLUA_DISABLE
  11792. /* method: new_local of class Rect */
  11793. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new03_local
  11794. static int tolua_Math_Rect_new03_local(lua_State* tolua_S)
  11795. {
  11796. tolua_Error tolua_err;
  11797. if (
  11798. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11799. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  11800. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11801. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11802. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11803. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11804. )
  11805. goto tolua_lerror;
  11806. else
  11807. {
  11808. float left = ((float) tolua_tonumber(tolua_S,2,0));
  11809. float top = ((float) tolua_tonumber(tolua_S,3,0));
  11810. float right = ((float) tolua_tonumber(tolua_S,4,0));
  11811. float bottom = ((float) tolua_tonumber(tolua_S,5,0));
  11812. {
  11813. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(left,top,right,bottom));
  11814. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11815. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11816. }
  11817. }
  11818. return 1;
  11819. tolua_lerror:
  11820. return tolua_Math_Rect_new02_local(tolua_S);
  11821. }
  11822. #endif //#ifndef TOLUA_DISABLE
  11823. /* method: new of class Rect */
  11824. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new04
  11825. static int tolua_Math_Rect_new04(lua_State* tolua_S)
  11826. {
  11827. tolua_Error tolua_err;
  11828. if (
  11829. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11830. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  11831. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11832. )
  11833. goto tolua_lerror;
  11834. else
  11835. {
  11836. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  11837. {
  11838. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*vector));
  11839. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11840. }
  11841. }
  11842. return 1;
  11843. tolua_lerror:
  11844. return tolua_Math_Rect_new03(tolua_S);
  11845. }
  11846. #endif //#ifndef TOLUA_DISABLE
  11847. /* method: new_local of class Rect */
  11848. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new04_local
  11849. static int tolua_Math_Rect_new04_local(lua_State* tolua_S)
  11850. {
  11851. tolua_Error tolua_err;
  11852. if (
  11853. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11854. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  11855. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11856. )
  11857. goto tolua_lerror;
  11858. else
  11859. {
  11860. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  11861. {
  11862. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*vector));
  11863. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11864. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11865. }
  11866. }
  11867. return 1;
  11868. tolua_lerror:
  11869. return tolua_Math_Rect_new03_local(tolua_S);
  11870. }
  11871. #endif //#ifndef TOLUA_DISABLE
  11872. /* method: operator== of class Rect */
  11873. #ifndef TOLUA_DISABLE_tolua_Math_Rect__eq00
  11874. static int tolua_Math_Rect__eq00(lua_State* tolua_S)
  11875. {
  11876. #ifndef TOLUA_RELEASE
  11877. tolua_Error tolua_err;
  11878. if (
  11879. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  11880. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11881. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11882. )
  11883. goto tolua_lerror;
  11884. else
  11885. #endif
  11886. {
  11887. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  11888. const Rect* rhs = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11889. #ifndef TOLUA_RELEASE
  11890. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  11891. #endif
  11892. {
  11893. bool tolua_ret = (bool) self->operator==(*rhs);
  11894. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11895. }
  11896. }
  11897. return 1;
  11898. #ifndef TOLUA_RELEASE
  11899. tolua_lerror:
  11900. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  11901. return 0;
  11902. #endif
  11903. }
  11904. #endif //#ifndef TOLUA_DISABLE
  11905. /* method: Define of class Rect */
  11906. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Define00
  11907. static int tolua_Math_Rect_Define00(lua_State* tolua_S)
  11908. {
  11909. #ifndef TOLUA_RELEASE
  11910. tolua_Error tolua_err;
  11911. if (
  11912. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11913. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11914. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11915. )
  11916. goto tolua_lerror;
  11917. else
  11918. #endif
  11919. {
  11920. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11921. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11922. #ifndef TOLUA_RELEASE
  11923. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11924. #endif
  11925. {
  11926. self->Define(*rect);
  11927. }
  11928. }
  11929. return 0;
  11930. #ifndef TOLUA_RELEASE
  11931. tolua_lerror:
  11932. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  11933. return 0;
  11934. #endif
  11935. }
  11936. #endif //#ifndef TOLUA_DISABLE
  11937. /* method: Define of class Rect */
  11938. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Define01
  11939. static int tolua_Math_Rect_Define01(lua_State* tolua_S)
  11940. {
  11941. tolua_Error tolua_err;
  11942. if (
  11943. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11944. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11945. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector2",0,&tolua_err)) ||
  11946. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11947. )
  11948. goto tolua_lerror;
  11949. else
  11950. {
  11951. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11952. const Vector2* min = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11953. const Vector2* max = ((const Vector2*) tolua_tousertype(tolua_S,3,0));
  11954. #ifndef TOLUA_RELEASE
  11955. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11956. #endif
  11957. {
  11958. self->Define(*min,*max);
  11959. }
  11960. }
  11961. return 0;
  11962. tolua_lerror:
  11963. return tolua_Math_Rect_Define00(tolua_S);
  11964. }
  11965. #endif //#ifndef TOLUA_DISABLE
  11966. /* method: Define of class Rect */
  11967. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Define02
  11968. static int tolua_Math_Rect_Define02(lua_State* tolua_S)
  11969. {
  11970. tolua_Error tolua_err;
  11971. if (
  11972. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11973. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11974. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11975. )
  11976. goto tolua_lerror;
  11977. else
  11978. {
  11979. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11980. const Vector2* point = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11981. #ifndef TOLUA_RELEASE
  11982. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11983. #endif
  11984. {
  11985. self->Define(*point);
  11986. }
  11987. }
  11988. return 0;
  11989. tolua_lerror:
  11990. return tolua_Math_Rect_Define01(tolua_S);
  11991. }
  11992. #endif //#ifndef TOLUA_DISABLE
  11993. /* method: Merge of class Rect */
  11994. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Merge00
  11995. static int tolua_Math_Rect_Merge00(lua_State* tolua_S)
  11996. {
  11997. #ifndef TOLUA_RELEASE
  11998. tolua_Error tolua_err;
  11999. if (
  12000. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  12001. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  12002. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12003. )
  12004. goto tolua_lerror;
  12005. else
  12006. #endif
  12007. {
  12008. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12009. const Vector2* point = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  12010. #ifndef TOLUA_RELEASE
  12011. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  12012. #endif
  12013. {
  12014. self->Merge(*point);
  12015. }
  12016. }
  12017. return 0;
  12018. #ifndef TOLUA_RELEASE
  12019. tolua_lerror:
  12020. tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err);
  12021. return 0;
  12022. #endif
  12023. }
  12024. #endif //#ifndef TOLUA_DISABLE
  12025. /* method: Merge of class Rect */
  12026. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Merge01
  12027. static int tolua_Math_Rect_Merge01(lua_State* tolua_S)
  12028. {
  12029. tolua_Error tolua_err;
  12030. if (
  12031. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  12032. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  12033. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12034. )
  12035. goto tolua_lerror;
  12036. else
  12037. {
  12038. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12039. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  12040. #ifndef TOLUA_RELEASE
  12041. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  12042. #endif
  12043. {
  12044. self->Merge(*rect);
  12045. }
  12046. }
  12047. return 0;
  12048. tolua_lerror:
  12049. return tolua_Math_Rect_Merge00(tolua_S);
  12050. }
  12051. #endif //#ifndef TOLUA_DISABLE
  12052. /* method: Clear of class Rect */
  12053. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Clear00
  12054. static int tolua_Math_Rect_Clear00(lua_State* tolua_S)
  12055. {
  12056. #ifndef TOLUA_RELEASE
  12057. tolua_Error tolua_err;
  12058. if (
  12059. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  12060. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12061. )
  12062. goto tolua_lerror;
  12063. else
  12064. #endif
  12065. {
  12066. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12067. #ifndef TOLUA_RELEASE
  12068. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  12069. #endif
  12070. {
  12071. self->Clear();
  12072. }
  12073. }
  12074. return 0;
  12075. #ifndef TOLUA_RELEASE
  12076. tolua_lerror:
  12077. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  12078. return 0;
  12079. #endif
  12080. }
  12081. #endif //#ifndef TOLUA_DISABLE
  12082. /* method: Clip of class Rect */
  12083. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Clip00
  12084. static int tolua_Math_Rect_Clip00(lua_State* tolua_S)
  12085. {
  12086. #ifndef TOLUA_RELEASE
  12087. tolua_Error tolua_err;
  12088. if (
  12089. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  12090. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  12091. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12092. )
  12093. goto tolua_lerror;
  12094. else
  12095. #endif
  12096. {
  12097. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12098. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  12099. #ifndef TOLUA_RELEASE
  12100. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  12101. #endif
  12102. {
  12103. self->Clip(*rect);
  12104. }
  12105. }
  12106. return 0;
  12107. #ifndef TOLUA_RELEASE
  12108. tolua_lerror:
  12109. tolua_error(tolua_S,"#ferror in function 'Clip'.",&tolua_err);
  12110. return 0;
  12111. #endif
  12112. }
  12113. #endif //#ifndef TOLUA_DISABLE
  12114. /* method: Center of class Rect */
  12115. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Center00
  12116. static int tolua_Math_Rect_Center00(lua_State* tolua_S)
  12117. {
  12118. #ifndef TOLUA_RELEASE
  12119. tolua_Error tolua_err;
  12120. if (
  12121. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12122. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12123. )
  12124. goto tolua_lerror;
  12125. else
  12126. #endif
  12127. {
  12128. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12129. #ifndef TOLUA_RELEASE
  12130. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Center'", NULL);
  12131. #endif
  12132. {
  12133. Vector2 tolua_ret = (Vector2) self->Center();
  12134. {
  12135. #ifdef __cplusplus
  12136. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  12137. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  12138. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12139. #else
  12140. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  12141. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  12142. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12143. #endif
  12144. }
  12145. }
  12146. }
  12147. return 1;
  12148. #ifndef TOLUA_RELEASE
  12149. tolua_lerror:
  12150. tolua_error(tolua_S,"#ferror in function 'Center'.",&tolua_err);
  12151. return 0;
  12152. #endif
  12153. }
  12154. #endif //#ifndef TOLUA_DISABLE
  12155. /* method: Size of class Rect */
  12156. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Size00
  12157. static int tolua_Math_Rect_Size00(lua_State* tolua_S)
  12158. {
  12159. #ifndef TOLUA_RELEASE
  12160. tolua_Error tolua_err;
  12161. if (
  12162. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12163. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12164. )
  12165. goto tolua_lerror;
  12166. else
  12167. #endif
  12168. {
  12169. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12170. #ifndef TOLUA_RELEASE
  12171. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL);
  12172. #endif
  12173. {
  12174. Vector2 tolua_ret = (Vector2) self->Size();
  12175. {
  12176. #ifdef __cplusplus
  12177. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  12178. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  12179. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12180. #else
  12181. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  12182. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  12183. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12184. #endif
  12185. }
  12186. }
  12187. }
  12188. return 1;
  12189. #ifndef TOLUA_RELEASE
  12190. tolua_lerror:
  12191. tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err);
  12192. return 0;
  12193. #endif
  12194. }
  12195. #endif //#ifndef TOLUA_DISABLE
  12196. /* method: HalfSize of class Rect */
  12197. #ifndef TOLUA_DISABLE_tolua_Math_Rect_HalfSize00
  12198. static int tolua_Math_Rect_HalfSize00(lua_State* tolua_S)
  12199. {
  12200. #ifndef TOLUA_RELEASE
  12201. tolua_Error tolua_err;
  12202. if (
  12203. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12204. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12205. )
  12206. goto tolua_lerror;
  12207. else
  12208. #endif
  12209. {
  12210. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12211. #ifndef TOLUA_RELEASE
  12212. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HalfSize'", NULL);
  12213. #endif
  12214. {
  12215. Vector2 tolua_ret = (Vector2) self->HalfSize();
  12216. {
  12217. #ifdef __cplusplus
  12218. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  12219. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  12220. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12221. #else
  12222. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  12223. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  12224. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12225. #endif
  12226. }
  12227. }
  12228. }
  12229. return 1;
  12230. #ifndef TOLUA_RELEASE
  12231. tolua_lerror:
  12232. tolua_error(tolua_S,"#ferror in function 'HalfSize'.",&tolua_err);
  12233. return 0;
  12234. #endif
  12235. }
  12236. #endif //#ifndef TOLUA_DISABLE
  12237. /* method: Equals of class Rect */
  12238. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Equals00
  12239. static int tolua_Math_Rect_Equals00(lua_State* tolua_S)
  12240. {
  12241. #ifndef TOLUA_RELEASE
  12242. tolua_Error tolua_err;
  12243. if (
  12244. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12245. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  12246. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12247. )
  12248. goto tolua_lerror;
  12249. else
  12250. #endif
  12251. {
  12252. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12253. const Rect* rhs = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  12254. #ifndef TOLUA_RELEASE
  12255. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  12256. #endif
  12257. {
  12258. bool tolua_ret = (bool) self->Equals(*rhs);
  12259. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  12260. }
  12261. }
  12262. return 1;
  12263. #ifndef TOLUA_RELEASE
  12264. tolua_lerror:
  12265. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  12266. return 0;
  12267. #endif
  12268. }
  12269. #endif //#ifndef TOLUA_DISABLE
  12270. /* method: ToVector4 of class Rect */
  12271. #ifndef TOLUA_DISABLE_tolua_Math_Rect_ToVector400
  12272. static int tolua_Math_Rect_ToVector400(lua_State* tolua_S)
  12273. {
  12274. #ifndef TOLUA_RELEASE
  12275. tolua_Error tolua_err;
  12276. if (
  12277. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12278. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12279. )
  12280. goto tolua_lerror;
  12281. else
  12282. #endif
  12283. {
  12284. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12285. #ifndef TOLUA_RELEASE
  12286. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToVector4'", NULL);
  12287. #endif
  12288. {
  12289. Vector4 tolua_ret = (Vector4) self->ToVector4();
  12290. {
  12291. #ifdef __cplusplus
  12292. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  12293. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  12294. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12295. #else
  12296. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  12297. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  12298. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12299. #endif
  12300. }
  12301. }
  12302. }
  12303. return 1;
  12304. #ifndef TOLUA_RELEASE
  12305. tolua_lerror:
  12306. tolua_error(tolua_S,"#ferror in function 'ToVector4'.",&tolua_err);
  12307. return 0;
  12308. #endif
  12309. }
  12310. #endif //#ifndef TOLUA_DISABLE
  12311. /* method: ToString of class Rect */
  12312. #ifndef TOLUA_DISABLE_tolua_Math_Rect_ToString00
  12313. static int tolua_Math_Rect_ToString00(lua_State* tolua_S)
  12314. {
  12315. #ifndef TOLUA_RELEASE
  12316. tolua_Error tolua_err;
  12317. if (
  12318. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12319. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12320. )
  12321. goto tolua_lerror;
  12322. else
  12323. #endif
  12324. {
  12325. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12326. #ifndef TOLUA_RELEASE
  12327. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  12328. #endif
  12329. {
  12330. String tolua_ret = (String) self->ToString();
  12331. {
  12332. #ifdef __cplusplus
  12333. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  12334. tolua_pushusertype(tolua_S,tolua_obj,"String");
  12335. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12336. #else
  12337. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  12338. tolua_pushusertype(tolua_S,tolua_obj,"String");
  12339. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12340. #endif
  12341. }
  12342. }
  12343. }
  12344. return 1;
  12345. #ifndef TOLUA_RELEASE
  12346. tolua_lerror:
  12347. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  12348. return 0;
  12349. #endif
  12350. }
  12351. #endif //#ifndef TOLUA_DISABLE
  12352. /* get function: min_ of class Rect */
  12353. #ifndef TOLUA_DISABLE_tolua_get_Rect_min
  12354. static int tolua_get_Rect_min(lua_State* tolua_S)
  12355. {
  12356. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12357. #ifndef TOLUA_RELEASE
  12358. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  12359. #endif
  12360. tolua_pushusertype(tolua_S,(void*)&self->min_,"Vector2");
  12361. return 1;
  12362. }
  12363. #endif //#ifndef TOLUA_DISABLE
  12364. /* set function: min_ of class Rect */
  12365. #ifndef TOLUA_DISABLE_tolua_set_Rect_min
  12366. static int tolua_set_Rect_min(lua_State* tolua_S)
  12367. {
  12368. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12369. #ifndef TOLUA_RELEASE
  12370. tolua_Error tolua_err;
  12371. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  12372. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector2",0,&tolua_err)))
  12373. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12374. #endif
  12375. self->min_ = *((Vector2*) tolua_tousertype(tolua_S,2,0))
  12376. ;
  12377. return 0;
  12378. }
  12379. #endif //#ifndef TOLUA_DISABLE
  12380. /* get function: max_ of class Rect */
  12381. #ifndef TOLUA_DISABLE_tolua_get_Rect_max
  12382. static int tolua_get_Rect_max(lua_State* tolua_S)
  12383. {
  12384. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12385. #ifndef TOLUA_RELEASE
  12386. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  12387. #endif
  12388. tolua_pushusertype(tolua_S,(void*)&self->max_,"Vector2");
  12389. return 1;
  12390. }
  12391. #endif //#ifndef TOLUA_DISABLE
  12392. /* set function: max_ of class Rect */
  12393. #ifndef TOLUA_DISABLE_tolua_set_Rect_max
  12394. static int tolua_set_Rect_max(lua_State* tolua_S)
  12395. {
  12396. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12397. #ifndef TOLUA_RELEASE
  12398. tolua_Error tolua_err;
  12399. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  12400. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector2",0,&tolua_err)))
  12401. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12402. #endif
  12403. self->max_ = *((Vector2*) tolua_tousertype(tolua_S,2,0))
  12404. ;
  12405. return 0;
  12406. }
  12407. #endif //#ifndef TOLUA_DISABLE
  12408. /* get function: FULL of class Rect */
  12409. #ifndef TOLUA_DISABLE_tolua_get_Rect_FULL
  12410. static int tolua_get_Rect_FULL(lua_State* tolua_S)
  12411. {
  12412. tolua_pushusertype(tolua_S,(void*)&Rect::FULL,"const Rect");
  12413. return 1;
  12414. }
  12415. #endif //#ifndef TOLUA_DISABLE
  12416. /* get function: POSITIVE of class Rect */
  12417. #ifndef TOLUA_DISABLE_tolua_get_Rect_POSITIVE
  12418. static int tolua_get_Rect_POSITIVE(lua_State* tolua_S)
  12419. {
  12420. tolua_pushusertype(tolua_S,(void*)&Rect::POSITIVE,"const Rect");
  12421. return 1;
  12422. }
  12423. #endif //#ifndef TOLUA_DISABLE
  12424. /* get function: ZERO of class Rect */
  12425. #ifndef TOLUA_DISABLE_tolua_get_Rect_ZERO
  12426. static int tolua_get_Rect_ZERO(lua_State* tolua_S)
  12427. {
  12428. tolua_pushusertype(tolua_S,(void*)&Rect::ZERO,"const Rect");
  12429. return 1;
  12430. }
  12431. #endif //#ifndef TOLUA_DISABLE
  12432. /* method: new of class IntRect */
  12433. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new00
  12434. static int tolua_Math_IntRect_new00(lua_State* tolua_S)
  12435. {
  12436. #ifndef TOLUA_RELEASE
  12437. tolua_Error tolua_err;
  12438. if (
  12439. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12440. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12441. )
  12442. goto tolua_lerror;
  12443. else
  12444. #endif
  12445. {
  12446. {
  12447. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)());
  12448. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12449. }
  12450. }
  12451. return 1;
  12452. #ifndef TOLUA_RELEASE
  12453. tolua_lerror:
  12454. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12455. return 0;
  12456. #endif
  12457. }
  12458. #endif //#ifndef TOLUA_DISABLE
  12459. /* method: new_local of class IntRect */
  12460. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new00_local
  12461. static int tolua_Math_IntRect_new00_local(lua_State* tolua_S)
  12462. {
  12463. #ifndef TOLUA_RELEASE
  12464. tolua_Error tolua_err;
  12465. if (
  12466. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12467. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12468. )
  12469. goto tolua_lerror;
  12470. else
  12471. #endif
  12472. {
  12473. {
  12474. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)());
  12475. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12476. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12477. }
  12478. }
  12479. return 1;
  12480. #ifndef TOLUA_RELEASE
  12481. tolua_lerror:
  12482. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12483. return 0;
  12484. #endif
  12485. }
  12486. #endif //#ifndef TOLUA_DISABLE
  12487. /* method: new of class IntRect */
  12488. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new01
  12489. static int tolua_Math_IntRect_new01(lua_State* tolua_S)
  12490. {
  12491. tolua_Error tolua_err;
  12492. if (
  12493. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12494. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  12495. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12496. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  12497. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  12498. !tolua_isnoobj(tolua_S,6,&tolua_err)
  12499. )
  12500. goto tolua_lerror;
  12501. else
  12502. {
  12503. int left = ((int) tolua_tonumber(tolua_S,2,0));
  12504. int top = ((int) tolua_tonumber(tolua_S,3,0));
  12505. int right = ((int) tolua_tonumber(tolua_S,4,0));
  12506. int bottom = ((int) tolua_tonumber(tolua_S,5,0));
  12507. {
  12508. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)(left,top,right,bottom));
  12509. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12510. }
  12511. }
  12512. return 1;
  12513. tolua_lerror:
  12514. return tolua_Math_IntRect_new00(tolua_S);
  12515. }
  12516. #endif //#ifndef TOLUA_DISABLE
  12517. /* method: new_local of class IntRect */
  12518. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new01_local
  12519. static int tolua_Math_IntRect_new01_local(lua_State* tolua_S)
  12520. {
  12521. tolua_Error tolua_err;
  12522. if (
  12523. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12524. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  12525. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12526. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  12527. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  12528. !tolua_isnoobj(tolua_S,6,&tolua_err)
  12529. )
  12530. goto tolua_lerror;
  12531. else
  12532. {
  12533. int left = ((int) tolua_tonumber(tolua_S,2,0));
  12534. int top = ((int) tolua_tonumber(tolua_S,3,0));
  12535. int right = ((int) tolua_tonumber(tolua_S,4,0));
  12536. int bottom = ((int) tolua_tonumber(tolua_S,5,0));
  12537. {
  12538. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)(left,top,right,bottom));
  12539. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12540. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12541. }
  12542. }
  12543. return 1;
  12544. tolua_lerror:
  12545. return tolua_Math_IntRect_new00_local(tolua_S);
  12546. }
  12547. #endif //#ifndef TOLUA_DISABLE
  12548. /* method: operator== of class IntRect */
  12549. #ifndef TOLUA_DISABLE_tolua_Math_IntRect__eq00
  12550. static int tolua_Math_IntRect__eq00(lua_State* tolua_S)
  12551. {
  12552. #ifndef TOLUA_RELEASE
  12553. tolua_Error tolua_err;
  12554. if (
  12555. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12556. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntRect",0,&tolua_err)) ||
  12557. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12558. )
  12559. goto tolua_lerror;
  12560. else
  12561. #endif
  12562. {
  12563. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12564. const IntRect* rhs = ((const IntRect*) tolua_tousertype(tolua_S,2,0));
  12565. #ifndef TOLUA_RELEASE
  12566. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  12567. #endif
  12568. {
  12569. bool tolua_ret = (bool) self->operator==(*rhs);
  12570. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  12571. }
  12572. }
  12573. return 1;
  12574. #ifndef TOLUA_RELEASE
  12575. tolua_lerror:
  12576. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  12577. return 0;
  12578. #endif
  12579. }
  12580. #endif //#ifndef TOLUA_DISABLE
  12581. /* method: Size of class IntRect */
  12582. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_Size00
  12583. static int tolua_Math_IntRect_Size00(lua_State* tolua_S)
  12584. {
  12585. #ifndef TOLUA_RELEASE
  12586. tolua_Error tolua_err;
  12587. if (
  12588. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12589. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12590. )
  12591. goto tolua_lerror;
  12592. else
  12593. #endif
  12594. {
  12595. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12596. #ifndef TOLUA_RELEASE
  12597. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL);
  12598. #endif
  12599. {
  12600. IntVector2 tolua_ret = (IntVector2) self->Size();
  12601. {
  12602. #ifdef __cplusplus
  12603. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  12604. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  12605. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12606. #else
  12607. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  12608. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  12609. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12610. #endif
  12611. }
  12612. }
  12613. }
  12614. return 1;
  12615. #ifndef TOLUA_RELEASE
  12616. tolua_lerror:
  12617. tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err);
  12618. return 0;
  12619. #endif
  12620. }
  12621. #endif //#ifndef TOLUA_DISABLE
  12622. /* method: Width of class IntRect */
  12623. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_Width00
  12624. static int tolua_Math_IntRect_Width00(lua_State* tolua_S)
  12625. {
  12626. #ifndef TOLUA_RELEASE
  12627. tolua_Error tolua_err;
  12628. if (
  12629. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12630. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12631. )
  12632. goto tolua_lerror;
  12633. else
  12634. #endif
  12635. {
  12636. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12637. #ifndef TOLUA_RELEASE
  12638. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Width'", NULL);
  12639. #endif
  12640. {
  12641. int tolua_ret = (int) self->Width();
  12642. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  12643. }
  12644. }
  12645. return 1;
  12646. #ifndef TOLUA_RELEASE
  12647. tolua_lerror:
  12648. tolua_error(tolua_S,"#ferror in function 'Width'.",&tolua_err);
  12649. return 0;
  12650. #endif
  12651. }
  12652. #endif //#ifndef TOLUA_DISABLE
  12653. /* method: Height of class IntRect */
  12654. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_Height00
  12655. static int tolua_Math_IntRect_Height00(lua_State* tolua_S)
  12656. {
  12657. #ifndef TOLUA_RELEASE
  12658. tolua_Error tolua_err;
  12659. if (
  12660. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12661. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12662. )
  12663. goto tolua_lerror;
  12664. else
  12665. #endif
  12666. {
  12667. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12668. #ifndef TOLUA_RELEASE
  12669. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Height'", NULL);
  12670. #endif
  12671. {
  12672. int tolua_ret = (int) self->Height();
  12673. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  12674. }
  12675. }
  12676. return 1;
  12677. #ifndef TOLUA_RELEASE
  12678. tolua_lerror:
  12679. tolua_error(tolua_S,"#ferror in function 'Height'.",&tolua_err);
  12680. return 0;
  12681. #endif
  12682. }
  12683. #endif //#ifndef TOLUA_DISABLE
  12684. /* get function: left_ of class IntRect */
  12685. #ifndef TOLUA_DISABLE_tolua_get_IntRect_left
  12686. static int tolua_get_IntRect_left(lua_State* tolua_S)
  12687. {
  12688. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12689. #ifndef TOLUA_RELEASE
  12690. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'left_'",NULL);
  12691. #endif
  12692. tolua_pushnumber(tolua_S,(lua_Number)self->left_);
  12693. return 1;
  12694. }
  12695. #endif //#ifndef TOLUA_DISABLE
  12696. /* set function: left_ of class IntRect */
  12697. #ifndef TOLUA_DISABLE_tolua_set_IntRect_left
  12698. static int tolua_set_IntRect_left(lua_State* tolua_S)
  12699. {
  12700. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12701. #ifndef TOLUA_RELEASE
  12702. tolua_Error tolua_err;
  12703. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'left_'",NULL);
  12704. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12705. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12706. #endif
  12707. self->left_ = ((int) tolua_tonumber(tolua_S,2,0))
  12708. ;
  12709. return 0;
  12710. }
  12711. #endif //#ifndef TOLUA_DISABLE
  12712. /* get function: top_ of class IntRect */
  12713. #ifndef TOLUA_DISABLE_tolua_get_IntRect_top
  12714. static int tolua_get_IntRect_top(lua_State* tolua_S)
  12715. {
  12716. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12717. #ifndef TOLUA_RELEASE
  12718. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'top_'",NULL);
  12719. #endif
  12720. tolua_pushnumber(tolua_S,(lua_Number)self->top_);
  12721. return 1;
  12722. }
  12723. #endif //#ifndef TOLUA_DISABLE
  12724. /* set function: top_ of class IntRect */
  12725. #ifndef TOLUA_DISABLE_tolua_set_IntRect_top
  12726. static int tolua_set_IntRect_top(lua_State* tolua_S)
  12727. {
  12728. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12729. #ifndef TOLUA_RELEASE
  12730. tolua_Error tolua_err;
  12731. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'top_'",NULL);
  12732. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12733. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12734. #endif
  12735. self->top_ = ((int) tolua_tonumber(tolua_S,2,0))
  12736. ;
  12737. return 0;
  12738. }
  12739. #endif //#ifndef TOLUA_DISABLE
  12740. /* get function: right_ of class IntRect */
  12741. #ifndef TOLUA_DISABLE_tolua_get_IntRect_right
  12742. static int tolua_get_IntRect_right(lua_State* tolua_S)
  12743. {
  12744. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12745. #ifndef TOLUA_RELEASE
  12746. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'right_'",NULL);
  12747. #endif
  12748. tolua_pushnumber(tolua_S,(lua_Number)self->right_);
  12749. return 1;
  12750. }
  12751. #endif //#ifndef TOLUA_DISABLE
  12752. /* set function: right_ of class IntRect */
  12753. #ifndef TOLUA_DISABLE_tolua_set_IntRect_right
  12754. static int tolua_set_IntRect_right(lua_State* tolua_S)
  12755. {
  12756. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12757. #ifndef TOLUA_RELEASE
  12758. tolua_Error tolua_err;
  12759. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'right_'",NULL);
  12760. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12761. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12762. #endif
  12763. self->right_ = ((int) tolua_tonumber(tolua_S,2,0))
  12764. ;
  12765. return 0;
  12766. }
  12767. #endif //#ifndef TOLUA_DISABLE
  12768. /* get function: bottom_ of class IntRect */
  12769. #ifndef TOLUA_DISABLE_tolua_get_IntRect_bottom
  12770. static int tolua_get_IntRect_bottom(lua_State* tolua_S)
  12771. {
  12772. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12773. #ifndef TOLUA_RELEASE
  12774. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bottom_'",NULL);
  12775. #endif
  12776. tolua_pushnumber(tolua_S,(lua_Number)self->bottom_);
  12777. return 1;
  12778. }
  12779. #endif //#ifndef TOLUA_DISABLE
  12780. /* set function: bottom_ of class IntRect */
  12781. #ifndef TOLUA_DISABLE_tolua_set_IntRect_bottom
  12782. static int tolua_set_IntRect_bottom(lua_State* tolua_S)
  12783. {
  12784. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12785. #ifndef TOLUA_RELEASE
  12786. tolua_Error tolua_err;
  12787. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bottom_'",NULL);
  12788. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12789. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12790. #endif
  12791. self->bottom_ = ((int) tolua_tonumber(tolua_S,2,0))
  12792. ;
  12793. return 0;
  12794. }
  12795. #endif //#ifndef TOLUA_DISABLE
  12796. /* get function: ZERO of class IntRect */
  12797. #ifndef TOLUA_DISABLE_tolua_get_IntRect_ZERO
  12798. static int tolua_get_IntRect_ZERO(lua_State* tolua_S)
  12799. {
  12800. tolua_pushusertype(tolua_S,(void*)&IntRect::ZERO,"const IntRect");
  12801. return 1;
  12802. }
  12803. #endif //#ifndef TOLUA_DISABLE
  12804. /* method: new of class Sphere */
  12805. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new00
  12806. static int tolua_Math_Sphere_new00(lua_State* tolua_S)
  12807. {
  12808. #ifndef TOLUA_RELEASE
  12809. tolua_Error tolua_err;
  12810. if (
  12811. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12812. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12813. )
  12814. goto tolua_lerror;
  12815. else
  12816. #endif
  12817. {
  12818. {
  12819. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)());
  12820. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12821. }
  12822. }
  12823. return 1;
  12824. #ifndef TOLUA_RELEASE
  12825. tolua_lerror:
  12826. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12827. return 0;
  12828. #endif
  12829. }
  12830. #endif //#ifndef TOLUA_DISABLE
  12831. /* method: new_local of class Sphere */
  12832. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new00_local
  12833. static int tolua_Math_Sphere_new00_local(lua_State* tolua_S)
  12834. {
  12835. #ifndef TOLUA_RELEASE
  12836. tolua_Error tolua_err;
  12837. if (
  12838. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12839. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12840. )
  12841. goto tolua_lerror;
  12842. else
  12843. #endif
  12844. {
  12845. {
  12846. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)());
  12847. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12848. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12849. }
  12850. }
  12851. return 1;
  12852. #ifndef TOLUA_RELEASE
  12853. tolua_lerror:
  12854. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12855. return 0;
  12856. #endif
  12857. }
  12858. #endif //#ifndef TOLUA_DISABLE
  12859. /* method: new of class Sphere */
  12860. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new01
  12861. static int tolua_Math_Sphere_new01(lua_State* tolua_S)
  12862. {
  12863. tolua_Error tolua_err;
  12864. if (
  12865. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12866. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  12867. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12868. )
  12869. goto tolua_lerror;
  12870. else
  12871. {
  12872. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  12873. {
  12874. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*sphere));
  12875. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12876. }
  12877. }
  12878. return 1;
  12879. tolua_lerror:
  12880. return tolua_Math_Sphere_new00(tolua_S);
  12881. }
  12882. #endif //#ifndef TOLUA_DISABLE
  12883. /* method: new_local of class Sphere */
  12884. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new01_local
  12885. static int tolua_Math_Sphere_new01_local(lua_State* tolua_S)
  12886. {
  12887. tolua_Error tolua_err;
  12888. if (
  12889. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12890. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  12891. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12892. )
  12893. goto tolua_lerror;
  12894. else
  12895. {
  12896. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  12897. {
  12898. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*sphere));
  12899. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12900. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12901. }
  12902. }
  12903. return 1;
  12904. tolua_lerror:
  12905. return tolua_Math_Sphere_new00_local(tolua_S);
  12906. }
  12907. #endif //#ifndef TOLUA_DISABLE
  12908. /* method: new of class Sphere */
  12909. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new02
  12910. static int tolua_Math_Sphere_new02(lua_State* tolua_S)
  12911. {
  12912. tolua_Error tolua_err;
  12913. if (
  12914. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12915. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  12916. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12917. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12918. )
  12919. goto tolua_lerror;
  12920. else
  12921. {
  12922. const Vector3* center = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12923. float radius = ((float) tolua_tonumber(tolua_S,3,0));
  12924. {
  12925. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*center,radius));
  12926. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12927. }
  12928. }
  12929. return 1;
  12930. tolua_lerror:
  12931. return tolua_Math_Sphere_new01(tolua_S);
  12932. }
  12933. #endif //#ifndef TOLUA_DISABLE
  12934. /* method: new_local of class Sphere */
  12935. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new02_local
  12936. static int tolua_Math_Sphere_new02_local(lua_State* tolua_S)
  12937. {
  12938. tolua_Error tolua_err;
  12939. if (
  12940. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12941. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  12942. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12943. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12944. )
  12945. goto tolua_lerror;
  12946. else
  12947. {
  12948. const Vector3* center = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12949. float radius = ((float) tolua_tonumber(tolua_S,3,0));
  12950. {
  12951. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*center,radius));
  12952. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12953. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12954. }
  12955. }
  12956. return 1;
  12957. tolua_lerror:
  12958. return tolua_Math_Sphere_new01_local(tolua_S);
  12959. }
  12960. #endif //#ifndef TOLUA_DISABLE
  12961. /* method: new of class Sphere */
  12962. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new03
  12963. static int tolua_Math_Sphere_new03(lua_State* tolua_S)
  12964. {
  12965. tolua_Error tolua_err;
  12966. if (
  12967. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12968. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  12969. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12970. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12971. )
  12972. goto tolua_lerror;
  12973. else
  12974. {
  12975. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12976. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  12977. {
  12978. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(vertices,count));
  12979. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12980. }
  12981. }
  12982. return 1;
  12983. tolua_lerror:
  12984. return tolua_Math_Sphere_new02(tolua_S);
  12985. }
  12986. #endif //#ifndef TOLUA_DISABLE
  12987. /* method: new_local of class Sphere */
  12988. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new03_local
  12989. static int tolua_Math_Sphere_new03_local(lua_State* tolua_S)
  12990. {
  12991. tolua_Error tolua_err;
  12992. if (
  12993. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12994. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  12995. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12996. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12997. )
  12998. goto tolua_lerror;
  12999. else
  13000. {
  13001. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13002. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  13003. {
  13004. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(vertices,count));
  13005. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13006. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13007. }
  13008. }
  13009. return 1;
  13010. tolua_lerror:
  13011. return tolua_Math_Sphere_new02_local(tolua_S);
  13012. }
  13013. #endif //#ifndef TOLUA_DISABLE
  13014. /* method: new of class Sphere */
  13015. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new04
  13016. static int tolua_Math_Sphere_new04(lua_State* tolua_S)
  13017. {
  13018. tolua_Error tolua_err;
  13019. if (
  13020. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  13021. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13022. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13023. )
  13024. goto tolua_lerror;
  13025. else
  13026. {
  13027. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13028. {
  13029. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*box));
  13030. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13031. }
  13032. }
  13033. return 1;
  13034. tolua_lerror:
  13035. return tolua_Math_Sphere_new03(tolua_S);
  13036. }
  13037. #endif //#ifndef TOLUA_DISABLE
  13038. /* method: new_local of class Sphere */
  13039. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new04_local
  13040. static int tolua_Math_Sphere_new04_local(lua_State* tolua_S)
  13041. {
  13042. tolua_Error tolua_err;
  13043. if (
  13044. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  13045. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13046. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13047. )
  13048. goto tolua_lerror;
  13049. else
  13050. {
  13051. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13052. {
  13053. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*box));
  13054. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13055. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13056. }
  13057. }
  13058. return 1;
  13059. tolua_lerror:
  13060. return tolua_Math_Sphere_new03_local(tolua_S);
  13061. }
  13062. #endif //#ifndef TOLUA_DISABLE
  13063. /* method: new of class Sphere */
  13064. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new05
  13065. static int tolua_Math_Sphere_new05(lua_State* tolua_S)
  13066. {
  13067. tolua_Error tolua_err;
  13068. if (
  13069. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  13070. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  13071. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13072. )
  13073. goto tolua_lerror;
  13074. else
  13075. {
  13076. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  13077. {
  13078. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*frustum));
  13079. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13080. }
  13081. }
  13082. return 1;
  13083. tolua_lerror:
  13084. return tolua_Math_Sphere_new04(tolua_S);
  13085. }
  13086. #endif //#ifndef TOLUA_DISABLE
  13087. /* method: new_local of class Sphere */
  13088. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new05_local
  13089. static int tolua_Math_Sphere_new05_local(lua_State* tolua_S)
  13090. {
  13091. tolua_Error tolua_err;
  13092. if (
  13093. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  13094. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  13095. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13096. )
  13097. goto tolua_lerror;
  13098. else
  13099. {
  13100. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  13101. {
  13102. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*frustum));
  13103. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13104. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13105. }
  13106. }
  13107. return 1;
  13108. tolua_lerror:
  13109. return tolua_Math_Sphere_new04_local(tolua_S);
  13110. }
  13111. #endif //#ifndef TOLUA_DISABLE
  13112. /* method: new of class Sphere */
  13113. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new06
  13114. static int tolua_Math_Sphere_new06(lua_State* tolua_S)
  13115. {
  13116. tolua_Error tolua_err;
  13117. if (
  13118. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  13119. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  13120. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13121. )
  13122. goto tolua_lerror;
  13123. else
  13124. {
  13125. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  13126. {
  13127. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*poly));
  13128. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13129. }
  13130. }
  13131. return 1;
  13132. tolua_lerror:
  13133. return tolua_Math_Sphere_new05(tolua_S);
  13134. }
  13135. #endif //#ifndef TOLUA_DISABLE
  13136. /* method: new_local of class Sphere */
  13137. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new06_local
  13138. static int tolua_Math_Sphere_new06_local(lua_State* tolua_S)
  13139. {
  13140. tolua_Error tolua_err;
  13141. if (
  13142. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  13143. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  13144. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13145. )
  13146. goto tolua_lerror;
  13147. else
  13148. {
  13149. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  13150. {
  13151. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*poly));
  13152. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  13153. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13154. }
  13155. }
  13156. return 1;
  13157. tolua_lerror:
  13158. return tolua_Math_Sphere_new05_local(tolua_S);
  13159. }
  13160. #endif //#ifndef TOLUA_DISABLE
  13161. /* method: operator== of class Sphere */
  13162. #ifndef TOLUA_DISABLE_tolua_Math_Sphere__eq00
  13163. static int tolua_Math_Sphere__eq00(lua_State* tolua_S)
  13164. {
  13165. #ifndef TOLUA_RELEASE
  13166. tolua_Error tolua_err;
  13167. if (
  13168. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13169. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13170. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13171. )
  13172. goto tolua_lerror;
  13173. else
  13174. #endif
  13175. {
  13176. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13177. const Sphere* rhs = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13178. #ifndef TOLUA_RELEASE
  13179. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  13180. #endif
  13181. {
  13182. bool tolua_ret = (bool) self->operator==(*rhs);
  13183. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  13184. }
  13185. }
  13186. return 1;
  13187. #ifndef TOLUA_RELEASE
  13188. tolua_lerror:
  13189. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  13190. return 0;
  13191. #endif
  13192. }
  13193. #endif //#ifndef TOLUA_DISABLE
  13194. /* method: Define of class Sphere */
  13195. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define00
  13196. static int tolua_Math_Sphere_Define00(lua_State* tolua_S)
  13197. {
  13198. #ifndef TOLUA_RELEASE
  13199. tolua_Error tolua_err;
  13200. if (
  13201. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13202. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13203. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13204. )
  13205. goto tolua_lerror;
  13206. else
  13207. #endif
  13208. {
  13209. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13210. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13211. #ifndef TOLUA_RELEASE
  13212. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13213. #endif
  13214. {
  13215. self->Define(*sphere);
  13216. }
  13217. }
  13218. return 0;
  13219. #ifndef TOLUA_RELEASE
  13220. tolua_lerror:
  13221. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  13222. return 0;
  13223. #endif
  13224. }
  13225. #endif //#ifndef TOLUA_DISABLE
  13226. /* method: Define of class Sphere */
  13227. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define01
  13228. static int tolua_Math_Sphere_Define01(lua_State* tolua_S)
  13229. {
  13230. tolua_Error tolua_err;
  13231. if (
  13232. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13233. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13234. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  13235. !tolua_isnoobj(tolua_S,4,&tolua_err)
  13236. )
  13237. goto tolua_lerror;
  13238. else
  13239. {
  13240. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13241. const Vector3* center = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13242. float radius = ((float) tolua_tonumber(tolua_S,3,0));
  13243. #ifndef TOLUA_RELEASE
  13244. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13245. #endif
  13246. {
  13247. self->Define(*center,radius);
  13248. }
  13249. }
  13250. return 0;
  13251. tolua_lerror:
  13252. return tolua_Math_Sphere_Define00(tolua_S);
  13253. }
  13254. #endif //#ifndef TOLUA_DISABLE
  13255. /* method: Define of class Sphere */
  13256. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define02
  13257. static int tolua_Math_Sphere_Define02(lua_State* tolua_S)
  13258. {
  13259. tolua_Error tolua_err;
  13260. if (
  13261. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13262. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  13263. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  13264. !tolua_isnoobj(tolua_S,4,&tolua_err)
  13265. )
  13266. goto tolua_lerror;
  13267. else
  13268. {
  13269. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13270. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13271. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  13272. #ifndef TOLUA_RELEASE
  13273. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13274. #endif
  13275. {
  13276. self->Define(vertices,count);
  13277. }
  13278. }
  13279. return 0;
  13280. tolua_lerror:
  13281. return tolua_Math_Sphere_Define01(tolua_S);
  13282. }
  13283. #endif //#ifndef TOLUA_DISABLE
  13284. /* method: Define of class Sphere */
  13285. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define03
  13286. static int tolua_Math_Sphere_Define03(lua_State* tolua_S)
  13287. {
  13288. tolua_Error tolua_err;
  13289. if (
  13290. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13291. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13292. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13293. )
  13294. goto tolua_lerror;
  13295. else
  13296. {
  13297. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13298. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13299. #ifndef TOLUA_RELEASE
  13300. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13301. #endif
  13302. {
  13303. self->Define(*box);
  13304. }
  13305. }
  13306. return 0;
  13307. tolua_lerror:
  13308. return tolua_Math_Sphere_Define02(tolua_S);
  13309. }
  13310. #endif //#ifndef TOLUA_DISABLE
  13311. /* method: Define of class Sphere */
  13312. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define04
  13313. static int tolua_Math_Sphere_Define04(lua_State* tolua_S)
  13314. {
  13315. tolua_Error tolua_err;
  13316. if (
  13317. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13318. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  13319. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13320. )
  13321. goto tolua_lerror;
  13322. else
  13323. {
  13324. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13325. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  13326. #ifndef TOLUA_RELEASE
  13327. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13328. #endif
  13329. {
  13330. self->Define(*frustum);
  13331. }
  13332. }
  13333. return 0;
  13334. tolua_lerror:
  13335. return tolua_Math_Sphere_Define03(tolua_S);
  13336. }
  13337. #endif //#ifndef TOLUA_DISABLE
  13338. /* method: Define of class Sphere */
  13339. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define05
  13340. static int tolua_Math_Sphere_Define05(lua_State* tolua_S)
  13341. {
  13342. tolua_Error tolua_err;
  13343. if (
  13344. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13345. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  13346. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13347. )
  13348. goto tolua_lerror;
  13349. else
  13350. {
  13351. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13352. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  13353. #ifndef TOLUA_RELEASE
  13354. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13355. #endif
  13356. {
  13357. self->Define(*poly);
  13358. }
  13359. }
  13360. return 0;
  13361. tolua_lerror:
  13362. return tolua_Math_Sphere_Define04(tolua_S);
  13363. }
  13364. #endif //#ifndef TOLUA_DISABLE
  13365. /* method: Merge of class Sphere */
  13366. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge00
  13367. static int tolua_Math_Sphere_Merge00(lua_State* tolua_S)
  13368. {
  13369. #ifndef TOLUA_RELEASE
  13370. tolua_Error tolua_err;
  13371. if (
  13372. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13373. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13374. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13375. )
  13376. goto tolua_lerror;
  13377. else
  13378. #endif
  13379. {
  13380. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13381. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13382. #ifndef TOLUA_RELEASE
  13383. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13384. #endif
  13385. {
  13386. self->Merge(*point);
  13387. }
  13388. }
  13389. return 0;
  13390. #ifndef TOLUA_RELEASE
  13391. tolua_lerror:
  13392. tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err);
  13393. return 0;
  13394. #endif
  13395. }
  13396. #endif //#ifndef TOLUA_DISABLE
  13397. /* method: Merge of class Sphere */
  13398. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge01
  13399. static int tolua_Math_Sphere_Merge01(lua_State* tolua_S)
  13400. {
  13401. tolua_Error tolua_err;
  13402. if (
  13403. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13404. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  13405. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  13406. !tolua_isnoobj(tolua_S,4,&tolua_err)
  13407. )
  13408. goto tolua_lerror;
  13409. else
  13410. {
  13411. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13412. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13413. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  13414. #ifndef TOLUA_RELEASE
  13415. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13416. #endif
  13417. {
  13418. self->Merge(vertices,count);
  13419. }
  13420. }
  13421. return 0;
  13422. tolua_lerror:
  13423. return tolua_Math_Sphere_Merge00(tolua_S);
  13424. }
  13425. #endif //#ifndef TOLUA_DISABLE
  13426. /* method: Merge of class Sphere */
  13427. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge02
  13428. static int tolua_Math_Sphere_Merge02(lua_State* tolua_S)
  13429. {
  13430. tolua_Error tolua_err;
  13431. if (
  13432. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13433. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13434. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13435. )
  13436. goto tolua_lerror;
  13437. else
  13438. {
  13439. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13440. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13441. #ifndef TOLUA_RELEASE
  13442. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13443. #endif
  13444. {
  13445. self->Merge(*box);
  13446. }
  13447. }
  13448. return 0;
  13449. tolua_lerror:
  13450. return tolua_Math_Sphere_Merge01(tolua_S);
  13451. }
  13452. #endif //#ifndef TOLUA_DISABLE
  13453. /* method: Merge of class Sphere */
  13454. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge03
  13455. static int tolua_Math_Sphere_Merge03(lua_State* tolua_S)
  13456. {
  13457. tolua_Error tolua_err;
  13458. if (
  13459. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13460. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  13461. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13462. )
  13463. goto tolua_lerror;
  13464. else
  13465. {
  13466. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13467. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  13468. #ifndef TOLUA_RELEASE
  13469. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13470. #endif
  13471. {
  13472. self->Merge(*frustum);
  13473. }
  13474. }
  13475. return 0;
  13476. tolua_lerror:
  13477. return tolua_Math_Sphere_Merge02(tolua_S);
  13478. }
  13479. #endif //#ifndef TOLUA_DISABLE
  13480. /* method: Merge of class Sphere */
  13481. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge04
  13482. static int tolua_Math_Sphere_Merge04(lua_State* tolua_S)
  13483. {
  13484. tolua_Error tolua_err;
  13485. if (
  13486. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13487. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  13488. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13489. )
  13490. goto tolua_lerror;
  13491. else
  13492. {
  13493. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13494. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  13495. #ifndef TOLUA_RELEASE
  13496. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13497. #endif
  13498. {
  13499. self->Merge(*poly);
  13500. }
  13501. }
  13502. return 0;
  13503. tolua_lerror:
  13504. return tolua_Math_Sphere_Merge03(tolua_S);
  13505. }
  13506. #endif //#ifndef TOLUA_DISABLE
  13507. /* method: Merge of class Sphere */
  13508. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge05
  13509. static int tolua_Math_Sphere_Merge05(lua_State* tolua_S)
  13510. {
  13511. tolua_Error tolua_err;
  13512. if (
  13513. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13514. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13515. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13516. )
  13517. goto tolua_lerror;
  13518. else
  13519. {
  13520. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13521. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13522. #ifndef TOLUA_RELEASE
  13523. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13524. #endif
  13525. {
  13526. self->Merge(*sphere);
  13527. }
  13528. }
  13529. return 0;
  13530. tolua_lerror:
  13531. return tolua_Math_Sphere_Merge04(tolua_S);
  13532. }
  13533. #endif //#ifndef TOLUA_DISABLE
  13534. /* method: Clear of class Sphere */
  13535. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Clear00
  13536. static int tolua_Math_Sphere_Clear00(lua_State* tolua_S)
  13537. {
  13538. #ifndef TOLUA_RELEASE
  13539. tolua_Error tolua_err;
  13540. if (
  13541. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13542. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13543. )
  13544. goto tolua_lerror;
  13545. else
  13546. #endif
  13547. {
  13548. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13549. #ifndef TOLUA_RELEASE
  13550. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  13551. #endif
  13552. {
  13553. self->Clear();
  13554. }
  13555. }
  13556. return 0;
  13557. #ifndef TOLUA_RELEASE
  13558. tolua_lerror:
  13559. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  13560. return 0;
  13561. #endif
  13562. }
  13563. #endif //#ifndef TOLUA_DISABLE
  13564. /* method: IsInside of class Sphere */
  13565. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInside00
  13566. static int tolua_Math_Sphere_IsInside00(lua_State* tolua_S)
  13567. {
  13568. #ifndef TOLUA_RELEASE
  13569. tolua_Error tolua_err;
  13570. if (
  13571. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13572. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13573. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13574. )
  13575. goto tolua_lerror;
  13576. else
  13577. #endif
  13578. {
  13579. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13580. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13581. #ifndef TOLUA_RELEASE
  13582. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  13583. #endif
  13584. {
  13585. Intersection tolua_ret = (Intersection) self->IsInside(*point);
  13586. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13587. }
  13588. }
  13589. return 1;
  13590. #ifndef TOLUA_RELEASE
  13591. tolua_lerror:
  13592. tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err);
  13593. return 0;
  13594. #endif
  13595. }
  13596. #endif //#ifndef TOLUA_DISABLE
  13597. /* method: IsInside of class Sphere */
  13598. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInside01
  13599. static int tolua_Math_Sphere_IsInside01(lua_State* tolua_S)
  13600. {
  13601. tolua_Error tolua_err;
  13602. if (
  13603. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13604. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13605. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13606. )
  13607. goto tolua_lerror;
  13608. else
  13609. {
  13610. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13611. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13612. #ifndef TOLUA_RELEASE
  13613. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  13614. #endif
  13615. {
  13616. Intersection tolua_ret = (Intersection) self->IsInside(*sphere);
  13617. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13618. }
  13619. }
  13620. return 1;
  13621. tolua_lerror:
  13622. return tolua_Math_Sphere_IsInside00(tolua_S);
  13623. }
  13624. #endif //#ifndef TOLUA_DISABLE
  13625. /* method: IsInsideFast of class Sphere */
  13626. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInsideFast00
  13627. static int tolua_Math_Sphere_IsInsideFast00(lua_State* tolua_S)
  13628. {
  13629. #ifndef TOLUA_RELEASE
  13630. tolua_Error tolua_err;
  13631. if (
  13632. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13633. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13634. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13635. )
  13636. goto tolua_lerror;
  13637. else
  13638. #endif
  13639. {
  13640. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13641. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13642. #ifndef TOLUA_RELEASE
  13643. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  13644. #endif
  13645. {
  13646. Intersection tolua_ret = (Intersection) self->IsInsideFast(*sphere);
  13647. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13648. }
  13649. }
  13650. return 1;
  13651. #ifndef TOLUA_RELEASE
  13652. tolua_lerror:
  13653. tolua_error(tolua_S,"#ferror in function 'IsInsideFast'.",&tolua_err);
  13654. return 0;
  13655. #endif
  13656. }
  13657. #endif //#ifndef TOLUA_DISABLE
  13658. /* method: IsInside of class Sphere */
  13659. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInside02
  13660. static int tolua_Math_Sphere_IsInside02(lua_State* tolua_S)
  13661. {
  13662. tolua_Error tolua_err;
  13663. if (
  13664. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13665. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13666. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13667. )
  13668. goto tolua_lerror;
  13669. else
  13670. {
  13671. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13672. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13673. #ifndef TOLUA_RELEASE
  13674. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  13675. #endif
  13676. {
  13677. Intersection tolua_ret = (Intersection) self->IsInside(*box);
  13678. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13679. }
  13680. }
  13681. return 1;
  13682. tolua_lerror:
  13683. return tolua_Math_Sphere_IsInside01(tolua_S);
  13684. }
  13685. #endif //#ifndef TOLUA_DISABLE
  13686. /* method: IsInsideFast of class Sphere */
  13687. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInsideFast01
  13688. static int tolua_Math_Sphere_IsInsideFast01(lua_State* tolua_S)
  13689. {
  13690. tolua_Error tolua_err;
  13691. if (
  13692. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13693. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13694. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13695. )
  13696. goto tolua_lerror;
  13697. else
  13698. {
  13699. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13700. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13701. #ifndef TOLUA_RELEASE
  13702. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  13703. #endif
  13704. {
  13705. Intersection tolua_ret = (Intersection) self->IsInsideFast(*box);
  13706. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13707. }
  13708. }
  13709. return 1;
  13710. tolua_lerror:
  13711. return tolua_Math_Sphere_IsInsideFast00(tolua_S);
  13712. }
  13713. #endif //#ifndef TOLUA_DISABLE
  13714. /* method: Distance of class Sphere */
  13715. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Distance00
  13716. static int tolua_Math_Sphere_Distance00(lua_State* tolua_S)
  13717. {
  13718. #ifndef TOLUA_RELEASE
  13719. tolua_Error tolua_err;
  13720. if (
  13721. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13722. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13723. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13724. )
  13725. goto tolua_lerror;
  13726. else
  13727. #endif
  13728. {
  13729. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13730. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13731. #ifndef TOLUA_RELEASE
  13732. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  13733. #endif
  13734. {
  13735. float tolua_ret = (float) self->Distance(*point);
  13736. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13737. }
  13738. }
  13739. return 1;
  13740. #ifndef TOLUA_RELEASE
  13741. tolua_lerror:
  13742. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  13743. return 0;
  13744. #endif
  13745. }
  13746. #endif //#ifndef TOLUA_DISABLE
  13747. /* get function: center_ of class Sphere */
  13748. #ifndef TOLUA_DISABLE_tolua_get_Sphere_center
  13749. static int tolua_get_Sphere_center(lua_State* tolua_S)
  13750. {
  13751. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13752. #ifndef TOLUA_RELEASE
  13753. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'center_'",NULL);
  13754. #endif
  13755. tolua_pushusertype(tolua_S,(void*)&self->center_,"Vector3");
  13756. return 1;
  13757. }
  13758. #endif //#ifndef TOLUA_DISABLE
  13759. /* set function: center_ of class Sphere */
  13760. #ifndef TOLUA_DISABLE_tolua_set_Sphere_center
  13761. static int tolua_set_Sphere_center(lua_State* tolua_S)
  13762. {
  13763. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13764. #ifndef TOLUA_RELEASE
  13765. tolua_Error tolua_err;
  13766. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'center_'",NULL);
  13767. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  13768. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  13769. #endif
  13770. self->center_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  13771. ;
  13772. return 0;
  13773. }
  13774. #endif //#ifndef TOLUA_DISABLE
  13775. /* get function: radius_ of class Sphere */
  13776. #ifndef TOLUA_DISABLE_tolua_get_Sphere_radius
  13777. static int tolua_get_Sphere_radius(lua_State* tolua_S)
  13778. {
  13779. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13780. #ifndef TOLUA_RELEASE
  13781. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'radius_'",NULL);
  13782. #endif
  13783. tolua_pushnumber(tolua_S,(lua_Number)self->radius_);
  13784. return 1;
  13785. }
  13786. #endif //#ifndef TOLUA_DISABLE
  13787. /* set function: radius_ of class Sphere */
  13788. #ifndef TOLUA_DISABLE_tolua_set_Sphere_radius
  13789. static int tolua_set_Sphere_radius(lua_State* tolua_S)
  13790. {
  13791. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13792. #ifndef TOLUA_RELEASE
  13793. tolua_Error tolua_err;
  13794. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'radius_'",NULL);
  13795. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  13796. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  13797. #endif
  13798. self->radius_ = ((float) tolua_tonumber(tolua_S,2,0))
  13799. ;
  13800. return 0;
  13801. }
  13802. #endif //#ifndef TOLUA_DISABLE
  13803. /* method: new of class StringHash */
  13804. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new00
  13805. static int tolua_Math_StringHash_new00(lua_State* tolua_S)
  13806. {
  13807. #ifndef TOLUA_RELEASE
  13808. tolua_Error tolua_err;
  13809. if (
  13810. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13811. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13812. )
  13813. goto tolua_lerror;
  13814. else
  13815. #endif
  13816. {
  13817. {
  13818. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)());
  13819. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13820. }
  13821. }
  13822. return 1;
  13823. #ifndef TOLUA_RELEASE
  13824. tolua_lerror:
  13825. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  13826. return 0;
  13827. #endif
  13828. }
  13829. #endif //#ifndef TOLUA_DISABLE
  13830. /* method: new_local of class StringHash */
  13831. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new00_local
  13832. static int tolua_Math_StringHash_new00_local(lua_State* tolua_S)
  13833. {
  13834. #ifndef TOLUA_RELEASE
  13835. tolua_Error tolua_err;
  13836. if (
  13837. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13838. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13839. )
  13840. goto tolua_lerror;
  13841. else
  13842. #endif
  13843. {
  13844. {
  13845. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)());
  13846. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13847. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13848. }
  13849. }
  13850. return 1;
  13851. #ifndef TOLUA_RELEASE
  13852. tolua_lerror:
  13853. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  13854. return 0;
  13855. #endif
  13856. }
  13857. #endif //#ifndef TOLUA_DISABLE
  13858. /* method: new of class StringHash */
  13859. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new01
  13860. static int tolua_Math_StringHash_new01(lua_State* tolua_S)
  13861. {
  13862. tolua_Error tolua_err;
  13863. if (
  13864. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13865. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13866. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13867. )
  13868. goto tolua_lerror;
  13869. else
  13870. {
  13871. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13872. {
  13873. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*rhs));
  13874. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13875. }
  13876. }
  13877. return 1;
  13878. tolua_lerror:
  13879. return tolua_Math_StringHash_new00(tolua_S);
  13880. }
  13881. #endif //#ifndef TOLUA_DISABLE
  13882. /* method: new_local of class StringHash */
  13883. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new01_local
  13884. static int tolua_Math_StringHash_new01_local(lua_State* tolua_S)
  13885. {
  13886. tolua_Error tolua_err;
  13887. if (
  13888. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13889. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13890. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13891. )
  13892. goto tolua_lerror;
  13893. else
  13894. {
  13895. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13896. {
  13897. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*rhs));
  13898. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13899. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13900. }
  13901. }
  13902. return 1;
  13903. tolua_lerror:
  13904. return tolua_Math_StringHash_new00_local(tolua_S);
  13905. }
  13906. #endif //#ifndef TOLUA_DISABLE
  13907. /* method: new of class StringHash */
  13908. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new02
  13909. static int tolua_Math_StringHash_new02(lua_State* tolua_S)
  13910. {
  13911. tolua_Error tolua_err;
  13912. if (
  13913. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13914. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  13915. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13916. )
  13917. goto tolua_lerror;
  13918. else
  13919. {
  13920. unsigned value = ((unsigned) tolua_tonumber(tolua_S,2,0));
  13921. {
  13922. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(value));
  13923. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13924. }
  13925. }
  13926. return 1;
  13927. tolua_lerror:
  13928. return tolua_Math_StringHash_new01(tolua_S);
  13929. }
  13930. #endif //#ifndef TOLUA_DISABLE
  13931. /* method: new_local of class StringHash */
  13932. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new02_local
  13933. static int tolua_Math_StringHash_new02_local(lua_State* tolua_S)
  13934. {
  13935. tolua_Error tolua_err;
  13936. if (
  13937. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13938. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  13939. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13940. )
  13941. goto tolua_lerror;
  13942. else
  13943. {
  13944. unsigned value = ((unsigned) tolua_tonumber(tolua_S,2,0));
  13945. {
  13946. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(value));
  13947. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13948. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13949. }
  13950. }
  13951. return 1;
  13952. tolua_lerror:
  13953. return tolua_Math_StringHash_new01_local(tolua_S);
  13954. }
  13955. #endif //#ifndef TOLUA_DISABLE
  13956. /* method: new of class StringHash */
  13957. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new03
  13958. static int tolua_Math_StringHash_new03(lua_State* tolua_S)
  13959. {
  13960. tolua_Error tolua_err;
  13961. if (
  13962. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13963. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  13964. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13965. )
  13966. goto tolua_lerror;
  13967. else
  13968. {
  13969. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  13970. {
  13971. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(str));
  13972. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13973. }
  13974. }
  13975. return 1;
  13976. tolua_lerror:
  13977. return tolua_Math_StringHash_new02(tolua_S);
  13978. }
  13979. #endif //#ifndef TOLUA_DISABLE
  13980. /* method: new_local of class StringHash */
  13981. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new03_local
  13982. static int tolua_Math_StringHash_new03_local(lua_State* tolua_S)
  13983. {
  13984. tolua_Error tolua_err;
  13985. if (
  13986. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13987. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  13988. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13989. )
  13990. goto tolua_lerror;
  13991. else
  13992. {
  13993. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  13994. {
  13995. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(str));
  13996. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13997. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13998. }
  13999. }
  14000. return 1;
  14001. tolua_lerror:
  14002. return tolua_Math_StringHash_new02_local(tolua_S);
  14003. }
  14004. #endif //#ifndef TOLUA_DISABLE
  14005. /* method: new of class StringHash */
  14006. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new04
  14007. static int tolua_Math_StringHash_new04(lua_State* tolua_S)
  14008. {
  14009. tolua_Error tolua_err;
  14010. if (
  14011. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  14012. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  14013. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14014. )
  14015. goto tolua_lerror;
  14016. else
  14017. {
  14018. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  14019. {
  14020. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*str));
  14021. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  14022. }
  14023. }
  14024. return 1;
  14025. tolua_lerror:
  14026. return tolua_Math_StringHash_new03(tolua_S);
  14027. }
  14028. #endif //#ifndef TOLUA_DISABLE
  14029. /* method: new_local of class StringHash */
  14030. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new04_local
  14031. static int tolua_Math_StringHash_new04_local(lua_State* tolua_S)
  14032. {
  14033. tolua_Error tolua_err;
  14034. if (
  14035. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  14036. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  14037. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14038. )
  14039. goto tolua_lerror;
  14040. else
  14041. {
  14042. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  14043. {
  14044. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*str));
  14045. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  14046. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14047. }
  14048. }
  14049. return 1;
  14050. tolua_lerror:
  14051. return tolua_Math_StringHash_new03_local(tolua_S);
  14052. }
  14053. #endif //#ifndef TOLUA_DISABLE
  14054. /* method: operator+ of class StringHash */
  14055. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__add00
  14056. static int tolua_Math_StringHash__add00(lua_State* tolua_S)
  14057. {
  14058. #ifndef TOLUA_RELEASE
  14059. tolua_Error tolua_err;
  14060. if (
  14061. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14062. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14063. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14064. )
  14065. goto tolua_lerror;
  14066. else
  14067. #endif
  14068. {
  14069. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14070. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14071. #ifndef TOLUA_RELEASE
  14072. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  14073. #endif
  14074. {
  14075. StringHash tolua_ret = (StringHash) self->operator+(*rhs);
  14076. {
  14077. #ifdef __cplusplus
  14078. void* tolua_obj = Mtolua_new((StringHash)(tolua_ret));
  14079. tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
  14080. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14081. #else
  14082. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(StringHash));
  14083. tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
  14084. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14085. #endif
  14086. }
  14087. }
  14088. }
  14089. return 1;
  14090. #ifndef TOLUA_RELEASE
  14091. tolua_lerror:
  14092. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  14093. return 0;
  14094. #endif
  14095. }
  14096. #endif //#ifndef TOLUA_DISABLE
  14097. /* method: operator== of class StringHash */
  14098. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__eq00
  14099. static int tolua_Math_StringHash__eq00(lua_State* tolua_S)
  14100. {
  14101. #ifndef TOLUA_RELEASE
  14102. tolua_Error tolua_err;
  14103. if (
  14104. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14105. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14106. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14107. )
  14108. goto tolua_lerror;
  14109. else
  14110. #endif
  14111. {
  14112. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14113. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14114. #ifndef TOLUA_RELEASE
  14115. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  14116. #endif
  14117. {
  14118. bool tolua_ret = (bool) self->operator==(*rhs);
  14119. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14120. }
  14121. }
  14122. return 1;
  14123. #ifndef TOLUA_RELEASE
  14124. tolua_lerror:
  14125. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  14126. return 0;
  14127. #endif
  14128. }
  14129. #endif //#ifndef TOLUA_DISABLE
  14130. /* method: operator< of class StringHash */
  14131. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__lt00
  14132. static int tolua_Math_StringHash__lt00(lua_State* tolua_S)
  14133. {
  14134. #ifndef TOLUA_RELEASE
  14135. tolua_Error tolua_err;
  14136. if (
  14137. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14138. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14139. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14140. )
  14141. goto tolua_lerror;
  14142. else
  14143. #endif
  14144. {
  14145. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14146. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14147. #ifndef TOLUA_RELEASE
  14148. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator<'", NULL);
  14149. #endif
  14150. {
  14151. bool tolua_ret = (bool) self->operator<(*rhs);
  14152. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14153. }
  14154. }
  14155. return 1;
  14156. #ifndef TOLUA_RELEASE
  14157. tolua_lerror:
  14158. tolua_error(tolua_S,"#ferror in function '.lt'.",&tolua_err);
  14159. return 0;
  14160. #endif
  14161. }
  14162. #endif //#ifndef TOLUA_DISABLE
  14163. /* method: operatorbool of class StringHash */
  14164. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__bool00
  14165. static int tolua_Math_StringHash__bool00(lua_State* tolua_S)
  14166. {
  14167. #ifndef TOLUA_RELEASE
  14168. tolua_Error tolua_err;
  14169. if (
  14170. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14171. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14172. )
  14173. goto tolua_lerror;
  14174. else
  14175. #endif
  14176. {
  14177. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14178. #ifndef TOLUA_RELEASE
  14179. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operatorbool'", NULL);
  14180. #endif
  14181. {
  14182. bool tolua_ret = (bool) self->operator bool();
  14183. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14184. }
  14185. }
  14186. return 1;
  14187. #ifndef TOLUA_RELEASE
  14188. tolua_lerror:
  14189. tolua_error(tolua_S,"#ferror in function '.bool'.",&tolua_err);
  14190. return 0;
  14191. #endif
  14192. }
  14193. #endif //#ifndef TOLUA_DISABLE
  14194. /* method: Value of class StringHash */
  14195. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_Value00
  14196. static int tolua_Math_StringHash_Value00(lua_State* tolua_S)
  14197. {
  14198. #ifndef TOLUA_RELEASE
  14199. tolua_Error tolua_err;
  14200. if (
  14201. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14202. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14203. )
  14204. goto tolua_lerror;
  14205. else
  14206. #endif
  14207. {
  14208. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14209. #ifndef TOLUA_RELEASE
  14210. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Value'", NULL);
  14211. #endif
  14212. {
  14213. unsigned tolua_ret = (unsigned) self->Value();
  14214. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14215. }
  14216. }
  14217. return 1;
  14218. #ifndef TOLUA_RELEASE
  14219. tolua_lerror:
  14220. tolua_error(tolua_S,"#ferror in function 'Value'.",&tolua_err);
  14221. return 0;
  14222. #endif
  14223. }
  14224. #endif //#ifndef TOLUA_DISABLE
  14225. /* method: ToString of class StringHash */
  14226. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_ToString00
  14227. static int tolua_Math_StringHash_ToString00(lua_State* tolua_S)
  14228. {
  14229. #ifndef TOLUA_RELEASE
  14230. tolua_Error tolua_err;
  14231. if (
  14232. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14233. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14234. )
  14235. goto tolua_lerror;
  14236. else
  14237. #endif
  14238. {
  14239. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14240. #ifndef TOLUA_RELEASE
  14241. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  14242. #endif
  14243. {
  14244. String tolua_ret = (String) self->ToString();
  14245. {
  14246. #ifdef __cplusplus
  14247. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  14248. tolua_pushusertype(tolua_S,tolua_obj,"String");
  14249. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14250. #else
  14251. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  14252. tolua_pushusertype(tolua_S,tolua_obj,"String");
  14253. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14254. #endif
  14255. }
  14256. }
  14257. }
  14258. return 1;
  14259. #ifndef TOLUA_RELEASE
  14260. tolua_lerror:
  14261. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  14262. return 0;
  14263. #endif
  14264. }
  14265. #endif //#ifndef TOLUA_DISABLE
  14266. /* method: ToHash of class StringHash */
  14267. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_ToHash00
  14268. static int tolua_Math_StringHash_ToHash00(lua_State* tolua_S)
  14269. {
  14270. #ifndef TOLUA_RELEASE
  14271. tolua_Error tolua_err;
  14272. if (
  14273. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  14274. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14275. )
  14276. goto tolua_lerror;
  14277. else
  14278. #endif
  14279. {
  14280. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  14281. #ifndef TOLUA_RELEASE
  14282. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToHash'", NULL);
  14283. #endif
  14284. {
  14285. unsigned tolua_ret = (unsigned) self->ToHash();
  14286. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14287. }
  14288. }
  14289. return 1;
  14290. #ifndef TOLUA_RELEASE
  14291. tolua_lerror:
  14292. tolua_error(tolua_S,"#ferror in function 'ToHash'.",&tolua_err);
  14293. return 0;
  14294. #endif
  14295. }
  14296. #endif //#ifndef TOLUA_DISABLE
  14297. /* method: Calculate of class StringHash */
  14298. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_Calculate00
  14299. static int tolua_Math_StringHash_Calculate00(lua_State* tolua_S)
  14300. {
  14301. #ifndef TOLUA_RELEASE
  14302. tolua_Error tolua_err;
  14303. if (
  14304. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  14305. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14306. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14307. )
  14308. goto tolua_lerror;
  14309. else
  14310. #endif
  14311. {
  14312. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14313. {
  14314. unsigned tolua_ret = (unsigned) StringHash::Calculate(str);
  14315. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14316. }
  14317. }
  14318. return 1;
  14319. #ifndef TOLUA_RELEASE
  14320. tolua_lerror:
  14321. tolua_error(tolua_S,"#ferror in function 'Calculate'.",&tolua_err);
  14322. return 0;
  14323. #endif
  14324. }
  14325. #endif //#ifndef TOLUA_DISABLE
  14326. /* get function: ZERO of class StringHash */
  14327. #ifndef TOLUA_DISABLE_tolua_get_StringHash_ZERO
  14328. static int tolua_get_StringHash_ZERO(lua_State* tolua_S)
  14329. {
  14330. tolua_pushusertype(tolua_S,(void*)&StringHash::ZERO,"const StringHash");
  14331. return 1;
  14332. }
  14333. #endif //#ifndef TOLUA_DISABLE
  14334. /* method: new of class ShortStringHash */
  14335. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new00
  14336. static int tolua_Math_ShortStringHash_new00(lua_State* tolua_S)
  14337. {
  14338. #ifndef TOLUA_RELEASE
  14339. tolua_Error tolua_err;
  14340. if (
  14341. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14342. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14343. )
  14344. goto tolua_lerror;
  14345. else
  14346. #endif
  14347. {
  14348. {
  14349. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)());
  14350. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14351. }
  14352. }
  14353. return 1;
  14354. #ifndef TOLUA_RELEASE
  14355. tolua_lerror:
  14356. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  14357. return 0;
  14358. #endif
  14359. }
  14360. #endif //#ifndef TOLUA_DISABLE
  14361. /* method: new_local of class ShortStringHash */
  14362. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new00_local
  14363. static int tolua_Math_ShortStringHash_new00_local(lua_State* tolua_S)
  14364. {
  14365. #ifndef TOLUA_RELEASE
  14366. tolua_Error tolua_err;
  14367. if (
  14368. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14369. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14370. )
  14371. goto tolua_lerror;
  14372. else
  14373. #endif
  14374. {
  14375. {
  14376. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)());
  14377. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14378. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14379. }
  14380. }
  14381. return 1;
  14382. #ifndef TOLUA_RELEASE
  14383. tolua_lerror:
  14384. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  14385. return 0;
  14386. #endif
  14387. }
  14388. #endif //#ifndef TOLUA_DISABLE
  14389. /* method: new of class ShortStringHash */
  14390. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new01
  14391. static int tolua_Math_ShortStringHash_new01(lua_State* tolua_S)
  14392. {
  14393. tolua_Error tolua_err;
  14394. if (
  14395. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14396. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14397. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14398. )
  14399. goto tolua_lerror;
  14400. else
  14401. {
  14402. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14403. {
  14404. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14405. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14406. }
  14407. }
  14408. return 1;
  14409. tolua_lerror:
  14410. return tolua_Math_ShortStringHash_new00(tolua_S);
  14411. }
  14412. #endif //#ifndef TOLUA_DISABLE
  14413. /* method: new_local of class ShortStringHash */
  14414. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new01_local
  14415. static int tolua_Math_ShortStringHash_new01_local(lua_State* tolua_S)
  14416. {
  14417. tolua_Error tolua_err;
  14418. if (
  14419. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14420. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14421. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14422. )
  14423. goto tolua_lerror;
  14424. else
  14425. {
  14426. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14427. {
  14428. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14429. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14430. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14431. }
  14432. }
  14433. return 1;
  14434. tolua_lerror:
  14435. return tolua_Math_ShortStringHash_new00_local(tolua_S);
  14436. }
  14437. #endif //#ifndef TOLUA_DISABLE
  14438. /* method: new of class ShortStringHash */
  14439. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new02
  14440. static int tolua_Math_ShortStringHash_new02(lua_State* tolua_S)
  14441. {
  14442. tolua_Error tolua_err;
  14443. if (
  14444. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14445. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14446. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14447. )
  14448. goto tolua_lerror;
  14449. else
  14450. {
  14451. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14452. {
  14453. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14454. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14455. }
  14456. }
  14457. return 1;
  14458. tolua_lerror:
  14459. return tolua_Math_ShortStringHash_new01(tolua_S);
  14460. }
  14461. #endif //#ifndef TOLUA_DISABLE
  14462. /* method: new_local of class ShortStringHash */
  14463. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new02_local
  14464. static int tolua_Math_ShortStringHash_new02_local(lua_State* tolua_S)
  14465. {
  14466. tolua_Error tolua_err;
  14467. if (
  14468. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14469. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14470. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14471. )
  14472. goto tolua_lerror;
  14473. else
  14474. {
  14475. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14476. {
  14477. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14478. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14479. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14480. }
  14481. }
  14482. return 1;
  14483. tolua_lerror:
  14484. return tolua_Math_ShortStringHash_new01_local(tolua_S);
  14485. }
  14486. #endif //#ifndef TOLUA_DISABLE
  14487. /* method: new of class ShortStringHash */
  14488. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new03
  14489. static int tolua_Math_ShortStringHash_new03(lua_State* tolua_S)
  14490. {
  14491. tolua_Error tolua_err;
  14492. if (
  14493. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14494. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14495. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14496. )
  14497. goto tolua_lerror;
  14498. else
  14499. {
  14500. unsigned short value = ((unsigned short) tolua_tonumber(tolua_S,2,0));
  14501. {
  14502. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(value));
  14503. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14504. }
  14505. }
  14506. return 1;
  14507. tolua_lerror:
  14508. return tolua_Math_ShortStringHash_new02(tolua_S);
  14509. }
  14510. #endif //#ifndef TOLUA_DISABLE
  14511. /* method: new_local of class ShortStringHash */
  14512. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new03_local
  14513. static int tolua_Math_ShortStringHash_new03_local(lua_State* tolua_S)
  14514. {
  14515. tolua_Error tolua_err;
  14516. if (
  14517. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14518. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14519. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14520. )
  14521. goto tolua_lerror;
  14522. else
  14523. {
  14524. unsigned short value = ((unsigned short) tolua_tonumber(tolua_S,2,0));
  14525. {
  14526. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(value));
  14527. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14528. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14529. }
  14530. }
  14531. return 1;
  14532. tolua_lerror:
  14533. return tolua_Math_ShortStringHash_new02_local(tolua_S);
  14534. }
  14535. #endif //#ifndef TOLUA_DISABLE
  14536. /* method: new of class ShortStringHash */
  14537. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new04
  14538. static int tolua_Math_ShortStringHash_new04(lua_State* tolua_S)
  14539. {
  14540. tolua_Error tolua_err;
  14541. if (
  14542. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14543. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14544. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14545. )
  14546. goto tolua_lerror;
  14547. else
  14548. {
  14549. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14550. {
  14551. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(str));
  14552. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14553. }
  14554. }
  14555. return 1;
  14556. tolua_lerror:
  14557. return tolua_Math_ShortStringHash_new03(tolua_S);
  14558. }
  14559. #endif //#ifndef TOLUA_DISABLE
  14560. /* method: new_local of class ShortStringHash */
  14561. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new04_local
  14562. static int tolua_Math_ShortStringHash_new04_local(lua_State* tolua_S)
  14563. {
  14564. tolua_Error tolua_err;
  14565. if (
  14566. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14567. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14568. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14569. )
  14570. goto tolua_lerror;
  14571. else
  14572. {
  14573. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14574. {
  14575. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(str));
  14576. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14577. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14578. }
  14579. }
  14580. return 1;
  14581. tolua_lerror:
  14582. return tolua_Math_ShortStringHash_new03_local(tolua_S);
  14583. }
  14584. #endif //#ifndef TOLUA_DISABLE
  14585. /* method: new of class ShortStringHash */
  14586. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new05
  14587. static int tolua_Math_ShortStringHash_new05(lua_State* tolua_S)
  14588. {
  14589. tolua_Error tolua_err;
  14590. if (
  14591. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14592. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  14593. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14594. )
  14595. goto tolua_lerror;
  14596. else
  14597. {
  14598. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  14599. {
  14600. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*str));
  14601. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14602. }
  14603. }
  14604. return 1;
  14605. tolua_lerror:
  14606. return tolua_Math_ShortStringHash_new04(tolua_S);
  14607. }
  14608. #endif //#ifndef TOLUA_DISABLE
  14609. /* method: new_local of class ShortStringHash */
  14610. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new05_local
  14611. static int tolua_Math_ShortStringHash_new05_local(lua_State* tolua_S)
  14612. {
  14613. tolua_Error tolua_err;
  14614. if (
  14615. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14616. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  14617. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14618. )
  14619. goto tolua_lerror;
  14620. else
  14621. {
  14622. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  14623. {
  14624. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*str));
  14625. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14626. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14627. }
  14628. }
  14629. return 1;
  14630. tolua_lerror:
  14631. return tolua_Math_ShortStringHash_new04_local(tolua_S);
  14632. }
  14633. #endif //#ifndef TOLUA_DISABLE
  14634. /* method: operator+ of class ShortStringHash */
  14635. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash__add00
  14636. static int tolua_Math_ShortStringHash__add00(lua_State* tolua_S)
  14637. {
  14638. #ifndef TOLUA_RELEASE
  14639. tolua_Error tolua_err;
  14640. if (
  14641. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14642. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14643. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14644. )
  14645. goto tolua_lerror;
  14646. else
  14647. #endif
  14648. {
  14649. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14650. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14651. #ifndef TOLUA_RELEASE
  14652. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  14653. #endif
  14654. {
  14655. ShortStringHash tolua_ret = (ShortStringHash) self->operator+(*rhs);
  14656. {
  14657. #ifdef __cplusplus
  14658. void* tolua_obj = Mtolua_new((ShortStringHash)(tolua_ret));
  14659. tolua_pushusertype(tolua_S,tolua_obj,"ShortStringHash");
  14660. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14661. #else
  14662. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(ShortStringHash));
  14663. tolua_pushusertype(tolua_S,tolua_obj,"ShortStringHash");
  14664. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14665. #endif
  14666. }
  14667. }
  14668. }
  14669. return 1;
  14670. #ifndef TOLUA_RELEASE
  14671. tolua_lerror:
  14672. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  14673. return 0;
  14674. #endif
  14675. }
  14676. #endif //#ifndef TOLUA_DISABLE
  14677. /* method: operator== of class ShortStringHash */
  14678. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash__eq00
  14679. static int tolua_Math_ShortStringHash__eq00(lua_State* tolua_S)
  14680. {
  14681. #ifndef TOLUA_RELEASE
  14682. tolua_Error tolua_err;
  14683. if (
  14684. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14685. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14686. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14687. )
  14688. goto tolua_lerror;
  14689. else
  14690. #endif
  14691. {
  14692. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14693. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14694. #ifndef TOLUA_RELEASE
  14695. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  14696. #endif
  14697. {
  14698. bool tolua_ret = (bool) self->operator==(*rhs);
  14699. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14700. }
  14701. }
  14702. return 1;
  14703. #ifndef TOLUA_RELEASE
  14704. tolua_lerror:
  14705. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  14706. return 0;
  14707. #endif
  14708. }
  14709. #endif //#ifndef TOLUA_DISABLE
  14710. /* method: operator< of class ShortStringHash */
  14711. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash__lt00
  14712. static int tolua_Math_ShortStringHash__lt00(lua_State* tolua_S)
  14713. {
  14714. #ifndef TOLUA_RELEASE
  14715. tolua_Error tolua_err;
  14716. if (
  14717. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14718. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14719. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14720. )
  14721. goto tolua_lerror;
  14722. else
  14723. #endif
  14724. {
  14725. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14726. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14727. #ifndef TOLUA_RELEASE
  14728. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator<'", NULL);
  14729. #endif
  14730. {
  14731. bool tolua_ret = (bool) self->operator<(*rhs);
  14732. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14733. }
  14734. }
  14735. return 1;
  14736. #ifndef TOLUA_RELEASE
  14737. tolua_lerror:
  14738. tolua_error(tolua_S,"#ferror in function '.lt'.",&tolua_err);
  14739. return 0;
  14740. #endif
  14741. }
  14742. #endif //#ifndef TOLUA_DISABLE
  14743. /* method: Value of class ShortStringHash */
  14744. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_Value00
  14745. static int tolua_Math_ShortStringHash_Value00(lua_State* tolua_S)
  14746. {
  14747. #ifndef TOLUA_RELEASE
  14748. tolua_Error tolua_err;
  14749. if (
  14750. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14751. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14752. )
  14753. goto tolua_lerror;
  14754. else
  14755. #endif
  14756. {
  14757. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14758. #ifndef TOLUA_RELEASE
  14759. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Value'", NULL);
  14760. #endif
  14761. {
  14762. unsigned short tolua_ret = (unsigned short) self->Value();
  14763. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14764. }
  14765. }
  14766. return 1;
  14767. #ifndef TOLUA_RELEASE
  14768. tolua_lerror:
  14769. tolua_error(tolua_S,"#ferror in function 'Value'.",&tolua_err);
  14770. return 0;
  14771. #endif
  14772. }
  14773. #endif //#ifndef TOLUA_DISABLE
  14774. /* method: Calculate of class ShortStringHash */
  14775. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_Calculate00
  14776. static int tolua_Math_ShortStringHash_Calculate00(lua_State* tolua_S)
  14777. {
  14778. #ifndef TOLUA_RELEASE
  14779. tolua_Error tolua_err;
  14780. if (
  14781. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14782. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14783. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14784. )
  14785. goto tolua_lerror;
  14786. else
  14787. #endif
  14788. {
  14789. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14790. {
  14791. unsigned short tolua_ret = (unsigned short) ShortStringHash::Calculate(str);
  14792. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14793. }
  14794. }
  14795. return 1;
  14796. #ifndef TOLUA_RELEASE
  14797. tolua_lerror:
  14798. tolua_error(tolua_S,"#ferror in function 'Calculate'.",&tolua_err);
  14799. return 0;
  14800. #endif
  14801. }
  14802. #endif //#ifndef TOLUA_DISABLE
  14803. /* get function: ZERO of class ShortStringHash */
  14804. #ifndef TOLUA_DISABLE_tolua_get_ShortStringHash_ZERO
  14805. static int tolua_get_ShortStringHash_ZERO(lua_State* tolua_S)
  14806. {
  14807. tolua_pushusertype(tolua_S,(void*)&ShortStringHash::ZERO,"const ShortStringHash");
  14808. return 1;
  14809. }
  14810. #endif //#ifndef TOLUA_DISABLE
  14811. /* method: new of class Vector2 */
  14812. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new00
  14813. static int tolua_Math_Vector2_new00(lua_State* tolua_S)
  14814. {
  14815. #ifndef TOLUA_RELEASE
  14816. tolua_Error tolua_err;
  14817. if (
  14818. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14819. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14820. )
  14821. goto tolua_lerror;
  14822. else
  14823. #endif
  14824. {
  14825. {
  14826. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)());
  14827. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14828. }
  14829. }
  14830. return 1;
  14831. #ifndef TOLUA_RELEASE
  14832. tolua_lerror:
  14833. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  14834. return 0;
  14835. #endif
  14836. }
  14837. #endif //#ifndef TOLUA_DISABLE
  14838. /* method: new_local of class Vector2 */
  14839. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new00_local
  14840. static int tolua_Math_Vector2_new00_local(lua_State* tolua_S)
  14841. {
  14842. #ifndef TOLUA_RELEASE
  14843. tolua_Error tolua_err;
  14844. if (
  14845. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14846. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14847. )
  14848. goto tolua_lerror;
  14849. else
  14850. #endif
  14851. {
  14852. {
  14853. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)());
  14854. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14855. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14856. }
  14857. }
  14858. return 1;
  14859. #ifndef TOLUA_RELEASE
  14860. tolua_lerror:
  14861. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  14862. return 0;
  14863. #endif
  14864. }
  14865. #endif //#ifndef TOLUA_DISABLE
  14866. /* method: new of class Vector2 */
  14867. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new01
  14868. static int tolua_Math_Vector2_new01(lua_State* tolua_S)
  14869. {
  14870. tolua_Error tolua_err;
  14871. if (
  14872. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14873. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14874. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14875. )
  14876. goto tolua_lerror;
  14877. else
  14878. {
  14879. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14880. {
  14881. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(*vector));
  14882. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14883. }
  14884. }
  14885. return 1;
  14886. tolua_lerror:
  14887. return tolua_Math_Vector2_new00(tolua_S);
  14888. }
  14889. #endif //#ifndef TOLUA_DISABLE
  14890. /* method: new_local of class Vector2 */
  14891. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new01_local
  14892. static int tolua_Math_Vector2_new01_local(lua_State* tolua_S)
  14893. {
  14894. tolua_Error tolua_err;
  14895. if (
  14896. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14897. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14898. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14899. )
  14900. goto tolua_lerror;
  14901. else
  14902. {
  14903. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14904. {
  14905. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(*vector));
  14906. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14907. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14908. }
  14909. }
  14910. return 1;
  14911. tolua_lerror:
  14912. return tolua_Math_Vector2_new00_local(tolua_S);
  14913. }
  14914. #endif //#ifndef TOLUA_DISABLE
  14915. /* method: new of class Vector2 */
  14916. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new02
  14917. static int tolua_Math_Vector2_new02(lua_State* tolua_S)
  14918. {
  14919. tolua_Error tolua_err;
  14920. if (
  14921. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14922. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14923. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  14924. !tolua_isnoobj(tolua_S,4,&tolua_err)
  14925. )
  14926. goto tolua_lerror;
  14927. else
  14928. {
  14929. float x = ((float) tolua_tonumber(tolua_S,2,0));
  14930. float y = ((float) tolua_tonumber(tolua_S,3,0));
  14931. {
  14932. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(x,y));
  14933. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14934. }
  14935. }
  14936. return 1;
  14937. tolua_lerror:
  14938. return tolua_Math_Vector2_new01(tolua_S);
  14939. }
  14940. #endif //#ifndef TOLUA_DISABLE
  14941. /* method: new_local of class Vector2 */
  14942. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new02_local
  14943. static int tolua_Math_Vector2_new02_local(lua_State* tolua_S)
  14944. {
  14945. tolua_Error tolua_err;
  14946. if (
  14947. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14948. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14949. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  14950. !tolua_isnoobj(tolua_S,4,&tolua_err)
  14951. )
  14952. goto tolua_lerror;
  14953. else
  14954. {
  14955. float x = ((float) tolua_tonumber(tolua_S,2,0));
  14956. float y = ((float) tolua_tonumber(tolua_S,3,0));
  14957. {
  14958. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(x,y));
  14959. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14960. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14961. }
  14962. }
  14963. return 1;
  14964. tolua_lerror:
  14965. return tolua_Math_Vector2_new01_local(tolua_S);
  14966. }
  14967. #endif //#ifndef TOLUA_DISABLE
  14968. /* method: new of class Vector2 */
  14969. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new03
  14970. static int tolua_Math_Vector2_new03(lua_State* tolua_S)
  14971. {
  14972. tolua_Error tolua_err;
  14973. if (
  14974. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14975. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14976. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14977. )
  14978. goto tolua_lerror;
  14979. else
  14980. {
  14981. const float data = ((const float) tolua_tonumber(tolua_S,2,0));
  14982. {
  14983. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(&data));
  14984. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14985. tolua_pushnumber(tolua_S,(lua_Number)data);
  14986. }
  14987. }
  14988. return 2;
  14989. tolua_lerror:
  14990. return tolua_Math_Vector2_new02(tolua_S);
  14991. }
  14992. #endif //#ifndef TOLUA_DISABLE
  14993. /* method: new_local of class Vector2 */
  14994. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new03_local
  14995. static int tolua_Math_Vector2_new03_local(lua_State* tolua_S)
  14996. {
  14997. tolua_Error tolua_err;
  14998. if (
  14999. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  15000. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15001. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15002. )
  15003. goto tolua_lerror;
  15004. else
  15005. {
  15006. const float data = ((const float) tolua_tonumber(tolua_S,2,0));
  15007. {
  15008. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(&data));
  15009. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  15010. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15011. tolua_pushnumber(tolua_S,(lua_Number)data);
  15012. }
  15013. }
  15014. return 2;
  15015. tolua_lerror:
  15016. return tolua_Math_Vector2_new02_local(tolua_S);
  15017. }
  15018. #endif //#ifndef TOLUA_DISABLE
  15019. /* method: operator== of class Vector2 */
  15020. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__eq00
  15021. static int tolua_Math_Vector2__eq00(lua_State* tolua_S)
  15022. {
  15023. #ifndef TOLUA_RELEASE
  15024. tolua_Error tolua_err;
  15025. if (
  15026. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15027. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15028. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15029. )
  15030. goto tolua_lerror;
  15031. else
  15032. #endif
  15033. {
  15034. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15035. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15036. #ifndef TOLUA_RELEASE
  15037. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  15038. #endif
  15039. {
  15040. bool tolua_ret = (bool) self->operator==(*rhs);
  15041. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  15042. }
  15043. }
  15044. return 1;
  15045. #ifndef TOLUA_RELEASE
  15046. tolua_lerror:
  15047. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  15048. return 0;
  15049. #endif
  15050. }
  15051. #endif //#ifndef TOLUA_DISABLE
  15052. /* method: operator+ of class Vector2 */
  15053. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__add00
  15054. static int tolua_Math_Vector2__add00(lua_State* tolua_S)
  15055. {
  15056. #ifndef TOLUA_RELEASE
  15057. tolua_Error tolua_err;
  15058. if (
  15059. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15060. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15061. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15062. )
  15063. goto tolua_lerror;
  15064. else
  15065. #endif
  15066. {
  15067. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15068. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15069. #ifndef TOLUA_RELEASE
  15070. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  15071. #endif
  15072. {
  15073. Vector2 tolua_ret = (Vector2) self->operator+(*rhs);
  15074. {
  15075. #ifdef __cplusplus
  15076. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15077. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15078. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15079. #else
  15080. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15081. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15082. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15083. #endif
  15084. }
  15085. }
  15086. }
  15087. return 1;
  15088. #ifndef TOLUA_RELEASE
  15089. tolua_lerror:
  15090. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  15091. return 0;
  15092. #endif
  15093. }
  15094. #endif //#ifndef TOLUA_DISABLE
  15095. /* method: operator- of class Vector2 */
  15096. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__sub00
  15097. static int tolua_Math_Vector2__sub00(lua_State* tolua_S)
  15098. {
  15099. #ifndef TOLUA_RELEASE
  15100. tolua_Error tolua_err;
  15101. if (
  15102. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15103. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15104. )
  15105. goto tolua_lerror;
  15106. else
  15107. #endif
  15108. {
  15109. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15110. #ifndef TOLUA_RELEASE
  15111. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  15112. #endif
  15113. {
  15114. Vector2 tolua_ret = (Vector2) self->operator-();
  15115. {
  15116. #ifdef __cplusplus
  15117. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15118. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15119. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15120. #else
  15121. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15122. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15123. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15124. #endif
  15125. }
  15126. }
  15127. }
  15128. return 1;
  15129. #ifndef TOLUA_RELEASE
  15130. tolua_lerror:
  15131. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  15132. return 0;
  15133. #endif
  15134. }
  15135. #endif //#ifndef TOLUA_DISABLE
  15136. /* method: operator- of class Vector2 */
  15137. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__sub01
  15138. static int tolua_Math_Vector2__sub01(lua_State* tolua_S)
  15139. {
  15140. tolua_Error tolua_err;
  15141. if (
  15142. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15143. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15144. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15145. )
  15146. goto tolua_lerror;
  15147. else
  15148. {
  15149. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15150. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15151. #ifndef TOLUA_RELEASE
  15152. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  15153. #endif
  15154. {
  15155. Vector2 tolua_ret = (Vector2) self->operator-(*rhs);
  15156. {
  15157. #ifdef __cplusplus
  15158. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15159. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15160. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15161. #else
  15162. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15163. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15164. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15165. #endif
  15166. }
  15167. }
  15168. }
  15169. return 1;
  15170. tolua_lerror:
  15171. return tolua_Math_Vector2__sub00(tolua_S);
  15172. }
  15173. #endif //#ifndef TOLUA_DISABLE
  15174. /* method: operator* of class Vector2 */
  15175. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__mul00
  15176. static int tolua_Math_Vector2__mul00(lua_State* tolua_S)
  15177. {
  15178. #ifndef TOLUA_RELEASE
  15179. tolua_Error tolua_err;
  15180. if (
  15181. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15182. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15183. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15184. )
  15185. goto tolua_lerror;
  15186. else
  15187. #endif
  15188. {
  15189. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15190. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  15191. #ifndef TOLUA_RELEASE
  15192. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  15193. #endif
  15194. {
  15195. Vector2 tolua_ret = (Vector2) self->operator*(rhs);
  15196. {
  15197. #ifdef __cplusplus
  15198. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15199. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15200. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15201. #else
  15202. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15203. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15204. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15205. #endif
  15206. }
  15207. }
  15208. }
  15209. return 1;
  15210. #ifndef TOLUA_RELEASE
  15211. tolua_lerror:
  15212. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  15213. return 0;
  15214. #endif
  15215. }
  15216. #endif //#ifndef TOLUA_DISABLE
  15217. /* method: operator* of class Vector2 */
  15218. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__mul01
  15219. static int tolua_Math_Vector2__mul01(lua_State* tolua_S)
  15220. {
  15221. tolua_Error tolua_err;
  15222. if (
  15223. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15224. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15225. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15226. )
  15227. goto tolua_lerror;
  15228. else
  15229. {
  15230. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15231. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15232. #ifndef TOLUA_RELEASE
  15233. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  15234. #endif
  15235. {
  15236. Vector2 tolua_ret = (Vector2) self->operator*(*rhs);
  15237. {
  15238. #ifdef __cplusplus
  15239. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15240. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15241. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15242. #else
  15243. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15244. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15245. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15246. #endif
  15247. }
  15248. }
  15249. }
  15250. return 1;
  15251. tolua_lerror:
  15252. return tolua_Math_Vector2__mul00(tolua_S);
  15253. }
  15254. #endif //#ifndef TOLUA_DISABLE
  15255. /* method: operator/ of class Vector2 */
  15256. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__div00
  15257. static int tolua_Math_Vector2__div00(lua_State* tolua_S)
  15258. {
  15259. #ifndef TOLUA_RELEASE
  15260. tolua_Error tolua_err;
  15261. if (
  15262. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15263. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15264. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15265. )
  15266. goto tolua_lerror;
  15267. else
  15268. #endif
  15269. {
  15270. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15271. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  15272. #ifndef TOLUA_RELEASE
  15273. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  15274. #endif
  15275. {
  15276. Vector2 tolua_ret = (Vector2) self->operator/(rhs);
  15277. {
  15278. #ifdef __cplusplus
  15279. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15280. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15281. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15282. #else
  15283. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15284. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15285. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15286. #endif
  15287. }
  15288. }
  15289. }
  15290. return 1;
  15291. #ifndef TOLUA_RELEASE
  15292. tolua_lerror:
  15293. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  15294. return 0;
  15295. #endif
  15296. }
  15297. #endif //#ifndef TOLUA_DISABLE
  15298. /* method: operator/ of class Vector2 */
  15299. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__div01
  15300. static int tolua_Math_Vector2__div01(lua_State* tolua_S)
  15301. {
  15302. tolua_Error tolua_err;
  15303. if (
  15304. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15305. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15306. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15307. )
  15308. goto tolua_lerror;
  15309. else
  15310. {
  15311. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15312. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15313. #ifndef TOLUA_RELEASE
  15314. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  15315. #endif
  15316. {
  15317. Vector2 tolua_ret = (Vector2) self->operator/(*rhs);
  15318. {
  15319. #ifdef __cplusplus
  15320. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15321. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15322. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15323. #else
  15324. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15325. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15326. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15327. #endif
  15328. }
  15329. }
  15330. }
  15331. return 1;
  15332. tolua_lerror:
  15333. return tolua_Math_Vector2__div00(tolua_S);
  15334. }
  15335. #endif //#ifndef TOLUA_DISABLE
  15336. /* method: operator/ of class Vector2 */
  15337. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__div02
  15338. static int tolua_Math_Vector2__div02(lua_State* tolua_S)
  15339. {
  15340. tolua_Error tolua_err;
  15341. if (
  15342. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15343. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15344. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15345. )
  15346. goto tolua_lerror;
  15347. else
  15348. {
  15349. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15350. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15351. #ifndef TOLUA_RELEASE
  15352. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  15353. #endif
  15354. {
  15355. Vector2 tolua_ret = (Vector2) self->operator/(*rhs);
  15356. {
  15357. #ifdef __cplusplus
  15358. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15359. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15360. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15361. #else
  15362. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15363. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15364. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15365. #endif
  15366. }
  15367. }
  15368. }
  15369. return 1;
  15370. tolua_lerror:
  15371. return tolua_Math_Vector2__div01(tolua_S);
  15372. }
  15373. #endif //#ifndef TOLUA_DISABLE
  15374. /* method: Normalize of class Vector2 */
  15375. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Normalize00
  15376. static int tolua_Math_Vector2_Normalize00(lua_State* tolua_S)
  15377. {
  15378. #ifndef TOLUA_RELEASE
  15379. tolua_Error tolua_err;
  15380. if (
  15381. !tolua_isusertype(tolua_S,1,"Vector2",0,&tolua_err) ||
  15382. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15383. )
  15384. goto tolua_lerror;
  15385. else
  15386. #endif
  15387. {
  15388. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15389. #ifndef TOLUA_RELEASE
  15390. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
  15391. #endif
  15392. {
  15393. float tolua_ret = (float) self->Normalize();
  15394. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15395. }
  15396. }
  15397. return 1;
  15398. #ifndef TOLUA_RELEASE
  15399. tolua_lerror:
  15400. tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
  15401. return 0;
  15402. #endif
  15403. }
  15404. #endif //#ifndef TOLUA_DISABLE
  15405. /* method: Length of class Vector2 */
  15406. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Length00
  15407. static int tolua_Math_Vector2_Length00(lua_State* tolua_S)
  15408. {
  15409. #ifndef TOLUA_RELEASE
  15410. tolua_Error tolua_err;
  15411. if (
  15412. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15413. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15414. )
  15415. goto tolua_lerror;
  15416. else
  15417. #endif
  15418. {
  15419. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15420. #ifndef TOLUA_RELEASE
  15421. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Length'", NULL);
  15422. #endif
  15423. {
  15424. float tolua_ret = (float) self->Length();
  15425. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15426. }
  15427. }
  15428. return 1;
  15429. #ifndef TOLUA_RELEASE
  15430. tolua_lerror:
  15431. tolua_error(tolua_S,"#ferror in function 'Length'.",&tolua_err);
  15432. return 0;
  15433. #endif
  15434. }
  15435. #endif //#ifndef TOLUA_DISABLE
  15436. /* method: LengthSquared of class Vector2 */
  15437. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_LengthSquared00
  15438. static int tolua_Math_Vector2_LengthSquared00(lua_State* tolua_S)
  15439. {
  15440. #ifndef TOLUA_RELEASE
  15441. tolua_Error tolua_err;
  15442. if (
  15443. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15444. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15445. )
  15446. goto tolua_lerror;
  15447. else
  15448. #endif
  15449. {
  15450. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15451. #ifndef TOLUA_RELEASE
  15452. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
  15453. #endif
  15454. {
  15455. float tolua_ret = (float) self->LengthSquared();
  15456. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15457. }
  15458. }
  15459. return 1;
  15460. #ifndef TOLUA_RELEASE
  15461. tolua_lerror:
  15462. tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
  15463. return 0;
  15464. #endif
  15465. }
  15466. #endif //#ifndef TOLUA_DISABLE
  15467. /* method: DotProduct of class Vector2 */
  15468. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_DotProduct00
  15469. static int tolua_Math_Vector2_DotProduct00(lua_State* tolua_S)
  15470. {
  15471. #ifndef TOLUA_RELEASE
  15472. tolua_Error tolua_err;
  15473. if (
  15474. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15475. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15476. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15477. )
  15478. goto tolua_lerror;
  15479. else
  15480. #endif
  15481. {
  15482. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15483. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15484. #ifndef TOLUA_RELEASE
  15485. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  15486. #endif
  15487. {
  15488. float tolua_ret = (float) self->DotProduct(*rhs);
  15489. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15490. }
  15491. }
  15492. return 1;
  15493. #ifndef TOLUA_RELEASE
  15494. tolua_lerror:
  15495. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  15496. return 0;
  15497. #endif
  15498. }
  15499. #endif //#ifndef TOLUA_DISABLE
  15500. /* method: AbsDotProduct of class Vector2 */
  15501. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_AbsDotProduct00
  15502. static int tolua_Math_Vector2_AbsDotProduct00(lua_State* tolua_S)
  15503. {
  15504. #ifndef TOLUA_RELEASE
  15505. tolua_Error tolua_err;
  15506. if (
  15507. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15508. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15509. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15510. )
  15511. goto tolua_lerror;
  15512. else
  15513. #endif
  15514. {
  15515. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15516. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15517. #ifndef TOLUA_RELEASE
  15518. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AbsDotProduct'", NULL);
  15519. #endif
  15520. {
  15521. float tolua_ret = (float) self->AbsDotProduct(*rhs);
  15522. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15523. }
  15524. }
  15525. return 1;
  15526. #ifndef TOLUA_RELEASE
  15527. tolua_lerror:
  15528. tolua_error(tolua_S,"#ferror in function 'AbsDotProduct'.",&tolua_err);
  15529. return 0;
  15530. #endif
  15531. }
  15532. #endif //#ifndef TOLUA_DISABLE
  15533. /* method: Abs of class Vector2 */
  15534. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Abs00
  15535. static int tolua_Math_Vector2_Abs00(lua_State* tolua_S)
  15536. {
  15537. #ifndef TOLUA_RELEASE
  15538. tolua_Error tolua_err;
  15539. if (
  15540. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15541. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15542. )
  15543. goto tolua_lerror;
  15544. else
  15545. #endif
  15546. {
  15547. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15548. #ifndef TOLUA_RELEASE
  15549. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Abs'", NULL);
  15550. #endif
  15551. {
  15552. Vector2 tolua_ret = (Vector2) self->Abs();
  15553. {
  15554. #ifdef __cplusplus
  15555. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15556. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15557. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15558. #else
  15559. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15560. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15561. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15562. #endif
  15563. }
  15564. }
  15565. }
  15566. return 1;
  15567. #ifndef TOLUA_RELEASE
  15568. tolua_lerror:
  15569. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  15570. return 0;
  15571. #endif
  15572. }
  15573. #endif //#ifndef TOLUA_DISABLE
  15574. /* method: Lerp of class Vector2 */
  15575. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Lerp00
  15576. static int tolua_Math_Vector2_Lerp00(lua_State* tolua_S)
  15577. {
  15578. #ifndef TOLUA_RELEASE
  15579. tolua_Error tolua_err;
  15580. if (
  15581. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15582. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15583. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15584. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15585. )
  15586. goto tolua_lerror;
  15587. else
  15588. #endif
  15589. {
  15590. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15591. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15592. float t = ((float) tolua_tonumber(tolua_S,3,0));
  15593. #ifndef TOLUA_RELEASE
  15594. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  15595. #endif
  15596. {
  15597. Vector2 tolua_ret = (Vector2) self->Lerp(*rhs,t);
  15598. {
  15599. #ifdef __cplusplus
  15600. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15601. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15602. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15603. #else
  15604. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15605. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15606. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15607. #endif
  15608. }
  15609. }
  15610. }
  15611. return 1;
  15612. #ifndef TOLUA_RELEASE
  15613. tolua_lerror:
  15614. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  15615. return 0;
  15616. #endif
  15617. }
  15618. #endif //#ifndef TOLUA_DISABLE
  15619. /* method: Equals of class Vector2 */
  15620. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Equals00
  15621. static int tolua_Math_Vector2_Equals00(lua_State* tolua_S)
  15622. {
  15623. #ifndef TOLUA_RELEASE
  15624. tolua_Error tolua_err;
  15625. if (
  15626. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15627. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15628. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15629. )
  15630. goto tolua_lerror;
  15631. else
  15632. #endif
  15633. {
  15634. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15635. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15636. #ifndef TOLUA_RELEASE
  15637. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  15638. #endif
  15639. {
  15640. bool tolua_ret = (bool) self->Equals(*rhs);
  15641. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  15642. }
  15643. }
  15644. return 1;
  15645. #ifndef TOLUA_RELEASE
  15646. tolua_lerror:
  15647. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  15648. return 0;
  15649. #endif
  15650. }
  15651. #endif //#ifndef TOLUA_DISABLE
  15652. /* method: Normalized of class Vector2 */
  15653. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Normalized00
  15654. static int tolua_Math_Vector2_Normalized00(lua_State* tolua_S)
  15655. {
  15656. #ifndef TOLUA_RELEASE
  15657. tolua_Error tolua_err;
  15658. if (
  15659. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15660. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15661. )
  15662. goto tolua_lerror;
  15663. else
  15664. #endif
  15665. {
  15666. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15667. #ifndef TOLUA_RELEASE
  15668. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalized'", NULL);
  15669. #endif
  15670. {
  15671. Vector2 tolua_ret = (Vector2) self->Normalized();
  15672. {
  15673. #ifdef __cplusplus
  15674. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15675. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15676. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15677. #else
  15678. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15679. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15680. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15681. #endif
  15682. }
  15683. }
  15684. }
  15685. return 1;
  15686. #ifndef TOLUA_RELEASE
  15687. tolua_lerror:
  15688. tolua_error(tolua_S,"#ferror in function 'Normalized'.",&tolua_err);
  15689. return 0;
  15690. #endif
  15691. }
  15692. #endif //#ifndef TOLUA_DISABLE
  15693. /* method: ToString of class Vector2 */
  15694. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_ToString00
  15695. static int tolua_Math_Vector2_ToString00(lua_State* tolua_S)
  15696. {
  15697. #ifndef TOLUA_RELEASE
  15698. tolua_Error tolua_err;
  15699. if (
  15700. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15701. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15702. )
  15703. goto tolua_lerror;
  15704. else
  15705. #endif
  15706. {
  15707. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15708. #ifndef TOLUA_RELEASE
  15709. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  15710. #endif
  15711. {
  15712. String tolua_ret = (String) self->ToString();
  15713. {
  15714. #ifdef __cplusplus
  15715. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  15716. tolua_pushusertype(tolua_S,tolua_obj,"String");
  15717. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15718. #else
  15719. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  15720. tolua_pushusertype(tolua_S,tolua_obj,"String");
  15721. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15722. #endif
  15723. }
  15724. }
  15725. }
  15726. return 1;
  15727. #ifndef TOLUA_RELEASE
  15728. tolua_lerror:
  15729. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  15730. return 0;
  15731. #endif
  15732. }
  15733. #endif //#ifndef TOLUA_DISABLE
  15734. /* get function: x_ of class Vector2 */
  15735. #ifndef TOLUA_DISABLE_tolua_get_Vector2_x
  15736. static int tolua_get_Vector2_x(lua_State* tolua_S)
  15737. {
  15738. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15739. #ifndef TOLUA_RELEASE
  15740. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  15741. #endif
  15742. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  15743. return 1;
  15744. }
  15745. #endif //#ifndef TOLUA_DISABLE
  15746. /* set function: x_ of class Vector2 */
  15747. #ifndef TOLUA_DISABLE_tolua_set_Vector2_x
  15748. static int tolua_set_Vector2_x(lua_State* tolua_S)
  15749. {
  15750. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15751. #ifndef TOLUA_RELEASE
  15752. tolua_Error tolua_err;
  15753. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  15754. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  15755. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  15756. #endif
  15757. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  15758. ;
  15759. return 0;
  15760. }
  15761. #endif //#ifndef TOLUA_DISABLE
  15762. /* get function: y_ of class Vector2 */
  15763. #ifndef TOLUA_DISABLE_tolua_get_Vector2_y
  15764. static int tolua_get_Vector2_y(lua_State* tolua_S)
  15765. {
  15766. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15767. #ifndef TOLUA_RELEASE
  15768. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  15769. #endif
  15770. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  15771. return 1;
  15772. }
  15773. #endif //#ifndef TOLUA_DISABLE
  15774. /* set function: y_ of class Vector2 */
  15775. #ifndef TOLUA_DISABLE_tolua_set_Vector2_y
  15776. static int tolua_set_Vector2_y(lua_State* tolua_S)
  15777. {
  15778. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15779. #ifndef TOLUA_RELEASE
  15780. tolua_Error tolua_err;
  15781. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  15782. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  15783. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  15784. #endif
  15785. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  15786. ;
  15787. return 0;
  15788. }
  15789. #endif //#ifndef TOLUA_DISABLE
  15790. /* get function: ZERO of class Vector2 */
  15791. #ifndef TOLUA_DISABLE_tolua_get_Vector2_ZERO
  15792. static int tolua_get_Vector2_ZERO(lua_State* tolua_S)
  15793. {
  15794. tolua_pushusertype(tolua_S,(void*)&Vector2::ZERO,"const Vector2");
  15795. return 1;
  15796. }
  15797. #endif //#ifndef TOLUA_DISABLE
  15798. /* get function: LEFT of class Vector2 */
  15799. #ifndef TOLUA_DISABLE_tolua_get_Vector2_LEFT
  15800. static int tolua_get_Vector2_LEFT(lua_State* tolua_S)
  15801. {
  15802. tolua_pushusertype(tolua_S,(void*)&Vector2::LEFT,"const Vector2");
  15803. return 1;
  15804. }
  15805. #endif //#ifndef TOLUA_DISABLE
  15806. /* get function: RIGHT of class Vector2 */
  15807. #ifndef TOLUA_DISABLE_tolua_get_Vector2_RIGHT
  15808. static int tolua_get_Vector2_RIGHT(lua_State* tolua_S)
  15809. {
  15810. tolua_pushusertype(tolua_S,(void*)&Vector2::RIGHT,"const Vector2");
  15811. return 1;
  15812. }
  15813. #endif //#ifndef TOLUA_DISABLE
  15814. /* get function: UP of class Vector2 */
  15815. #ifndef TOLUA_DISABLE_tolua_get_Vector2_UP
  15816. static int tolua_get_Vector2_UP(lua_State* tolua_S)
  15817. {
  15818. tolua_pushusertype(tolua_S,(void*)&Vector2::UP,"const Vector2");
  15819. return 1;
  15820. }
  15821. #endif //#ifndef TOLUA_DISABLE
  15822. /* get function: DOWN of class Vector2 */
  15823. #ifndef TOLUA_DISABLE_tolua_get_Vector2_DOWN
  15824. static int tolua_get_Vector2_DOWN(lua_State* tolua_S)
  15825. {
  15826. tolua_pushusertype(tolua_S,(void*)&Vector2::DOWN,"const Vector2");
  15827. return 1;
  15828. }
  15829. #endif //#ifndef TOLUA_DISABLE
  15830. /* get function: ONE of class Vector2 */
  15831. #ifndef TOLUA_DISABLE_tolua_get_Vector2_ONE
  15832. static int tolua_get_Vector2_ONE(lua_State* tolua_S)
  15833. {
  15834. tolua_pushusertype(tolua_S,(void*)&Vector2::ONE,"const Vector2");
  15835. return 1;
  15836. }
  15837. #endif //#ifndef TOLUA_DISABLE
  15838. /* method: new of class IntVector2 */
  15839. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new00
  15840. static int tolua_Math_IntVector2_new00(lua_State* tolua_S)
  15841. {
  15842. #ifndef TOLUA_RELEASE
  15843. tolua_Error tolua_err;
  15844. if (
  15845. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15846. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15847. )
  15848. goto tolua_lerror;
  15849. else
  15850. #endif
  15851. {
  15852. {
  15853. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)());
  15854. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15855. }
  15856. }
  15857. return 1;
  15858. #ifndef TOLUA_RELEASE
  15859. tolua_lerror:
  15860. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  15861. return 0;
  15862. #endif
  15863. }
  15864. #endif //#ifndef TOLUA_DISABLE
  15865. /* method: new_local of class IntVector2 */
  15866. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new00_local
  15867. static int tolua_Math_IntVector2_new00_local(lua_State* tolua_S)
  15868. {
  15869. #ifndef TOLUA_RELEASE
  15870. tolua_Error tolua_err;
  15871. if (
  15872. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15873. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15874. )
  15875. goto tolua_lerror;
  15876. else
  15877. #endif
  15878. {
  15879. {
  15880. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)());
  15881. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15882. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15883. }
  15884. }
  15885. return 1;
  15886. #ifndef TOLUA_RELEASE
  15887. tolua_lerror:
  15888. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  15889. return 0;
  15890. #endif
  15891. }
  15892. #endif //#ifndef TOLUA_DISABLE
  15893. /* method: new of class IntVector2 */
  15894. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new01
  15895. static int tolua_Math_IntVector2_new01(lua_State* tolua_S)
  15896. {
  15897. tolua_Error tolua_err;
  15898. if (
  15899. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15900. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15901. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15902. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15903. )
  15904. goto tolua_lerror;
  15905. else
  15906. {
  15907. int x = ((int) tolua_tonumber(tolua_S,2,0));
  15908. int y = ((int) tolua_tonumber(tolua_S,3,0));
  15909. {
  15910. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(x,y));
  15911. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15912. }
  15913. }
  15914. return 1;
  15915. tolua_lerror:
  15916. return tolua_Math_IntVector2_new00(tolua_S);
  15917. }
  15918. #endif //#ifndef TOLUA_DISABLE
  15919. /* method: new_local of class IntVector2 */
  15920. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new01_local
  15921. static int tolua_Math_IntVector2_new01_local(lua_State* tolua_S)
  15922. {
  15923. tolua_Error tolua_err;
  15924. if (
  15925. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15926. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15927. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15928. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15929. )
  15930. goto tolua_lerror;
  15931. else
  15932. {
  15933. int x = ((int) tolua_tonumber(tolua_S,2,0));
  15934. int y = ((int) tolua_tonumber(tolua_S,3,0));
  15935. {
  15936. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(x,y));
  15937. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15938. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15939. }
  15940. }
  15941. return 1;
  15942. tolua_lerror:
  15943. return tolua_Math_IntVector2_new00_local(tolua_S);
  15944. }
  15945. #endif //#ifndef TOLUA_DISABLE
  15946. /* method: new of class IntVector2 */
  15947. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new02
  15948. static int tolua_Math_IntVector2_new02(lua_State* tolua_S)
  15949. {
  15950. tolua_Error tolua_err;
  15951. if (
  15952. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15953. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15954. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15955. )
  15956. goto tolua_lerror;
  15957. else
  15958. {
  15959. const int data = ((const int) tolua_tonumber(tolua_S,2,0));
  15960. {
  15961. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(&data));
  15962. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15963. tolua_pushnumber(tolua_S,(lua_Number)data);
  15964. }
  15965. }
  15966. return 2;
  15967. tolua_lerror:
  15968. return tolua_Math_IntVector2_new01(tolua_S);
  15969. }
  15970. #endif //#ifndef TOLUA_DISABLE
  15971. /* method: new_local of class IntVector2 */
  15972. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new02_local
  15973. static int tolua_Math_IntVector2_new02_local(lua_State* tolua_S)
  15974. {
  15975. tolua_Error tolua_err;
  15976. if (
  15977. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15978. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15979. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15980. )
  15981. goto tolua_lerror;
  15982. else
  15983. {
  15984. const int data = ((const int) tolua_tonumber(tolua_S,2,0));
  15985. {
  15986. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(&data));
  15987. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15988. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15989. tolua_pushnumber(tolua_S,(lua_Number)data);
  15990. }
  15991. }
  15992. return 2;
  15993. tolua_lerror:
  15994. return tolua_Math_IntVector2_new01_local(tolua_S);
  15995. }
  15996. #endif //#ifndef TOLUA_DISABLE
  15997. /* method: new of class IntVector2 */
  15998. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new03
  15999. static int tolua_Math_IntVector2_new03(lua_State* tolua_S)
  16000. {
  16001. tolua_Error tolua_err;
  16002. if (
  16003. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  16004. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  16005. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16006. )
  16007. goto tolua_lerror;
  16008. else
  16009. {
  16010. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  16011. {
  16012. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(*rhs));
  16013. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  16014. }
  16015. }
  16016. return 1;
  16017. tolua_lerror:
  16018. return tolua_Math_IntVector2_new02(tolua_S);
  16019. }
  16020. #endif //#ifndef TOLUA_DISABLE
  16021. /* method: new_local of class IntVector2 */
  16022. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new03_local
  16023. static int tolua_Math_IntVector2_new03_local(lua_State* tolua_S)
  16024. {
  16025. tolua_Error tolua_err;
  16026. if (
  16027. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  16028. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  16029. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16030. )
  16031. goto tolua_lerror;
  16032. else
  16033. {
  16034. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  16035. {
  16036. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(*rhs));
  16037. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  16038. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16039. }
  16040. }
  16041. return 1;
  16042. tolua_lerror:
  16043. return tolua_Math_IntVector2_new02_local(tolua_S);
  16044. }
  16045. #endif //#ifndef TOLUA_DISABLE
  16046. /* method: operator== of class IntVector2 */
  16047. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__eq00
  16048. static int tolua_Math_IntVector2__eq00(lua_State* tolua_S)
  16049. {
  16050. #ifndef TOLUA_RELEASE
  16051. tolua_Error tolua_err;
  16052. if (
  16053. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16054. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  16055. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16056. )
  16057. goto tolua_lerror;
  16058. else
  16059. #endif
  16060. {
  16061. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16062. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  16063. #ifndef TOLUA_RELEASE
  16064. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  16065. #endif
  16066. {
  16067. bool tolua_ret = (bool) self->operator==(*rhs);
  16068. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  16069. }
  16070. }
  16071. return 1;
  16072. #ifndef TOLUA_RELEASE
  16073. tolua_lerror:
  16074. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  16075. return 0;
  16076. #endif
  16077. }
  16078. #endif //#ifndef TOLUA_DISABLE
  16079. /* method: operator+ of class IntVector2 */
  16080. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__add00
  16081. static int tolua_Math_IntVector2__add00(lua_State* tolua_S)
  16082. {
  16083. #ifndef TOLUA_RELEASE
  16084. tolua_Error tolua_err;
  16085. if (
  16086. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16087. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  16088. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16089. )
  16090. goto tolua_lerror;
  16091. else
  16092. #endif
  16093. {
  16094. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16095. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  16096. #ifndef TOLUA_RELEASE
  16097. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  16098. #endif
  16099. {
  16100. IntVector2 tolua_ret = (IntVector2) self->operator+(*rhs);
  16101. {
  16102. #ifdef __cplusplus
  16103. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  16104. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16105. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16106. #else
  16107. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  16108. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16109. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16110. #endif
  16111. }
  16112. }
  16113. }
  16114. return 1;
  16115. #ifndef TOLUA_RELEASE
  16116. tolua_lerror:
  16117. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  16118. return 0;
  16119. #endif
  16120. }
  16121. #endif //#ifndef TOLUA_DISABLE
  16122. /* method: operator- of class IntVector2 */
  16123. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__sub00
  16124. static int tolua_Math_IntVector2__sub00(lua_State* tolua_S)
  16125. {
  16126. #ifndef TOLUA_RELEASE
  16127. tolua_Error tolua_err;
  16128. if (
  16129. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16130. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16131. )
  16132. goto tolua_lerror;
  16133. else
  16134. #endif
  16135. {
  16136. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16137. #ifndef TOLUA_RELEASE
  16138. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  16139. #endif
  16140. {
  16141. IntVector2 tolua_ret = (IntVector2) self->operator-();
  16142. {
  16143. #ifdef __cplusplus
  16144. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  16145. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16146. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16147. #else
  16148. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  16149. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16150. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16151. #endif
  16152. }
  16153. }
  16154. }
  16155. return 1;
  16156. #ifndef TOLUA_RELEASE
  16157. tolua_lerror:
  16158. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  16159. return 0;
  16160. #endif
  16161. }
  16162. #endif //#ifndef TOLUA_DISABLE
  16163. /* method: operator- of class IntVector2 */
  16164. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__sub01
  16165. static int tolua_Math_IntVector2__sub01(lua_State* tolua_S)
  16166. {
  16167. tolua_Error tolua_err;
  16168. if (
  16169. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16170. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  16171. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16172. )
  16173. goto tolua_lerror;
  16174. else
  16175. {
  16176. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16177. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  16178. #ifndef TOLUA_RELEASE
  16179. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  16180. #endif
  16181. {
  16182. IntVector2 tolua_ret = (IntVector2) self->operator-(*rhs);
  16183. {
  16184. #ifdef __cplusplus
  16185. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  16186. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16187. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16188. #else
  16189. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  16190. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16191. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16192. #endif
  16193. }
  16194. }
  16195. }
  16196. return 1;
  16197. tolua_lerror:
  16198. return tolua_Math_IntVector2__sub00(tolua_S);
  16199. }
  16200. #endif //#ifndef TOLUA_DISABLE
  16201. /* method: operator* of class IntVector2 */
  16202. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__mul00
  16203. static int tolua_Math_IntVector2__mul00(lua_State* tolua_S)
  16204. {
  16205. #ifndef TOLUA_RELEASE
  16206. tolua_Error tolua_err;
  16207. if (
  16208. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16209. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16210. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16211. )
  16212. goto tolua_lerror;
  16213. else
  16214. #endif
  16215. {
  16216. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16217. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  16218. #ifndef TOLUA_RELEASE
  16219. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  16220. #endif
  16221. {
  16222. IntVector2 tolua_ret = (IntVector2) self->operator*(rhs);
  16223. {
  16224. #ifdef __cplusplus
  16225. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  16226. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16227. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16228. #else
  16229. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  16230. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16231. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16232. #endif
  16233. }
  16234. }
  16235. }
  16236. return 1;
  16237. #ifndef TOLUA_RELEASE
  16238. tolua_lerror:
  16239. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  16240. return 0;
  16241. #endif
  16242. }
  16243. #endif //#ifndef TOLUA_DISABLE
  16244. /* method: operator/ of class IntVector2 */
  16245. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__div00
  16246. static int tolua_Math_IntVector2__div00(lua_State* tolua_S)
  16247. {
  16248. #ifndef TOLUA_RELEASE
  16249. tolua_Error tolua_err;
  16250. if (
  16251. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16252. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16253. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16254. )
  16255. goto tolua_lerror;
  16256. else
  16257. #endif
  16258. {
  16259. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16260. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  16261. #ifndef TOLUA_RELEASE
  16262. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16263. #endif
  16264. {
  16265. IntVector2 tolua_ret = (IntVector2) self->operator/(rhs);
  16266. {
  16267. #ifdef __cplusplus
  16268. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  16269. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16270. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16271. #else
  16272. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  16273. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16274. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16275. #endif
  16276. }
  16277. }
  16278. }
  16279. return 1;
  16280. #ifndef TOLUA_RELEASE
  16281. tolua_lerror:
  16282. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  16283. return 0;
  16284. #endif
  16285. }
  16286. #endif //#ifndef TOLUA_DISABLE
  16287. /* method: operator/ of class IntVector2 */
  16288. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__div01
  16289. static int tolua_Math_IntVector2__div01(lua_State* tolua_S)
  16290. {
  16291. tolua_Error tolua_err;
  16292. if (
  16293. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16294. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16295. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16296. )
  16297. goto tolua_lerror;
  16298. else
  16299. {
  16300. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16301. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  16302. #ifndef TOLUA_RELEASE
  16303. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16304. #endif
  16305. {
  16306. IntVector2 tolua_ret = (IntVector2) self->operator/(rhs);
  16307. {
  16308. #ifdef __cplusplus
  16309. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  16310. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16311. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16312. #else
  16313. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  16314. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  16315. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16316. #endif
  16317. }
  16318. }
  16319. }
  16320. return 1;
  16321. tolua_lerror:
  16322. return tolua_Math_IntVector2__div00(tolua_S);
  16323. }
  16324. #endif //#ifndef TOLUA_DISABLE
  16325. /* method: ToString of class IntVector2 */
  16326. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_ToString00
  16327. static int tolua_Math_IntVector2_ToString00(lua_State* tolua_S)
  16328. {
  16329. #ifndef TOLUA_RELEASE
  16330. tolua_Error tolua_err;
  16331. if (
  16332. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  16333. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16334. )
  16335. goto tolua_lerror;
  16336. else
  16337. #endif
  16338. {
  16339. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  16340. #ifndef TOLUA_RELEASE
  16341. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  16342. #endif
  16343. {
  16344. String tolua_ret = (String) self->ToString();
  16345. {
  16346. #ifdef __cplusplus
  16347. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  16348. tolua_pushusertype(tolua_S,tolua_obj,"String");
  16349. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16350. #else
  16351. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  16352. tolua_pushusertype(tolua_S,tolua_obj,"String");
  16353. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16354. #endif
  16355. }
  16356. }
  16357. }
  16358. return 1;
  16359. #ifndef TOLUA_RELEASE
  16360. tolua_lerror:
  16361. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  16362. return 0;
  16363. #endif
  16364. }
  16365. #endif //#ifndef TOLUA_DISABLE
  16366. /* get function: x_ of class IntVector2 */
  16367. #ifndef TOLUA_DISABLE_tolua_get_IntVector2_x
  16368. static int tolua_get_IntVector2_x(lua_State* tolua_S)
  16369. {
  16370. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  16371. #ifndef TOLUA_RELEASE
  16372. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  16373. #endif
  16374. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  16375. return 1;
  16376. }
  16377. #endif //#ifndef TOLUA_DISABLE
  16378. /* set function: x_ of class IntVector2 */
  16379. #ifndef TOLUA_DISABLE_tolua_set_IntVector2_x
  16380. static int tolua_set_IntVector2_x(lua_State* tolua_S)
  16381. {
  16382. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  16383. #ifndef TOLUA_RELEASE
  16384. tolua_Error tolua_err;
  16385. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  16386. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  16387. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  16388. #endif
  16389. self->x_ = ((int) tolua_tonumber(tolua_S,2,0))
  16390. ;
  16391. return 0;
  16392. }
  16393. #endif //#ifndef TOLUA_DISABLE
  16394. /* get function: y_ of class IntVector2 */
  16395. #ifndef TOLUA_DISABLE_tolua_get_IntVector2_y
  16396. static int tolua_get_IntVector2_y(lua_State* tolua_S)
  16397. {
  16398. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  16399. #ifndef TOLUA_RELEASE
  16400. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  16401. #endif
  16402. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  16403. return 1;
  16404. }
  16405. #endif //#ifndef TOLUA_DISABLE
  16406. /* set function: y_ of class IntVector2 */
  16407. #ifndef TOLUA_DISABLE_tolua_set_IntVector2_y
  16408. static int tolua_set_IntVector2_y(lua_State* tolua_S)
  16409. {
  16410. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  16411. #ifndef TOLUA_RELEASE
  16412. tolua_Error tolua_err;
  16413. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  16414. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  16415. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  16416. #endif
  16417. self->y_ = ((int) tolua_tonumber(tolua_S,2,0))
  16418. ;
  16419. return 0;
  16420. }
  16421. #endif //#ifndef TOLUA_DISABLE
  16422. /* get function: ZERO of class IntVector2 */
  16423. #ifndef TOLUA_DISABLE_tolua_get_IntVector2_ZERO
  16424. static int tolua_get_IntVector2_ZERO(lua_State* tolua_S)
  16425. {
  16426. tolua_pushusertype(tolua_S,(void*)&IntVector2::ZERO,"const IntVector2");
  16427. return 1;
  16428. }
  16429. #endif //#ifndef TOLUA_DISABLE
  16430. /* method: new of class Vector3 */
  16431. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new00
  16432. static int tolua_Math_Vector3_new00(lua_State* tolua_S)
  16433. {
  16434. #ifndef TOLUA_RELEASE
  16435. tolua_Error tolua_err;
  16436. if (
  16437. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16438. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16439. )
  16440. goto tolua_lerror;
  16441. else
  16442. #endif
  16443. {
  16444. {
  16445. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)());
  16446. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16447. }
  16448. }
  16449. return 1;
  16450. #ifndef TOLUA_RELEASE
  16451. tolua_lerror:
  16452. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  16453. return 0;
  16454. #endif
  16455. }
  16456. #endif //#ifndef TOLUA_DISABLE
  16457. /* method: new_local of class Vector3 */
  16458. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new00_local
  16459. static int tolua_Math_Vector3_new00_local(lua_State* tolua_S)
  16460. {
  16461. #ifndef TOLUA_RELEASE
  16462. tolua_Error tolua_err;
  16463. if (
  16464. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16465. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16466. )
  16467. goto tolua_lerror;
  16468. else
  16469. #endif
  16470. {
  16471. {
  16472. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)());
  16473. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16474. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16475. }
  16476. }
  16477. return 1;
  16478. #ifndef TOLUA_RELEASE
  16479. tolua_lerror:
  16480. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  16481. return 0;
  16482. #endif
  16483. }
  16484. #endif //#ifndef TOLUA_DISABLE
  16485. /* method: new of class Vector3 */
  16486. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new01
  16487. static int tolua_Math_Vector3_new01(lua_State* tolua_S)
  16488. {
  16489. tolua_Error tolua_err;
  16490. if (
  16491. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16492. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16493. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16494. )
  16495. goto tolua_lerror;
  16496. else
  16497. {
  16498. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16499. {
  16500. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector));
  16501. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16502. }
  16503. }
  16504. return 1;
  16505. tolua_lerror:
  16506. return tolua_Math_Vector3_new00(tolua_S);
  16507. }
  16508. #endif //#ifndef TOLUA_DISABLE
  16509. /* method: new_local of class Vector3 */
  16510. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new01_local
  16511. static int tolua_Math_Vector3_new01_local(lua_State* tolua_S)
  16512. {
  16513. tolua_Error tolua_err;
  16514. if (
  16515. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16516. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16517. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16518. )
  16519. goto tolua_lerror;
  16520. else
  16521. {
  16522. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16523. {
  16524. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector));
  16525. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16526. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16527. }
  16528. }
  16529. return 1;
  16530. tolua_lerror:
  16531. return tolua_Math_Vector3_new00_local(tolua_S);
  16532. }
  16533. #endif //#ifndef TOLUA_DISABLE
  16534. /* method: new of class Vector3 */
  16535. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new02
  16536. static int tolua_Math_Vector3_new02(lua_State* tolua_S)
  16537. {
  16538. tolua_Error tolua_err;
  16539. if (
  16540. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16541. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  16542. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16543. !tolua_isnoobj(tolua_S,4,&tolua_err)
  16544. )
  16545. goto tolua_lerror;
  16546. else
  16547. {
  16548. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  16549. float z = ((float) tolua_tonumber(tolua_S,3,0));
  16550. {
  16551. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector,z));
  16552. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16553. }
  16554. }
  16555. return 1;
  16556. tolua_lerror:
  16557. return tolua_Math_Vector3_new01(tolua_S);
  16558. }
  16559. #endif //#ifndef TOLUA_DISABLE
  16560. /* method: new_local of class Vector3 */
  16561. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new02_local
  16562. static int tolua_Math_Vector3_new02_local(lua_State* tolua_S)
  16563. {
  16564. tolua_Error tolua_err;
  16565. if (
  16566. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16567. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  16568. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16569. !tolua_isnoobj(tolua_S,4,&tolua_err)
  16570. )
  16571. goto tolua_lerror;
  16572. else
  16573. {
  16574. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  16575. float z = ((float) tolua_tonumber(tolua_S,3,0));
  16576. {
  16577. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector,z));
  16578. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16579. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16580. }
  16581. }
  16582. return 1;
  16583. tolua_lerror:
  16584. return tolua_Math_Vector3_new01_local(tolua_S);
  16585. }
  16586. #endif //#ifndef TOLUA_DISABLE
  16587. /* method: new of class Vector3 */
  16588. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new03
  16589. static int tolua_Math_Vector3_new03(lua_State* tolua_S)
  16590. {
  16591. tolua_Error tolua_err;
  16592. if (
  16593. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16594. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16595. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16596. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  16597. !tolua_isnoobj(tolua_S,5,&tolua_err)
  16598. )
  16599. goto tolua_lerror;
  16600. else
  16601. {
  16602. float x = ((float) tolua_tonumber(tolua_S,2,0));
  16603. float y = ((float) tolua_tonumber(tolua_S,3,0));
  16604. float z = ((float) tolua_tonumber(tolua_S,4,0));
  16605. {
  16606. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(x,y,z));
  16607. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16608. }
  16609. }
  16610. return 1;
  16611. tolua_lerror:
  16612. return tolua_Math_Vector3_new02(tolua_S);
  16613. }
  16614. #endif //#ifndef TOLUA_DISABLE
  16615. /* method: new_local of class Vector3 */
  16616. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new03_local
  16617. static int tolua_Math_Vector3_new03_local(lua_State* tolua_S)
  16618. {
  16619. tolua_Error tolua_err;
  16620. if (
  16621. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16622. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16623. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16624. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  16625. !tolua_isnoobj(tolua_S,5,&tolua_err)
  16626. )
  16627. goto tolua_lerror;
  16628. else
  16629. {
  16630. float x = ((float) tolua_tonumber(tolua_S,2,0));
  16631. float y = ((float) tolua_tonumber(tolua_S,3,0));
  16632. float z = ((float) tolua_tonumber(tolua_S,4,0));
  16633. {
  16634. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(x,y,z));
  16635. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16636. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16637. }
  16638. }
  16639. return 1;
  16640. tolua_lerror:
  16641. return tolua_Math_Vector3_new02_local(tolua_S);
  16642. }
  16643. #endif //#ifndef TOLUA_DISABLE
  16644. /* method: operator== of class Vector3 */
  16645. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__eq00
  16646. static int tolua_Math_Vector3__eq00(lua_State* tolua_S)
  16647. {
  16648. #ifndef TOLUA_RELEASE
  16649. tolua_Error tolua_err;
  16650. if (
  16651. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16652. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16653. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16654. )
  16655. goto tolua_lerror;
  16656. else
  16657. #endif
  16658. {
  16659. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16660. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16661. #ifndef TOLUA_RELEASE
  16662. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  16663. #endif
  16664. {
  16665. bool tolua_ret = (bool) self->operator==(*rhs);
  16666. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  16667. }
  16668. }
  16669. return 1;
  16670. #ifndef TOLUA_RELEASE
  16671. tolua_lerror:
  16672. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  16673. return 0;
  16674. #endif
  16675. }
  16676. #endif //#ifndef TOLUA_DISABLE
  16677. /* method: operator+ of class Vector3 */
  16678. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__add00
  16679. static int tolua_Math_Vector3__add00(lua_State* tolua_S)
  16680. {
  16681. #ifndef TOLUA_RELEASE
  16682. tolua_Error tolua_err;
  16683. if (
  16684. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16685. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16686. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16687. )
  16688. goto tolua_lerror;
  16689. else
  16690. #endif
  16691. {
  16692. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16693. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16694. #ifndef TOLUA_RELEASE
  16695. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  16696. #endif
  16697. {
  16698. Vector3 tolua_ret = (Vector3) self->operator+(*rhs);
  16699. {
  16700. #ifdef __cplusplus
  16701. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16702. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16703. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16704. #else
  16705. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16706. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16707. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16708. #endif
  16709. }
  16710. }
  16711. }
  16712. return 1;
  16713. #ifndef TOLUA_RELEASE
  16714. tolua_lerror:
  16715. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  16716. return 0;
  16717. #endif
  16718. }
  16719. #endif //#ifndef TOLUA_DISABLE
  16720. /* method: operator- of class Vector3 */
  16721. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__sub00
  16722. static int tolua_Math_Vector3__sub00(lua_State* tolua_S)
  16723. {
  16724. #ifndef TOLUA_RELEASE
  16725. tolua_Error tolua_err;
  16726. if (
  16727. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16728. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16729. )
  16730. goto tolua_lerror;
  16731. else
  16732. #endif
  16733. {
  16734. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16735. #ifndef TOLUA_RELEASE
  16736. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  16737. #endif
  16738. {
  16739. Vector3 tolua_ret = (Vector3) self->operator-();
  16740. {
  16741. #ifdef __cplusplus
  16742. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16743. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16744. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16745. #else
  16746. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16747. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16748. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16749. #endif
  16750. }
  16751. }
  16752. }
  16753. return 1;
  16754. #ifndef TOLUA_RELEASE
  16755. tolua_lerror:
  16756. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  16757. return 0;
  16758. #endif
  16759. }
  16760. #endif //#ifndef TOLUA_DISABLE
  16761. /* method: operator- of class Vector3 */
  16762. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__sub01
  16763. static int tolua_Math_Vector3__sub01(lua_State* tolua_S)
  16764. {
  16765. tolua_Error tolua_err;
  16766. if (
  16767. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16768. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16769. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16770. )
  16771. goto tolua_lerror;
  16772. else
  16773. {
  16774. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16775. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16776. #ifndef TOLUA_RELEASE
  16777. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  16778. #endif
  16779. {
  16780. Vector3 tolua_ret = (Vector3) self->operator-(*rhs);
  16781. {
  16782. #ifdef __cplusplus
  16783. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16784. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16785. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16786. #else
  16787. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16788. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16789. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16790. #endif
  16791. }
  16792. }
  16793. }
  16794. return 1;
  16795. tolua_lerror:
  16796. return tolua_Math_Vector3__sub00(tolua_S);
  16797. }
  16798. #endif //#ifndef TOLUA_DISABLE
  16799. /* method: operator* of class Vector3 */
  16800. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__mul00
  16801. static int tolua_Math_Vector3__mul00(lua_State* tolua_S)
  16802. {
  16803. #ifndef TOLUA_RELEASE
  16804. tolua_Error tolua_err;
  16805. if (
  16806. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16807. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16808. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16809. )
  16810. goto tolua_lerror;
  16811. else
  16812. #endif
  16813. {
  16814. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16815. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  16816. #ifndef TOLUA_RELEASE
  16817. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  16818. #endif
  16819. {
  16820. Vector3 tolua_ret = (Vector3) self->operator*(rhs);
  16821. {
  16822. #ifdef __cplusplus
  16823. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16824. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16825. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16826. #else
  16827. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16828. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16829. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16830. #endif
  16831. }
  16832. }
  16833. }
  16834. return 1;
  16835. #ifndef TOLUA_RELEASE
  16836. tolua_lerror:
  16837. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  16838. return 0;
  16839. #endif
  16840. }
  16841. #endif //#ifndef TOLUA_DISABLE
  16842. /* method: operator* of class Vector3 */
  16843. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__mul01
  16844. static int tolua_Math_Vector3__mul01(lua_State* tolua_S)
  16845. {
  16846. tolua_Error tolua_err;
  16847. if (
  16848. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16849. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16850. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16851. )
  16852. goto tolua_lerror;
  16853. else
  16854. {
  16855. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16856. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16857. #ifndef TOLUA_RELEASE
  16858. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  16859. #endif
  16860. {
  16861. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  16862. {
  16863. #ifdef __cplusplus
  16864. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16865. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16866. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16867. #else
  16868. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16869. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16870. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16871. #endif
  16872. }
  16873. }
  16874. }
  16875. return 1;
  16876. tolua_lerror:
  16877. return tolua_Math_Vector3__mul00(tolua_S);
  16878. }
  16879. #endif //#ifndef TOLUA_DISABLE
  16880. /* method: operator/ of class Vector3 */
  16881. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__div00
  16882. static int tolua_Math_Vector3__div00(lua_State* tolua_S)
  16883. {
  16884. #ifndef TOLUA_RELEASE
  16885. tolua_Error tolua_err;
  16886. if (
  16887. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16888. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16889. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16890. )
  16891. goto tolua_lerror;
  16892. else
  16893. #endif
  16894. {
  16895. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16896. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  16897. #ifndef TOLUA_RELEASE
  16898. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16899. #endif
  16900. {
  16901. Vector3 tolua_ret = (Vector3) self->operator/(rhs);
  16902. {
  16903. #ifdef __cplusplus
  16904. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16905. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16906. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16907. #else
  16908. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16909. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16910. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16911. #endif
  16912. }
  16913. }
  16914. }
  16915. return 1;
  16916. #ifndef TOLUA_RELEASE
  16917. tolua_lerror:
  16918. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  16919. return 0;
  16920. #endif
  16921. }
  16922. #endif //#ifndef TOLUA_DISABLE
  16923. /* method: operator/ of class Vector3 */
  16924. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__div01
  16925. static int tolua_Math_Vector3__div01(lua_State* tolua_S)
  16926. {
  16927. tolua_Error tolua_err;
  16928. if (
  16929. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16930. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16931. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16932. )
  16933. goto tolua_lerror;
  16934. else
  16935. {
  16936. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16937. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16938. #ifndef TOLUA_RELEASE
  16939. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16940. #endif
  16941. {
  16942. Vector3 tolua_ret = (Vector3) self->operator/(*rhs);
  16943. {
  16944. #ifdef __cplusplus
  16945. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16946. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16947. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16948. #else
  16949. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16950. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16951. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16952. #endif
  16953. }
  16954. }
  16955. }
  16956. return 1;
  16957. tolua_lerror:
  16958. return tolua_Math_Vector3__div00(tolua_S);
  16959. }
  16960. #endif //#ifndef TOLUA_DISABLE
  16961. /* method: operator/ of class Vector3 */
  16962. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__div02
  16963. static int tolua_Math_Vector3__div02(lua_State* tolua_S)
  16964. {
  16965. tolua_Error tolua_err;
  16966. if (
  16967. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16968. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16969. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16970. )
  16971. goto tolua_lerror;
  16972. else
  16973. {
  16974. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16975. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16976. #ifndef TOLUA_RELEASE
  16977. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16978. #endif
  16979. {
  16980. Vector3 tolua_ret = (Vector3) self->operator/(*rhs);
  16981. {
  16982. #ifdef __cplusplus
  16983. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16984. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16985. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16986. #else
  16987. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16988. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16989. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16990. #endif
  16991. }
  16992. }
  16993. }
  16994. return 1;
  16995. tolua_lerror:
  16996. return tolua_Math_Vector3__div01(tolua_S);
  16997. }
  16998. #endif //#ifndef TOLUA_DISABLE
  16999. /* method: Normalize of class Vector3 */
  17000. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Normalize00
  17001. static int tolua_Math_Vector3_Normalize00(lua_State* tolua_S)
  17002. {
  17003. #ifndef TOLUA_RELEASE
  17004. tolua_Error tolua_err;
  17005. if (
  17006. !tolua_isusertype(tolua_S,1,"Vector3",0,&tolua_err) ||
  17007. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17008. )
  17009. goto tolua_lerror;
  17010. else
  17011. #endif
  17012. {
  17013. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17014. #ifndef TOLUA_RELEASE
  17015. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
  17016. #endif
  17017. {
  17018. float tolua_ret = (float) self->Normalize();
  17019. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17020. }
  17021. }
  17022. return 1;
  17023. #ifndef TOLUA_RELEASE
  17024. tolua_lerror:
  17025. tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
  17026. return 0;
  17027. #endif
  17028. }
  17029. #endif //#ifndef TOLUA_DISABLE
  17030. /* method: Length of class Vector3 */
  17031. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Length00
  17032. static int tolua_Math_Vector3_Length00(lua_State* tolua_S)
  17033. {
  17034. #ifndef TOLUA_RELEASE
  17035. tolua_Error tolua_err;
  17036. if (
  17037. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17038. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17039. )
  17040. goto tolua_lerror;
  17041. else
  17042. #endif
  17043. {
  17044. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17045. #ifndef TOLUA_RELEASE
  17046. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Length'", NULL);
  17047. #endif
  17048. {
  17049. float tolua_ret = (float) self->Length();
  17050. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17051. }
  17052. }
  17053. return 1;
  17054. #ifndef TOLUA_RELEASE
  17055. tolua_lerror:
  17056. tolua_error(tolua_S,"#ferror in function 'Length'.",&tolua_err);
  17057. return 0;
  17058. #endif
  17059. }
  17060. #endif //#ifndef TOLUA_DISABLE
  17061. /* method: LengthSquared of class Vector3 */
  17062. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_LengthSquared00
  17063. static int tolua_Math_Vector3_LengthSquared00(lua_State* tolua_S)
  17064. {
  17065. #ifndef TOLUA_RELEASE
  17066. tolua_Error tolua_err;
  17067. if (
  17068. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17069. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17070. )
  17071. goto tolua_lerror;
  17072. else
  17073. #endif
  17074. {
  17075. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17076. #ifndef TOLUA_RELEASE
  17077. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
  17078. #endif
  17079. {
  17080. float tolua_ret = (float) self->LengthSquared();
  17081. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17082. }
  17083. }
  17084. return 1;
  17085. #ifndef TOLUA_RELEASE
  17086. tolua_lerror:
  17087. tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
  17088. return 0;
  17089. #endif
  17090. }
  17091. #endif //#ifndef TOLUA_DISABLE
  17092. /* method: DotProduct of class Vector3 */
  17093. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_DotProduct00
  17094. static int tolua_Math_Vector3_DotProduct00(lua_State* tolua_S)
  17095. {
  17096. #ifndef TOLUA_RELEASE
  17097. tolua_Error tolua_err;
  17098. if (
  17099. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17100. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17101. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17102. )
  17103. goto tolua_lerror;
  17104. else
  17105. #endif
  17106. {
  17107. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17108. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17109. #ifndef TOLUA_RELEASE
  17110. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  17111. #endif
  17112. {
  17113. float tolua_ret = (float) self->DotProduct(*rhs);
  17114. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17115. }
  17116. }
  17117. return 1;
  17118. #ifndef TOLUA_RELEASE
  17119. tolua_lerror:
  17120. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  17121. return 0;
  17122. #endif
  17123. }
  17124. #endif //#ifndef TOLUA_DISABLE
  17125. /* method: AbsDotProduct of class Vector3 */
  17126. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_AbsDotProduct00
  17127. static int tolua_Math_Vector3_AbsDotProduct00(lua_State* tolua_S)
  17128. {
  17129. #ifndef TOLUA_RELEASE
  17130. tolua_Error tolua_err;
  17131. if (
  17132. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17133. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17134. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17135. )
  17136. goto tolua_lerror;
  17137. else
  17138. #endif
  17139. {
  17140. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17141. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17142. #ifndef TOLUA_RELEASE
  17143. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AbsDotProduct'", NULL);
  17144. #endif
  17145. {
  17146. float tolua_ret = (float) self->AbsDotProduct(*rhs);
  17147. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17148. }
  17149. }
  17150. return 1;
  17151. #ifndef TOLUA_RELEASE
  17152. tolua_lerror:
  17153. tolua_error(tolua_S,"#ferror in function 'AbsDotProduct'.",&tolua_err);
  17154. return 0;
  17155. #endif
  17156. }
  17157. #endif //#ifndef TOLUA_DISABLE
  17158. /* method: CrossProduct of class Vector3 */
  17159. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_CrossProduct00
  17160. static int tolua_Math_Vector3_CrossProduct00(lua_State* tolua_S)
  17161. {
  17162. #ifndef TOLUA_RELEASE
  17163. tolua_Error tolua_err;
  17164. if (
  17165. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17166. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17167. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17168. )
  17169. goto tolua_lerror;
  17170. else
  17171. #endif
  17172. {
  17173. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17174. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17175. #ifndef TOLUA_RELEASE
  17176. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CrossProduct'", NULL);
  17177. #endif
  17178. {
  17179. Vector3 tolua_ret = (Vector3) self->CrossProduct(*rhs);
  17180. {
  17181. #ifdef __cplusplus
  17182. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  17183. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17184. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17185. #else
  17186. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  17187. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17188. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17189. #endif
  17190. }
  17191. }
  17192. }
  17193. return 1;
  17194. #ifndef TOLUA_RELEASE
  17195. tolua_lerror:
  17196. tolua_error(tolua_S,"#ferror in function 'CrossProduct'.",&tolua_err);
  17197. return 0;
  17198. #endif
  17199. }
  17200. #endif //#ifndef TOLUA_DISABLE
  17201. /* method: Abs of class Vector3 */
  17202. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Abs00
  17203. static int tolua_Math_Vector3_Abs00(lua_State* tolua_S)
  17204. {
  17205. #ifndef TOLUA_RELEASE
  17206. tolua_Error tolua_err;
  17207. if (
  17208. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17209. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17210. )
  17211. goto tolua_lerror;
  17212. else
  17213. #endif
  17214. {
  17215. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17216. #ifndef TOLUA_RELEASE
  17217. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Abs'", NULL);
  17218. #endif
  17219. {
  17220. Vector3 tolua_ret = (Vector3) self->Abs();
  17221. {
  17222. #ifdef __cplusplus
  17223. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  17224. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17225. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17226. #else
  17227. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  17228. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17229. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17230. #endif
  17231. }
  17232. }
  17233. }
  17234. return 1;
  17235. #ifndef TOLUA_RELEASE
  17236. tolua_lerror:
  17237. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  17238. return 0;
  17239. #endif
  17240. }
  17241. #endif //#ifndef TOLUA_DISABLE
  17242. /* method: Lerp of class Vector3 */
  17243. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Lerp00
  17244. static int tolua_Math_Vector3_Lerp00(lua_State* tolua_S)
  17245. {
  17246. #ifndef TOLUA_RELEASE
  17247. tolua_Error tolua_err;
  17248. if (
  17249. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17250. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17251. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17252. !tolua_isnoobj(tolua_S,4,&tolua_err)
  17253. )
  17254. goto tolua_lerror;
  17255. else
  17256. #endif
  17257. {
  17258. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17259. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17260. float t = ((float) tolua_tonumber(tolua_S,3,0));
  17261. #ifndef TOLUA_RELEASE
  17262. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  17263. #endif
  17264. {
  17265. Vector3 tolua_ret = (Vector3) self->Lerp(*rhs,t);
  17266. {
  17267. #ifdef __cplusplus
  17268. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  17269. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17270. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17271. #else
  17272. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  17273. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17274. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17275. #endif
  17276. }
  17277. }
  17278. }
  17279. return 1;
  17280. #ifndef TOLUA_RELEASE
  17281. tolua_lerror:
  17282. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  17283. return 0;
  17284. #endif
  17285. }
  17286. #endif //#ifndef TOLUA_DISABLE
  17287. /* method: Equals of class Vector3 */
  17288. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Equals00
  17289. static int tolua_Math_Vector3_Equals00(lua_State* tolua_S)
  17290. {
  17291. #ifndef TOLUA_RELEASE
  17292. tolua_Error tolua_err;
  17293. if (
  17294. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17295. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17296. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17297. )
  17298. goto tolua_lerror;
  17299. else
  17300. #endif
  17301. {
  17302. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17303. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17304. #ifndef TOLUA_RELEASE
  17305. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  17306. #endif
  17307. {
  17308. bool tolua_ret = (bool) self->Equals(*rhs);
  17309. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  17310. }
  17311. }
  17312. return 1;
  17313. #ifndef TOLUA_RELEASE
  17314. tolua_lerror:
  17315. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  17316. return 0;
  17317. #endif
  17318. }
  17319. #endif //#ifndef TOLUA_DISABLE
  17320. /* method: Normalized of class Vector3 */
  17321. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Normalized00
  17322. static int tolua_Math_Vector3_Normalized00(lua_State* tolua_S)
  17323. {
  17324. #ifndef TOLUA_RELEASE
  17325. tolua_Error tolua_err;
  17326. if (
  17327. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17328. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17329. )
  17330. goto tolua_lerror;
  17331. else
  17332. #endif
  17333. {
  17334. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17335. #ifndef TOLUA_RELEASE
  17336. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalized'", NULL);
  17337. #endif
  17338. {
  17339. Vector3 tolua_ret = (Vector3) self->Normalized();
  17340. {
  17341. #ifdef __cplusplus
  17342. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  17343. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17344. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17345. #else
  17346. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  17347. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  17348. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17349. #endif
  17350. }
  17351. }
  17352. }
  17353. return 1;
  17354. #ifndef TOLUA_RELEASE
  17355. tolua_lerror:
  17356. tolua_error(tolua_S,"#ferror in function 'Normalized'.",&tolua_err);
  17357. return 0;
  17358. #endif
  17359. }
  17360. #endif //#ifndef TOLUA_DISABLE
  17361. /* method: ToString of class Vector3 */
  17362. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_ToString00
  17363. static int tolua_Math_Vector3_ToString00(lua_State* tolua_S)
  17364. {
  17365. #ifndef TOLUA_RELEASE
  17366. tolua_Error tolua_err;
  17367. if (
  17368. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  17369. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17370. )
  17371. goto tolua_lerror;
  17372. else
  17373. #endif
  17374. {
  17375. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  17376. #ifndef TOLUA_RELEASE
  17377. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  17378. #endif
  17379. {
  17380. String tolua_ret = (String) self->ToString();
  17381. {
  17382. #ifdef __cplusplus
  17383. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  17384. tolua_pushusertype(tolua_S,tolua_obj,"String");
  17385. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17386. #else
  17387. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  17388. tolua_pushusertype(tolua_S,tolua_obj,"String");
  17389. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17390. #endif
  17391. }
  17392. }
  17393. }
  17394. return 1;
  17395. #ifndef TOLUA_RELEASE
  17396. tolua_lerror:
  17397. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  17398. return 0;
  17399. #endif
  17400. }
  17401. #endif //#ifndef TOLUA_DISABLE
  17402. /* get function: x_ of class Vector3 */
  17403. #ifndef TOLUA_DISABLE_tolua_get_Vector3_x
  17404. static int tolua_get_Vector3_x(lua_State* tolua_S)
  17405. {
  17406. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17407. #ifndef TOLUA_RELEASE
  17408. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  17409. #endif
  17410. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  17411. return 1;
  17412. }
  17413. #endif //#ifndef TOLUA_DISABLE
  17414. /* set function: x_ of class Vector3 */
  17415. #ifndef TOLUA_DISABLE_tolua_set_Vector3_x
  17416. static int tolua_set_Vector3_x(lua_State* tolua_S)
  17417. {
  17418. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17419. #ifndef TOLUA_RELEASE
  17420. tolua_Error tolua_err;
  17421. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  17422. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17423. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17424. #endif
  17425. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  17426. ;
  17427. return 0;
  17428. }
  17429. #endif //#ifndef TOLUA_DISABLE
  17430. /* get function: y_ of class Vector3 */
  17431. #ifndef TOLUA_DISABLE_tolua_get_Vector3_y
  17432. static int tolua_get_Vector3_y(lua_State* tolua_S)
  17433. {
  17434. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17435. #ifndef TOLUA_RELEASE
  17436. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  17437. #endif
  17438. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  17439. return 1;
  17440. }
  17441. #endif //#ifndef TOLUA_DISABLE
  17442. /* set function: y_ of class Vector3 */
  17443. #ifndef TOLUA_DISABLE_tolua_set_Vector3_y
  17444. static int tolua_set_Vector3_y(lua_State* tolua_S)
  17445. {
  17446. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17447. #ifndef TOLUA_RELEASE
  17448. tolua_Error tolua_err;
  17449. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  17450. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17451. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17452. #endif
  17453. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  17454. ;
  17455. return 0;
  17456. }
  17457. #endif //#ifndef TOLUA_DISABLE
  17458. /* get function: z_ of class Vector3 */
  17459. #ifndef TOLUA_DISABLE_tolua_get_Vector3_z
  17460. static int tolua_get_Vector3_z(lua_State* tolua_S)
  17461. {
  17462. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17463. #ifndef TOLUA_RELEASE
  17464. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  17465. #endif
  17466. tolua_pushnumber(tolua_S,(lua_Number)self->z_);
  17467. return 1;
  17468. }
  17469. #endif //#ifndef TOLUA_DISABLE
  17470. /* set function: z_ of class Vector3 */
  17471. #ifndef TOLUA_DISABLE_tolua_set_Vector3_z
  17472. static int tolua_set_Vector3_z(lua_State* tolua_S)
  17473. {
  17474. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  17475. #ifndef TOLUA_RELEASE
  17476. tolua_Error tolua_err;
  17477. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  17478. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17479. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17480. #endif
  17481. self->z_ = ((float) tolua_tonumber(tolua_S,2,0))
  17482. ;
  17483. return 0;
  17484. }
  17485. #endif //#ifndef TOLUA_DISABLE
  17486. /* get function: ZERO of class Vector3 */
  17487. #ifndef TOLUA_DISABLE_tolua_get_Vector3_ZERO
  17488. static int tolua_get_Vector3_ZERO(lua_State* tolua_S)
  17489. {
  17490. tolua_pushusertype(tolua_S,(void*)&Vector3::ZERO,"const Vector3");
  17491. return 1;
  17492. }
  17493. #endif //#ifndef TOLUA_DISABLE
  17494. /* get function: LEFT of class Vector3 */
  17495. #ifndef TOLUA_DISABLE_tolua_get_Vector3_LEFT
  17496. static int tolua_get_Vector3_LEFT(lua_State* tolua_S)
  17497. {
  17498. tolua_pushusertype(tolua_S,(void*)&Vector3::LEFT,"const Vector3");
  17499. return 1;
  17500. }
  17501. #endif //#ifndef TOLUA_DISABLE
  17502. /* get function: RIGHT of class Vector3 */
  17503. #ifndef TOLUA_DISABLE_tolua_get_Vector3_RIGHT
  17504. static int tolua_get_Vector3_RIGHT(lua_State* tolua_S)
  17505. {
  17506. tolua_pushusertype(tolua_S,(void*)&Vector3::RIGHT,"const Vector3");
  17507. return 1;
  17508. }
  17509. #endif //#ifndef TOLUA_DISABLE
  17510. /* get function: UP of class Vector3 */
  17511. #ifndef TOLUA_DISABLE_tolua_get_Vector3_UP
  17512. static int tolua_get_Vector3_UP(lua_State* tolua_S)
  17513. {
  17514. tolua_pushusertype(tolua_S,(void*)&Vector3::UP,"const Vector3");
  17515. return 1;
  17516. }
  17517. #endif //#ifndef TOLUA_DISABLE
  17518. /* get function: DOWN of class Vector3 */
  17519. #ifndef TOLUA_DISABLE_tolua_get_Vector3_DOWN
  17520. static int tolua_get_Vector3_DOWN(lua_State* tolua_S)
  17521. {
  17522. tolua_pushusertype(tolua_S,(void*)&Vector3::DOWN,"const Vector3");
  17523. return 1;
  17524. }
  17525. #endif //#ifndef TOLUA_DISABLE
  17526. /* get function: FORWARD of class Vector3 */
  17527. #ifndef TOLUA_DISABLE_tolua_get_Vector3_FORWARD
  17528. static int tolua_get_Vector3_FORWARD(lua_State* tolua_S)
  17529. {
  17530. tolua_pushusertype(tolua_S,(void*)&Vector3::FORWARD,"const Vector3");
  17531. return 1;
  17532. }
  17533. #endif //#ifndef TOLUA_DISABLE
  17534. /* get function: BACK of class Vector3 */
  17535. #ifndef TOLUA_DISABLE_tolua_get_Vector3_BACK
  17536. static int tolua_get_Vector3_BACK(lua_State* tolua_S)
  17537. {
  17538. tolua_pushusertype(tolua_S,(void*)&Vector3::BACK,"const Vector3");
  17539. return 1;
  17540. }
  17541. #endif //#ifndef TOLUA_DISABLE
  17542. /* get function: ONE of class Vector3 */
  17543. #ifndef TOLUA_DISABLE_tolua_get_Vector3_ONE
  17544. static int tolua_get_Vector3_ONE(lua_State* tolua_S)
  17545. {
  17546. tolua_pushusertype(tolua_S,(void*)&Vector3::ONE,"const Vector3");
  17547. return 1;
  17548. }
  17549. #endif //#ifndef TOLUA_DISABLE
  17550. /* method: new of class Vector4 */
  17551. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new00
  17552. static int tolua_Math_Vector4_new00(lua_State* tolua_S)
  17553. {
  17554. #ifndef TOLUA_RELEASE
  17555. tolua_Error tolua_err;
  17556. if (
  17557. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17558. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17559. )
  17560. goto tolua_lerror;
  17561. else
  17562. #endif
  17563. {
  17564. {
  17565. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)());
  17566. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17567. }
  17568. }
  17569. return 1;
  17570. #ifndef TOLUA_RELEASE
  17571. tolua_lerror:
  17572. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  17573. return 0;
  17574. #endif
  17575. }
  17576. #endif //#ifndef TOLUA_DISABLE
  17577. /* method: new_local of class Vector4 */
  17578. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new00_local
  17579. static int tolua_Math_Vector4_new00_local(lua_State* tolua_S)
  17580. {
  17581. #ifndef TOLUA_RELEASE
  17582. tolua_Error tolua_err;
  17583. if (
  17584. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17585. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17586. )
  17587. goto tolua_lerror;
  17588. else
  17589. #endif
  17590. {
  17591. {
  17592. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)());
  17593. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17594. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17595. }
  17596. }
  17597. return 1;
  17598. #ifndef TOLUA_RELEASE
  17599. tolua_lerror:
  17600. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  17601. return 0;
  17602. #endif
  17603. }
  17604. #endif //#ifndef TOLUA_DISABLE
  17605. /* method: new of class Vector4 */
  17606. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new01
  17607. static int tolua_Math_Vector4_new01(lua_State* tolua_S)
  17608. {
  17609. tolua_Error tolua_err;
  17610. if (
  17611. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17612. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17613. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17614. )
  17615. goto tolua_lerror;
  17616. else
  17617. {
  17618. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17619. {
  17620. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector));
  17621. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17622. }
  17623. }
  17624. return 1;
  17625. tolua_lerror:
  17626. return tolua_Math_Vector4_new00(tolua_S);
  17627. }
  17628. #endif //#ifndef TOLUA_DISABLE
  17629. /* method: new_local of class Vector4 */
  17630. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new01_local
  17631. static int tolua_Math_Vector4_new01_local(lua_State* tolua_S)
  17632. {
  17633. tolua_Error tolua_err;
  17634. if (
  17635. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17636. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17637. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17638. )
  17639. goto tolua_lerror;
  17640. else
  17641. {
  17642. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17643. {
  17644. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector));
  17645. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17646. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17647. }
  17648. }
  17649. return 1;
  17650. tolua_lerror:
  17651. return tolua_Math_Vector4_new00_local(tolua_S);
  17652. }
  17653. #endif //#ifndef TOLUA_DISABLE
  17654. /* method: new of class Vector4 */
  17655. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new02
  17656. static int tolua_Math_Vector4_new02(lua_State* tolua_S)
  17657. {
  17658. tolua_Error tolua_err;
  17659. if (
  17660. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17661. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17662. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17663. !tolua_isnoobj(tolua_S,4,&tolua_err)
  17664. )
  17665. goto tolua_lerror;
  17666. else
  17667. {
  17668. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17669. float w = ((float) tolua_tonumber(tolua_S,3,0));
  17670. {
  17671. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector,w));
  17672. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17673. }
  17674. }
  17675. return 1;
  17676. tolua_lerror:
  17677. return tolua_Math_Vector4_new01(tolua_S);
  17678. }
  17679. #endif //#ifndef TOLUA_DISABLE
  17680. /* method: new_local of class Vector4 */
  17681. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new02_local
  17682. static int tolua_Math_Vector4_new02_local(lua_State* tolua_S)
  17683. {
  17684. tolua_Error tolua_err;
  17685. if (
  17686. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17687. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17688. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17689. !tolua_isnoobj(tolua_S,4,&tolua_err)
  17690. )
  17691. goto tolua_lerror;
  17692. else
  17693. {
  17694. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17695. float w = ((float) tolua_tonumber(tolua_S,3,0));
  17696. {
  17697. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector,w));
  17698. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17699. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17700. }
  17701. }
  17702. return 1;
  17703. tolua_lerror:
  17704. return tolua_Math_Vector4_new01_local(tolua_S);
  17705. }
  17706. #endif //#ifndef TOLUA_DISABLE
  17707. /* method: new of class Vector4 */
  17708. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new03
  17709. static int tolua_Math_Vector4_new03(lua_State* tolua_S)
  17710. {
  17711. tolua_Error tolua_err;
  17712. if (
  17713. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17714. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17715. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17716. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  17717. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  17718. !tolua_isnoobj(tolua_S,6,&tolua_err)
  17719. )
  17720. goto tolua_lerror;
  17721. else
  17722. {
  17723. float x = ((float) tolua_tonumber(tolua_S,2,0));
  17724. float y = ((float) tolua_tonumber(tolua_S,3,0));
  17725. float z = ((float) tolua_tonumber(tolua_S,4,0));
  17726. float w = ((float) tolua_tonumber(tolua_S,5,0));
  17727. {
  17728. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(x,y,z,w));
  17729. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17730. }
  17731. }
  17732. return 1;
  17733. tolua_lerror:
  17734. return tolua_Math_Vector4_new02(tolua_S);
  17735. }
  17736. #endif //#ifndef TOLUA_DISABLE
  17737. /* method: new_local of class Vector4 */
  17738. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new03_local
  17739. static int tolua_Math_Vector4_new03_local(lua_State* tolua_S)
  17740. {
  17741. tolua_Error tolua_err;
  17742. if (
  17743. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17744. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17745. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17746. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  17747. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  17748. !tolua_isnoobj(tolua_S,6,&tolua_err)
  17749. )
  17750. goto tolua_lerror;
  17751. else
  17752. {
  17753. float x = ((float) tolua_tonumber(tolua_S,2,0));
  17754. float y = ((float) tolua_tonumber(tolua_S,3,0));
  17755. float z = ((float) tolua_tonumber(tolua_S,4,0));
  17756. float w = ((float) tolua_tonumber(tolua_S,5,0));
  17757. {
  17758. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(x,y,z,w));
  17759. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17760. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17761. }
  17762. }
  17763. return 1;
  17764. tolua_lerror:
  17765. return tolua_Math_Vector4_new02_local(tolua_S);
  17766. }
  17767. #endif //#ifndef TOLUA_DISABLE
  17768. /* method: operator== of class Vector4 */
  17769. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__eq00
  17770. static int tolua_Math_Vector4__eq00(lua_State* tolua_S)
  17771. {
  17772. #ifndef TOLUA_RELEASE
  17773. tolua_Error tolua_err;
  17774. if (
  17775. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17776. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17777. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17778. )
  17779. goto tolua_lerror;
  17780. else
  17781. #endif
  17782. {
  17783. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17784. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17785. #ifndef TOLUA_RELEASE
  17786. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  17787. #endif
  17788. {
  17789. bool tolua_ret = (bool) self->operator==(*rhs);
  17790. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  17791. }
  17792. }
  17793. return 1;
  17794. #ifndef TOLUA_RELEASE
  17795. tolua_lerror:
  17796. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  17797. return 0;
  17798. #endif
  17799. }
  17800. #endif //#ifndef TOLUA_DISABLE
  17801. /* method: operator+ of class Vector4 */
  17802. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__add00
  17803. static int tolua_Math_Vector4__add00(lua_State* tolua_S)
  17804. {
  17805. #ifndef TOLUA_RELEASE
  17806. tolua_Error tolua_err;
  17807. if (
  17808. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17809. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17810. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17811. )
  17812. goto tolua_lerror;
  17813. else
  17814. #endif
  17815. {
  17816. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17817. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17818. #ifndef TOLUA_RELEASE
  17819. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  17820. #endif
  17821. {
  17822. Vector4 tolua_ret = (Vector4) self->operator+(*rhs);
  17823. {
  17824. #ifdef __cplusplus
  17825. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17826. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17827. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17828. #else
  17829. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17830. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17831. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17832. #endif
  17833. }
  17834. }
  17835. }
  17836. return 1;
  17837. #ifndef TOLUA_RELEASE
  17838. tolua_lerror:
  17839. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  17840. return 0;
  17841. #endif
  17842. }
  17843. #endif //#ifndef TOLUA_DISABLE
  17844. /* method: operator- of class Vector4 */
  17845. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__sub00
  17846. static int tolua_Math_Vector4__sub00(lua_State* tolua_S)
  17847. {
  17848. #ifndef TOLUA_RELEASE
  17849. tolua_Error tolua_err;
  17850. if (
  17851. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17852. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17853. )
  17854. goto tolua_lerror;
  17855. else
  17856. #endif
  17857. {
  17858. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17859. #ifndef TOLUA_RELEASE
  17860. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  17861. #endif
  17862. {
  17863. Vector4 tolua_ret = (Vector4) self->operator-();
  17864. {
  17865. #ifdef __cplusplus
  17866. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17867. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17868. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17869. #else
  17870. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17871. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17872. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17873. #endif
  17874. }
  17875. }
  17876. }
  17877. return 1;
  17878. #ifndef TOLUA_RELEASE
  17879. tolua_lerror:
  17880. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  17881. return 0;
  17882. #endif
  17883. }
  17884. #endif //#ifndef TOLUA_DISABLE
  17885. /* method: operator- of class Vector4 */
  17886. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__sub01
  17887. static int tolua_Math_Vector4__sub01(lua_State* tolua_S)
  17888. {
  17889. tolua_Error tolua_err;
  17890. if (
  17891. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17892. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17893. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17894. )
  17895. goto tolua_lerror;
  17896. else
  17897. {
  17898. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17899. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17900. #ifndef TOLUA_RELEASE
  17901. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  17902. #endif
  17903. {
  17904. Vector4 tolua_ret = (Vector4) self->operator-(*rhs);
  17905. {
  17906. #ifdef __cplusplus
  17907. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17908. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17909. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17910. #else
  17911. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17912. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17913. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17914. #endif
  17915. }
  17916. }
  17917. }
  17918. return 1;
  17919. tolua_lerror:
  17920. return tolua_Math_Vector4__sub00(tolua_S);
  17921. }
  17922. #endif //#ifndef TOLUA_DISABLE
  17923. /* method: operator* of class Vector4 */
  17924. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__mul00
  17925. static int tolua_Math_Vector4__mul00(lua_State* tolua_S)
  17926. {
  17927. #ifndef TOLUA_RELEASE
  17928. tolua_Error tolua_err;
  17929. if (
  17930. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17931. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17932. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17933. )
  17934. goto tolua_lerror;
  17935. else
  17936. #endif
  17937. {
  17938. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17939. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  17940. #ifndef TOLUA_RELEASE
  17941. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  17942. #endif
  17943. {
  17944. Vector4 tolua_ret = (Vector4) self->operator*(rhs);
  17945. {
  17946. #ifdef __cplusplus
  17947. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17948. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17949. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17950. #else
  17951. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17952. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17953. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17954. #endif
  17955. }
  17956. }
  17957. }
  17958. return 1;
  17959. #ifndef TOLUA_RELEASE
  17960. tolua_lerror:
  17961. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  17962. return 0;
  17963. #endif
  17964. }
  17965. #endif //#ifndef TOLUA_DISABLE
  17966. /* method: operator* of class Vector4 */
  17967. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__mul01
  17968. static int tolua_Math_Vector4__mul01(lua_State* tolua_S)
  17969. {
  17970. tolua_Error tolua_err;
  17971. if (
  17972. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17973. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17974. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17975. )
  17976. goto tolua_lerror;
  17977. else
  17978. {
  17979. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17980. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17981. #ifndef TOLUA_RELEASE
  17982. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  17983. #endif
  17984. {
  17985. Vector4 tolua_ret = (Vector4) self->operator*(*rhs);
  17986. {
  17987. #ifdef __cplusplus
  17988. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17989. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17990. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17991. #else
  17992. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17993. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17994. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17995. #endif
  17996. }
  17997. }
  17998. }
  17999. return 1;
  18000. tolua_lerror:
  18001. return tolua_Math_Vector4__mul00(tolua_S);
  18002. }
  18003. #endif //#ifndef TOLUA_DISABLE
  18004. /* method: operator/ of class Vector4 */
  18005. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__div00
  18006. static int tolua_Math_Vector4__div00(lua_State* tolua_S)
  18007. {
  18008. #ifndef TOLUA_RELEASE
  18009. tolua_Error tolua_err;
  18010. if (
  18011. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18012. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  18013. !tolua_isnoobj(tolua_S,3,&tolua_err)
  18014. )
  18015. goto tolua_lerror;
  18016. else
  18017. #endif
  18018. {
  18019. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18020. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  18021. #ifndef TOLUA_RELEASE
  18022. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  18023. #endif
  18024. {
  18025. Vector4 tolua_ret = (Vector4) self->operator/(rhs);
  18026. {
  18027. #ifdef __cplusplus
  18028. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  18029. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18030. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18031. #else
  18032. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  18033. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18034. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18035. #endif
  18036. }
  18037. }
  18038. }
  18039. return 1;
  18040. #ifndef TOLUA_RELEASE
  18041. tolua_lerror:
  18042. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  18043. return 0;
  18044. #endif
  18045. }
  18046. #endif //#ifndef TOLUA_DISABLE
  18047. /* method: operator/ of class Vector4 */
  18048. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__div01
  18049. static int tolua_Math_Vector4__div01(lua_State* tolua_S)
  18050. {
  18051. tolua_Error tolua_err;
  18052. if (
  18053. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18054. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  18055. !tolua_isnoobj(tolua_S,3,&tolua_err)
  18056. )
  18057. goto tolua_lerror;
  18058. else
  18059. {
  18060. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18061. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  18062. #ifndef TOLUA_RELEASE
  18063. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  18064. #endif
  18065. {
  18066. Vector4 tolua_ret = (Vector4) self->operator/(*rhs);
  18067. {
  18068. #ifdef __cplusplus
  18069. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  18070. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18071. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18072. #else
  18073. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  18074. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18075. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18076. #endif
  18077. }
  18078. }
  18079. }
  18080. return 1;
  18081. tolua_lerror:
  18082. return tolua_Math_Vector4__div00(tolua_S);
  18083. }
  18084. #endif //#ifndef TOLUA_DISABLE
  18085. /* method: operator/ of class Vector4 */
  18086. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__div02
  18087. static int tolua_Math_Vector4__div02(lua_State* tolua_S)
  18088. {
  18089. tolua_Error tolua_err;
  18090. if (
  18091. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18092. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  18093. !tolua_isnoobj(tolua_S,3,&tolua_err)
  18094. )
  18095. goto tolua_lerror;
  18096. else
  18097. {
  18098. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18099. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  18100. #ifndef TOLUA_RELEASE
  18101. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  18102. #endif
  18103. {
  18104. Vector4 tolua_ret = (Vector4) self->operator/(*rhs);
  18105. {
  18106. #ifdef __cplusplus
  18107. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  18108. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18109. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18110. #else
  18111. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  18112. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18113. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18114. #endif
  18115. }
  18116. }
  18117. }
  18118. return 1;
  18119. tolua_lerror:
  18120. return tolua_Math_Vector4__div01(tolua_S);
  18121. }
  18122. #endif //#ifndef TOLUA_DISABLE
  18123. /* method: DotProduct of class Vector4 */
  18124. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_DotProduct00
  18125. static int tolua_Math_Vector4_DotProduct00(lua_State* tolua_S)
  18126. {
  18127. #ifndef TOLUA_RELEASE
  18128. tolua_Error tolua_err;
  18129. if (
  18130. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18131. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  18132. !tolua_isnoobj(tolua_S,3,&tolua_err)
  18133. )
  18134. goto tolua_lerror;
  18135. else
  18136. #endif
  18137. {
  18138. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18139. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  18140. #ifndef TOLUA_RELEASE
  18141. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  18142. #endif
  18143. {
  18144. float tolua_ret = (float) self->DotProduct(*rhs);
  18145. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  18146. }
  18147. }
  18148. return 1;
  18149. #ifndef TOLUA_RELEASE
  18150. tolua_lerror:
  18151. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  18152. return 0;
  18153. #endif
  18154. }
  18155. #endif //#ifndef TOLUA_DISABLE
  18156. /* method: AbsDotProduct of class Vector4 */
  18157. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_AbsDotProduct00
  18158. static int tolua_Math_Vector4_AbsDotProduct00(lua_State* tolua_S)
  18159. {
  18160. #ifndef TOLUA_RELEASE
  18161. tolua_Error tolua_err;
  18162. if (
  18163. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18164. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  18165. !tolua_isnoobj(tolua_S,3,&tolua_err)
  18166. )
  18167. goto tolua_lerror;
  18168. else
  18169. #endif
  18170. {
  18171. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18172. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  18173. #ifndef TOLUA_RELEASE
  18174. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AbsDotProduct'", NULL);
  18175. #endif
  18176. {
  18177. float tolua_ret = (float) self->AbsDotProduct(*rhs);
  18178. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  18179. }
  18180. }
  18181. return 1;
  18182. #ifndef TOLUA_RELEASE
  18183. tolua_lerror:
  18184. tolua_error(tolua_S,"#ferror in function 'AbsDotProduct'.",&tolua_err);
  18185. return 0;
  18186. #endif
  18187. }
  18188. #endif //#ifndef TOLUA_DISABLE
  18189. /* method: Abs of class Vector4 */
  18190. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_Abs00
  18191. static int tolua_Math_Vector4_Abs00(lua_State* tolua_S)
  18192. {
  18193. #ifndef TOLUA_RELEASE
  18194. tolua_Error tolua_err;
  18195. if (
  18196. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18197. !tolua_isnoobj(tolua_S,2,&tolua_err)
  18198. )
  18199. goto tolua_lerror;
  18200. else
  18201. #endif
  18202. {
  18203. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18204. #ifndef TOLUA_RELEASE
  18205. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Abs'", NULL);
  18206. #endif
  18207. {
  18208. Vector4 tolua_ret = (Vector4) self->Abs();
  18209. {
  18210. #ifdef __cplusplus
  18211. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  18212. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18213. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18214. #else
  18215. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  18216. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18217. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18218. #endif
  18219. }
  18220. }
  18221. }
  18222. return 1;
  18223. #ifndef TOLUA_RELEASE
  18224. tolua_lerror:
  18225. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  18226. return 0;
  18227. #endif
  18228. }
  18229. #endif //#ifndef TOLUA_DISABLE
  18230. /* method: Lerp of class Vector4 */
  18231. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_Lerp00
  18232. static int tolua_Math_Vector4_Lerp00(lua_State* tolua_S)
  18233. {
  18234. #ifndef TOLUA_RELEASE
  18235. tolua_Error tolua_err;
  18236. if (
  18237. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18238. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  18239. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  18240. !tolua_isnoobj(tolua_S,4,&tolua_err)
  18241. )
  18242. goto tolua_lerror;
  18243. else
  18244. #endif
  18245. {
  18246. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18247. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  18248. float t = ((float) tolua_tonumber(tolua_S,3,0));
  18249. #ifndef TOLUA_RELEASE
  18250. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  18251. #endif
  18252. {
  18253. Vector4 tolua_ret = (Vector4) self->Lerp(*rhs,t);
  18254. {
  18255. #ifdef __cplusplus
  18256. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  18257. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18258. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18259. #else
  18260. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  18261. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  18262. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18263. #endif
  18264. }
  18265. }
  18266. }
  18267. return 1;
  18268. #ifndef TOLUA_RELEASE
  18269. tolua_lerror:
  18270. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  18271. return 0;
  18272. #endif
  18273. }
  18274. #endif //#ifndef TOLUA_DISABLE
  18275. /* method: Equals of class Vector4 */
  18276. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_Equals00
  18277. static int tolua_Math_Vector4_Equals00(lua_State* tolua_S)
  18278. {
  18279. #ifndef TOLUA_RELEASE
  18280. tolua_Error tolua_err;
  18281. if (
  18282. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18283. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  18284. !tolua_isnoobj(tolua_S,3,&tolua_err)
  18285. )
  18286. goto tolua_lerror;
  18287. else
  18288. #endif
  18289. {
  18290. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18291. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  18292. #ifndef TOLUA_RELEASE
  18293. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  18294. #endif
  18295. {
  18296. bool tolua_ret = (bool) self->Equals(*rhs);
  18297. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  18298. }
  18299. }
  18300. return 1;
  18301. #ifndef TOLUA_RELEASE
  18302. tolua_lerror:
  18303. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  18304. return 0;
  18305. #endif
  18306. }
  18307. #endif //#ifndef TOLUA_DISABLE
  18308. /* method: ToString of class Vector4 */
  18309. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_ToString00
  18310. static int tolua_Math_Vector4_ToString00(lua_State* tolua_S)
  18311. {
  18312. #ifndef TOLUA_RELEASE
  18313. tolua_Error tolua_err;
  18314. if (
  18315. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  18316. !tolua_isnoobj(tolua_S,2,&tolua_err)
  18317. )
  18318. goto tolua_lerror;
  18319. else
  18320. #endif
  18321. {
  18322. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  18323. #ifndef TOLUA_RELEASE
  18324. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToString'", NULL);
  18325. #endif
  18326. {
  18327. String tolua_ret = (String) self->ToString();
  18328. {
  18329. #ifdef __cplusplus
  18330. void* tolua_obj = Mtolua_new((String)(tolua_ret));
  18331. tolua_pushusertype(tolua_S,tolua_obj,"String");
  18332. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18333. #else
  18334. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(String));
  18335. tolua_pushusertype(tolua_S,tolua_obj,"String");
  18336. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  18337. #endif
  18338. }
  18339. }
  18340. }
  18341. return 1;
  18342. #ifndef TOLUA_RELEASE
  18343. tolua_lerror:
  18344. tolua_error(tolua_S,"#ferror in function 'ToString'.",&tolua_err);
  18345. return 0;
  18346. #endif
  18347. }
  18348. #endif //#ifndef TOLUA_DISABLE
  18349. /* get function: x_ of class Vector4 */
  18350. #ifndef TOLUA_DISABLE_tolua_get_Vector4_x
  18351. static int tolua_get_Vector4_x(lua_State* tolua_S)
  18352. {
  18353. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18354. #ifndef TOLUA_RELEASE
  18355. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  18356. #endif
  18357. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  18358. return 1;
  18359. }
  18360. #endif //#ifndef TOLUA_DISABLE
  18361. /* set function: x_ of class Vector4 */
  18362. #ifndef TOLUA_DISABLE_tolua_set_Vector4_x
  18363. static int tolua_set_Vector4_x(lua_State* tolua_S)
  18364. {
  18365. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18366. #ifndef TOLUA_RELEASE
  18367. tolua_Error tolua_err;
  18368. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  18369. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  18370. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  18371. #endif
  18372. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  18373. ;
  18374. return 0;
  18375. }
  18376. #endif //#ifndef TOLUA_DISABLE
  18377. /* get function: y_ of class Vector4 */
  18378. #ifndef TOLUA_DISABLE_tolua_get_Vector4_y
  18379. static int tolua_get_Vector4_y(lua_State* tolua_S)
  18380. {
  18381. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18382. #ifndef TOLUA_RELEASE
  18383. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  18384. #endif
  18385. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  18386. return 1;
  18387. }
  18388. #endif //#ifndef TOLUA_DISABLE
  18389. /* set function: y_ of class Vector4 */
  18390. #ifndef TOLUA_DISABLE_tolua_set_Vector4_y
  18391. static int tolua_set_Vector4_y(lua_State* tolua_S)
  18392. {
  18393. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18394. #ifndef TOLUA_RELEASE
  18395. tolua_Error tolua_err;
  18396. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  18397. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  18398. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  18399. #endif
  18400. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  18401. ;
  18402. return 0;
  18403. }
  18404. #endif //#ifndef TOLUA_DISABLE
  18405. /* get function: z_ of class Vector4 */
  18406. #ifndef TOLUA_DISABLE_tolua_get_Vector4_z
  18407. static int tolua_get_Vector4_z(lua_State* tolua_S)
  18408. {
  18409. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18410. #ifndef TOLUA_RELEASE
  18411. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  18412. #endif
  18413. tolua_pushnumber(tolua_S,(lua_Number)self->z_);
  18414. return 1;
  18415. }
  18416. #endif //#ifndef TOLUA_DISABLE
  18417. /* set function: z_ of class Vector4 */
  18418. #ifndef TOLUA_DISABLE_tolua_set_Vector4_z
  18419. static int tolua_set_Vector4_z(lua_State* tolua_S)
  18420. {
  18421. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18422. #ifndef TOLUA_RELEASE
  18423. tolua_Error tolua_err;
  18424. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  18425. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  18426. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  18427. #endif
  18428. self->z_ = ((float) tolua_tonumber(tolua_S,2,0))
  18429. ;
  18430. return 0;
  18431. }
  18432. #endif //#ifndef TOLUA_DISABLE
  18433. /* get function: w_ of class Vector4 */
  18434. #ifndef TOLUA_DISABLE_tolua_get_Vector4_w
  18435. static int tolua_get_Vector4_w(lua_State* tolua_S)
  18436. {
  18437. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18438. #ifndef TOLUA_RELEASE
  18439. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  18440. #endif
  18441. tolua_pushnumber(tolua_S,(lua_Number)self->w_);
  18442. return 1;
  18443. }
  18444. #endif //#ifndef TOLUA_DISABLE
  18445. /* set function: w_ of class Vector4 */
  18446. #ifndef TOLUA_DISABLE_tolua_set_Vector4_w
  18447. static int tolua_set_Vector4_w(lua_State* tolua_S)
  18448. {
  18449. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  18450. #ifndef TOLUA_RELEASE
  18451. tolua_Error tolua_err;
  18452. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  18453. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  18454. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  18455. #endif
  18456. self->w_ = ((float) tolua_tonumber(tolua_S,2,0))
  18457. ;
  18458. return 0;
  18459. }
  18460. #endif //#ifndef TOLUA_DISABLE
  18461. /* get function: ZERO of class Vector4 */
  18462. #ifndef TOLUA_DISABLE_tolua_get_Vector4_ZERO
  18463. static int tolua_get_Vector4_ZERO(lua_State* tolua_S)
  18464. {
  18465. tolua_pushusertype(tolua_S,(void*)&Vector4::ZERO,"const Vector4");
  18466. return 1;
  18467. }
  18468. #endif //#ifndef TOLUA_DISABLE
  18469. /* get function: ONE of class Vector4 */
  18470. #ifndef TOLUA_DISABLE_tolua_get_Vector4_ONE
  18471. static int tolua_get_Vector4_ONE(lua_State* tolua_S)
  18472. {
  18473. tolua_pushusertype(tolua_S,(void*)&Vector4::ONE,"const Vector4");
  18474. return 1;
  18475. }
  18476. #endif //#ifndef TOLUA_DISABLE
  18477. /* Open function */
  18478. TOLUA_API int tolua_Math_open (lua_State* tolua_S)
  18479. {
  18480. tolua_open(tolua_S);
  18481. tolua_reg_types(tolua_S);
  18482. tolua_module(tolua_S,NULL,1);
  18483. tolua_beginmodule(tolua_S,NULL);
  18484. #ifdef __cplusplus
  18485. tolua_cclass(tolua_S,"AreaAllocator","AreaAllocator","",tolua_collect_AreaAllocator);
  18486. #else
  18487. tolua_cclass(tolua_S,"AreaAllocator","AreaAllocator","",NULL);
  18488. #endif
  18489. tolua_beginmodule(tolua_S,"AreaAllocator");
  18490. tolua_function(tolua_S,"new",tolua_Math_AreaAllocator_new00);
  18491. tolua_function(tolua_S,"new_local",tolua_Math_AreaAllocator_new00_local);
  18492. tolua_function(tolua_S,".call",tolua_Math_AreaAllocator_new00_local);
  18493. tolua_function(tolua_S,"new",tolua_Math_AreaAllocator_new01);
  18494. tolua_function(tolua_S,"new_local",tolua_Math_AreaAllocator_new01_local);
  18495. tolua_function(tolua_S,".call",tolua_Math_AreaAllocator_new01_local);
  18496. tolua_function(tolua_S,"Reset",tolua_Math_AreaAllocator_Reset00);
  18497. tolua_function(tolua_S,"Allocate",tolua_Math_AreaAllocator_Allocate00);
  18498. tolua_function(tolua_S,"GetWidth",tolua_Math_AreaAllocator_GetWidth00);
  18499. tolua_function(tolua_S,"GetHeight",tolua_Math_AreaAllocator_GetHeight00);
  18500. tolua_endmodule(tolua_S);
  18501. #ifdef __cplusplus
  18502. tolua_cclass(tolua_S,"BoundingBox","BoundingBox","",tolua_collect_BoundingBox);
  18503. #else
  18504. tolua_cclass(tolua_S,"BoundingBox","BoundingBox","",NULL);
  18505. #endif
  18506. tolua_beginmodule(tolua_S,"BoundingBox");
  18507. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new00);
  18508. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new00_local);
  18509. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new00_local);
  18510. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new01);
  18511. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new01_local);
  18512. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new01_local);
  18513. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new02);
  18514. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new02_local);
  18515. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new02_local);
  18516. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new03);
  18517. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new03_local);
  18518. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new03_local);
  18519. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new04);
  18520. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new04_local);
  18521. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new04_local);
  18522. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new05);
  18523. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new05_local);
  18524. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new05_local);
  18525. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new06);
  18526. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new06_local);
  18527. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new06_local);
  18528. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new07);
  18529. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new07_local);
  18530. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new07_local);
  18531. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new08);
  18532. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new08_local);
  18533. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new08_local);
  18534. tolua_function(tolua_S,".eq",tolua_Math_BoundingBox__eq00);
  18535. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define00);
  18536. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define01);
  18537. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define02);
  18538. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define03);
  18539. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define04);
  18540. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge00);
  18541. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge01);
  18542. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define05);
  18543. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define06);
  18544. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define07);
  18545. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define08);
  18546. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge02);
  18547. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge03);
  18548. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge04);
  18549. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge05);
  18550. tolua_function(tolua_S,"Clip",tolua_Math_BoundingBox_Clip00);
  18551. tolua_function(tolua_S,"Transform",tolua_Math_BoundingBox_Transform00);
  18552. tolua_function(tolua_S,"Transform",tolua_Math_BoundingBox_Transform01);
  18553. tolua_function(tolua_S,"Clear",tolua_Math_BoundingBox_Clear00);
  18554. tolua_function(tolua_S,"Center",tolua_Math_BoundingBox_Center00);
  18555. tolua_function(tolua_S,"Size",tolua_Math_BoundingBox_Size00);
  18556. tolua_function(tolua_S,"HalfSize",tolua_Math_BoundingBox_HalfSize00);
  18557. tolua_function(tolua_S,"Transformed",tolua_Math_BoundingBox_Transformed00);
  18558. tolua_function(tolua_S,"Transformed",tolua_Math_BoundingBox_Transformed01);
  18559. tolua_function(tolua_S,"Projected",tolua_Math_BoundingBox_Projected00);
  18560. tolua_function(tolua_S,"IsInside",tolua_Math_BoundingBox_IsInside00);
  18561. tolua_function(tolua_S,"IsInside",tolua_Math_BoundingBox_IsInside01);
  18562. tolua_function(tolua_S,"IsInsideFast",tolua_Math_BoundingBox_IsInsideFast00);
  18563. tolua_function(tolua_S,"IsInside",tolua_Math_BoundingBox_IsInside02);
  18564. tolua_function(tolua_S,"IsInsideFast",tolua_Math_BoundingBox_IsInsideFast01);
  18565. tolua_function(tolua_S,"ToString",tolua_Math_BoundingBox_ToString00);
  18566. tolua_variable(tolua_S,"min",tolua_get_BoundingBox_min,tolua_set_BoundingBox_min);
  18567. tolua_variable(tolua_S,"max",tolua_get_BoundingBox_max,tolua_set_BoundingBox_max);
  18568. tolua_endmodule(tolua_S);
  18569. #ifdef __cplusplus
  18570. tolua_cclass(tolua_S,"Color","Color","",tolua_collect_Color);
  18571. #else
  18572. tolua_cclass(tolua_S,"Color","Color","",NULL);
  18573. #endif
  18574. tolua_beginmodule(tolua_S,"Color");
  18575. tolua_function(tolua_S,"new",tolua_Math_Color_new00);
  18576. tolua_function(tolua_S,"new_local",tolua_Math_Color_new00_local);
  18577. tolua_function(tolua_S,".call",tolua_Math_Color_new00_local);
  18578. tolua_function(tolua_S,"new",tolua_Math_Color_new01);
  18579. tolua_function(tolua_S,"new_local",tolua_Math_Color_new01_local);
  18580. tolua_function(tolua_S,".call",tolua_Math_Color_new01_local);
  18581. tolua_function(tolua_S,"new",tolua_Math_Color_new02);
  18582. tolua_function(tolua_S,"new_local",tolua_Math_Color_new02_local);
  18583. tolua_function(tolua_S,".call",tolua_Math_Color_new02_local);
  18584. tolua_function(tolua_S,"new",tolua_Math_Color_new03);
  18585. tolua_function(tolua_S,"new_local",tolua_Math_Color_new03_local);
  18586. tolua_function(tolua_S,".call",tolua_Math_Color_new03_local);
  18587. tolua_function(tolua_S,"new",tolua_Math_Color_new04);
  18588. tolua_function(tolua_S,"new_local",tolua_Math_Color_new04_local);
  18589. tolua_function(tolua_S,".call",tolua_Math_Color_new04_local);
  18590. tolua_function(tolua_S,".eq",tolua_Math_Color__eq00);
  18591. tolua_function(tolua_S,".mul",tolua_Math_Color__mul00);
  18592. tolua_function(tolua_S,".add",tolua_Math_Color__add00);
  18593. tolua_function(tolua_S,"RGBValues",tolua_Math_Color_RGBValues00);
  18594. tolua_function(tolua_S,"Intensity",tolua_Math_Color_Intensity00);
  18595. tolua_function(tolua_S,"Lerp",tolua_Math_Color_Lerp00);
  18596. tolua_function(tolua_S,"ToUInt",tolua_Math_Color_ToUInt00);
  18597. tolua_function(tolua_S,"ToVector4",tolua_Math_Color_ToVector400);
  18598. tolua_function(tolua_S,"ToString",tolua_Math_Color_ToString00);
  18599. tolua_variable(tolua_S,"r",tolua_get_Color_r,tolua_set_Color_r);
  18600. tolua_variable(tolua_S,"g",tolua_get_Color_g,tolua_set_Color_g);
  18601. tolua_variable(tolua_S,"b",tolua_get_Color_b,tolua_set_Color_b);
  18602. tolua_variable(tolua_S,"a",tolua_get_Color_a,tolua_set_Color_a);
  18603. tolua_variable(tolua_S,"WHITE",tolua_get_Color_WHITE,NULL);
  18604. tolua_variable(tolua_S,"YELLOW",tolua_get_Color_YELLOW,NULL);
  18605. tolua_variable(tolua_S,"RED",tolua_get_Color_RED,NULL);
  18606. tolua_variable(tolua_S,"GREEN",tolua_get_Color_GREEN,NULL);
  18607. tolua_variable(tolua_S,"BLUE",tolua_get_Color_BLUE,NULL);
  18608. tolua_variable(tolua_S,"BLACK",tolua_get_Color_BLACK,NULL);
  18609. tolua_variable(tolua_S,"TRANSPARENT",tolua_get_Color_TRANSPARENT,NULL);
  18610. tolua_endmodule(tolua_S);
  18611. tolua_constant(tolua_S,"PLANE_NEAR",PLANE_NEAR);
  18612. tolua_constant(tolua_S,"PLANE_LEFT",PLANE_LEFT);
  18613. tolua_constant(tolua_S,"PLANE_RIGHT",PLANE_RIGHT);
  18614. tolua_constant(tolua_S,"PLANE_UP",PLANE_UP);
  18615. tolua_constant(tolua_S,"PLANE_DOWN",PLANE_DOWN);
  18616. tolua_constant(tolua_S,"PLANE_FAR",PLANE_FAR);
  18617. tolua_variable(tolua_S,"NUM_FRUSTUM_PLANES",tolua_get_NUM_FRUSTUM_PLANES,NULL);
  18618. tolua_variable(tolua_S,"NUM_FRUSTUM_VERTICES",tolua_get_NUM_FRUSTUM_VERTICES,NULL);
  18619. #ifdef __cplusplus
  18620. tolua_cclass(tolua_S,"Frustum","Frustum","",tolua_collect_Frustum);
  18621. #else
  18622. tolua_cclass(tolua_S,"Frustum","Frustum","",NULL);
  18623. #endif
  18624. tolua_beginmodule(tolua_S,"Frustum");
  18625. tolua_function(tolua_S,"new",tolua_Math_Frustum_new00);
  18626. tolua_function(tolua_S,"new_local",tolua_Math_Frustum_new00_local);
  18627. tolua_function(tolua_S,".call",tolua_Math_Frustum_new00_local);
  18628. tolua_function(tolua_S,"new",tolua_Math_Frustum_new01);
  18629. tolua_function(tolua_S,"new_local",tolua_Math_Frustum_new01_local);
  18630. tolua_function(tolua_S,".call",tolua_Math_Frustum_new01_local);
  18631. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define00);
  18632. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define01);
  18633. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define02);
  18634. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define03);
  18635. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define04);
  18636. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define05);
  18637. tolua_function(tolua_S,"DefineOrtho",tolua_Math_Frustum_DefineOrtho00);
  18638. tolua_function(tolua_S,"DefineOrtho",tolua_Math_Frustum_DefineOrtho01);
  18639. tolua_function(tolua_S,"Transform",tolua_Math_Frustum_Transform00);
  18640. tolua_function(tolua_S,"Transform",tolua_Math_Frustum_Transform01);
  18641. tolua_function(tolua_S,"IsInside",tolua_Math_Frustum_IsInside00);
  18642. tolua_function(tolua_S,"IsInside",tolua_Math_Frustum_IsInside01);
  18643. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Frustum_IsInsideFast00);
  18644. tolua_function(tolua_S,"IsInside",tolua_Math_Frustum_IsInside02);
  18645. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Frustum_IsInsideFast01);
  18646. tolua_function(tolua_S,"Distance",tolua_Math_Frustum_Distance00);
  18647. tolua_function(tolua_S,"Transformed",tolua_Math_Frustum_Transformed00);
  18648. tolua_function(tolua_S,"Transformed",tolua_Math_Frustum_Transformed01);
  18649. tolua_function(tolua_S,"Projected",tolua_Math_Frustum_Projected00);
  18650. tolua_function(tolua_S,"UpdatePlanes",tolua_Math_Frustum_UpdatePlanes00);
  18651. tolua_endmodule(tolua_S);
  18652. tolua_variable(tolua_S,"M_PI",tolua_get_M_PI,NULL);
  18653. tolua_variable(tolua_S,"M_MIN_INT",tolua_get_M_MIN_INT,NULL);
  18654. tolua_variable(tolua_S,"M_MAX_INT",tolua_get_M_MAX_INT,NULL);
  18655. tolua_variable(tolua_S,"M_MIN_UNSIGNED",tolua_get_M_MIN_UNSIGNED,NULL);
  18656. tolua_variable(tolua_S,"M_MAX_UNSIGNED",tolua_get_M_MAX_UNSIGNED,NULL);
  18657. tolua_variable(tolua_S,"M_EPSILON",tolua_get_M_EPSILON,NULL);
  18658. tolua_variable(tolua_S,"M_LARGE_EPSILON",tolua_get_M_LARGE_EPSILON,NULL);
  18659. tolua_variable(tolua_S,"M_MIN_NEARCLIP",tolua_get_M_MIN_NEARCLIP,NULL);
  18660. tolua_variable(tolua_S,"M_MAX_FOV",tolua_get_M_MAX_FOV,NULL);
  18661. tolua_variable(tolua_S,"M_LARGE_VALUE",tolua_get_M_LARGE_VALUE,NULL);
  18662. tolua_variable(tolua_S,"M_INFINITY",tolua_get_M_INFINITY,NULL);
  18663. tolua_variable(tolua_S,"M_DEGTORAD",tolua_get_M_DEGTORAD,NULL);
  18664. tolua_variable(tolua_S,"M_DEGTORAD_2",tolua_get_M_DEGTORAD_2,NULL);
  18665. tolua_variable(tolua_S,"M_RADTODEG",tolua_get_M_RADTODEG,NULL);
  18666. tolua_constant(tolua_S,"OUTSIDE",OUTSIDE);
  18667. tolua_constant(tolua_S,"INTERSECTS",INTERSECTS);
  18668. tolua_constant(tolua_S,"INSIDE",INSIDE);
  18669. tolua_function(tolua_S,"Lerp",tolua_Math_Lerp00);
  18670. tolua_function(tolua_S,"Min",tolua_Math_Min00);
  18671. tolua_function(tolua_S,"Max",tolua_Math_Max00);
  18672. tolua_function(tolua_S,"Abs",tolua_Math_Abs00);
  18673. tolua_function(tolua_S,"Clamp",tolua_Math_Clamp00);
  18674. tolua_function(tolua_S,"Equals",tolua_Math_Equals00);
  18675. tolua_function(tolua_S,"Min",tolua_Math_Min01);
  18676. tolua_function(tolua_S,"Max",tolua_Math_Max01);
  18677. tolua_function(tolua_S,"Abs",tolua_Math_Abs01);
  18678. tolua_function(tolua_S,"Clamp",tolua_Math_Clamp01);
  18679. tolua_function(tolua_S,"IsPowerOfTwo",tolua_Math_IsPowerOfTwo00);
  18680. tolua_function(tolua_S,"NextPowerOfTwo",tolua_Math_NextPowerOfTwo00);
  18681. tolua_function(tolua_S,"SDBMHash",tolua_Math_SDBMHash00);
  18682. tolua_function(tolua_S,"Random",tolua_Math_Random00);
  18683. tolua_function(tolua_S,"Random",tolua_Math_Random01);
  18684. tolua_function(tolua_S,"RandomInt",tolua_Math_RandomInt00);
  18685. #ifdef __cplusplus
  18686. tolua_cclass(tolua_S,"Matrix3","Matrix3","",tolua_collect_Matrix3);
  18687. #else
  18688. tolua_cclass(tolua_S,"Matrix3","Matrix3","",NULL);
  18689. #endif
  18690. tolua_beginmodule(tolua_S,"Matrix3");
  18691. tolua_function(tolua_S,"new",tolua_Math_Matrix3_new00);
  18692. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3_new00_local);
  18693. tolua_function(tolua_S,".call",tolua_Math_Matrix3_new00_local);
  18694. tolua_function(tolua_S,"new",tolua_Math_Matrix3_new01);
  18695. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3_new01_local);
  18696. tolua_function(tolua_S,".call",tolua_Math_Matrix3_new01_local);
  18697. tolua_function(tolua_S,"new",tolua_Math_Matrix3_new02);
  18698. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3_new02_local);
  18699. tolua_function(tolua_S,".call",tolua_Math_Matrix3_new02_local);
  18700. tolua_function(tolua_S,".eq",tolua_Math_Matrix3__eq00);
  18701. tolua_function(tolua_S,".mul",tolua_Math_Matrix3__mul00);
  18702. tolua_function(tolua_S,".add",tolua_Math_Matrix3__add00);
  18703. tolua_function(tolua_S,".sub",tolua_Math_Matrix3__sub00);
  18704. tolua_function(tolua_S,".mul",tolua_Math_Matrix3__mul01);
  18705. tolua_function(tolua_S,".mul",tolua_Math_Matrix3__mul02);
  18706. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3_SetScale00);
  18707. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3_SetScale01);
  18708. tolua_function(tolua_S,"Scale",tolua_Math_Matrix3_Scale00);
  18709. tolua_function(tolua_S,"Transpose",tolua_Math_Matrix3_Transpose00);
  18710. tolua_function(tolua_S,"Scaled",tolua_Math_Matrix3_Scaled00);
  18711. tolua_function(tolua_S,"Equals",tolua_Math_Matrix3_Equals00);
  18712. tolua_function(tolua_S,"Inverse",tolua_Math_Matrix3_Inverse00);
  18713. tolua_variable(tolua_S,"m00",tolua_get_Matrix3_m00,tolua_set_Matrix3_m00);
  18714. tolua_variable(tolua_S,"m01",tolua_get_Matrix3_m01,tolua_set_Matrix3_m01);
  18715. tolua_variable(tolua_S,"m02",tolua_get_Matrix3_m02,tolua_set_Matrix3_m02);
  18716. tolua_variable(tolua_S,"m10",tolua_get_Matrix3_m10,tolua_set_Matrix3_m10);
  18717. tolua_variable(tolua_S,"m11",tolua_get_Matrix3_m11,tolua_set_Matrix3_m11);
  18718. tolua_variable(tolua_S,"m12",tolua_get_Matrix3_m12,tolua_set_Matrix3_m12);
  18719. tolua_variable(tolua_S,"m20",tolua_get_Matrix3_m20,tolua_set_Matrix3_m20);
  18720. tolua_variable(tolua_S,"m21",tolua_get_Matrix3_m21,tolua_set_Matrix3_m21);
  18721. tolua_variable(tolua_S,"m22",tolua_get_Matrix3_m22,tolua_set_Matrix3_m22);
  18722. tolua_function(tolua_S,"BulkTranspose",tolua_Math_Matrix3_BulkTranspose00);
  18723. tolua_variable(tolua_S,"ZERO",tolua_get_Matrix3_ZERO,NULL);
  18724. tolua_variable(tolua_S,"IDENTITY",tolua_get_Matrix3_IDENTITY,NULL);
  18725. tolua_endmodule(tolua_S);
  18726. #ifdef __cplusplus
  18727. tolua_cclass(tolua_S,"Matrix3x4","Matrix3x4","",tolua_collect_Matrix3x4);
  18728. #else
  18729. tolua_cclass(tolua_S,"Matrix3x4","Matrix3x4","",NULL);
  18730. #endif
  18731. tolua_beginmodule(tolua_S,"Matrix3x4");
  18732. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new00);
  18733. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new00_local);
  18734. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new00_local);
  18735. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new01);
  18736. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new01_local);
  18737. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new01_local);
  18738. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new02);
  18739. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new02_local);
  18740. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new02_local);
  18741. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new03);
  18742. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new03_local);
  18743. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new03_local);
  18744. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new04);
  18745. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new04_local);
  18746. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new04_local);
  18747. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new05);
  18748. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new05_local);
  18749. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new05_local);
  18750. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new06);
  18751. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new06_local);
  18752. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new06_local);
  18753. tolua_function(tolua_S,".eq",tolua_Math_Matrix3x4__eq00);
  18754. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul00);
  18755. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul01);
  18756. tolua_function(tolua_S,".add",tolua_Math_Matrix3x4__add00);
  18757. tolua_function(tolua_S,".sub",tolua_Math_Matrix3x4__sub00);
  18758. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul02);
  18759. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul03);
  18760. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul04);
  18761. tolua_function(tolua_S,"SetTranslation",tolua_Math_Matrix3x4_SetTranslation00);
  18762. tolua_function(tolua_S,"SetRotation",tolua_Math_Matrix3x4_SetRotation00);
  18763. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3x4_SetScale00);
  18764. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3x4_SetScale01);
  18765. tolua_function(tolua_S,"ToMatrix3",tolua_Math_Matrix3x4_ToMatrix300);
  18766. tolua_function(tolua_S,"RotationMatrix",tolua_Math_Matrix3x4_RotationMatrix00);
  18767. tolua_function(tolua_S,"Translation",tolua_Math_Matrix3x4_Translation00);
  18768. tolua_function(tolua_S,"Rotation",tolua_Math_Matrix3x4_Rotation00);
  18769. tolua_function(tolua_S,"Scale",tolua_Math_Matrix3x4_Scale00);
  18770. tolua_function(tolua_S,"Equals",tolua_Math_Matrix3x4_Equals00);
  18771. tolua_function(tolua_S,"Decompose",tolua_Math_Matrix3x4_Decompose00);
  18772. tolua_function(tolua_S,"Inverse",tolua_Math_Matrix3x4_Inverse00);
  18773. tolua_variable(tolua_S,"m00",tolua_get_Matrix3x4_m00,tolua_set_Matrix3x4_m00);
  18774. tolua_variable(tolua_S,"m01",tolua_get_Matrix3x4_m01,tolua_set_Matrix3x4_m01);
  18775. tolua_variable(tolua_S,"m02",tolua_get_Matrix3x4_m02,tolua_set_Matrix3x4_m02);
  18776. tolua_variable(tolua_S,"m03",tolua_get_Matrix3x4_m03,tolua_set_Matrix3x4_m03);
  18777. tolua_variable(tolua_S,"m10",tolua_get_Matrix3x4_m10,tolua_set_Matrix3x4_m10);
  18778. tolua_variable(tolua_S,"m11",tolua_get_Matrix3x4_m11,tolua_set_Matrix3x4_m11);
  18779. tolua_variable(tolua_S,"m12",tolua_get_Matrix3x4_m12,tolua_set_Matrix3x4_m12);
  18780. tolua_variable(tolua_S,"m13",tolua_get_Matrix3x4_m13,tolua_set_Matrix3x4_m13);
  18781. tolua_variable(tolua_S,"m20",tolua_get_Matrix3x4_m20,tolua_set_Matrix3x4_m20);
  18782. tolua_variable(tolua_S,"m21",tolua_get_Matrix3x4_m21,tolua_set_Matrix3x4_m21);
  18783. tolua_variable(tolua_S,"m22",tolua_get_Matrix3x4_m22,tolua_set_Matrix3x4_m22);
  18784. tolua_variable(tolua_S,"m23",tolua_get_Matrix3x4_m23,tolua_set_Matrix3x4_m23);
  18785. tolua_variable(tolua_S,"ZERO",tolua_get_Matrix3x4_ZERO,NULL);
  18786. tolua_variable(tolua_S,"IDENTITY",tolua_get_Matrix3x4_IDENTITY,NULL);
  18787. tolua_endmodule(tolua_S);
  18788. #ifdef __cplusplus
  18789. tolua_cclass(tolua_S,"Matrix4","Matrix4","",tolua_collect_Matrix4);
  18790. #else
  18791. tolua_cclass(tolua_S,"Matrix4","Matrix4","",NULL);
  18792. #endif
  18793. tolua_beginmodule(tolua_S,"Matrix4");
  18794. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new00);
  18795. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new00_local);
  18796. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new00_local);
  18797. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new01);
  18798. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new01_local);
  18799. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new01_local);
  18800. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new02);
  18801. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new02_local);
  18802. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new02_local);
  18803. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new03);
  18804. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new03_local);
  18805. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new03_local);
  18806. tolua_function(tolua_S,".eq",tolua_Math_Matrix4__eq00);
  18807. tolua_function(tolua_S,".eq",tolua_Math_Matrix4__eq01);
  18808. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul00);
  18809. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul01);
  18810. tolua_function(tolua_S,".add",tolua_Math_Matrix4__add00);
  18811. tolua_function(tolua_S,".sub",tolua_Math_Matrix4__sub00);
  18812. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul02);
  18813. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul03);
  18814. tolua_function(tolua_S,"SetTranslation",tolua_Math_Matrix4_SetTranslation00);
  18815. tolua_function(tolua_S,"SetRotation",tolua_Math_Matrix4_SetRotation00);
  18816. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix4_SetScale00);
  18817. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix4_SetScale01);
  18818. tolua_function(tolua_S,"ToMatrix3",tolua_Math_Matrix4_ToMatrix300);
  18819. tolua_function(tolua_S,"RotationMatrix",tolua_Math_Matrix4_RotationMatrix00);
  18820. tolua_function(tolua_S,"Translation",tolua_Math_Matrix4_Translation00);
  18821. tolua_function(tolua_S,"Rotation",tolua_Math_Matrix4_Rotation00);
  18822. tolua_function(tolua_S,"Scale",tolua_Math_Matrix4_Scale00);
  18823. tolua_function(tolua_S,"Transpose",tolua_Math_Matrix4_Transpose00);
  18824. tolua_function(tolua_S,"Equals",tolua_Math_Matrix4_Equals00);
  18825. tolua_function(tolua_S,"Decompose",tolua_Math_Matrix4_Decompose00);
  18826. tolua_function(tolua_S,"Inverse",tolua_Math_Matrix4_Inverse00);
  18827. tolua_variable(tolua_S,"m00",tolua_get_Matrix4_m00,tolua_set_Matrix4_m00);
  18828. tolua_variable(tolua_S,"m01",tolua_get_Matrix4_m01,tolua_set_Matrix4_m01);
  18829. tolua_variable(tolua_S,"m02",tolua_get_Matrix4_m02,tolua_set_Matrix4_m02);
  18830. tolua_variable(tolua_S,"m03",tolua_get_Matrix4_m03,tolua_set_Matrix4_m03);
  18831. tolua_variable(tolua_S,"m10",tolua_get_Matrix4_m10,tolua_set_Matrix4_m10);
  18832. tolua_variable(tolua_S,"m11",tolua_get_Matrix4_m11,tolua_set_Matrix4_m11);
  18833. tolua_variable(tolua_S,"m12",tolua_get_Matrix4_m12,tolua_set_Matrix4_m12);
  18834. tolua_variable(tolua_S,"m13",tolua_get_Matrix4_m13,tolua_set_Matrix4_m13);
  18835. tolua_variable(tolua_S,"m20",tolua_get_Matrix4_m20,tolua_set_Matrix4_m20);
  18836. tolua_variable(tolua_S,"m21",tolua_get_Matrix4_m21,tolua_set_Matrix4_m21);
  18837. tolua_variable(tolua_S,"m22",tolua_get_Matrix4_m22,tolua_set_Matrix4_m22);
  18838. tolua_variable(tolua_S,"m23",tolua_get_Matrix4_m23,tolua_set_Matrix4_m23);
  18839. tolua_variable(tolua_S,"m30",tolua_get_Matrix4_m30,tolua_set_Matrix4_m30);
  18840. tolua_variable(tolua_S,"m31",tolua_get_Matrix4_m31,tolua_set_Matrix4_m31);
  18841. tolua_variable(tolua_S,"m32",tolua_get_Matrix4_m32,tolua_set_Matrix4_m32);
  18842. tolua_variable(tolua_S,"m33",tolua_get_Matrix4_m33,tolua_set_Matrix4_m33);
  18843. tolua_function(tolua_S,"BulkTranspose",tolua_Math_Matrix4_BulkTranspose00);
  18844. tolua_variable(tolua_S,"ZERO",tolua_get_Matrix4_ZERO,NULL);
  18845. tolua_variable(tolua_S,"IDENTITY",tolua_get_Matrix4_IDENTITY,NULL);
  18846. tolua_endmodule(tolua_S);
  18847. #ifdef __cplusplus
  18848. tolua_cclass(tolua_S,"Plane","Plane","",tolua_collect_Plane);
  18849. #else
  18850. tolua_cclass(tolua_S,"Plane","Plane","",NULL);
  18851. #endif
  18852. tolua_beginmodule(tolua_S,"Plane");
  18853. tolua_function(tolua_S,"new",tolua_Math_Plane_new00);
  18854. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new00_local);
  18855. tolua_function(tolua_S,".call",tolua_Math_Plane_new00_local);
  18856. tolua_function(tolua_S,"new",tolua_Math_Plane_new01);
  18857. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new01_local);
  18858. tolua_function(tolua_S,".call",tolua_Math_Plane_new01_local);
  18859. tolua_function(tolua_S,"new",tolua_Math_Plane_new02);
  18860. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new02_local);
  18861. tolua_function(tolua_S,".call",tolua_Math_Plane_new02_local);
  18862. tolua_function(tolua_S,"new",tolua_Math_Plane_new03);
  18863. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new03_local);
  18864. tolua_function(tolua_S,".call",tolua_Math_Plane_new03_local);
  18865. tolua_function(tolua_S,"Define",tolua_Math_Plane_Define00);
  18866. tolua_function(tolua_S,"Define",tolua_Math_Plane_Define01);
  18867. tolua_function(tolua_S,"Distance",tolua_Math_Plane_Distance00);
  18868. tolua_variable(tolua_S,"normal",tolua_get_Plane_normal,tolua_set_Plane_normal);
  18869. tolua_variable(tolua_S,"absNormal",tolua_get_Plane_absNormal,tolua_set_Plane_absNormal);
  18870. tolua_variable(tolua_S,"intercept",tolua_get_Plane_intercept,tolua_set_Plane_intercept);
  18871. tolua_endmodule(tolua_S);
  18872. #ifdef __cplusplus
  18873. tolua_cclass(tolua_S,"Polyhedron","Polyhedron","",tolua_collect_Polyhedron);
  18874. #else
  18875. tolua_cclass(tolua_S,"Polyhedron","Polyhedron","",NULL);
  18876. #endif
  18877. tolua_beginmodule(tolua_S,"Polyhedron");
  18878. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new00);
  18879. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new00_local);
  18880. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new00_local);
  18881. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new01);
  18882. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new01_local);
  18883. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new01_local);
  18884. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new02);
  18885. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new02_local);
  18886. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new02_local);
  18887. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new03);
  18888. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new03_local);
  18889. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new03_local);
  18890. tolua_function(tolua_S,"delete",tolua_Math_Polyhedron_delete00);
  18891. tolua_function(tolua_S,"Define",tolua_Math_Polyhedron_Define00);
  18892. tolua_function(tolua_S,"Define",tolua_Math_Polyhedron_Define01);
  18893. tolua_function(tolua_S,"AddFace",tolua_Math_Polyhedron_AddFace00);
  18894. tolua_function(tolua_S,"AddFace",tolua_Math_Polyhedron_AddFace01);
  18895. tolua_function(tolua_S,"Clip",tolua_Math_Polyhedron_Clip00);
  18896. tolua_function(tolua_S,"Clip",tolua_Math_Polyhedron_Clip01);
  18897. tolua_function(tolua_S,"Clip",tolua_Math_Polyhedron_Clip02);
  18898. tolua_function(tolua_S,"Clear",tolua_Math_Polyhedron_Clear00);
  18899. tolua_function(tolua_S,"Transform",tolua_Math_Polyhedron_Transform00);
  18900. tolua_function(tolua_S,"Transform",tolua_Math_Polyhedron_Transform01);
  18901. tolua_function(tolua_S,"Transformed",tolua_Math_Polyhedron_Transformed00);
  18902. tolua_function(tolua_S,"Transformed",tolua_Math_Polyhedron_Transformed01);
  18903. tolua_function(tolua_S,"Empty",tolua_Math_Polyhedron_Empty00);
  18904. tolua_endmodule(tolua_S);
  18905. #ifdef __cplusplus
  18906. tolua_cclass(tolua_S,"Quaternion","Quaternion","",tolua_collect_Quaternion);
  18907. #else
  18908. tolua_cclass(tolua_S,"Quaternion","Quaternion","",NULL);
  18909. #endif
  18910. tolua_beginmodule(tolua_S,"Quaternion");
  18911. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new00);
  18912. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new00_local);
  18913. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new00_local);
  18914. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new01);
  18915. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new01_local);
  18916. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new01_local);
  18917. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new02);
  18918. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new02_local);
  18919. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new02_local);
  18920. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new03);
  18921. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new03_local);
  18922. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new03_local);
  18923. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new04);
  18924. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new04_local);
  18925. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new04_local);
  18926. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new05);
  18927. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new05_local);
  18928. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new05_local);
  18929. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new06);
  18930. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new06_local);
  18931. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new06_local);
  18932. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new07);
  18933. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new07_local);
  18934. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new07_local);
  18935. tolua_function(tolua_S,".eq",tolua_Math_Quaternion__eq00);
  18936. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul00);
  18937. tolua_function(tolua_S,".sub",tolua_Math_Quaternion__sub00);
  18938. tolua_function(tolua_S,".eq",tolua_Math_Quaternion__eq01);
  18939. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul01);
  18940. tolua_function(tolua_S,".sub",tolua_Math_Quaternion__sub01);
  18941. tolua_function(tolua_S,".add",tolua_Math_Quaternion__add00);
  18942. tolua_function(tolua_S,".sub",tolua_Math_Quaternion__sub02);
  18943. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul02);
  18944. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul03);
  18945. tolua_function(tolua_S,"FromAngleAxis",tolua_Math_Quaternion_FromAngleAxis00);
  18946. tolua_function(tolua_S,"FromEulerAngles",tolua_Math_Quaternion_FromEulerAngles00);
  18947. tolua_function(tolua_S,"FromRotationTo",tolua_Math_Quaternion_FromRotationTo00);
  18948. tolua_function(tolua_S,"FromAxes",tolua_Math_Quaternion_FromAxes00);
  18949. tolua_function(tolua_S,"FromRotationMatrix",tolua_Math_Quaternion_FromRotationMatrix00);
  18950. tolua_function(tolua_S,"Normalize",tolua_Math_Quaternion_Normalize00);
  18951. tolua_function(tolua_S,"Normalized",tolua_Math_Quaternion_Normalized00);
  18952. tolua_function(tolua_S,"Inverse",tolua_Math_Quaternion_Inverse00);
  18953. tolua_function(tolua_S,"LengthSquared",tolua_Math_Quaternion_LengthSquared00);
  18954. tolua_function(tolua_S,"DotProduct",tolua_Math_Quaternion_DotProduct00);
  18955. tolua_function(tolua_S,"Equals",tolua_Math_Quaternion_Equals00);
  18956. tolua_function(tolua_S,"Conjugate",tolua_Math_Quaternion_Conjugate00);
  18957. tolua_function(tolua_S,"EulerAngles",tolua_Math_Quaternion_EulerAngles00);
  18958. tolua_function(tolua_S,"YawAngle",tolua_Math_Quaternion_YawAngle00);
  18959. tolua_function(tolua_S,"PitchAngle",tolua_Math_Quaternion_PitchAngle00);
  18960. tolua_function(tolua_S,"RollAngle",tolua_Math_Quaternion_RollAngle00);
  18961. tolua_function(tolua_S,"RotationMatrix",tolua_Math_Quaternion_RotationMatrix00);
  18962. tolua_function(tolua_S,"Slerp",tolua_Math_Quaternion_Slerp00);
  18963. tolua_function(tolua_S,"ToString",tolua_Math_Quaternion_ToString00);
  18964. tolua_variable(tolua_S,"w",tolua_get_Quaternion_w,tolua_set_Quaternion_w);
  18965. tolua_variable(tolua_S,"x",tolua_get_Quaternion_x,tolua_set_Quaternion_x);
  18966. tolua_variable(tolua_S,"y",tolua_get_Quaternion_y,tolua_set_Quaternion_y);
  18967. tolua_variable(tolua_S,"z",tolua_get_Quaternion_z,tolua_set_Quaternion_z);
  18968. tolua_variable(tolua_S,"IDENTITY",tolua_get_Quaternion_IDENTITY,NULL);
  18969. tolua_endmodule(tolua_S);
  18970. tolua_function(tolua_S,"SetRandomSeed",tolua_Math_SetRandomSeed00);
  18971. tolua_function(tolua_S,"GetRandomSeed",tolua_Math_GetRandomSeed00);
  18972. tolua_function(tolua_S,"Rand",tolua_Math_Rand00);
  18973. #ifdef __cplusplus
  18974. tolua_cclass(tolua_S,"Ray","Ray","",tolua_collect_Ray);
  18975. #else
  18976. tolua_cclass(tolua_S,"Ray","Ray","",NULL);
  18977. #endif
  18978. tolua_beginmodule(tolua_S,"Ray");
  18979. tolua_function(tolua_S,"new",tolua_Math_Ray_new00);
  18980. tolua_function(tolua_S,"new_local",tolua_Math_Ray_new00_local);
  18981. tolua_function(tolua_S,".call",tolua_Math_Ray_new00_local);
  18982. tolua_function(tolua_S,"new",tolua_Math_Ray_new01);
  18983. tolua_function(tolua_S,"new_local",tolua_Math_Ray_new01_local);
  18984. tolua_function(tolua_S,".call",tolua_Math_Ray_new01_local);
  18985. tolua_function(tolua_S,"new",tolua_Math_Ray_new02);
  18986. tolua_function(tolua_S,"new_local",tolua_Math_Ray_new02_local);
  18987. tolua_function(tolua_S,".call",tolua_Math_Ray_new02_local);
  18988. tolua_function(tolua_S,".eq",tolua_Math_Ray__eq00);
  18989. tolua_function(tolua_S,"Define",tolua_Math_Ray_Define00);
  18990. tolua_function(tolua_S,"Project",tolua_Math_Ray_Project00);
  18991. tolua_function(tolua_S,"Distance",tolua_Math_Ray_Distance00);
  18992. tolua_function(tolua_S,"ClosestPoint",tolua_Math_Ray_ClosestPoint00);
  18993. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance00);
  18994. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance01);
  18995. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance02);
  18996. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance03);
  18997. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance04);
  18998. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance05);
  18999. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance06);
  19000. tolua_function(tolua_S,"InsideGeometry",tolua_Math_Ray_InsideGeometry00);
  19001. tolua_function(tolua_S,"InsideGeometry",tolua_Math_Ray_InsideGeometry01);
  19002. tolua_variable(tolua_S,"origin",tolua_get_Ray_origin,tolua_set_Ray_origin);
  19003. tolua_variable(tolua_S,"direction",tolua_get_Ray_direction,tolua_set_Ray_direction);
  19004. tolua_endmodule(tolua_S);
  19005. #ifdef __cplusplus
  19006. tolua_cclass(tolua_S,"Rect","Rect","",tolua_collect_Rect);
  19007. #else
  19008. tolua_cclass(tolua_S,"Rect","Rect","",NULL);
  19009. #endif
  19010. tolua_beginmodule(tolua_S,"Rect");
  19011. tolua_function(tolua_S,"new",tolua_Math_Rect_new00);
  19012. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new00_local);
  19013. tolua_function(tolua_S,".call",tolua_Math_Rect_new00_local);
  19014. tolua_function(tolua_S,"new",tolua_Math_Rect_new01);
  19015. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new01_local);
  19016. tolua_function(tolua_S,".call",tolua_Math_Rect_new01_local);
  19017. tolua_function(tolua_S,"new",tolua_Math_Rect_new02);
  19018. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new02_local);
  19019. tolua_function(tolua_S,".call",tolua_Math_Rect_new02_local);
  19020. tolua_function(tolua_S,"new",tolua_Math_Rect_new03);
  19021. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new03_local);
  19022. tolua_function(tolua_S,".call",tolua_Math_Rect_new03_local);
  19023. tolua_function(tolua_S,"new",tolua_Math_Rect_new04);
  19024. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new04_local);
  19025. tolua_function(tolua_S,".call",tolua_Math_Rect_new04_local);
  19026. tolua_function(tolua_S,".eq",tolua_Math_Rect__eq00);
  19027. tolua_function(tolua_S,"Define",tolua_Math_Rect_Define00);
  19028. tolua_function(tolua_S,"Define",tolua_Math_Rect_Define01);
  19029. tolua_function(tolua_S,"Define",tolua_Math_Rect_Define02);
  19030. tolua_function(tolua_S,"Merge",tolua_Math_Rect_Merge00);
  19031. tolua_function(tolua_S,"Merge",tolua_Math_Rect_Merge01);
  19032. tolua_function(tolua_S,"Clear",tolua_Math_Rect_Clear00);
  19033. tolua_function(tolua_S,"Clip",tolua_Math_Rect_Clip00);
  19034. tolua_function(tolua_S,"Center",tolua_Math_Rect_Center00);
  19035. tolua_function(tolua_S,"Size",tolua_Math_Rect_Size00);
  19036. tolua_function(tolua_S,"HalfSize",tolua_Math_Rect_HalfSize00);
  19037. tolua_function(tolua_S,"Equals",tolua_Math_Rect_Equals00);
  19038. tolua_function(tolua_S,"ToVector4",tolua_Math_Rect_ToVector400);
  19039. tolua_function(tolua_S,"ToString",tolua_Math_Rect_ToString00);
  19040. tolua_variable(tolua_S,"min",tolua_get_Rect_min,tolua_set_Rect_min);
  19041. tolua_variable(tolua_S,"max",tolua_get_Rect_max,tolua_set_Rect_max);
  19042. tolua_variable(tolua_S,"FULL",tolua_get_Rect_FULL,NULL);
  19043. tolua_variable(tolua_S,"POSITIVE",tolua_get_Rect_POSITIVE,NULL);
  19044. tolua_variable(tolua_S,"ZERO",tolua_get_Rect_ZERO,NULL);
  19045. tolua_endmodule(tolua_S);
  19046. #ifdef __cplusplus
  19047. tolua_cclass(tolua_S,"IntRect","IntRect","",tolua_collect_IntRect);
  19048. #else
  19049. tolua_cclass(tolua_S,"IntRect","IntRect","",NULL);
  19050. #endif
  19051. tolua_beginmodule(tolua_S,"IntRect");
  19052. tolua_function(tolua_S,"new",tolua_Math_IntRect_new00);
  19053. tolua_function(tolua_S,"new_local",tolua_Math_IntRect_new00_local);
  19054. tolua_function(tolua_S,".call",tolua_Math_IntRect_new00_local);
  19055. tolua_function(tolua_S,"new",tolua_Math_IntRect_new01);
  19056. tolua_function(tolua_S,"new_local",tolua_Math_IntRect_new01_local);
  19057. tolua_function(tolua_S,".call",tolua_Math_IntRect_new01_local);
  19058. tolua_function(tolua_S,".eq",tolua_Math_IntRect__eq00);
  19059. tolua_function(tolua_S,"Size",tolua_Math_IntRect_Size00);
  19060. tolua_function(tolua_S,"Width",tolua_Math_IntRect_Width00);
  19061. tolua_function(tolua_S,"Height",tolua_Math_IntRect_Height00);
  19062. tolua_variable(tolua_S,"left",tolua_get_IntRect_left,tolua_set_IntRect_left);
  19063. tolua_variable(tolua_S,"top",tolua_get_IntRect_top,tolua_set_IntRect_top);
  19064. tolua_variable(tolua_S,"right",tolua_get_IntRect_right,tolua_set_IntRect_right);
  19065. tolua_variable(tolua_S,"bottom",tolua_get_IntRect_bottom,tolua_set_IntRect_bottom);
  19066. tolua_variable(tolua_S,"ZERO",tolua_get_IntRect_ZERO,NULL);
  19067. tolua_endmodule(tolua_S);
  19068. #ifdef __cplusplus
  19069. tolua_cclass(tolua_S,"Sphere","Sphere","",tolua_collect_Sphere);
  19070. #else
  19071. tolua_cclass(tolua_S,"Sphere","Sphere","",NULL);
  19072. #endif
  19073. tolua_beginmodule(tolua_S,"Sphere");
  19074. tolua_function(tolua_S,"new",tolua_Math_Sphere_new00);
  19075. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new00_local);
  19076. tolua_function(tolua_S,".call",tolua_Math_Sphere_new00_local);
  19077. tolua_function(tolua_S,"new",tolua_Math_Sphere_new01);
  19078. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new01_local);
  19079. tolua_function(tolua_S,".call",tolua_Math_Sphere_new01_local);
  19080. tolua_function(tolua_S,"new",tolua_Math_Sphere_new02);
  19081. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new02_local);
  19082. tolua_function(tolua_S,".call",tolua_Math_Sphere_new02_local);
  19083. tolua_function(tolua_S,"new",tolua_Math_Sphere_new03);
  19084. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new03_local);
  19085. tolua_function(tolua_S,".call",tolua_Math_Sphere_new03_local);
  19086. tolua_function(tolua_S,"new",tolua_Math_Sphere_new04);
  19087. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new04_local);
  19088. tolua_function(tolua_S,".call",tolua_Math_Sphere_new04_local);
  19089. tolua_function(tolua_S,"new",tolua_Math_Sphere_new05);
  19090. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new05_local);
  19091. tolua_function(tolua_S,".call",tolua_Math_Sphere_new05_local);
  19092. tolua_function(tolua_S,"new",tolua_Math_Sphere_new06);
  19093. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new06_local);
  19094. tolua_function(tolua_S,".call",tolua_Math_Sphere_new06_local);
  19095. tolua_function(tolua_S,".eq",tolua_Math_Sphere__eq00);
  19096. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define00);
  19097. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define01);
  19098. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define02);
  19099. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define03);
  19100. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define04);
  19101. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define05);
  19102. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge00);
  19103. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge01);
  19104. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge02);
  19105. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge03);
  19106. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge04);
  19107. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge05);
  19108. tolua_function(tolua_S,"Clear",tolua_Math_Sphere_Clear00);
  19109. tolua_function(tolua_S,"IsInside",tolua_Math_Sphere_IsInside00);
  19110. tolua_function(tolua_S,"IsInside",tolua_Math_Sphere_IsInside01);
  19111. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Sphere_IsInsideFast00);
  19112. tolua_function(tolua_S,"IsInside",tolua_Math_Sphere_IsInside02);
  19113. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Sphere_IsInsideFast01);
  19114. tolua_function(tolua_S,"Distance",tolua_Math_Sphere_Distance00);
  19115. tolua_variable(tolua_S,"center",tolua_get_Sphere_center,tolua_set_Sphere_center);
  19116. tolua_variable(tolua_S,"radius",tolua_get_Sphere_radius,tolua_set_Sphere_radius);
  19117. tolua_endmodule(tolua_S);
  19118. #ifdef __cplusplus
  19119. tolua_cclass(tolua_S,"StringHash","StringHash","",tolua_collect_StringHash);
  19120. #else
  19121. tolua_cclass(tolua_S,"StringHash","StringHash","",NULL);
  19122. #endif
  19123. tolua_beginmodule(tolua_S,"StringHash");
  19124. tolua_function(tolua_S,"new",tolua_Math_StringHash_new00);
  19125. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new00_local);
  19126. tolua_function(tolua_S,".call",tolua_Math_StringHash_new00_local);
  19127. tolua_function(tolua_S,"new",tolua_Math_StringHash_new01);
  19128. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new01_local);
  19129. tolua_function(tolua_S,".call",tolua_Math_StringHash_new01_local);
  19130. tolua_function(tolua_S,"new",tolua_Math_StringHash_new02);
  19131. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new02_local);
  19132. tolua_function(tolua_S,".call",tolua_Math_StringHash_new02_local);
  19133. tolua_function(tolua_S,"new",tolua_Math_StringHash_new03);
  19134. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new03_local);
  19135. tolua_function(tolua_S,".call",tolua_Math_StringHash_new03_local);
  19136. tolua_function(tolua_S,"new",tolua_Math_StringHash_new04);
  19137. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new04_local);
  19138. tolua_function(tolua_S,".call",tolua_Math_StringHash_new04_local);
  19139. tolua_function(tolua_S,".add",tolua_Math_StringHash__add00);
  19140. tolua_function(tolua_S,".eq",tolua_Math_StringHash__eq00);
  19141. tolua_function(tolua_S,".lt",tolua_Math_StringHash__lt00);
  19142. tolua_function(tolua_S,".bool",tolua_Math_StringHash__bool00);
  19143. tolua_function(tolua_S,"Value",tolua_Math_StringHash_Value00);
  19144. tolua_function(tolua_S,"ToString",tolua_Math_StringHash_ToString00);
  19145. tolua_function(tolua_S,"ToHash",tolua_Math_StringHash_ToHash00);
  19146. tolua_function(tolua_S,"Calculate",tolua_Math_StringHash_Calculate00);
  19147. tolua_variable(tolua_S,"ZERO",tolua_get_StringHash_ZERO,NULL);
  19148. tolua_endmodule(tolua_S);
  19149. #ifdef __cplusplus
  19150. tolua_cclass(tolua_S,"ShortStringHash","ShortStringHash","",tolua_collect_ShortStringHash);
  19151. #else
  19152. tolua_cclass(tolua_S,"ShortStringHash","ShortStringHash","",NULL);
  19153. #endif
  19154. tolua_beginmodule(tolua_S,"ShortStringHash");
  19155. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new00);
  19156. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new00_local);
  19157. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new00_local);
  19158. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new01);
  19159. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new01_local);
  19160. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new01_local);
  19161. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new02);
  19162. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new02_local);
  19163. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new02_local);
  19164. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new03);
  19165. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new03_local);
  19166. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new03_local);
  19167. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new04);
  19168. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new04_local);
  19169. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new04_local);
  19170. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new05);
  19171. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new05_local);
  19172. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new05_local);
  19173. tolua_function(tolua_S,".add",tolua_Math_ShortStringHash__add00);
  19174. tolua_function(tolua_S,".eq",tolua_Math_ShortStringHash__eq00);
  19175. tolua_function(tolua_S,".lt",tolua_Math_ShortStringHash__lt00);
  19176. tolua_function(tolua_S,"Value",tolua_Math_ShortStringHash_Value00);
  19177. tolua_function(tolua_S,"Calculate",tolua_Math_ShortStringHash_Calculate00);
  19178. tolua_variable(tolua_S,"ZERO",tolua_get_ShortStringHash_ZERO,NULL);
  19179. tolua_endmodule(tolua_S);
  19180. #ifdef __cplusplus
  19181. tolua_cclass(tolua_S,"Vector2","Vector2","",tolua_collect_Vector2);
  19182. #else
  19183. tolua_cclass(tolua_S,"Vector2","Vector2","",NULL);
  19184. #endif
  19185. tolua_beginmodule(tolua_S,"Vector2");
  19186. tolua_function(tolua_S,"new",tolua_Math_Vector2_new00);
  19187. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new00_local);
  19188. tolua_function(tolua_S,".call",tolua_Math_Vector2_new00_local);
  19189. tolua_function(tolua_S,"new",tolua_Math_Vector2_new01);
  19190. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new01_local);
  19191. tolua_function(tolua_S,".call",tolua_Math_Vector2_new01_local);
  19192. tolua_function(tolua_S,"new",tolua_Math_Vector2_new02);
  19193. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new02_local);
  19194. tolua_function(tolua_S,".call",tolua_Math_Vector2_new02_local);
  19195. tolua_function(tolua_S,"new",tolua_Math_Vector2_new03);
  19196. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new03_local);
  19197. tolua_function(tolua_S,".call",tolua_Math_Vector2_new03_local);
  19198. tolua_function(tolua_S,".eq",tolua_Math_Vector2__eq00);
  19199. tolua_function(tolua_S,".add",tolua_Math_Vector2__add00);
  19200. tolua_function(tolua_S,".sub",tolua_Math_Vector2__sub00);
  19201. tolua_function(tolua_S,".sub",tolua_Math_Vector2__sub01);
  19202. tolua_function(tolua_S,".mul",tolua_Math_Vector2__mul00);
  19203. tolua_function(tolua_S,".mul",tolua_Math_Vector2__mul01);
  19204. tolua_function(tolua_S,".div",tolua_Math_Vector2__div00);
  19205. tolua_function(tolua_S,".div",tolua_Math_Vector2__div01);
  19206. tolua_function(tolua_S,".div",tolua_Math_Vector2__div02);
  19207. tolua_function(tolua_S,"Normalize",tolua_Math_Vector2_Normalize00);
  19208. tolua_function(tolua_S,"Length",tolua_Math_Vector2_Length00);
  19209. tolua_function(tolua_S,"LengthSquared",tolua_Math_Vector2_LengthSquared00);
  19210. tolua_function(tolua_S,"DotProduct",tolua_Math_Vector2_DotProduct00);
  19211. tolua_function(tolua_S,"AbsDotProduct",tolua_Math_Vector2_AbsDotProduct00);
  19212. tolua_function(tolua_S,"Abs",tolua_Math_Vector2_Abs00);
  19213. tolua_function(tolua_S,"Lerp",tolua_Math_Vector2_Lerp00);
  19214. tolua_function(tolua_S,"Equals",tolua_Math_Vector2_Equals00);
  19215. tolua_function(tolua_S,"Normalized",tolua_Math_Vector2_Normalized00);
  19216. tolua_function(tolua_S,"ToString",tolua_Math_Vector2_ToString00);
  19217. tolua_variable(tolua_S,"x",tolua_get_Vector2_x,tolua_set_Vector2_x);
  19218. tolua_variable(tolua_S,"y",tolua_get_Vector2_y,tolua_set_Vector2_y);
  19219. tolua_variable(tolua_S,"ZERO",tolua_get_Vector2_ZERO,NULL);
  19220. tolua_variable(tolua_S,"LEFT",tolua_get_Vector2_LEFT,NULL);
  19221. tolua_variable(tolua_S,"RIGHT",tolua_get_Vector2_RIGHT,NULL);
  19222. tolua_variable(tolua_S,"UP",tolua_get_Vector2_UP,NULL);
  19223. tolua_variable(tolua_S,"DOWN",tolua_get_Vector2_DOWN,NULL);
  19224. tolua_variable(tolua_S,"ONE",tolua_get_Vector2_ONE,NULL);
  19225. tolua_endmodule(tolua_S);
  19226. #ifdef __cplusplus
  19227. tolua_cclass(tolua_S,"IntVector2","IntVector2","",tolua_collect_IntVector2);
  19228. #else
  19229. tolua_cclass(tolua_S,"IntVector2","IntVector2","",NULL);
  19230. #endif
  19231. tolua_beginmodule(tolua_S,"IntVector2");
  19232. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new00);
  19233. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new00_local);
  19234. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new00_local);
  19235. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new01);
  19236. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new01_local);
  19237. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new01_local);
  19238. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new02);
  19239. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new02_local);
  19240. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new02_local);
  19241. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new03);
  19242. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new03_local);
  19243. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new03_local);
  19244. tolua_function(tolua_S,".eq",tolua_Math_IntVector2__eq00);
  19245. tolua_function(tolua_S,".add",tolua_Math_IntVector2__add00);
  19246. tolua_function(tolua_S,".sub",tolua_Math_IntVector2__sub00);
  19247. tolua_function(tolua_S,".sub",tolua_Math_IntVector2__sub01);
  19248. tolua_function(tolua_S,".mul",tolua_Math_IntVector2__mul00);
  19249. tolua_function(tolua_S,".div",tolua_Math_IntVector2__div00);
  19250. tolua_function(tolua_S,".div",tolua_Math_IntVector2__div01);
  19251. tolua_function(tolua_S,"ToString",tolua_Math_IntVector2_ToString00);
  19252. tolua_variable(tolua_S,"x",tolua_get_IntVector2_x,tolua_set_IntVector2_x);
  19253. tolua_variable(tolua_S,"y",tolua_get_IntVector2_y,tolua_set_IntVector2_y);
  19254. tolua_variable(tolua_S,"ZERO",tolua_get_IntVector2_ZERO,NULL);
  19255. tolua_endmodule(tolua_S);
  19256. #ifdef __cplusplus
  19257. tolua_cclass(tolua_S,"Vector3","Vector3","",tolua_collect_Vector3);
  19258. #else
  19259. tolua_cclass(tolua_S,"Vector3","Vector3","",NULL);
  19260. #endif
  19261. tolua_beginmodule(tolua_S,"Vector3");
  19262. tolua_function(tolua_S,"new",tolua_Math_Vector3_new00);
  19263. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new00_local);
  19264. tolua_function(tolua_S,".call",tolua_Math_Vector3_new00_local);
  19265. tolua_function(tolua_S,"new",tolua_Math_Vector3_new01);
  19266. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new01_local);
  19267. tolua_function(tolua_S,".call",tolua_Math_Vector3_new01_local);
  19268. tolua_function(tolua_S,"new",tolua_Math_Vector3_new02);
  19269. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new02_local);
  19270. tolua_function(tolua_S,".call",tolua_Math_Vector3_new02_local);
  19271. tolua_function(tolua_S,"new",tolua_Math_Vector3_new03);
  19272. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new03_local);
  19273. tolua_function(tolua_S,".call",tolua_Math_Vector3_new03_local);
  19274. tolua_function(tolua_S,".eq",tolua_Math_Vector3__eq00);
  19275. tolua_function(tolua_S,".add",tolua_Math_Vector3__add00);
  19276. tolua_function(tolua_S,".sub",tolua_Math_Vector3__sub00);
  19277. tolua_function(tolua_S,".sub",tolua_Math_Vector3__sub01);
  19278. tolua_function(tolua_S,".mul",tolua_Math_Vector3__mul00);
  19279. tolua_function(tolua_S,".mul",tolua_Math_Vector3__mul01);
  19280. tolua_function(tolua_S,".div",tolua_Math_Vector3__div00);
  19281. tolua_function(tolua_S,".div",tolua_Math_Vector3__div01);
  19282. tolua_function(tolua_S,".div",tolua_Math_Vector3__div02);
  19283. tolua_function(tolua_S,"Normalize",tolua_Math_Vector3_Normalize00);
  19284. tolua_function(tolua_S,"Length",tolua_Math_Vector3_Length00);
  19285. tolua_function(tolua_S,"LengthSquared",tolua_Math_Vector3_LengthSquared00);
  19286. tolua_function(tolua_S,"DotProduct",tolua_Math_Vector3_DotProduct00);
  19287. tolua_function(tolua_S,"AbsDotProduct",tolua_Math_Vector3_AbsDotProduct00);
  19288. tolua_function(tolua_S,"CrossProduct",tolua_Math_Vector3_CrossProduct00);
  19289. tolua_function(tolua_S,"Abs",tolua_Math_Vector3_Abs00);
  19290. tolua_function(tolua_S,"Lerp",tolua_Math_Vector3_Lerp00);
  19291. tolua_function(tolua_S,"Equals",tolua_Math_Vector3_Equals00);
  19292. tolua_function(tolua_S,"Normalized",tolua_Math_Vector3_Normalized00);
  19293. tolua_function(tolua_S,"ToString",tolua_Math_Vector3_ToString00);
  19294. tolua_variable(tolua_S,"x",tolua_get_Vector3_x,tolua_set_Vector3_x);
  19295. tolua_variable(tolua_S,"y",tolua_get_Vector3_y,tolua_set_Vector3_y);
  19296. tolua_variable(tolua_S,"z",tolua_get_Vector3_z,tolua_set_Vector3_z);
  19297. tolua_variable(tolua_S,"ZERO",tolua_get_Vector3_ZERO,NULL);
  19298. tolua_variable(tolua_S,"LEFT",tolua_get_Vector3_LEFT,NULL);
  19299. tolua_variable(tolua_S,"RIGHT",tolua_get_Vector3_RIGHT,NULL);
  19300. tolua_variable(tolua_S,"UP",tolua_get_Vector3_UP,NULL);
  19301. tolua_variable(tolua_S,"DOWN",tolua_get_Vector3_DOWN,NULL);
  19302. tolua_variable(tolua_S,"FORWARD",tolua_get_Vector3_FORWARD,NULL);
  19303. tolua_variable(tolua_S,"BACK",tolua_get_Vector3_BACK,NULL);
  19304. tolua_variable(tolua_S,"ONE",tolua_get_Vector3_ONE,NULL);
  19305. tolua_endmodule(tolua_S);
  19306. #ifdef __cplusplus
  19307. tolua_cclass(tolua_S,"Vector4","Vector4","",tolua_collect_Vector4);
  19308. #else
  19309. tolua_cclass(tolua_S,"Vector4","Vector4","",NULL);
  19310. #endif
  19311. tolua_beginmodule(tolua_S,"Vector4");
  19312. tolua_function(tolua_S,"new",tolua_Math_Vector4_new00);
  19313. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new00_local);
  19314. tolua_function(tolua_S,".call",tolua_Math_Vector4_new00_local);
  19315. tolua_function(tolua_S,"new",tolua_Math_Vector4_new01);
  19316. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new01_local);
  19317. tolua_function(tolua_S,".call",tolua_Math_Vector4_new01_local);
  19318. tolua_function(tolua_S,"new",tolua_Math_Vector4_new02);
  19319. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new02_local);
  19320. tolua_function(tolua_S,".call",tolua_Math_Vector4_new02_local);
  19321. tolua_function(tolua_S,"new",tolua_Math_Vector4_new03);
  19322. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new03_local);
  19323. tolua_function(tolua_S,".call",tolua_Math_Vector4_new03_local);
  19324. tolua_function(tolua_S,".eq",tolua_Math_Vector4__eq00);
  19325. tolua_function(tolua_S,".add",tolua_Math_Vector4__add00);
  19326. tolua_function(tolua_S,".sub",tolua_Math_Vector4__sub00);
  19327. tolua_function(tolua_S,".sub",tolua_Math_Vector4__sub01);
  19328. tolua_function(tolua_S,".mul",tolua_Math_Vector4__mul00);
  19329. tolua_function(tolua_S,".mul",tolua_Math_Vector4__mul01);
  19330. tolua_function(tolua_S,".div",tolua_Math_Vector4__div00);
  19331. tolua_function(tolua_S,".div",tolua_Math_Vector4__div01);
  19332. tolua_function(tolua_S,".div",tolua_Math_Vector4__div02);
  19333. tolua_function(tolua_S,"DotProduct",tolua_Math_Vector4_DotProduct00);
  19334. tolua_function(tolua_S,"AbsDotProduct",tolua_Math_Vector4_AbsDotProduct00);
  19335. tolua_function(tolua_S,"Abs",tolua_Math_Vector4_Abs00);
  19336. tolua_function(tolua_S,"Lerp",tolua_Math_Vector4_Lerp00);
  19337. tolua_function(tolua_S,"Equals",tolua_Math_Vector4_Equals00);
  19338. tolua_function(tolua_S,"ToString",tolua_Math_Vector4_ToString00);
  19339. tolua_variable(tolua_S,"x",tolua_get_Vector4_x,tolua_set_Vector4_x);
  19340. tolua_variable(tolua_S,"y",tolua_get_Vector4_y,tolua_set_Vector4_y);
  19341. tolua_variable(tolua_S,"z",tolua_get_Vector4_z,tolua_set_Vector4_z);
  19342. tolua_variable(tolua_S,"w",tolua_get_Vector4_w,tolua_set_Vector4_w);
  19343. tolua_variable(tolua_S,"ZERO",tolua_get_Vector4_ZERO,NULL);
  19344. tolua_variable(tolua_S,"ONE",tolua_get_Vector4_ONE,NULL);
  19345. tolua_endmodule(tolua_S);
  19346. tolua_endmodule(tolua_S);
  19347. return 1;
  19348. }
  19349. #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
  19350. TOLUA_API int luaopen_Math (lua_State* tolua_S) {
  19351. return tolua_Math_open(tolua_S);
  19352. };
  19353. #endif