MathLuaAPI.cpp 611 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320
  1. /*
  2. ** Lua binding: Math
  3. ** Generated automatically by tolua++-1.0.92 on 06/30/13 11:31:50.
  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_Vector3 (lua_State* tolua_S)
  74. {
  75. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  76. Mtolua_delete(self);
  77. return 0;
  78. }
  79. static int tolua_collect_StringHash (lua_State* tolua_S)
  80. {
  81. StringHash* self = (StringHash*) 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_IntRect (lua_State* tolua_S)
  92. {
  93. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  94. Mtolua_delete(self);
  95. return 0;
  96. }
  97. static int tolua_collect_Vector4 (lua_State* tolua_S)
  98. {
  99. Vector4* self = (Vector4*) 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_Matrix3 (lua_State* tolua_S)
  110. {
  111. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  112. Mtolua_delete(self);
  113. return 0;
  114. }
  115. static int tolua_collect_Plane (lua_State* tolua_S)
  116. {
  117. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  118. Mtolua_delete(self);
  119. return 0;
  120. }
  121. static int tolua_collect_Polyhedron (lua_State* tolua_S)
  122. {
  123. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  124. Mtolua_delete(self);
  125. return 0;
  126. }
  127. static int tolua_collect_Ray (lua_State* tolua_S)
  128. {
  129. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  130. Mtolua_delete(self);
  131. return 0;
  132. }
  133. static int tolua_collect_Rect (lua_State* tolua_S)
  134. {
  135. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  136. Mtolua_delete(self);
  137. return 0;
  138. }
  139. static int tolua_collect_Frustum (lua_State* tolua_S)
  140. {
  141. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  142. Mtolua_delete(self);
  143. return 0;
  144. }
  145. static int tolua_collect_Vector2 (lua_State* tolua_S)
  146. {
  147. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  148. Mtolua_delete(self);
  149. return 0;
  150. }
  151. static int tolua_collect_BoundingBox (lua_State* tolua_S)
  152. {
  153. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  154. Mtolua_delete(self);
  155. return 0;
  156. }
  157. static int tolua_collect_AreaAllocator (lua_State* tolua_S)
  158. {
  159. AreaAllocator* self = (AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  160. Mtolua_delete(self);
  161. return 0;
  162. }
  163. static int tolua_collect_Matrix4 (lua_State* tolua_S)
  164. {
  165. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  166. Mtolua_delete(self);
  167. return 0;
  168. }
  169. static int tolua_collect_IntVector2 (lua_State* tolua_S)
  170. {
  171. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  172. Mtolua_delete(self);
  173. return 0;
  174. }
  175. #endif
  176. /* function to register type */
  177. static void tolua_reg_types (lua_State* tolua_S)
  178. {
  179. tolua_usertype(tolua_S,"Quaternion");
  180. tolua_usertype(tolua_S,"AreaAllocator");
  181. tolua_usertype(tolua_S,"Vector4");
  182. tolua_usertype(tolua_S,"Vector3");
  183. tolua_usertype(tolua_S,"BoundingBox");
  184. tolua_usertype(tolua_S,"IntVector2");
  185. tolua_usertype(tolua_S,"Matrix3x4");
  186. tolua_usertype(tolua_S,"IntRect");
  187. tolua_usertype(tolua_S,"Rect");
  188. tolua_usertype(tolua_S,"String");
  189. tolua_usertype(tolua_S,"Matrix3");
  190. tolua_usertype(tolua_S,"Plane");
  191. tolua_usertype(tolua_S,"Polyhedron");
  192. tolua_usertype(tolua_S,"Ray");
  193. tolua_usertype(tolua_S,"Sphere");
  194. tolua_usertype(tolua_S,"Frustum");
  195. tolua_usertype(tolua_S,"Vector2");
  196. tolua_usertype(tolua_S,"StringHash");
  197. tolua_usertype(tolua_S,"Color");
  198. tolua_usertype(tolua_S,"Matrix4");
  199. tolua_usertype(tolua_S,"ShortStringHash");
  200. }
  201. /* method: new of class AreaAllocator */
  202. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new00
  203. static int tolua_Math_AreaAllocator_new00(lua_State* tolua_S)
  204. {
  205. #ifndef TOLUA_RELEASE
  206. tolua_Error tolua_err;
  207. if (
  208. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  209. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  210. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  211. !tolua_isnoobj(tolua_S,4,&tolua_err)
  212. )
  213. goto tolua_lerror;
  214. else
  215. #endif
  216. {
  217. int width = ((int) tolua_tonumber(tolua_S,2,0));
  218. int height = ((int) tolua_tonumber(tolua_S,3,0));
  219. {
  220. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height));
  221. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  222. }
  223. }
  224. return 1;
  225. #ifndef TOLUA_RELEASE
  226. tolua_lerror:
  227. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  228. return 0;
  229. #endif
  230. }
  231. #endif //#ifndef TOLUA_DISABLE
  232. /* method: new_local of class AreaAllocator */
  233. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new00_local
  234. static int tolua_Math_AreaAllocator_new00_local(lua_State* tolua_S)
  235. {
  236. #ifndef TOLUA_RELEASE
  237. tolua_Error tolua_err;
  238. if (
  239. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  240. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  241. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  242. !tolua_isnoobj(tolua_S,4,&tolua_err)
  243. )
  244. goto tolua_lerror;
  245. else
  246. #endif
  247. {
  248. int width = ((int) tolua_tonumber(tolua_S,2,0));
  249. int height = ((int) tolua_tonumber(tolua_S,3,0));
  250. {
  251. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height));
  252. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  253. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  254. }
  255. }
  256. return 1;
  257. #ifndef TOLUA_RELEASE
  258. tolua_lerror:
  259. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  260. return 0;
  261. #endif
  262. }
  263. #endif //#ifndef TOLUA_DISABLE
  264. /* method: new of class AreaAllocator */
  265. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new01
  266. static int tolua_Math_AreaAllocator_new01(lua_State* tolua_S)
  267. {
  268. tolua_Error tolua_err;
  269. if (
  270. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  271. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  272. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  273. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  274. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  275. !tolua_isnoobj(tolua_S,6,&tolua_err)
  276. )
  277. goto tolua_lerror;
  278. else
  279. {
  280. int width = ((int) tolua_tonumber(tolua_S,2,0));
  281. int height = ((int) tolua_tonumber(tolua_S,3,0));
  282. int maxWidth = ((int) tolua_tonumber(tolua_S,4,0));
  283. int maxHeight = ((int) tolua_tonumber(tolua_S,5,0));
  284. {
  285. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height,maxWidth,maxHeight));
  286. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  287. }
  288. }
  289. return 1;
  290. tolua_lerror:
  291. return tolua_Math_AreaAllocator_new00(tolua_S);
  292. }
  293. #endif //#ifndef TOLUA_DISABLE
  294. /* method: new_local of class AreaAllocator */
  295. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_new01_local
  296. static int tolua_Math_AreaAllocator_new01_local(lua_State* tolua_S)
  297. {
  298. tolua_Error tolua_err;
  299. if (
  300. !tolua_isusertable(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  301. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  302. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  303. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  304. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  305. !tolua_isnoobj(tolua_S,6,&tolua_err)
  306. )
  307. goto tolua_lerror;
  308. else
  309. {
  310. int width = ((int) tolua_tonumber(tolua_S,2,0));
  311. int height = ((int) tolua_tonumber(tolua_S,3,0));
  312. int maxWidth = ((int) tolua_tonumber(tolua_S,4,0));
  313. int maxHeight = ((int) tolua_tonumber(tolua_S,5,0));
  314. {
  315. AreaAllocator* tolua_ret = (AreaAllocator*) Mtolua_new((AreaAllocator)(width,height,maxWidth,maxHeight));
  316. tolua_pushusertype(tolua_S,(void*)tolua_ret,"AreaAllocator");
  317. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  318. }
  319. }
  320. return 1;
  321. tolua_lerror:
  322. return tolua_Math_AreaAllocator_new00_local(tolua_S);
  323. }
  324. #endif //#ifndef TOLUA_DISABLE
  325. /* method: Reset of class AreaAllocator */
  326. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_Reset00
  327. static int tolua_Math_AreaAllocator_Reset00(lua_State* tolua_S)
  328. {
  329. #ifndef TOLUA_RELEASE
  330. tolua_Error tolua_err;
  331. if (
  332. !tolua_isusertype(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  333. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  334. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  335. !tolua_isnoobj(tolua_S,4,&tolua_err)
  336. )
  337. goto tolua_lerror;
  338. else
  339. #endif
  340. {
  341. AreaAllocator* self = (AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  342. int width = ((int) tolua_tonumber(tolua_S,2,0));
  343. int height = ((int) tolua_tonumber(tolua_S,3,0));
  344. #ifndef TOLUA_RELEASE
  345. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Reset'", NULL);
  346. #endif
  347. {
  348. self->Reset(width,height);
  349. }
  350. }
  351. return 0;
  352. #ifndef TOLUA_RELEASE
  353. tolua_lerror:
  354. tolua_error(tolua_S,"#ferror in function 'Reset'.",&tolua_err);
  355. return 0;
  356. #endif
  357. }
  358. #endif //#ifndef TOLUA_DISABLE
  359. /* method: Allocate of class AreaAllocator */
  360. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_Allocate00
  361. static int tolua_Math_AreaAllocator_Allocate00(lua_State* tolua_S)
  362. {
  363. #ifndef TOLUA_RELEASE
  364. tolua_Error tolua_err;
  365. if (
  366. !tolua_isusertype(tolua_S,1,"AreaAllocator",0,&tolua_err) ||
  367. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  368. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  369. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  370. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  371. !tolua_isnoobj(tolua_S,6,&tolua_err)
  372. )
  373. goto tolua_lerror;
  374. else
  375. #endif
  376. {
  377. AreaAllocator* self = (AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  378. int width = ((int) tolua_tonumber(tolua_S,2,0));
  379. int height = ((int) tolua_tonumber(tolua_S,3,0));
  380. int x = ((int) tolua_tonumber(tolua_S,4,0));
  381. int y = ((int) tolua_tonumber(tolua_S,5,0));
  382. #ifndef TOLUA_RELEASE
  383. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Allocate'", NULL);
  384. #endif
  385. {
  386. bool tolua_ret = (bool) self->Allocate(width,height,x,y);
  387. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  388. tolua_pushnumber(tolua_S,(lua_Number)x);
  389. tolua_pushnumber(tolua_S,(lua_Number)y);
  390. }
  391. }
  392. return 3;
  393. #ifndef TOLUA_RELEASE
  394. tolua_lerror:
  395. tolua_error(tolua_S,"#ferror in function 'Allocate'.",&tolua_err);
  396. return 0;
  397. #endif
  398. }
  399. #endif //#ifndef TOLUA_DISABLE
  400. /* method: GetWidth of class AreaAllocator */
  401. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_GetWidth00
  402. static int tolua_Math_AreaAllocator_GetWidth00(lua_State* tolua_S)
  403. {
  404. #ifndef TOLUA_RELEASE
  405. tolua_Error tolua_err;
  406. if (
  407. !tolua_isusertype(tolua_S,1,"const AreaAllocator",0,&tolua_err) ||
  408. !tolua_isnoobj(tolua_S,2,&tolua_err)
  409. )
  410. goto tolua_lerror;
  411. else
  412. #endif
  413. {
  414. const AreaAllocator* self = (const AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  415. #ifndef TOLUA_RELEASE
  416. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWidth'", NULL);
  417. #endif
  418. {
  419. int tolua_ret = (int) self->GetWidth();
  420. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  421. }
  422. }
  423. return 1;
  424. #ifndef TOLUA_RELEASE
  425. tolua_lerror:
  426. tolua_error(tolua_S,"#ferror in function 'GetWidth'.",&tolua_err);
  427. return 0;
  428. #endif
  429. }
  430. #endif //#ifndef TOLUA_DISABLE
  431. /* method: GetHeight of class AreaAllocator */
  432. #ifndef TOLUA_DISABLE_tolua_Math_AreaAllocator_GetHeight00
  433. static int tolua_Math_AreaAllocator_GetHeight00(lua_State* tolua_S)
  434. {
  435. #ifndef TOLUA_RELEASE
  436. tolua_Error tolua_err;
  437. if (
  438. !tolua_isusertype(tolua_S,1,"const AreaAllocator",0,&tolua_err) ||
  439. !tolua_isnoobj(tolua_S,2,&tolua_err)
  440. )
  441. goto tolua_lerror;
  442. else
  443. #endif
  444. {
  445. const AreaAllocator* self = (const AreaAllocator*) tolua_tousertype(tolua_S,1,0);
  446. #ifndef TOLUA_RELEASE
  447. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHeight'", NULL);
  448. #endif
  449. {
  450. int tolua_ret = (int) self->GetHeight();
  451. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  452. }
  453. }
  454. return 1;
  455. #ifndef TOLUA_RELEASE
  456. tolua_lerror:
  457. tolua_error(tolua_S,"#ferror in function 'GetHeight'.",&tolua_err);
  458. return 0;
  459. #endif
  460. }
  461. #endif //#ifndef TOLUA_DISABLE
  462. /* method: new of class BoundingBox */
  463. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new00
  464. static int tolua_Math_BoundingBox_new00(lua_State* tolua_S)
  465. {
  466. #ifndef TOLUA_RELEASE
  467. tolua_Error tolua_err;
  468. if (
  469. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  470. !tolua_isnoobj(tolua_S,2,&tolua_err)
  471. )
  472. goto tolua_lerror;
  473. else
  474. #endif
  475. {
  476. {
  477. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)());
  478. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  479. }
  480. }
  481. return 1;
  482. #ifndef TOLUA_RELEASE
  483. tolua_lerror:
  484. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  485. return 0;
  486. #endif
  487. }
  488. #endif //#ifndef TOLUA_DISABLE
  489. /* method: new_local of class BoundingBox */
  490. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new00_local
  491. static int tolua_Math_BoundingBox_new00_local(lua_State* tolua_S)
  492. {
  493. #ifndef TOLUA_RELEASE
  494. tolua_Error tolua_err;
  495. if (
  496. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  497. !tolua_isnoobj(tolua_S,2,&tolua_err)
  498. )
  499. goto tolua_lerror;
  500. else
  501. #endif
  502. {
  503. {
  504. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)());
  505. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  506. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  507. }
  508. }
  509. return 1;
  510. #ifndef TOLUA_RELEASE
  511. tolua_lerror:
  512. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  513. return 0;
  514. #endif
  515. }
  516. #endif //#ifndef TOLUA_DISABLE
  517. /* method: new of class BoundingBox */
  518. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new01
  519. static int tolua_Math_BoundingBox_new01(lua_State* tolua_S)
  520. {
  521. tolua_Error tolua_err;
  522. if (
  523. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  524. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  525. !tolua_isnoobj(tolua_S,3,&tolua_err)
  526. )
  527. goto tolua_lerror;
  528. else
  529. {
  530. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  531. {
  532. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*box));
  533. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  534. }
  535. }
  536. return 1;
  537. tolua_lerror:
  538. return tolua_Math_BoundingBox_new00(tolua_S);
  539. }
  540. #endif //#ifndef TOLUA_DISABLE
  541. /* method: new_local of class BoundingBox */
  542. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new01_local
  543. static int tolua_Math_BoundingBox_new01_local(lua_State* tolua_S)
  544. {
  545. tolua_Error tolua_err;
  546. if (
  547. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  548. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  549. !tolua_isnoobj(tolua_S,3,&tolua_err)
  550. )
  551. goto tolua_lerror;
  552. else
  553. {
  554. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  555. {
  556. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*box));
  557. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  558. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  559. }
  560. }
  561. return 1;
  562. tolua_lerror:
  563. return tolua_Math_BoundingBox_new00_local(tolua_S);
  564. }
  565. #endif //#ifndef TOLUA_DISABLE
  566. /* method: new of class BoundingBox */
  567. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new02
  568. static int tolua_Math_BoundingBox_new02(lua_State* tolua_S)
  569. {
  570. tolua_Error tolua_err;
  571. if (
  572. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  573. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  574. !tolua_isnoobj(tolua_S,3,&tolua_err)
  575. )
  576. goto tolua_lerror;
  577. else
  578. {
  579. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  580. {
  581. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*rect));
  582. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  583. }
  584. }
  585. return 1;
  586. tolua_lerror:
  587. return tolua_Math_BoundingBox_new01(tolua_S);
  588. }
  589. #endif //#ifndef TOLUA_DISABLE
  590. /* method: new_local of class BoundingBox */
  591. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new02_local
  592. static int tolua_Math_BoundingBox_new02_local(lua_State* tolua_S)
  593. {
  594. tolua_Error tolua_err;
  595. if (
  596. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  597. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  598. !tolua_isnoobj(tolua_S,3,&tolua_err)
  599. )
  600. goto tolua_lerror;
  601. else
  602. {
  603. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  604. {
  605. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*rect));
  606. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  607. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  608. }
  609. }
  610. return 1;
  611. tolua_lerror:
  612. return tolua_Math_BoundingBox_new01_local(tolua_S);
  613. }
  614. #endif //#ifndef TOLUA_DISABLE
  615. /* method: new of class BoundingBox */
  616. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new03
  617. static int tolua_Math_BoundingBox_new03(lua_State* tolua_S)
  618. {
  619. tolua_Error tolua_err;
  620. if (
  621. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  622. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  623. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  624. !tolua_isnoobj(tolua_S,4,&tolua_err)
  625. )
  626. goto tolua_lerror;
  627. else
  628. {
  629. const Vector3* min = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  630. const Vector3* max = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  631. {
  632. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*min,*max));
  633. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  634. }
  635. }
  636. return 1;
  637. tolua_lerror:
  638. return tolua_Math_BoundingBox_new02(tolua_S);
  639. }
  640. #endif //#ifndef TOLUA_DISABLE
  641. /* method: new_local of class BoundingBox */
  642. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new03_local
  643. static int tolua_Math_BoundingBox_new03_local(lua_State* tolua_S)
  644. {
  645. tolua_Error tolua_err;
  646. if (
  647. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  648. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  649. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  650. !tolua_isnoobj(tolua_S,4,&tolua_err)
  651. )
  652. goto tolua_lerror;
  653. else
  654. {
  655. const Vector3* min = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  656. const Vector3* max = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  657. {
  658. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*min,*max));
  659. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  660. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  661. }
  662. }
  663. return 1;
  664. tolua_lerror:
  665. return tolua_Math_BoundingBox_new02_local(tolua_S);
  666. }
  667. #endif //#ifndef TOLUA_DISABLE
  668. /* method: new of class BoundingBox */
  669. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new04
  670. static int tolua_Math_BoundingBox_new04(lua_State* tolua_S)
  671. {
  672. tolua_Error tolua_err;
  673. if (
  674. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  675. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  676. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  677. !tolua_isnoobj(tolua_S,4,&tolua_err)
  678. )
  679. goto tolua_lerror;
  680. else
  681. {
  682. float min = ((float) tolua_tonumber(tolua_S,2,0));
  683. float max = ((float) tolua_tonumber(tolua_S,3,0));
  684. {
  685. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(min,max));
  686. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  687. }
  688. }
  689. return 1;
  690. tolua_lerror:
  691. return tolua_Math_BoundingBox_new03(tolua_S);
  692. }
  693. #endif //#ifndef TOLUA_DISABLE
  694. /* method: new_local of class BoundingBox */
  695. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new04_local
  696. static int tolua_Math_BoundingBox_new04_local(lua_State* tolua_S)
  697. {
  698. tolua_Error tolua_err;
  699. if (
  700. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  701. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  702. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  703. !tolua_isnoobj(tolua_S,4,&tolua_err)
  704. )
  705. goto tolua_lerror;
  706. else
  707. {
  708. float min = ((float) tolua_tonumber(tolua_S,2,0));
  709. float max = ((float) tolua_tonumber(tolua_S,3,0));
  710. {
  711. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(min,max));
  712. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  713. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  714. }
  715. }
  716. return 1;
  717. tolua_lerror:
  718. return tolua_Math_BoundingBox_new03_local(tolua_S);
  719. }
  720. #endif //#ifndef TOLUA_DISABLE
  721. /* method: new of class BoundingBox */
  722. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new05
  723. static int tolua_Math_BoundingBox_new05(lua_State* tolua_S)
  724. {
  725. tolua_Error tolua_err;
  726. if (
  727. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  728. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  729. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  730. !tolua_isnoobj(tolua_S,4,&tolua_err)
  731. )
  732. goto tolua_lerror;
  733. else
  734. {
  735. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  736. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  737. {
  738. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(vertices,count));
  739. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  740. }
  741. }
  742. return 1;
  743. tolua_lerror:
  744. return tolua_Math_BoundingBox_new04(tolua_S);
  745. }
  746. #endif //#ifndef TOLUA_DISABLE
  747. /* method: new_local of class BoundingBox */
  748. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new05_local
  749. static int tolua_Math_BoundingBox_new05_local(lua_State* tolua_S)
  750. {
  751. tolua_Error tolua_err;
  752. if (
  753. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  754. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  755. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  756. !tolua_isnoobj(tolua_S,4,&tolua_err)
  757. )
  758. goto tolua_lerror;
  759. else
  760. {
  761. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  762. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  763. {
  764. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(vertices,count));
  765. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  766. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  767. }
  768. }
  769. return 1;
  770. tolua_lerror:
  771. return tolua_Math_BoundingBox_new04_local(tolua_S);
  772. }
  773. #endif //#ifndef TOLUA_DISABLE
  774. /* method: new of class BoundingBox */
  775. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new06
  776. static int tolua_Math_BoundingBox_new06(lua_State* tolua_S)
  777. {
  778. tolua_Error tolua_err;
  779. if (
  780. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  781. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  782. !tolua_isnoobj(tolua_S,3,&tolua_err)
  783. )
  784. goto tolua_lerror;
  785. else
  786. {
  787. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  788. {
  789. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*frustum));
  790. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  791. }
  792. }
  793. return 1;
  794. tolua_lerror:
  795. return tolua_Math_BoundingBox_new05(tolua_S);
  796. }
  797. #endif //#ifndef TOLUA_DISABLE
  798. /* method: new_local of class BoundingBox */
  799. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new06_local
  800. static int tolua_Math_BoundingBox_new06_local(lua_State* tolua_S)
  801. {
  802. tolua_Error tolua_err;
  803. if (
  804. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  805. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  806. !tolua_isnoobj(tolua_S,3,&tolua_err)
  807. )
  808. goto tolua_lerror;
  809. else
  810. {
  811. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  812. {
  813. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*frustum));
  814. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  815. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  816. }
  817. }
  818. return 1;
  819. tolua_lerror:
  820. return tolua_Math_BoundingBox_new05_local(tolua_S);
  821. }
  822. #endif //#ifndef TOLUA_DISABLE
  823. /* method: new of class BoundingBox */
  824. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new07
  825. static int tolua_Math_BoundingBox_new07(lua_State* tolua_S)
  826. {
  827. tolua_Error tolua_err;
  828. if (
  829. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  830. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  831. !tolua_isnoobj(tolua_S,3,&tolua_err)
  832. )
  833. goto tolua_lerror;
  834. else
  835. {
  836. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  837. {
  838. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*poly));
  839. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  840. }
  841. }
  842. return 1;
  843. tolua_lerror:
  844. return tolua_Math_BoundingBox_new06(tolua_S);
  845. }
  846. #endif //#ifndef TOLUA_DISABLE
  847. /* method: new_local of class BoundingBox */
  848. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new07_local
  849. static int tolua_Math_BoundingBox_new07_local(lua_State* tolua_S)
  850. {
  851. tolua_Error tolua_err;
  852. if (
  853. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  854. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  855. !tolua_isnoobj(tolua_S,3,&tolua_err)
  856. )
  857. goto tolua_lerror;
  858. else
  859. {
  860. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  861. {
  862. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*poly));
  863. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  864. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  865. }
  866. }
  867. return 1;
  868. tolua_lerror:
  869. return tolua_Math_BoundingBox_new06_local(tolua_S);
  870. }
  871. #endif //#ifndef TOLUA_DISABLE
  872. /* method: new of class BoundingBox */
  873. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new08
  874. static int tolua_Math_BoundingBox_new08(lua_State* tolua_S)
  875. {
  876. tolua_Error tolua_err;
  877. if (
  878. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  879. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  880. !tolua_isnoobj(tolua_S,3,&tolua_err)
  881. )
  882. goto tolua_lerror;
  883. else
  884. {
  885. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  886. {
  887. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*sphere));
  888. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  889. }
  890. }
  891. return 1;
  892. tolua_lerror:
  893. return tolua_Math_BoundingBox_new07(tolua_S);
  894. }
  895. #endif //#ifndef TOLUA_DISABLE
  896. /* method: new_local of class BoundingBox */
  897. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_new08_local
  898. static int tolua_Math_BoundingBox_new08_local(lua_State* tolua_S)
  899. {
  900. tolua_Error tolua_err;
  901. if (
  902. !tolua_isusertable(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  903. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  904. !tolua_isnoobj(tolua_S,3,&tolua_err)
  905. )
  906. goto tolua_lerror;
  907. else
  908. {
  909. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  910. {
  911. BoundingBox* tolua_ret = (BoundingBox*) Mtolua_new((BoundingBox)(*sphere));
  912. tolua_pushusertype(tolua_S,(void*)tolua_ret,"BoundingBox");
  913. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  914. }
  915. }
  916. return 1;
  917. tolua_lerror:
  918. return tolua_Math_BoundingBox_new07_local(tolua_S);
  919. }
  920. #endif //#ifndef TOLUA_DISABLE
  921. /* method: operator== of class BoundingBox */
  922. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox__eq00
  923. static int tolua_Math_BoundingBox__eq00(lua_State* tolua_S)
  924. {
  925. #ifndef TOLUA_RELEASE
  926. tolua_Error tolua_err;
  927. if (
  928. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  929. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  930. !tolua_isnoobj(tolua_S,3,&tolua_err)
  931. )
  932. goto tolua_lerror;
  933. else
  934. #endif
  935. {
  936. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  937. const BoundingBox* rhs = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  938. #ifndef TOLUA_RELEASE
  939. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  940. #endif
  941. {
  942. bool tolua_ret = (bool) self->operator==(*rhs);
  943. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  944. }
  945. }
  946. return 1;
  947. #ifndef TOLUA_RELEASE
  948. tolua_lerror:
  949. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  950. return 0;
  951. #endif
  952. }
  953. #endif //#ifndef TOLUA_DISABLE
  954. /* method: Define of class BoundingBox */
  955. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define00
  956. static int tolua_Math_BoundingBox_Define00(lua_State* tolua_S)
  957. {
  958. #ifndef TOLUA_RELEASE
  959. tolua_Error tolua_err;
  960. if (
  961. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  962. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  963. !tolua_isnoobj(tolua_S,3,&tolua_err)
  964. )
  965. goto tolua_lerror;
  966. else
  967. #endif
  968. {
  969. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  970. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  971. #ifndef TOLUA_RELEASE
  972. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  973. #endif
  974. {
  975. self->Define(*box);
  976. }
  977. }
  978. return 0;
  979. #ifndef TOLUA_RELEASE
  980. tolua_lerror:
  981. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  982. return 0;
  983. #endif
  984. }
  985. #endif //#ifndef TOLUA_DISABLE
  986. /* method: Define of class BoundingBox */
  987. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define01
  988. static int tolua_Math_BoundingBox_Define01(lua_State* tolua_S)
  989. {
  990. tolua_Error tolua_err;
  991. if (
  992. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  993. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  994. !tolua_isnoobj(tolua_S,3,&tolua_err)
  995. )
  996. goto tolua_lerror;
  997. else
  998. {
  999. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1000. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  1001. #ifndef TOLUA_RELEASE
  1002. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1003. #endif
  1004. {
  1005. self->Define(*rect);
  1006. }
  1007. }
  1008. return 0;
  1009. tolua_lerror:
  1010. return tolua_Math_BoundingBox_Define00(tolua_S);
  1011. }
  1012. #endif //#ifndef TOLUA_DISABLE
  1013. /* method: Define of class BoundingBox */
  1014. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define02
  1015. static int tolua_Math_BoundingBox_Define02(lua_State* tolua_S)
  1016. {
  1017. tolua_Error tolua_err;
  1018. if (
  1019. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1020. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1021. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  1022. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1023. )
  1024. goto tolua_lerror;
  1025. else
  1026. {
  1027. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1028. const Vector3* min = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1029. const Vector3* max = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  1030. #ifndef TOLUA_RELEASE
  1031. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1032. #endif
  1033. {
  1034. self->Define(*min,*max);
  1035. }
  1036. }
  1037. return 0;
  1038. tolua_lerror:
  1039. return tolua_Math_BoundingBox_Define01(tolua_S);
  1040. }
  1041. #endif //#ifndef TOLUA_DISABLE
  1042. /* method: Define of class BoundingBox */
  1043. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define03
  1044. static int tolua_Math_BoundingBox_Define03(lua_State* tolua_S)
  1045. {
  1046. tolua_Error tolua_err;
  1047. if (
  1048. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1049. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1050. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1051. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1052. )
  1053. goto tolua_lerror;
  1054. else
  1055. {
  1056. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1057. float min = ((float) tolua_tonumber(tolua_S,2,0));
  1058. float max = ((float) tolua_tonumber(tolua_S,3,0));
  1059. #ifndef TOLUA_RELEASE
  1060. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1061. #endif
  1062. {
  1063. self->Define(min,max);
  1064. }
  1065. }
  1066. return 0;
  1067. tolua_lerror:
  1068. return tolua_Math_BoundingBox_Define02(tolua_S);
  1069. }
  1070. #endif //#ifndef TOLUA_DISABLE
  1071. /* method: Define of class BoundingBox */
  1072. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define04
  1073. static int tolua_Math_BoundingBox_Define04(lua_State* tolua_S)
  1074. {
  1075. tolua_Error tolua_err;
  1076. if (
  1077. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1078. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1079. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1080. )
  1081. goto tolua_lerror;
  1082. else
  1083. {
  1084. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1085. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1086. #ifndef TOLUA_RELEASE
  1087. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1088. #endif
  1089. {
  1090. self->Define(*point);
  1091. }
  1092. }
  1093. return 0;
  1094. tolua_lerror:
  1095. return tolua_Math_BoundingBox_Define03(tolua_S);
  1096. }
  1097. #endif //#ifndef TOLUA_DISABLE
  1098. /* method: Merge of class BoundingBox */
  1099. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge00
  1100. static int tolua_Math_BoundingBox_Merge00(lua_State* tolua_S)
  1101. {
  1102. #ifndef TOLUA_RELEASE
  1103. tolua_Error tolua_err;
  1104. if (
  1105. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1106. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1107. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1108. )
  1109. goto tolua_lerror;
  1110. else
  1111. #endif
  1112. {
  1113. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1114. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1115. #ifndef TOLUA_RELEASE
  1116. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1117. #endif
  1118. {
  1119. self->Merge(*point);
  1120. }
  1121. }
  1122. return 0;
  1123. #ifndef TOLUA_RELEASE
  1124. tolua_lerror:
  1125. tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err);
  1126. return 0;
  1127. #endif
  1128. }
  1129. #endif //#ifndef TOLUA_DISABLE
  1130. /* method: Merge of class BoundingBox */
  1131. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge01
  1132. static int tolua_Math_BoundingBox_Merge01(lua_State* tolua_S)
  1133. {
  1134. tolua_Error tolua_err;
  1135. if (
  1136. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1137. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1138. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1139. )
  1140. goto tolua_lerror;
  1141. else
  1142. {
  1143. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1144. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1145. #ifndef TOLUA_RELEASE
  1146. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1147. #endif
  1148. {
  1149. self->Merge(*box);
  1150. }
  1151. }
  1152. return 0;
  1153. tolua_lerror:
  1154. return tolua_Math_BoundingBox_Merge00(tolua_S);
  1155. }
  1156. #endif //#ifndef TOLUA_DISABLE
  1157. /* method: Define of class BoundingBox */
  1158. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define05
  1159. static int tolua_Math_BoundingBox_Define05(lua_State* tolua_S)
  1160. {
  1161. tolua_Error tolua_err;
  1162. if (
  1163. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1164. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  1165. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1166. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1167. )
  1168. goto tolua_lerror;
  1169. else
  1170. {
  1171. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1172. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1173. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  1174. #ifndef TOLUA_RELEASE
  1175. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1176. #endif
  1177. {
  1178. self->Define(vertices,count);
  1179. }
  1180. }
  1181. return 0;
  1182. tolua_lerror:
  1183. return tolua_Math_BoundingBox_Define04(tolua_S);
  1184. }
  1185. #endif //#ifndef TOLUA_DISABLE
  1186. /* method: Define of class BoundingBox */
  1187. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define06
  1188. static int tolua_Math_BoundingBox_Define06(lua_State* tolua_S)
  1189. {
  1190. tolua_Error tolua_err;
  1191. if (
  1192. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1193. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  1194. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1195. )
  1196. goto tolua_lerror;
  1197. else
  1198. {
  1199. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1200. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  1201. #ifndef TOLUA_RELEASE
  1202. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1203. #endif
  1204. {
  1205. self->Define(*frustum);
  1206. }
  1207. }
  1208. return 0;
  1209. tolua_lerror:
  1210. return tolua_Math_BoundingBox_Define05(tolua_S);
  1211. }
  1212. #endif //#ifndef TOLUA_DISABLE
  1213. /* method: Define of class BoundingBox */
  1214. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define07
  1215. static int tolua_Math_BoundingBox_Define07(lua_State* tolua_S)
  1216. {
  1217. tolua_Error tolua_err;
  1218. if (
  1219. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1220. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  1221. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1222. )
  1223. goto tolua_lerror;
  1224. else
  1225. {
  1226. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1227. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  1228. #ifndef TOLUA_RELEASE
  1229. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1230. #endif
  1231. {
  1232. self->Define(*poly);
  1233. }
  1234. }
  1235. return 0;
  1236. tolua_lerror:
  1237. return tolua_Math_BoundingBox_Define06(tolua_S);
  1238. }
  1239. #endif //#ifndef TOLUA_DISABLE
  1240. /* method: Define of class BoundingBox */
  1241. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Define08
  1242. static int tolua_Math_BoundingBox_Define08(lua_State* tolua_S)
  1243. {
  1244. tolua_Error tolua_err;
  1245. if (
  1246. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1247. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1248. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1249. )
  1250. goto tolua_lerror;
  1251. else
  1252. {
  1253. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1254. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1255. #ifndef TOLUA_RELEASE
  1256. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  1257. #endif
  1258. {
  1259. self->Define(*sphere);
  1260. }
  1261. }
  1262. return 0;
  1263. tolua_lerror:
  1264. return tolua_Math_BoundingBox_Define07(tolua_S);
  1265. }
  1266. #endif //#ifndef TOLUA_DISABLE
  1267. /* method: Merge of class BoundingBox */
  1268. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge02
  1269. static int tolua_Math_BoundingBox_Merge02(lua_State* tolua_S)
  1270. {
  1271. tolua_Error tolua_err;
  1272. if (
  1273. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1274. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  1275. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  1276. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1277. )
  1278. goto tolua_lerror;
  1279. else
  1280. {
  1281. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1282. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1283. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  1284. #ifndef TOLUA_RELEASE
  1285. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1286. #endif
  1287. {
  1288. self->Merge(vertices,count);
  1289. }
  1290. }
  1291. return 0;
  1292. tolua_lerror:
  1293. return tolua_Math_BoundingBox_Merge01(tolua_S);
  1294. }
  1295. #endif //#ifndef TOLUA_DISABLE
  1296. /* method: Merge of class BoundingBox */
  1297. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge03
  1298. static int tolua_Math_BoundingBox_Merge03(lua_State* tolua_S)
  1299. {
  1300. tolua_Error tolua_err;
  1301. if (
  1302. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1303. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  1304. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1305. )
  1306. goto tolua_lerror;
  1307. else
  1308. {
  1309. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1310. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  1311. #ifndef TOLUA_RELEASE
  1312. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1313. #endif
  1314. {
  1315. self->Merge(*frustum);
  1316. }
  1317. }
  1318. return 0;
  1319. tolua_lerror:
  1320. return tolua_Math_BoundingBox_Merge02(tolua_S);
  1321. }
  1322. #endif //#ifndef TOLUA_DISABLE
  1323. /* method: Merge of class BoundingBox */
  1324. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge04
  1325. static int tolua_Math_BoundingBox_Merge04(lua_State* tolua_S)
  1326. {
  1327. tolua_Error tolua_err;
  1328. if (
  1329. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1330. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  1331. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1332. )
  1333. goto tolua_lerror;
  1334. else
  1335. {
  1336. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1337. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  1338. #ifndef TOLUA_RELEASE
  1339. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1340. #endif
  1341. {
  1342. self->Merge(*poly);
  1343. }
  1344. }
  1345. return 0;
  1346. tolua_lerror:
  1347. return tolua_Math_BoundingBox_Merge03(tolua_S);
  1348. }
  1349. #endif //#ifndef TOLUA_DISABLE
  1350. /* method: Merge of class BoundingBox */
  1351. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Merge05
  1352. static int tolua_Math_BoundingBox_Merge05(lua_State* tolua_S)
  1353. {
  1354. tolua_Error tolua_err;
  1355. if (
  1356. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1357. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1358. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1359. )
  1360. goto tolua_lerror;
  1361. else
  1362. {
  1363. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1364. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1365. #ifndef TOLUA_RELEASE
  1366. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  1367. #endif
  1368. {
  1369. self->Merge(*sphere);
  1370. }
  1371. }
  1372. return 0;
  1373. tolua_lerror:
  1374. return tolua_Math_BoundingBox_Merge04(tolua_S);
  1375. }
  1376. #endif //#ifndef TOLUA_DISABLE
  1377. /* method: Clip of class BoundingBox */
  1378. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Clip00
  1379. static int tolua_Math_BoundingBox_Clip00(lua_State* tolua_S)
  1380. {
  1381. #ifndef TOLUA_RELEASE
  1382. tolua_Error tolua_err;
  1383. if (
  1384. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1385. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1386. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1387. )
  1388. goto tolua_lerror;
  1389. else
  1390. #endif
  1391. {
  1392. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1393. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1394. #ifndef TOLUA_RELEASE
  1395. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  1396. #endif
  1397. {
  1398. self->Clip(*box);
  1399. }
  1400. }
  1401. return 0;
  1402. #ifndef TOLUA_RELEASE
  1403. tolua_lerror:
  1404. tolua_error(tolua_S,"#ferror in function 'Clip'.",&tolua_err);
  1405. return 0;
  1406. #endif
  1407. }
  1408. #endif //#ifndef TOLUA_DISABLE
  1409. /* method: Transform of class BoundingBox */
  1410. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transform00
  1411. static int tolua_Math_BoundingBox_Transform00(lua_State* tolua_S)
  1412. {
  1413. #ifndef TOLUA_RELEASE
  1414. tolua_Error tolua_err;
  1415. if (
  1416. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1417. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  1418. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1419. )
  1420. goto tolua_lerror;
  1421. else
  1422. #endif
  1423. {
  1424. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1425. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  1426. #ifndef TOLUA_RELEASE
  1427. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  1428. #endif
  1429. {
  1430. self->Transform(*transform);
  1431. }
  1432. }
  1433. return 0;
  1434. #ifndef TOLUA_RELEASE
  1435. tolua_lerror:
  1436. tolua_error(tolua_S,"#ferror in function 'Transform'.",&tolua_err);
  1437. return 0;
  1438. #endif
  1439. }
  1440. #endif //#ifndef TOLUA_DISABLE
  1441. /* method: Transform of class BoundingBox */
  1442. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transform01
  1443. static int tolua_Math_BoundingBox_Transform01(lua_State* tolua_S)
  1444. {
  1445. tolua_Error tolua_err;
  1446. if (
  1447. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1448. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  1449. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1450. )
  1451. goto tolua_lerror;
  1452. else
  1453. {
  1454. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1455. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  1456. #ifndef TOLUA_RELEASE
  1457. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  1458. #endif
  1459. {
  1460. self->Transform(*transform);
  1461. }
  1462. }
  1463. return 0;
  1464. tolua_lerror:
  1465. return tolua_Math_BoundingBox_Transform00(tolua_S);
  1466. }
  1467. #endif //#ifndef TOLUA_DISABLE
  1468. /* method: Clear of class BoundingBox */
  1469. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Clear00
  1470. static int tolua_Math_BoundingBox_Clear00(lua_State* tolua_S)
  1471. {
  1472. #ifndef TOLUA_RELEASE
  1473. tolua_Error tolua_err;
  1474. if (
  1475. !tolua_isusertype(tolua_S,1,"BoundingBox",0,&tolua_err) ||
  1476. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1477. )
  1478. goto tolua_lerror;
  1479. else
  1480. #endif
  1481. {
  1482. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1483. #ifndef TOLUA_RELEASE
  1484. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  1485. #endif
  1486. {
  1487. self->Clear();
  1488. }
  1489. }
  1490. return 0;
  1491. #ifndef TOLUA_RELEASE
  1492. tolua_lerror:
  1493. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  1494. return 0;
  1495. #endif
  1496. }
  1497. #endif //#ifndef TOLUA_DISABLE
  1498. /* method: Center of class BoundingBox */
  1499. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Center00
  1500. static int tolua_Math_BoundingBox_Center00(lua_State* tolua_S)
  1501. {
  1502. #ifndef TOLUA_RELEASE
  1503. tolua_Error tolua_err;
  1504. if (
  1505. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1506. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1507. )
  1508. goto tolua_lerror;
  1509. else
  1510. #endif
  1511. {
  1512. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1513. #ifndef TOLUA_RELEASE
  1514. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Center'", NULL);
  1515. #endif
  1516. {
  1517. Vector3 tolua_ret = (Vector3) self->Center();
  1518. {
  1519. #ifdef __cplusplus
  1520. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  1521. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1522. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1523. #else
  1524. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  1525. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1526. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1527. #endif
  1528. }
  1529. }
  1530. }
  1531. return 1;
  1532. #ifndef TOLUA_RELEASE
  1533. tolua_lerror:
  1534. tolua_error(tolua_S,"#ferror in function 'Center'.",&tolua_err);
  1535. return 0;
  1536. #endif
  1537. }
  1538. #endif //#ifndef TOLUA_DISABLE
  1539. /* method: Size of class BoundingBox */
  1540. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Size00
  1541. static int tolua_Math_BoundingBox_Size00(lua_State* tolua_S)
  1542. {
  1543. #ifndef TOLUA_RELEASE
  1544. tolua_Error tolua_err;
  1545. if (
  1546. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1547. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1548. )
  1549. goto tolua_lerror;
  1550. else
  1551. #endif
  1552. {
  1553. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1554. #ifndef TOLUA_RELEASE
  1555. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL);
  1556. #endif
  1557. {
  1558. Vector3 tolua_ret = (Vector3) self->Size();
  1559. {
  1560. #ifdef __cplusplus
  1561. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  1562. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1563. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1564. #else
  1565. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  1566. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1567. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1568. #endif
  1569. }
  1570. }
  1571. }
  1572. return 1;
  1573. #ifndef TOLUA_RELEASE
  1574. tolua_lerror:
  1575. tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err);
  1576. return 0;
  1577. #endif
  1578. }
  1579. #endif //#ifndef TOLUA_DISABLE
  1580. /* method: HalfSize of class BoundingBox */
  1581. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_HalfSize00
  1582. static int tolua_Math_BoundingBox_HalfSize00(lua_State* tolua_S)
  1583. {
  1584. #ifndef TOLUA_RELEASE
  1585. tolua_Error tolua_err;
  1586. if (
  1587. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1588. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1589. )
  1590. goto tolua_lerror;
  1591. else
  1592. #endif
  1593. {
  1594. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1595. #ifndef TOLUA_RELEASE
  1596. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HalfSize'", NULL);
  1597. #endif
  1598. {
  1599. Vector3 tolua_ret = (Vector3) self->HalfSize();
  1600. {
  1601. #ifdef __cplusplus
  1602. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  1603. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1604. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1605. #else
  1606. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  1607. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  1608. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1609. #endif
  1610. }
  1611. }
  1612. }
  1613. return 1;
  1614. #ifndef TOLUA_RELEASE
  1615. tolua_lerror:
  1616. tolua_error(tolua_S,"#ferror in function 'HalfSize'.",&tolua_err);
  1617. return 0;
  1618. #endif
  1619. }
  1620. #endif //#ifndef TOLUA_DISABLE
  1621. /* method: Transformed of class BoundingBox */
  1622. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transformed00
  1623. static int tolua_Math_BoundingBox_Transformed00(lua_State* tolua_S)
  1624. {
  1625. #ifndef TOLUA_RELEASE
  1626. tolua_Error tolua_err;
  1627. if (
  1628. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1629. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  1630. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1631. )
  1632. goto tolua_lerror;
  1633. else
  1634. #endif
  1635. {
  1636. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1637. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  1638. #ifndef TOLUA_RELEASE
  1639. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  1640. #endif
  1641. {
  1642. BoundingBox tolua_ret = (BoundingBox) self->Transformed(*transform);
  1643. {
  1644. #ifdef __cplusplus
  1645. void* tolua_obj = Mtolua_new((BoundingBox)(tolua_ret));
  1646. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1647. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1648. #else
  1649. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BoundingBox));
  1650. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1651. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1652. #endif
  1653. }
  1654. }
  1655. }
  1656. return 1;
  1657. #ifndef TOLUA_RELEASE
  1658. tolua_lerror:
  1659. tolua_error(tolua_S,"#ferror in function 'Transformed'.",&tolua_err);
  1660. return 0;
  1661. #endif
  1662. }
  1663. #endif //#ifndef TOLUA_DISABLE
  1664. /* method: Transformed of class BoundingBox */
  1665. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Transformed01
  1666. static int tolua_Math_BoundingBox_Transformed01(lua_State* tolua_S)
  1667. {
  1668. tolua_Error tolua_err;
  1669. if (
  1670. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1671. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  1672. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1673. )
  1674. goto tolua_lerror;
  1675. else
  1676. {
  1677. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1678. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  1679. #ifndef TOLUA_RELEASE
  1680. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  1681. #endif
  1682. {
  1683. BoundingBox tolua_ret = (BoundingBox) self->Transformed(*transform);
  1684. {
  1685. #ifdef __cplusplus
  1686. void* tolua_obj = Mtolua_new((BoundingBox)(tolua_ret));
  1687. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1688. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1689. #else
  1690. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BoundingBox));
  1691. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1692. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1693. #endif
  1694. }
  1695. }
  1696. }
  1697. return 1;
  1698. tolua_lerror:
  1699. return tolua_Math_BoundingBox_Transformed00(tolua_S);
  1700. }
  1701. #endif //#ifndef TOLUA_DISABLE
  1702. /* method: Projected of class BoundingBox */
  1703. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_Projected00
  1704. static int tolua_Math_BoundingBox_Projected00(lua_State* tolua_S)
  1705. {
  1706. #ifndef TOLUA_RELEASE
  1707. tolua_Error tolua_err;
  1708. if (
  1709. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1710. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  1711. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1712. )
  1713. goto tolua_lerror;
  1714. else
  1715. #endif
  1716. {
  1717. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1718. const Matrix4* projection = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  1719. #ifndef TOLUA_RELEASE
  1720. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Projected'", NULL);
  1721. #endif
  1722. {
  1723. Rect tolua_ret = (Rect) self->Projected(*projection);
  1724. {
  1725. #ifdef __cplusplus
  1726. void* tolua_obj = Mtolua_new((Rect)(tolua_ret));
  1727. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  1728. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1729. #else
  1730. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Rect));
  1731. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  1732. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1733. #endif
  1734. }
  1735. }
  1736. }
  1737. return 1;
  1738. #ifndef TOLUA_RELEASE
  1739. tolua_lerror:
  1740. tolua_error(tolua_S,"#ferror in function 'Projected'.",&tolua_err);
  1741. return 0;
  1742. #endif
  1743. }
  1744. #endif //#ifndef TOLUA_DISABLE
  1745. /* method: IsInside of class BoundingBox */
  1746. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInside00
  1747. static int tolua_Math_BoundingBox_IsInside00(lua_State* tolua_S)
  1748. {
  1749. #ifndef TOLUA_RELEASE
  1750. tolua_Error tolua_err;
  1751. if (
  1752. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1753. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1754. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1755. )
  1756. goto tolua_lerror;
  1757. else
  1758. #endif
  1759. {
  1760. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1761. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1762. #ifndef TOLUA_RELEASE
  1763. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  1764. #endif
  1765. {
  1766. Intersection tolua_ret = (Intersection) self->IsInside(*point);
  1767. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1768. }
  1769. }
  1770. return 1;
  1771. #ifndef TOLUA_RELEASE
  1772. tolua_lerror:
  1773. tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err);
  1774. return 0;
  1775. #endif
  1776. }
  1777. #endif //#ifndef TOLUA_DISABLE
  1778. /* method: IsInside of class BoundingBox */
  1779. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInside01
  1780. static int tolua_Math_BoundingBox_IsInside01(lua_State* tolua_S)
  1781. {
  1782. tolua_Error tolua_err;
  1783. if (
  1784. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1785. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1786. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1787. )
  1788. goto tolua_lerror;
  1789. else
  1790. {
  1791. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1792. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1793. #ifndef TOLUA_RELEASE
  1794. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  1795. #endif
  1796. {
  1797. Intersection tolua_ret = (Intersection) self->IsInside(*box);
  1798. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1799. }
  1800. }
  1801. return 1;
  1802. tolua_lerror:
  1803. return tolua_Math_BoundingBox_IsInside00(tolua_S);
  1804. }
  1805. #endif //#ifndef TOLUA_DISABLE
  1806. /* method: IsInsideFast of class BoundingBox */
  1807. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInsideFast00
  1808. static int tolua_Math_BoundingBox_IsInsideFast00(lua_State* tolua_S)
  1809. {
  1810. #ifndef TOLUA_RELEASE
  1811. tolua_Error tolua_err;
  1812. if (
  1813. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1814. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  1815. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1816. )
  1817. goto tolua_lerror;
  1818. else
  1819. #endif
  1820. {
  1821. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1822. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  1823. #ifndef TOLUA_RELEASE
  1824. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  1825. #endif
  1826. {
  1827. Intersection tolua_ret = (Intersection) self->IsInsideFast(*box);
  1828. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1829. }
  1830. }
  1831. return 1;
  1832. #ifndef TOLUA_RELEASE
  1833. tolua_lerror:
  1834. tolua_error(tolua_S,"#ferror in function 'IsInsideFast'.",&tolua_err);
  1835. return 0;
  1836. #endif
  1837. }
  1838. #endif //#ifndef TOLUA_DISABLE
  1839. /* method: IsInside of class BoundingBox */
  1840. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInside02
  1841. static int tolua_Math_BoundingBox_IsInside02(lua_State* tolua_S)
  1842. {
  1843. tolua_Error tolua_err;
  1844. if (
  1845. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1846. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1847. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1848. )
  1849. goto tolua_lerror;
  1850. else
  1851. {
  1852. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1853. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1854. #ifndef TOLUA_RELEASE
  1855. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  1856. #endif
  1857. {
  1858. Intersection tolua_ret = (Intersection) self->IsInside(*sphere);
  1859. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1860. }
  1861. }
  1862. return 1;
  1863. tolua_lerror:
  1864. return tolua_Math_BoundingBox_IsInside01(tolua_S);
  1865. }
  1866. #endif //#ifndef TOLUA_DISABLE
  1867. /* method: IsInsideFast of class BoundingBox */
  1868. #ifndef TOLUA_DISABLE_tolua_Math_BoundingBox_IsInsideFast01
  1869. static int tolua_Math_BoundingBox_IsInsideFast01(lua_State* tolua_S)
  1870. {
  1871. tolua_Error tolua_err;
  1872. if (
  1873. !tolua_isusertype(tolua_S,1,"const BoundingBox",0,&tolua_err) ||
  1874. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  1875. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1876. )
  1877. goto tolua_lerror;
  1878. else
  1879. {
  1880. const BoundingBox* self = (const BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1881. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  1882. #ifndef TOLUA_RELEASE
  1883. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  1884. #endif
  1885. {
  1886. Intersection tolua_ret = (Intersection) self->IsInsideFast(*sphere);
  1887. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1888. }
  1889. }
  1890. return 1;
  1891. tolua_lerror:
  1892. return tolua_Math_BoundingBox_IsInsideFast00(tolua_S);
  1893. }
  1894. #endif //#ifndef TOLUA_DISABLE
  1895. /* get function: min_ of class BoundingBox */
  1896. #ifndef TOLUA_DISABLE_tolua_get_BoundingBox_min
  1897. static int tolua_get_BoundingBox_min(lua_State* tolua_S)
  1898. {
  1899. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1900. #ifndef TOLUA_RELEASE
  1901. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  1902. #endif
  1903. tolua_pushusertype(tolua_S,(void*)&self->min_,"Vector3");
  1904. return 1;
  1905. }
  1906. #endif //#ifndef TOLUA_DISABLE
  1907. /* set function: min_ of class BoundingBox */
  1908. #ifndef TOLUA_DISABLE_tolua_set_BoundingBox_min
  1909. static int tolua_set_BoundingBox_min(lua_State* tolua_S)
  1910. {
  1911. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1912. #ifndef TOLUA_RELEASE
  1913. tolua_Error tolua_err;
  1914. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  1915. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  1916. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  1917. #endif
  1918. self->min_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  1919. ;
  1920. return 0;
  1921. }
  1922. #endif //#ifndef TOLUA_DISABLE
  1923. /* get function: max_ of class BoundingBox */
  1924. #ifndef TOLUA_DISABLE_tolua_get_BoundingBox_max
  1925. static int tolua_get_BoundingBox_max(lua_State* tolua_S)
  1926. {
  1927. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1928. #ifndef TOLUA_RELEASE
  1929. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  1930. #endif
  1931. tolua_pushusertype(tolua_S,(void*)&self->max_,"Vector3");
  1932. return 1;
  1933. }
  1934. #endif //#ifndef TOLUA_DISABLE
  1935. /* set function: max_ of class BoundingBox */
  1936. #ifndef TOLUA_DISABLE_tolua_set_BoundingBox_max
  1937. static int tolua_set_BoundingBox_max(lua_State* tolua_S)
  1938. {
  1939. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  1940. #ifndef TOLUA_RELEASE
  1941. tolua_Error tolua_err;
  1942. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  1943. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  1944. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  1945. #endif
  1946. self->max_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  1947. ;
  1948. return 0;
  1949. }
  1950. #endif //#ifndef TOLUA_DISABLE
  1951. /* method: new of class Color */
  1952. #ifndef TOLUA_DISABLE_tolua_Math_Color_new00
  1953. static int tolua_Math_Color_new00(lua_State* tolua_S)
  1954. {
  1955. #ifndef TOLUA_RELEASE
  1956. tolua_Error tolua_err;
  1957. if (
  1958. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  1959. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1960. )
  1961. goto tolua_lerror;
  1962. else
  1963. #endif
  1964. {
  1965. {
  1966. Color* tolua_ret = (Color*) Mtolua_new((Color)());
  1967. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  1968. }
  1969. }
  1970. return 1;
  1971. #ifndef TOLUA_RELEASE
  1972. tolua_lerror:
  1973. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  1974. return 0;
  1975. #endif
  1976. }
  1977. #endif //#ifndef TOLUA_DISABLE
  1978. /* method: new_local of class Color */
  1979. #ifndef TOLUA_DISABLE_tolua_Math_Color_new00_local
  1980. static int tolua_Math_Color_new00_local(lua_State* tolua_S)
  1981. {
  1982. #ifndef TOLUA_RELEASE
  1983. tolua_Error tolua_err;
  1984. if (
  1985. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  1986. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1987. )
  1988. goto tolua_lerror;
  1989. else
  1990. #endif
  1991. {
  1992. {
  1993. Color* tolua_ret = (Color*) Mtolua_new((Color)());
  1994. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  1995. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1996. }
  1997. }
  1998. return 1;
  1999. #ifndef TOLUA_RELEASE
  2000. tolua_lerror:
  2001. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2002. return 0;
  2003. #endif
  2004. }
  2005. #endif //#ifndef TOLUA_DISABLE
  2006. /* method: new of class Color */
  2007. #ifndef TOLUA_DISABLE_tolua_Math_Color_new01
  2008. static int tolua_Math_Color_new01(lua_State* tolua_S)
  2009. {
  2010. tolua_Error tolua_err;
  2011. if (
  2012. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2013. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2014. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2015. )
  2016. goto tolua_lerror;
  2017. else
  2018. {
  2019. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2020. {
  2021. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color));
  2022. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2023. }
  2024. }
  2025. return 1;
  2026. tolua_lerror:
  2027. return tolua_Math_Color_new00(tolua_S);
  2028. }
  2029. #endif //#ifndef TOLUA_DISABLE
  2030. /* method: new_local of class Color */
  2031. #ifndef TOLUA_DISABLE_tolua_Math_Color_new01_local
  2032. static int tolua_Math_Color_new01_local(lua_State* tolua_S)
  2033. {
  2034. tolua_Error tolua_err;
  2035. if (
  2036. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2037. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2038. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2039. )
  2040. goto tolua_lerror;
  2041. else
  2042. {
  2043. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2044. {
  2045. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color));
  2046. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2047. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2048. }
  2049. }
  2050. return 1;
  2051. tolua_lerror:
  2052. return tolua_Math_Color_new00_local(tolua_S);
  2053. }
  2054. #endif //#ifndef TOLUA_DISABLE
  2055. /* method: new of class Color */
  2056. #ifndef TOLUA_DISABLE_tolua_Math_Color_new02
  2057. static int tolua_Math_Color_new02(lua_State* tolua_S)
  2058. {
  2059. tolua_Error tolua_err;
  2060. if (
  2061. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2062. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2063. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2064. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2065. )
  2066. goto tolua_lerror;
  2067. else
  2068. {
  2069. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2070. float a = ((float) tolua_tonumber(tolua_S,3,0));
  2071. {
  2072. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color,a));
  2073. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2074. }
  2075. }
  2076. return 1;
  2077. tolua_lerror:
  2078. return tolua_Math_Color_new01(tolua_S);
  2079. }
  2080. #endif //#ifndef TOLUA_DISABLE
  2081. /* method: new_local of class Color */
  2082. #ifndef TOLUA_DISABLE_tolua_Math_Color_new02_local
  2083. static int tolua_Math_Color_new02_local(lua_State* tolua_S)
  2084. {
  2085. tolua_Error tolua_err;
  2086. if (
  2087. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2088. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2089. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2090. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2091. )
  2092. goto tolua_lerror;
  2093. else
  2094. {
  2095. const Color* color = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2096. float a = ((float) tolua_tonumber(tolua_S,3,0));
  2097. {
  2098. Color* tolua_ret = (Color*) Mtolua_new((Color)(*color,a));
  2099. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2100. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2101. }
  2102. }
  2103. return 1;
  2104. tolua_lerror:
  2105. return tolua_Math_Color_new01_local(tolua_S);
  2106. }
  2107. #endif //#ifndef TOLUA_DISABLE
  2108. /* method: new of class Color */
  2109. #ifndef TOLUA_DISABLE_tolua_Math_Color_new03
  2110. static int tolua_Math_Color_new03(lua_State* tolua_S)
  2111. {
  2112. tolua_Error tolua_err;
  2113. if (
  2114. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2115. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2116. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2117. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2118. !tolua_isnoobj(tolua_S,5,&tolua_err)
  2119. )
  2120. goto tolua_lerror;
  2121. else
  2122. {
  2123. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2124. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2125. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2126. {
  2127. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b));
  2128. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2129. }
  2130. }
  2131. return 1;
  2132. tolua_lerror:
  2133. return tolua_Math_Color_new02(tolua_S);
  2134. }
  2135. #endif //#ifndef TOLUA_DISABLE
  2136. /* method: new_local of class Color */
  2137. #ifndef TOLUA_DISABLE_tolua_Math_Color_new03_local
  2138. static int tolua_Math_Color_new03_local(lua_State* tolua_S)
  2139. {
  2140. tolua_Error tolua_err;
  2141. if (
  2142. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2143. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2144. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2145. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2146. !tolua_isnoobj(tolua_S,5,&tolua_err)
  2147. )
  2148. goto tolua_lerror;
  2149. else
  2150. {
  2151. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2152. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2153. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2154. {
  2155. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b));
  2156. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2157. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2158. }
  2159. }
  2160. return 1;
  2161. tolua_lerror:
  2162. return tolua_Math_Color_new02_local(tolua_S);
  2163. }
  2164. #endif //#ifndef TOLUA_DISABLE
  2165. /* method: new of class Color */
  2166. #ifndef TOLUA_DISABLE_tolua_Math_Color_new04
  2167. static int tolua_Math_Color_new04(lua_State* tolua_S)
  2168. {
  2169. tolua_Error tolua_err;
  2170. if (
  2171. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2172. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2173. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2174. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2175. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2176. !tolua_isnoobj(tolua_S,6,&tolua_err)
  2177. )
  2178. goto tolua_lerror;
  2179. else
  2180. {
  2181. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2182. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2183. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2184. float a = ((float) tolua_tonumber(tolua_S,5,0));
  2185. {
  2186. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b,a));
  2187. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2188. }
  2189. }
  2190. return 1;
  2191. tolua_lerror:
  2192. return tolua_Math_Color_new03(tolua_S);
  2193. }
  2194. #endif //#ifndef TOLUA_DISABLE
  2195. /* method: new_local of class Color */
  2196. #ifndef TOLUA_DISABLE_tolua_Math_Color_new04_local
  2197. static int tolua_Math_Color_new04_local(lua_State* tolua_S)
  2198. {
  2199. tolua_Error tolua_err;
  2200. if (
  2201. !tolua_isusertable(tolua_S,1,"Color",0,&tolua_err) ||
  2202. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2203. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2204. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2205. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2206. !tolua_isnoobj(tolua_S,6,&tolua_err)
  2207. )
  2208. goto tolua_lerror;
  2209. else
  2210. {
  2211. float r = ((float) tolua_tonumber(tolua_S,2,0));
  2212. float g = ((float) tolua_tonumber(tolua_S,3,0));
  2213. float b = ((float) tolua_tonumber(tolua_S,4,0));
  2214. float a = ((float) tolua_tonumber(tolua_S,5,0));
  2215. {
  2216. Color* tolua_ret = (Color*) Mtolua_new((Color)(r,g,b,a));
  2217. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Color");
  2218. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2219. }
  2220. }
  2221. return 1;
  2222. tolua_lerror:
  2223. return tolua_Math_Color_new03_local(tolua_S);
  2224. }
  2225. #endif //#ifndef TOLUA_DISABLE
  2226. /* method: operator== of class Color */
  2227. #ifndef TOLUA_DISABLE_tolua_Math_Color__eq00
  2228. static int tolua_Math_Color__eq00(lua_State* tolua_S)
  2229. {
  2230. #ifndef TOLUA_RELEASE
  2231. tolua_Error tolua_err;
  2232. if (
  2233. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2234. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2235. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2236. )
  2237. goto tolua_lerror;
  2238. else
  2239. #endif
  2240. {
  2241. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2242. const Color* rhs = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2243. #ifndef TOLUA_RELEASE
  2244. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  2245. #endif
  2246. {
  2247. bool tolua_ret = (bool) self->operator==(*rhs);
  2248. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  2249. }
  2250. }
  2251. return 1;
  2252. #ifndef TOLUA_RELEASE
  2253. tolua_lerror:
  2254. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  2255. return 0;
  2256. #endif
  2257. }
  2258. #endif //#ifndef TOLUA_DISABLE
  2259. /* method: operator* of class Color */
  2260. #ifndef TOLUA_DISABLE_tolua_Math_Color__mul00
  2261. static int tolua_Math_Color__mul00(lua_State* tolua_S)
  2262. {
  2263. #ifndef TOLUA_RELEASE
  2264. tolua_Error tolua_err;
  2265. if (
  2266. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2267. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2268. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2269. )
  2270. goto tolua_lerror;
  2271. else
  2272. #endif
  2273. {
  2274. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2275. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  2276. #ifndef TOLUA_RELEASE
  2277. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  2278. #endif
  2279. {
  2280. Color tolua_ret = (Color) self->operator*(rhs);
  2281. {
  2282. #ifdef __cplusplus
  2283. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  2284. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2285. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2286. #else
  2287. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  2288. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2289. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2290. #endif
  2291. }
  2292. }
  2293. }
  2294. return 1;
  2295. #ifndef TOLUA_RELEASE
  2296. tolua_lerror:
  2297. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  2298. return 0;
  2299. #endif
  2300. }
  2301. #endif //#ifndef TOLUA_DISABLE
  2302. /* method: operator+ of class Color */
  2303. #ifndef TOLUA_DISABLE_tolua_Math_Color__add00
  2304. static int tolua_Math_Color__add00(lua_State* tolua_S)
  2305. {
  2306. #ifndef TOLUA_RELEASE
  2307. tolua_Error tolua_err;
  2308. if (
  2309. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2310. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2311. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2312. )
  2313. goto tolua_lerror;
  2314. else
  2315. #endif
  2316. {
  2317. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2318. const Color* rhs = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2319. #ifndef TOLUA_RELEASE
  2320. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  2321. #endif
  2322. {
  2323. Color tolua_ret = (Color) self->operator+(*rhs);
  2324. {
  2325. #ifdef __cplusplus
  2326. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  2327. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2328. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2329. #else
  2330. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  2331. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2332. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2333. #endif
  2334. }
  2335. }
  2336. }
  2337. return 1;
  2338. #ifndef TOLUA_RELEASE
  2339. tolua_lerror:
  2340. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  2341. return 0;
  2342. #endif
  2343. }
  2344. #endif //#ifndef TOLUA_DISABLE
  2345. /* method: RGBValues of class Color */
  2346. #ifndef TOLUA_DISABLE_tolua_Math_Color_RGBValues00
  2347. static int tolua_Math_Color_RGBValues00(lua_State* tolua_S)
  2348. {
  2349. #ifndef TOLUA_RELEASE
  2350. tolua_Error tolua_err;
  2351. if (
  2352. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2353. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2354. )
  2355. goto tolua_lerror;
  2356. else
  2357. #endif
  2358. {
  2359. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2360. #ifndef TOLUA_RELEASE
  2361. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RGBValues'", NULL);
  2362. #endif
  2363. {
  2364. Vector3 tolua_ret = (Vector3) self->RGBValues();
  2365. {
  2366. #ifdef __cplusplus
  2367. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  2368. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2369. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2370. #else
  2371. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  2372. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2373. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2374. #endif
  2375. }
  2376. }
  2377. }
  2378. return 1;
  2379. #ifndef TOLUA_RELEASE
  2380. tolua_lerror:
  2381. tolua_error(tolua_S,"#ferror in function 'RGBValues'.",&tolua_err);
  2382. return 0;
  2383. #endif
  2384. }
  2385. #endif //#ifndef TOLUA_DISABLE
  2386. /* method: Intensity of class Color */
  2387. #ifndef TOLUA_DISABLE_tolua_Math_Color_Intensity00
  2388. static int tolua_Math_Color_Intensity00(lua_State* tolua_S)
  2389. {
  2390. #ifndef TOLUA_RELEASE
  2391. tolua_Error tolua_err;
  2392. if (
  2393. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2394. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2395. )
  2396. goto tolua_lerror;
  2397. else
  2398. #endif
  2399. {
  2400. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2401. #ifndef TOLUA_RELEASE
  2402. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Intensity'", NULL);
  2403. #endif
  2404. {
  2405. float tolua_ret = (float) self->Intensity();
  2406. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2407. }
  2408. }
  2409. return 1;
  2410. #ifndef TOLUA_RELEASE
  2411. tolua_lerror:
  2412. tolua_error(tolua_S,"#ferror in function 'Intensity'.",&tolua_err);
  2413. return 0;
  2414. #endif
  2415. }
  2416. #endif //#ifndef TOLUA_DISABLE
  2417. /* method: Lerp of class Color */
  2418. #ifndef TOLUA_DISABLE_tolua_Math_Color_Lerp00
  2419. static int tolua_Math_Color_Lerp00(lua_State* tolua_S)
  2420. {
  2421. #ifndef TOLUA_RELEASE
  2422. tolua_Error tolua_err;
  2423. if (
  2424. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2425. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Color",0,&tolua_err)) ||
  2426. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2427. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2428. )
  2429. goto tolua_lerror;
  2430. else
  2431. #endif
  2432. {
  2433. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2434. const Color* rhs = ((const Color*) tolua_tousertype(tolua_S,2,0));
  2435. float t = ((float) tolua_tonumber(tolua_S,3,0));
  2436. #ifndef TOLUA_RELEASE
  2437. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  2438. #endif
  2439. {
  2440. Color tolua_ret = (Color) self->Lerp(*rhs,t);
  2441. {
  2442. #ifdef __cplusplus
  2443. void* tolua_obj = Mtolua_new((Color)(tolua_ret));
  2444. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2445. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2446. #else
  2447. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Color));
  2448. tolua_pushusertype(tolua_S,tolua_obj,"Color");
  2449. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2450. #endif
  2451. }
  2452. }
  2453. }
  2454. return 1;
  2455. #ifndef TOLUA_RELEASE
  2456. tolua_lerror:
  2457. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  2458. return 0;
  2459. #endif
  2460. }
  2461. #endif //#ifndef TOLUA_DISABLE
  2462. /* method: ToUInt of class Color */
  2463. #ifndef TOLUA_DISABLE_tolua_Math_Color_ToUInt00
  2464. static int tolua_Math_Color_ToUInt00(lua_State* tolua_S)
  2465. {
  2466. #ifndef TOLUA_RELEASE
  2467. tolua_Error tolua_err;
  2468. if (
  2469. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2470. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2471. )
  2472. goto tolua_lerror;
  2473. else
  2474. #endif
  2475. {
  2476. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2477. #ifndef TOLUA_RELEASE
  2478. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToUInt'", NULL);
  2479. #endif
  2480. {
  2481. unsigned tolua_ret = (unsigned) self->ToUInt();
  2482. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2483. }
  2484. }
  2485. return 1;
  2486. #ifndef TOLUA_RELEASE
  2487. tolua_lerror:
  2488. tolua_error(tolua_S,"#ferror in function 'ToUInt'.",&tolua_err);
  2489. return 0;
  2490. #endif
  2491. }
  2492. #endif //#ifndef TOLUA_DISABLE
  2493. /* method: ToVector4 of class Color */
  2494. #ifndef TOLUA_DISABLE_tolua_Math_Color_ToVector400
  2495. static int tolua_Math_Color_ToVector400(lua_State* tolua_S)
  2496. {
  2497. #ifndef TOLUA_RELEASE
  2498. tolua_Error tolua_err;
  2499. if (
  2500. !tolua_isusertype(tolua_S,1,"const Color",0,&tolua_err) ||
  2501. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2502. )
  2503. goto tolua_lerror;
  2504. else
  2505. #endif
  2506. {
  2507. const Color* self = (const Color*) tolua_tousertype(tolua_S,1,0);
  2508. #ifndef TOLUA_RELEASE
  2509. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToVector4'", NULL);
  2510. #endif
  2511. {
  2512. Vector4 tolua_ret = (Vector4) self->ToVector4();
  2513. {
  2514. #ifdef __cplusplus
  2515. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  2516. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2517. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2518. #else
  2519. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  2520. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  2521. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2522. #endif
  2523. }
  2524. }
  2525. }
  2526. return 1;
  2527. #ifndef TOLUA_RELEASE
  2528. tolua_lerror:
  2529. tolua_error(tolua_S,"#ferror in function 'ToVector4'.",&tolua_err);
  2530. return 0;
  2531. #endif
  2532. }
  2533. #endif //#ifndef TOLUA_DISABLE
  2534. /* get function: r_ of class Color */
  2535. #ifndef TOLUA_DISABLE_tolua_get_Color_r
  2536. static int tolua_get_Color_r(lua_State* tolua_S)
  2537. {
  2538. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2539. #ifndef TOLUA_RELEASE
  2540. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'r_'",NULL);
  2541. #endif
  2542. tolua_pushnumber(tolua_S,(lua_Number)self->r_);
  2543. return 1;
  2544. }
  2545. #endif //#ifndef TOLUA_DISABLE
  2546. /* set function: r_ of class Color */
  2547. #ifndef TOLUA_DISABLE_tolua_set_Color_r
  2548. static int tolua_set_Color_r(lua_State* tolua_S)
  2549. {
  2550. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2551. #ifndef TOLUA_RELEASE
  2552. tolua_Error tolua_err;
  2553. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'r_'",NULL);
  2554. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2555. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2556. #endif
  2557. self->r_ = ((float) tolua_tonumber(tolua_S,2,0))
  2558. ;
  2559. return 0;
  2560. }
  2561. #endif //#ifndef TOLUA_DISABLE
  2562. /* get function: g_ of class Color */
  2563. #ifndef TOLUA_DISABLE_tolua_get_Color_g
  2564. static int tolua_get_Color_g(lua_State* tolua_S)
  2565. {
  2566. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2567. #ifndef TOLUA_RELEASE
  2568. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'g_'",NULL);
  2569. #endif
  2570. tolua_pushnumber(tolua_S,(lua_Number)self->g_);
  2571. return 1;
  2572. }
  2573. #endif //#ifndef TOLUA_DISABLE
  2574. /* set function: g_ of class Color */
  2575. #ifndef TOLUA_DISABLE_tolua_set_Color_g
  2576. static int tolua_set_Color_g(lua_State* tolua_S)
  2577. {
  2578. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2579. #ifndef TOLUA_RELEASE
  2580. tolua_Error tolua_err;
  2581. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'g_'",NULL);
  2582. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2583. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2584. #endif
  2585. self->g_ = ((float) tolua_tonumber(tolua_S,2,0))
  2586. ;
  2587. return 0;
  2588. }
  2589. #endif //#ifndef TOLUA_DISABLE
  2590. /* get function: b_ of class Color */
  2591. #ifndef TOLUA_DISABLE_tolua_get_Color_b
  2592. static int tolua_get_Color_b(lua_State* tolua_S)
  2593. {
  2594. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2595. #ifndef TOLUA_RELEASE
  2596. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'b_'",NULL);
  2597. #endif
  2598. tolua_pushnumber(tolua_S,(lua_Number)self->b_);
  2599. return 1;
  2600. }
  2601. #endif //#ifndef TOLUA_DISABLE
  2602. /* set function: b_ of class Color */
  2603. #ifndef TOLUA_DISABLE_tolua_set_Color_b
  2604. static int tolua_set_Color_b(lua_State* tolua_S)
  2605. {
  2606. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2607. #ifndef TOLUA_RELEASE
  2608. tolua_Error tolua_err;
  2609. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'b_'",NULL);
  2610. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2611. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2612. #endif
  2613. self->b_ = ((float) tolua_tonumber(tolua_S,2,0))
  2614. ;
  2615. return 0;
  2616. }
  2617. #endif //#ifndef TOLUA_DISABLE
  2618. /* get function: a_ of class Color */
  2619. #ifndef TOLUA_DISABLE_tolua_get_Color_a
  2620. static int tolua_get_Color_a(lua_State* tolua_S)
  2621. {
  2622. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2623. #ifndef TOLUA_RELEASE
  2624. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'a_'",NULL);
  2625. #endif
  2626. tolua_pushnumber(tolua_S,(lua_Number)self->a_);
  2627. return 1;
  2628. }
  2629. #endif //#ifndef TOLUA_DISABLE
  2630. /* set function: a_ of class Color */
  2631. #ifndef TOLUA_DISABLE_tolua_set_Color_a
  2632. static int tolua_set_Color_a(lua_State* tolua_S)
  2633. {
  2634. Color* self = (Color*) tolua_tousertype(tolua_S,1,0);
  2635. #ifndef TOLUA_RELEASE
  2636. tolua_Error tolua_err;
  2637. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'a_'",NULL);
  2638. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2639. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2640. #endif
  2641. self->a_ = ((float) tolua_tonumber(tolua_S,2,0))
  2642. ;
  2643. return 0;
  2644. }
  2645. #endif //#ifndef TOLUA_DISABLE
  2646. /* get function: WHITE of class Color */
  2647. #ifndef TOLUA_DISABLE_tolua_get_Color_WHITE
  2648. static int tolua_get_Color_WHITE(lua_State* tolua_S)
  2649. {
  2650. tolua_pushusertype(tolua_S,(void*)&Color::WHITE,"const Color");
  2651. return 1;
  2652. }
  2653. #endif //#ifndef TOLUA_DISABLE
  2654. /* get function: YELLOW of class Color */
  2655. #ifndef TOLUA_DISABLE_tolua_get_Color_YELLOW
  2656. static int tolua_get_Color_YELLOW(lua_State* tolua_S)
  2657. {
  2658. tolua_pushusertype(tolua_S,(void*)&Color::YELLOW,"const Color");
  2659. return 1;
  2660. }
  2661. #endif //#ifndef TOLUA_DISABLE
  2662. /* get function: RED of class Color */
  2663. #ifndef TOLUA_DISABLE_tolua_get_Color_RED
  2664. static int tolua_get_Color_RED(lua_State* tolua_S)
  2665. {
  2666. tolua_pushusertype(tolua_S,(void*)&Color::RED,"const Color");
  2667. return 1;
  2668. }
  2669. #endif //#ifndef TOLUA_DISABLE
  2670. /* get function: GREEN of class Color */
  2671. #ifndef TOLUA_DISABLE_tolua_get_Color_GREEN
  2672. static int tolua_get_Color_GREEN(lua_State* tolua_S)
  2673. {
  2674. tolua_pushusertype(tolua_S,(void*)&Color::GREEN,"const Color");
  2675. return 1;
  2676. }
  2677. #endif //#ifndef TOLUA_DISABLE
  2678. /* get function: BLUE of class Color */
  2679. #ifndef TOLUA_DISABLE_tolua_get_Color_BLUE
  2680. static int tolua_get_Color_BLUE(lua_State* tolua_S)
  2681. {
  2682. tolua_pushusertype(tolua_S,(void*)&Color::BLUE,"const Color");
  2683. return 1;
  2684. }
  2685. #endif //#ifndef TOLUA_DISABLE
  2686. /* get function: BLACK of class Color */
  2687. #ifndef TOLUA_DISABLE_tolua_get_Color_BLACK
  2688. static int tolua_get_Color_BLACK(lua_State* tolua_S)
  2689. {
  2690. tolua_pushusertype(tolua_S,(void*)&Color::BLACK,"const Color");
  2691. return 1;
  2692. }
  2693. #endif //#ifndef TOLUA_DISABLE
  2694. /* get function: TRANSPARENT of class Color */
  2695. #ifndef TOLUA_DISABLE_tolua_get_Color_TRANSPARENT
  2696. static int tolua_get_Color_TRANSPARENT(lua_State* tolua_S)
  2697. {
  2698. tolua_pushusertype(tolua_S,(void*)&Color::TRANSPARENT,"const Color");
  2699. return 1;
  2700. }
  2701. #endif //#ifndef TOLUA_DISABLE
  2702. /* get function: NUM_FRUSTUM_PLANES */
  2703. #ifndef TOLUA_DISABLE_tolua_get_NUM_FRUSTUM_PLANES
  2704. static int tolua_get_NUM_FRUSTUM_PLANES(lua_State* tolua_S)
  2705. {
  2706. tolua_pushnumber(tolua_S,(lua_Number)NUM_FRUSTUM_PLANES);
  2707. return 1;
  2708. }
  2709. #endif //#ifndef TOLUA_DISABLE
  2710. /* get function: NUM_FRUSTUM_VERTICES */
  2711. #ifndef TOLUA_DISABLE_tolua_get_NUM_FRUSTUM_VERTICES
  2712. static int tolua_get_NUM_FRUSTUM_VERTICES(lua_State* tolua_S)
  2713. {
  2714. tolua_pushnumber(tolua_S,(lua_Number)NUM_FRUSTUM_VERTICES);
  2715. return 1;
  2716. }
  2717. #endif //#ifndef TOLUA_DISABLE
  2718. /* method: new of class Frustum */
  2719. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new00
  2720. static int tolua_Math_Frustum_new00(lua_State* tolua_S)
  2721. {
  2722. #ifndef TOLUA_RELEASE
  2723. tolua_Error tolua_err;
  2724. if (
  2725. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2726. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2727. )
  2728. goto tolua_lerror;
  2729. else
  2730. #endif
  2731. {
  2732. {
  2733. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)());
  2734. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2735. }
  2736. }
  2737. return 1;
  2738. #ifndef TOLUA_RELEASE
  2739. tolua_lerror:
  2740. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2741. return 0;
  2742. #endif
  2743. }
  2744. #endif //#ifndef TOLUA_DISABLE
  2745. /* method: new_local of class Frustum */
  2746. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new00_local
  2747. static int tolua_Math_Frustum_new00_local(lua_State* tolua_S)
  2748. {
  2749. #ifndef TOLUA_RELEASE
  2750. tolua_Error tolua_err;
  2751. if (
  2752. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2753. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2754. )
  2755. goto tolua_lerror;
  2756. else
  2757. #endif
  2758. {
  2759. {
  2760. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)());
  2761. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2762. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2763. }
  2764. }
  2765. return 1;
  2766. #ifndef TOLUA_RELEASE
  2767. tolua_lerror:
  2768. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2769. return 0;
  2770. #endif
  2771. }
  2772. #endif //#ifndef TOLUA_DISABLE
  2773. /* method: new of class Frustum */
  2774. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new01
  2775. static int tolua_Math_Frustum_new01(lua_State* tolua_S)
  2776. {
  2777. tolua_Error tolua_err;
  2778. if (
  2779. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2780. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  2781. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2782. )
  2783. goto tolua_lerror;
  2784. else
  2785. {
  2786. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  2787. {
  2788. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)(*frustum));
  2789. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2790. }
  2791. }
  2792. return 1;
  2793. tolua_lerror:
  2794. return tolua_Math_Frustum_new00(tolua_S);
  2795. }
  2796. #endif //#ifndef TOLUA_DISABLE
  2797. /* method: new_local of class Frustum */
  2798. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_new01_local
  2799. static int tolua_Math_Frustum_new01_local(lua_State* tolua_S)
  2800. {
  2801. tolua_Error tolua_err;
  2802. if (
  2803. !tolua_isusertable(tolua_S,1,"Frustum",0,&tolua_err) ||
  2804. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  2805. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2806. )
  2807. goto tolua_lerror;
  2808. else
  2809. {
  2810. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  2811. {
  2812. Frustum* tolua_ret = (Frustum*) Mtolua_new((Frustum)(*frustum));
  2813. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Frustum");
  2814. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2815. }
  2816. }
  2817. return 1;
  2818. tolua_lerror:
  2819. return tolua_Math_Frustum_new00_local(tolua_S);
  2820. }
  2821. #endif //#ifndef TOLUA_DISABLE
  2822. /* method: Define of class Frustum */
  2823. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define00
  2824. static int tolua_Math_Frustum_Define00(lua_State* tolua_S)
  2825. {
  2826. #ifndef TOLUA_RELEASE
  2827. tolua_Error tolua_err;
  2828. if (
  2829. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2830. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2831. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2832. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2833. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2834. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  2835. !tolua_isnoobj(tolua_S,7,&tolua_err)
  2836. )
  2837. goto tolua_lerror;
  2838. else
  2839. #endif
  2840. {
  2841. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2842. float fov = ((float) tolua_tonumber(tolua_S,2,0));
  2843. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  2844. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  2845. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  2846. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  2847. #ifndef TOLUA_RELEASE
  2848. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2849. #endif
  2850. {
  2851. self->Define(fov,aspectRatio,zoom,nearZ,farZ);
  2852. }
  2853. }
  2854. return 0;
  2855. #ifndef TOLUA_RELEASE
  2856. tolua_lerror:
  2857. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  2858. return 0;
  2859. #endif
  2860. }
  2861. #endif //#ifndef TOLUA_DISABLE
  2862. /* method: Define of class Frustum */
  2863. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define01
  2864. static int tolua_Math_Frustum_Define01(lua_State* tolua_S)
  2865. {
  2866. tolua_Error tolua_err;
  2867. if (
  2868. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2869. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2870. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  2871. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  2872. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  2873. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  2874. (tolua_isvaluenil(tolua_S,7,&tolua_err) || !tolua_isusertype(tolua_S,7,"const Matrix3x4",0,&tolua_err)) ||
  2875. !tolua_isnoobj(tolua_S,8,&tolua_err)
  2876. )
  2877. goto tolua_lerror;
  2878. else
  2879. {
  2880. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2881. float fov = ((float) tolua_tonumber(tolua_S,2,0));
  2882. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  2883. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  2884. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  2885. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  2886. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,7,0));
  2887. #ifndef TOLUA_RELEASE
  2888. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2889. #endif
  2890. {
  2891. self->Define(fov,aspectRatio,zoom,nearZ,farZ,*transform);
  2892. }
  2893. }
  2894. return 0;
  2895. tolua_lerror:
  2896. return tolua_Math_Frustum_Define00(tolua_S);
  2897. }
  2898. #endif //#ifndef TOLUA_DISABLE
  2899. /* method: Define of class Frustum */
  2900. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define02
  2901. static int tolua_Math_Frustum_Define02(lua_State* tolua_S)
  2902. {
  2903. tolua_Error tolua_err;
  2904. if (
  2905. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2906. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  2907. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  2908. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2909. )
  2910. goto tolua_lerror;
  2911. else
  2912. {
  2913. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2914. const Vector3* near = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  2915. const Vector3* far = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  2916. #ifndef TOLUA_RELEASE
  2917. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2918. #endif
  2919. {
  2920. self->Define(*near,*far);
  2921. }
  2922. }
  2923. return 0;
  2924. tolua_lerror:
  2925. return tolua_Math_Frustum_Define01(tolua_S);
  2926. }
  2927. #endif //#ifndef TOLUA_DISABLE
  2928. /* method: Define of class Frustum */
  2929. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define03
  2930. static int tolua_Math_Frustum_Define03(lua_State* tolua_S)
  2931. {
  2932. tolua_Error tolua_err;
  2933. if (
  2934. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2935. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  2936. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  2937. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Matrix3x4",0,&tolua_err)) ||
  2938. !tolua_isnoobj(tolua_S,5,&tolua_err)
  2939. )
  2940. goto tolua_lerror;
  2941. else
  2942. {
  2943. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2944. const Vector3* near = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  2945. const Vector3* far = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  2946. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,4,0));
  2947. #ifndef TOLUA_RELEASE
  2948. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2949. #endif
  2950. {
  2951. self->Define(*near,*far,*transform);
  2952. }
  2953. }
  2954. return 0;
  2955. tolua_lerror:
  2956. return tolua_Math_Frustum_Define02(tolua_S);
  2957. }
  2958. #endif //#ifndef TOLUA_DISABLE
  2959. /* method: Define of class Frustum */
  2960. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define04
  2961. static int tolua_Math_Frustum_Define04(lua_State* tolua_S)
  2962. {
  2963. tolua_Error tolua_err;
  2964. if (
  2965. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2966. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  2967. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2968. )
  2969. goto tolua_lerror;
  2970. else
  2971. {
  2972. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  2973. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  2974. #ifndef TOLUA_RELEASE
  2975. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  2976. #endif
  2977. {
  2978. self->Define(*box);
  2979. }
  2980. }
  2981. return 0;
  2982. tolua_lerror:
  2983. return tolua_Math_Frustum_Define03(tolua_S);
  2984. }
  2985. #endif //#ifndef TOLUA_DISABLE
  2986. /* method: Define of class Frustum */
  2987. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Define05
  2988. static int tolua_Math_Frustum_Define05(lua_State* tolua_S)
  2989. {
  2990. tolua_Error tolua_err;
  2991. if (
  2992. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  2993. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  2994. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Matrix3x4",0,&tolua_err)) ||
  2995. !tolua_isnoobj(tolua_S,4,&tolua_err)
  2996. )
  2997. goto tolua_lerror;
  2998. else
  2999. {
  3000. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3001. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3002. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,3,0));
  3003. #ifndef TOLUA_RELEASE
  3004. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  3005. #endif
  3006. {
  3007. self->Define(*box,*transform);
  3008. }
  3009. }
  3010. return 0;
  3011. tolua_lerror:
  3012. return tolua_Math_Frustum_Define04(tolua_S);
  3013. }
  3014. #endif //#ifndef TOLUA_DISABLE
  3015. /* method: DefineOrtho of class Frustum */
  3016. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_DefineOrtho00
  3017. static int tolua_Math_Frustum_DefineOrtho00(lua_State* tolua_S)
  3018. {
  3019. #ifndef TOLUA_RELEASE
  3020. tolua_Error tolua_err;
  3021. if (
  3022. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3023. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3024. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3025. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  3026. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  3027. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  3028. !tolua_isnoobj(tolua_S,7,&tolua_err)
  3029. )
  3030. goto tolua_lerror;
  3031. else
  3032. #endif
  3033. {
  3034. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3035. float orthoSize = ((float) tolua_tonumber(tolua_S,2,0));
  3036. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  3037. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  3038. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  3039. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  3040. #ifndef TOLUA_RELEASE
  3041. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DefineOrtho'", NULL);
  3042. #endif
  3043. {
  3044. self->DefineOrtho(orthoSize,aspectRatio,zoom,nearZ,farZ);
  3045. }
  3046. }
  3047. return 0;
  3048. #ifndef TOLUA_RELEASE
  3049. tolua_lerror:
  3050. tolua_error(tolua_S,"#ferror in function 'DefineOrtho'.",&tolua_err);
  3051. return 0;
  3052. #endif
  3053. }
  3054. #endif //#ifndef TOLUA_DISABLE
  3055. /* method: DefineOrtho of class Frustum */
  3056. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_DefineOrtho01
  3057. static int tolua_Math_Frustum_DefineOrtho01(lua_State* tolua_S)
  3058. {
  3059. tolua_Error tolua_err;
  3060. if (
  3061. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3062. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3063. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3064. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  3065. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  3066. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  3067. (tolua_isvaluenil(tolua_S,7,&tolua_err) || !tolua_isusertype(tolua_S,7,"const Matrix3x4",0,&tolua_err)) ||
  3068. !tolua_isnoobj(tolua_S,8,&tolua_err)
  3069. )
  3070. goto tolua_lerror;
  3071. else
  3072. {
  3073. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3074. float orthoSize = ((float) tolua_tonumber(tolua_S,2,0));
  3075. float aspectRatio = ((float) tolua_tonumber(tolua_S,3,0));
  3076. float zoom = ((float) tolua_tonumber(tolua_S,4,0));
  3077. float nearZ = ((float) tolua_tonumber(tolua_S,5,0));
  3078. float farZ = ((float) tolua_tonumber(tolua_S,6,0));
  3079. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,7,0));
  3080. #ifndef TOLUA_RELEASE
  3081. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DefineOrtho'", NULL);
  3082. #endif
  3083. {
  3084. self->DefineOrtho(orthoSize,aspectRatio,zoom,nearZ,farZ,*transform);
  3085. }
  3086. }
  3087. return 0;
  3088. tolua_lerror:
  3089. return tolua_Math_Frustum_DefineOrtho00(tolua_S);
  3090. }
  3091. #endif //#ifndef TOLUA_DISABLE
  3092. /* method: Transform of class Frustum */
  3093. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transform00
  3094. static int tolua_Math_Frustum_Transform00(lua_State* tolua_S)
  3095. {
  3096. #ifndef TOLUA_RELEASE
  3097. tolua_Error tolua_err;
  3098. if (
  3099. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3100. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  3101. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3102. )
  3103. goto tolua_lerror;
  3104. else
  3105. #endif
  3106. {
  3107. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3108. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  3109. #ifndef TOLUA_RELEASE
  3110. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  3111. #endif
  3112. {
  3113. self->Transform(*transform);
  3114. }
  3115. }
  3116. return 0;
  3117. #ifndef TOLUA_RELEASE
  3118. tolua_lerror:
  3119. tolua_error(tolua_S,"#ferror in function 'Transform'.",&tolua_err);
  3120. return 0;
  3121. #endif
  3122. }
  3123. #endif //#ifndef TOLUA_DISABLE
  3124. /* method: Transform of class Frustum */
  3125. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transform01
  3126. static int tolua_Math_Frustum_Transform01(lua_State* tolua_S)
  3127. {
  3128. tolua_Error tolua_err;
  3129. if (
  3130. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3131. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  3132. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3133. )
  3134. goto tolua_lerror;
  3135. else
  3136. {
  3137. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3138. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  3139. #ifndef TOLUA_RELEASE
  3140. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  3141. #endif
  3142. {
  3143. self->Transform(*transform);
  3144. }
  3145. }
  3146. return 0;
  3147. tolua_lerror:
  3148. return tolua_Math_Frustum_Transform00(tolua_S);
  3149. }
  3150. #endif //#ifndef TOLUA_DISABLE
  3151. /* method: IsInside of class Frustum */
  3152. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInside00
  3153. static int tolua_Math_Frustum_IsInside00(lua_State* tolua_S)
  3154. {
  3155. #ifndef TOLUA_RELEASE
  3156. tolua_Error tolua_err;
  3157. if (
  3158. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3159. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  3160. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3161. )
  3162. goto tolua_lerror;
  3163. else
  3164. #endif
  3165. {
  3166. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3167. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  3168. #ifndef TOLUA_RELEASE
  3169. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  3170. #endif
  3171. {
  3172. Intersection tolua_ret = (Intersection) self->IsInside(*point);
  3173. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3174. }
  3175. }
  3176. return 1;
  3177. #ifndef TOLUA_RELEASE
  3178. tolua_lerror:
  3179. tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err);
  3180. return 0;
  3181. #endif
  3182. }
  3183. #endif //#ifndef TOLUA_DISABLE
  3184. /* method: IsInside of class Frustum */
  3185. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInside01
  3186. static int tolua_Math_Frustum_IsInside01(lua_State* tolua_S)
  3187. {
  3188. tolua_Error tolua_err;
  3189. if (
  3190. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3191. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  3192. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3193. )
  3194. goto tolua_lerror;
  3195. else
  3196. {
  3197. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3198. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  3199. #ifndef TOLUA_RELEASE
  3200. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  3201. #endif
  3202. {
  3203. Intersection tolua_ret = (Intersection) self->IsInside(*sphere);
  3204. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3205. }
  3206. }
  3207. return 1;
  3208. tolua_lerror:
  3209. return tolua_Math_Frustum_IsInside00(tolua_S);
  3210. }
  3211. #endif //#ifndef TOLUA_DISABLE
  3212. /* method: IsInsideFast of class Frustum */
  3213. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInsideFast00
  3214. static int tolua_Math_Frustum_IsInsideFast00(lua_State* tolua_S)
  3215. {
  3216. #ifndef TOLUA_RELEASE
  3217. tolua_Error tolua_err;
  3218. if (
  3219. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3220. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  3221. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3222. )
  3223. goto tolua_lerror;
  3224. else
  3225. #endif
  3226. {
  3227. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3228. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  3229. #ifndef TOLUA_RELEASE
  3230. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  3231. #endif
  3232. {
  3233. Intersection tolua_ret = (Intersection) self->IsInsideFast(*sphere);
  3234. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3235. }
  3236. }
  3237. return 1;
  3238. #ifndef TOLUA_RELEASE
  3239. tolua_lerror:
  3240. tolua_error(tolua_S,"#ferror in function 'IsInsideFast'.",&tolua_err);
  3241. return 0;
  3242. #endif
  3243. }
  3244. #endif //#ifndef TOLUA_DISABLE
  3245. /* method: IsInside of class Frustum */
  3246. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInside02
  3247. static int tolua_Math_Frustum_IsInside02(lua_State* tolua_S)
  3248. {
  3249. tolua_Error tolua_err;
  3250. if (
  3251. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3252. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  3253. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3254. )
  3255. goto tolua_lerror;
  3256. else
  3257. {
  3258. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3259. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3260. #ifndef TOLUA_RELEASE
  3261. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  3262. #endif
  3263. {
  3264. Intersection tolua_ret = (Intersection) self->IsInside(*box);
  3265. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3266. }
  3267. }
  3268. return 1;
  3269. tolua_lerror:
  3270. return tolua_Math_Frustum_IsInside01(tolua_S);
  3271. }
  3272. #endif //#ifndef TOLUA_DISABLE
  3273. /* method: IsInsideFast of class Frustum */
  3274. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_IsInsideFast01
  3275. static int tolua_Math_Frustum_IsInsideFast01(lua_State* tolua_S)
  3276. {
  3277. tolua_Error tolua_err;
  3278. if (
  3279. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3280. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  3281. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3282. )
  3283. goto tolua_lerror;
  3284. else
  3285. {
  3286. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3287. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  3288. #ifndef TOLUA_RELEASE
  3289. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  3290. #endif
  3291. {
  3292. Intersection tolua_ret = (Intersection) self->IsInsideFast(*box);
  3293. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3294. }
  3295. }
  3296. return 1;
  3297. tolua_lerror:
  3298. return tolua_Math_Frustum_IsInsideFast00(tolua_S);
  3299. }
  3300. #endif //#ifndef TOLUA_DISABLE
  3301. /* method: Distance of class Frustum */
  3302. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Distance00
  3303. static int tolua_Math_Frustum_Distance00(lua_State* tolua_S)
  3304. {
  3305. #ifndef TOLUA_RELEASE
  3306. tolua_Error tolua_err;
  3307. if (
  3308. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3309. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  3310. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3311. )
  3312. goto tolua_lerror;
  3313. else
  3314. #endif
  3315. {
  3316. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3317. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  3318. #ifndef TOLUA_RELEASE
  3319. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  3320. #endif
  3321. {
  3322. float tolua_ret = (float) self->Distance(*point);
  3323. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3324. }
  3325. }
  3326. return 1;
  3327. #ifndef TOLUA_RELEASE
  3328. tolua_lerror:
  3329. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  3330. return 0;
  3331. #endif
  3332. }
  3333. #endif //#ifndef TOLUA_DISABLE
  3334. /* method: Transformed of class Frustum */
  3335. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transformed00
  3336. static int tolua_Math_Frustum_Transformed00(lua_State* tolua_S)
  3337. {
  3338. #ifndef TOLUA_RELEASE
  3339. tolua_Error tolua_err;
  3340. if (
  3341. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3342. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  3343. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3344. )
  3345. goto tolua_lerror;
  3346. else
  3347. #endif
  3348. {
  3349. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3350. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  3351. #ifndef TOLUA_RELEASE
  3352. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  3353. #endif
  3354. {
  3355. Frustum tolua_ret = (Frustum) self->Transformed(*transform);
  3356. {
  3357. #ifdef __cplusplus
  3358. void* tolua_obj = Mtolua_new((Frustum)(tolua_ret));
  3359. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3360. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3361. #else
  3362. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Frustum));
  3363. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3364. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3365. #endif
  3366. }
  3367. }
  3368. }
  3369. return 1;
  3370. #ifndef TOLUA_RELEASE
  3371. tolua_lerror:
  3372. tolua_error(tolua_S,"#ferror in function 'Transformed'.",&tolua_err);
  3373. return 0;
  3374. #endif
  3375. }
  3376. #endif //#ifndef TOLUA_DISABLE
  3377. /* method: Transformed of class Frustum */
  3378. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Transformed01
  3379. static int tolua_Math_Frustum_Transformed01(lua_State* tolua_S)
  3380. {
  3381. tolua_Error tolua_err;
  3382. if (
  3383. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3384. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  3385. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3386. )
  3387. goto tolua_lerror;
  3388. else
  3389. {
  3390. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3391. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  3392. #ifndef TOLUA_RELEASE
  3393. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  3394. #endif
  3395. {
  3396. Frustum tolua_ret = (Frustum) self->Transformed(*transform);
  3397. {
  3398. #ifdef __cplusplus
  3399. void* tolua_obj = Mtolua_new((Frustum)(tolua_ret));
  3400. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3401. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3402. #else
  3403. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Frustum));
  3404. tolua_pushusertype(tolua_S,tolua_obj,"Frustum");
  3405. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3406. #endif
  3407. }
  3408. }
  3409. }
  3410. return 1;
  3411. tolua_lerror:
  3412. return tolua_Math_Frustum_Transformed00(tolua_S);
  3413. }
  3414. #endif //#ifndef TOLUA_DISABLE
  3415. /* method: Projected of class Frustum */
  3416. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_Projected00
  3417. static int tolua_Math_Frustum_Projected00(lua_State* tolua_S)
  3418. {
  3419. #ifndef TOLUA_RELEASE
  3420. tolua_Error tolua_err;
  3421. if (
  3422. !tolua_isusertype(tolua_S,1,"const Frustum",0,&tolua_err) ||
  3423. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  3424. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3425. )
  3426. goto tolua_lerror;
  3427. else
  3428. #endif
  3429. {
  3430. const Frustum* self = (const Frustum*) tolua_tousertype(tolua_S,1,0);
  3431. const Matrix4* transform = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  3432. #ifndef TOLUA_RELEASE
  3433. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Projected'", NULL);
  3434. #endif
  3435. {
  3436. Rect tolua_ret = (Rect) self->Projected(*transform);
  3437. {
  3438. #ifdef __cplusplus
  3439. void* tolua_obj = Mtolua_new((Rect)(tolua_ret));
  3440. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  3441. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3442. #else
  3443. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Rect));
  3444. tolua_pushusertype(tolua_S,tolua_obj,"Rect");
  3445. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3446. #endif
  3447. }
  3448. }
  3449. }
  3450. return 1;
  3451. #ifndef TOLUA_RELEASE
  3452. tolua_lerror:
  3453. tolua_error(tolua_S,"#ferror in function 'Projected'.",&tolua_err);
  3454. return 0;
  3455. #endif
  3456. }
  3457. #endif //#ifndef TOLUA_DISABLE
  3458. /* method: UpdatePlanes of class Frustum */
  3459. #ifndef TOLUA_DISABLE_tolua_Math_Frustum_UpdatePlanes00
  3460. static int tolua_Math_Frustum_UpdatePlanes00(lua_State* tolua_S)
  3461. {
  3462. #ifndef TOLUA_RELEASE
  3463. tolua_Error tolua_err;
  3464. if (
  3465. !tolua_isusertype(tolua_S,1,"Frustum",0,&tolua_err) ||
  3466. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3467. )
  3468. goto tolua_lerror;
  3469. else
  3470. #endif
  3471. {
  3472. Frustum* self = (Frustum*) tolua_tousertype(tolua_S,1,0);
  3473. #ifndef TOLUA_RELEASE
  3474. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdatePlanes'", NULL);
  3475. #endif
  3476. {
  3477. self->UpdatePlanes();
  3478. }
  3479. }
  3480. return 0;
  3481. #ifndef TOLUA_RELEASE
  3482. tolua_lerror:
  3483. tolua_error(tolua_S,"#ferror in function 'UpdatePlanes'.",&tolua_err);
  3484. return 0;
  3485. #endif
  3486. }
  3487. #endif //#ifndef TOLUA_DISABLE
  3488. /* get function: M_PI */
  3489. #ifndef TOLUA_DISABLE_tolua_get_M_PI
  3490. static int tolua_get_M_PI(lua_State* tolua_S)
  3491. {
  3492. tolua_pushnumber(tolua_S,(lua_Number)M_PI);
  3493. return 1;
  3494. }
  3495. #endif //#ifndef TOLUA_DISABLE
  3496. /* get function: M_MIN_INT */
  3497. #ifndef TOLUA_DISABLE_tolua_get_M_MIN_INT
  3498. static int tolua_get_M_MIN_INT(lua_State* tolua_S)
  3499. {
  3500. tolua_pushnumber(tolua_S,(lua_Number)M_MIN_INT);
  3501. return 1;
  3502. }
  3503. #endif //#ifndef TOLUA_DISABLE
  3504. /* get function: M_MAX_INT */
  3505. #ifndef TOLUA_DISABLE_tolua_get_M_MAX_INT
  3506. static int tolua_get_M_MAX_INT(lua_State* tolua_S)
  3507. {
  3508. tolua_pushnumber(tolua_S,(lua_Number)M_MAX_INT);
  3509. return 1;
  3510. }
  3511. #endif //#ifndef TOLUA_DISABLE
  3512. /* get function: M_MIN_UNSIGNED */
  3513. #ifndef TOLUA_DISABLE_tolua_get_M_MIN_UNSIGNED
  3514. static int tolua_get_M_MIN_UNSIGNED(lua_State* tolua_S)
  3515. {
  3516. tolua_pushnumber(tolua_S,(lua_Number)M_MIN_UNSIGNED);
  3517. return 1;
  3518. }
  3519. #endif //#ifndef TOLUA_DISABLE
  3520. /* get function: M_MAX_UNSIGNED */
  3521. #ifndef TOLUA_DISABLE_tolua_get_M_MAX_UNSIGNED
  3522. static int tolua_get_M_MAX_UNSIGNED(lua_State* tolua_S)
  3523. {
  3524. tolua_pushnumber(tolua_S,(lua_Number)M_MAX_UNSIGNED);
  3525. return 1;
  3526. }
  3527. #endif //#ifndef TOLUA_DISABLE
  3528. /* get function: M_EPSILON */
  3529. #ifndef TOLUA_DISABLE_tolua_get_M_EPSILON
  3530. static int tolua_get_M_EPSILON(lua_State* tolua_S)
  3531. {
  3532. tolua_pushnumber(tolua_S,(lua_Number)M_EPSILON);
  3533. return 1;
  3534. }
  3535. #endif //#ifndef TOLUA_DISABLE
  3536. /* get function: M_LARGE_EPSILON */
  3537. #ifndef TOLUA_DISABLE_tolua_get_M_LARGE_EPSILON
  3538. static int tolua_get_M_LARGE_EPSILON(lua_State* tolua_S)
  3539. {
  3540. tolua_pushnumber(tolua_S,(lua_Number)M_LARGE_EPSILON);
  3541. return 1;
  3542. }
  3543. #endif //#ifndef TOLUA_DISABLE
  3544. /* get function: M_MIN_NEARCLIP */
  3545. #ifndef TOLUA_DISABLE_tolua_get_M_MIN_NEARCLIP
  3546. static int tolua_get_M_MIN_NEARCLIP(lua_State* tolua_S)
  3547. {
  3548. tolua_pushnumber(tolua_S,(lua_Number)M_MIN_NEARCLIP);
  3549. return 1;
  3550. }
  3551. #endif //#ifndef TOLUA_DISABLE
  3552. /* get function: M_MAX_FOV */
  3553. #ifndef TOLUA_DISABLE_tolua_get_M_MAX_FOV
  3554. static int tolua_get_M_MAX_FOV(lua_State* tolua_S)
  3555. {
  3556. tolua_pushnumber(tolua_S,(lua_Number)M_MAX_FOV);
  3557. return 1;
  3558. }
  3559. #endif //#ifndef TOLUA_DISABLE
  3560. /* get function: M_LARGE_VALUE */
  3561. #ifndef TOLUA_DISABLE_tolua_get_M_LARGE_VALUE
  3562. static int tolua_get_M_LARGE_VALUE(lua_State* tolua_S)
  3563. {
  3564. tolua_pushnumber(tolua_S,(lua_Number)M_LARGE_VALUE);
  3565. return 1;
  3566. }
  3567. #endif //#ifndef TOLUA_DISABLE
  3568. /* get function: M_INFINITY */
  3569. #ifndef TOLUA_DISABLE_tolua_get_M_INFINITY
  3570. static int tolua_get_M_INFINITY(lua_State* tolua_S)
  3571. {
  3572. tolua_pushnumber(tolua_S,(lua_Number)M_INFINITY);
  3573. return 1;
  3574. }
  3575. #endif //#ifndef TOLUA_DISABLE
  3576. /* get function: M_DEGTORAD */
  3577. #ifndef TOLUA_DISABLE_tolua_get_M_DEGTORAD
  3578. static int tolua_get_M_DEGTORAD(lua_State* tolua_S)
  3579. {
  3580. tolua_pushnumber(tolua_S,(lua_Number)M_DEGTORAD);
  3581. return 1;
  3582. }
  3583. #endif //#ifndef TOLUA_DISABLE
  3584. /* get function: M_DEGTORAD_2 */
  3585. #ifndef TOLUA_DISABLE_tolua_get_M_DEGTORAD_2
  3586. static int tolua_get_M_DEGTORAD_2(lua_State* tolua_S)
  3587. {
  3588. tolua_pushnumber(tolua_S,(lua_Number)M_DEGTORAD_2);
  3589. return 1;
  3590. }
  3591. #endif //#ifndef TOLUA_DISABLE
  3592. /* get function: M_RADTODEG */
  3593. #ifndef TOLUA_DISABLE_tolua_get_M_RADTODEG
  3594. static int tolua_get_M_RADTODEG(lua_State* tolua_S)
  3595. {
  3596. tolua_pushnumber(tolua_S,(lua_Number)M_RADTODEG);
  3597. return 1;
  3598. }
  3599. #endif //#ifndef TOLUA_DISABLE
  3600. /* function: Lerp */
  3601. #ifndef TOLUA_DISABLE_tolua_Math_Lerp00
  3602. static int tolua_Math_Lerp00(lua_State* tolua_S)
  3603. {
  3604. #ifndef TOLUA_RELEASE
  3605. tolua_Error tolua_err;
  3606. if (
  3607. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3608. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3609. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3610. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3611. )
  3612. goto tolua_lerror;
  3613. else
  3614. #endif
  3615. {
  3616. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3617. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3618. float t = ((float) tolua_tonumber(tolua_S,3,0));
  3619. {
  3620. float tolua_ret = (float) Lerp(lhs,rhs,t);
  3621. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3622. }
  3623. }
  3624. return 1;
  3625. #ifndef TOLUA_RELEASE
  3626. tolua_lerror:
  3627. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  3628. return 0;
  3629. #endif
  3630. }
  3631. #endif //#ifndef TOLUA_DISABLE
  3632. /* function: Min */
  3633. #ifndef TOLUA_DISABLE_tolua_Math_Min00
  3634. static int tolua_Math_Min00(lua_State* tolua_S)
  3635. {
  3636. #ifndef TOLUA_RELEASE
  3637. tolua_Error tolua_err;
  3638. if (
  3639. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3640. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3641. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3642. )
  3643. goto tolua_lerror;
  3644. else
  3645. #endif
  3646. {
  3647. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3648. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3649. {
  3650. float tolua_ret = (float) Min(lhs,rhs);
  3651. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3652. }
  3653. }
  3654. return 1;
  3655. #ifndef TOLUA_RELEASE
  3656. tolua_lerror:
  3657. tolua_error(tolua_S,"#ferror in function 'Min'.",&tolua_err);
  3658. return 0;
  3659. #endif
  3660. }
  3661. #endif //#ifndef TOLUA_DISABLE
  3662. /* function: Max */
  3663. #ifndef TOLUA_DISABLE_tolua_Math_Max00
  3664. static int tolua_Math_Max00(lua_State* tolua_S)
  3665. {
  3666. #ifndef TOLUA_RELEASE
  3667. tolua_Error tolua_err;
  3668. if (
  3669. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3670. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3671. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3672. )
  3673. goto tolua_lerror;
  3674. else
  3675. #endif
  3676. {
  3677. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3678. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3679. {
  3680. float tolua_ret = (float) Max(lhs,rhs);
  3681. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3682. }
  3683. }
  3684. return 1;
  3685. #ifndef TOLUA_RELEASE
  3686. tolua_lerror:
  3687. tolua_error(tolua_S,"#ferror in function 'Max'.",&tolua_err);
  3688. return 0;
  3689. #endif
  3690. }
  3691. #endif //#ifndef TOLUA_DISABLE
  3692. /* function: Abs */
  3693. #ifndef TOLUA_DISABLE_tolua_Math_Abs00
  3694. static int tolua_Math_Abs00(lua_State* tolua_S)
  3695. {
  3696. #ifndef TOLUA_RELEASE
  3697. tolua_Error tolua_err;
  3698. if (
  3699. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3700. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3701. )
  3702. goto tolua_lerror;
  3703. else
  3704. #endif
  3705. {
  3706. float value = ((float) tolua_tonumber(tolua_S,1,0));
  3707. {
  3708. float tolua_ret = (float) Abs(value);
  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 'Abs'.",&tolua_err);
  3716. return 0;
  3717. #endif
  3718. }
  3719. #endif //#ifndef TOLUA_DISABLE
  3720. /* function: Clamp */
  3721. #ifndef TOLUA_DISABLE_tolua_Math_Clamp00
  3722. static int tolua_Math_Clamp00(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_isnumber(tolua_S,3,0,&tolua_err) ||
  3730. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3731. )
  3732. goto tolua_lerror;
  3733. else
  3734. #endif
  3735. {
  3736. float value = ((float) tolua_tonumber(tolua_S,1,0));
  3737. float min = ((float) tolua_tonumber(tolua_S,2,0));
  3738. float max = ((float) tolua_tonumber(tolua_S,3,0));
  3739. {
  3740. float tolua_ret = (float) Clamp(value,min,max);
  3741. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3742. }
  3743. }
  3744. return 1;
  3745. #ifndef TOLUA_RELEASE
  3746. tolua_lerror:
  3747. tolua_error(tolua_S,"#ferror in function 'Clamp'.",&tolua_err);
  3748. return 0;
  3749. #endif
  3750. }
  3751. #endif //#ifndef TOLUA_DISABLE
  3752. /* function: Equals */
  3753. #ifndef TOLUA_DISABLE_tolua_Math_Equals00
  3754. static int tolua_Math_Equals00(lua_State* tolua_S)
  3755. {
  3756. #ifndef TOLUA_RELEASE
  3757. tolua_Error tolua_err;
  3758. if (
  3759. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3760. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3761. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3762. )
  3763. goto tolua_lerror;
  3764. else
  3765. #endif
  3766. {
  3767. float lhs = ((float) tolua_tonumber(tolua_S,1,0));
  3768. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  3769. {
  3770. bool tolua_ret = (bool) Equals(lhs,rhs);
  3771. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3772. }
  3773. }
  3774. return 1;
  3775. #ifndef TOLUA_RELEASE
  3776. tolua_lerror:
  3777. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  3778. return 0;
  3779. #endif
  3780. }
  3781. #endif //#ifndef TOLUA_DISABLE
  3782. /* function: Min */
  3783. #ifndef TOLUA_DISABLE_tolua_Math_Min01
  3784. static int tolua_Math_Min01(lua_State* tolua_S)
  3785. {
  3786. tolua_Error tolua_err;
  3787. if (
  3788. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3789. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3790. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3791. )
  3792. goto tolua_lerror;
  3793. else
  3794. {
  3795. int lhs = ((int) tolua_tonumber(tolua_S,1,0));
  3796. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  3797. {
  3798. int tolua_ret = (int) Min(lhs,rhs);
  3799. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3800. }
  3801. }
  3802. return 1;
  3803. tolua_lerror:
  3804. return tolua_Math_Min00(tolua_S);
  3805. }
  3806. #endif //#ifndef TOLUA_DISABLE
  3807. /* function: Max */
  3808. #ifndef TOLUA_DISABLE_tolua_Math_Max01
  3809. static int tolua_Math_Max01(lua_State* tolua_S)
  3810. {
  3811. tolua_Error tolua_err;
  3812. if (
  3813. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3814. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3815. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3816. )
  3817. goto tolua_lerror;
  3818. else
  3819. {
  3820. int lhs = ((int) tolua_tonumber(tolua_S,1,0));
  3821. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  3822. {
  3823. int tolua_ret = (int) Max(lhs,rhs);
  3824. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3825. }
  3826. }
  3827. return 1;
  3828. tolua_lerror:
  3829. return tolua_Math_Max00(tolua_S);
  3830. }
  3831. #endif //#ifndef TOLUA_DISABLE
  3832. /* function: Abs */
  3833. #ifndef TOLUA_DISABLE_tolua_Math_Abs01
  3834. static int tolua_Math_Abs01(lua_State* tolua_S)
  3835. {
  3836. tolua_Error tolua_err;
  3837. if (
  3838. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3839. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3840. )
  3841. goto tolua_lerror;
  3842. else
  3843. {
  3844. int value = ((int) tolua_tonumber(tolua_S,1,0));
  3845. {
  3846. int tolua_ret = (int) Abs(value);
  3847. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3848. }
  3849. }
  3850. return 1;
  3851. tolua_lerror:
  3852. return tolua_Math_Abs00(tolua_S);
  3853. }
  3854. #endif //#ifndef TOLUA_DISABLE
  3855. /* function: Clamp */
  3856. #ifndef TOLUA_DISABLE_tolua_Math_Clamp01
  3857. static int tolua_Math_Clamp01(lua_State* tolua_S)
  3858. {
  3859. tolua_Error tolua_err;
  3860. if (
  3861. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3862. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3863. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  3864. !tolua_isnoobj(tolua_S,4,&tolua_err)
  3865. )
  3866. goto tolua_lerror;
  3867. else
  3868. {
  3869. int value = ((int) tolua_tonumber(tolua_S,1,0));
  3870. int min = ((int) tolua_tonumber(tolua_S,2,0));
  3871. int max = ((int) tolua_tonumber(tolua_S,3,0));
  3872. {
  3873. int tolua_ret = (int) Clamp(value,min,max);
  3874. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3875. }
  3876. }
  3877. return 1;
  3878. tolua_lerror:
  3879. return tolua_Math_Clamp00(tolua_S);
  3880. }
  3881. #endif //#ifndef TOLUA_DISABLE
  3882. /* function: IsPowerOfTwo */
  3883. #ifndef TOLUA_DISABLE_tolua_Math_IsPowerOfTwo00
  3884. static int tolua_Math_IsPowerOfTwo00(lua_State* tolua_S)
  3885. {
  3886. #ifndef TOLUA_RELEASE
  3887. tolua_Error tolua_err;
  3888. if (
  3889. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3890. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3891. )
  3892. goto tolua_lerror;
  3893. else
  3894. #endif
  3895. {
  3896. unsigned value = ((unsigned) tolua_tonumber(tolua_S,1,0));
  3897. {
  3898. bool tolua_ret = (bool) IsPowerOfTwo(value);
  3899. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3900. }
  3901. }
  3902. return 1;
  3903. #ifndef TOLUA_RELEASE
  3904. tolua_lerror:
  3905. tolua_error(tolua_S,"#ferror in function 'IsPowerOfTwo'.",&tolua_err);
  3906. return 0;
  3907. #endif
  3908. }
  3909. #endif //#ifndef TOLUA_DISABLE
  3910. /* function: NextPowerOfTwo */
  3911. #ifndef TOLUA_DISABLE_tolua_Math_NextPowerOfTwo00
  3912. static int tolua_Math_NextPowerOfTwo00(lua_State* tolua_S)
  3913. {
  3914. #ifndef TOLUA_RELEASE
  3915. tolua_Error tolua_err;
  3916. if (
  3917. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3918. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3919. )
  3920. goto tolua_lerror;
  3921. else
  3922. #endif
  3923. {
  3924. unsigned value = ((unsigned) tolua_tonumber(tolua_S,1,0));
  3925. {
  3926. unsigned tolua_ret = (unsigned) NextPowerOfTwo(value);
  3927. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3928. }
  3929. }
  3930. return 1;
  3931. #ifndef TOLUA_RELEASE
  3932. tolua_lerror:
  3933. tolua_error(tolua_S,"#ferror in function 'NextPowerOfTwo'.",&tolua_err);
  3934. return 0;
  3935. #endif
  3936. }
  3937. #endif //#ifndef TOLUA_DISABLE
  3938. /* function: SDBMHash */
  3939. #ifndef TOLUA_DISABLE_tolua_Math_SDBMHash00
  3940. static int tolua_Math_SDBMHash00(lua_State* tolua_S)
  3941. {
  3942. #ifndef TOLUA_RELEASE
  3943. tolua_Error tolua_err;
  3944. if (
  3945. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  3946. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3947. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3948. )
  3949. goto tolua_lerror;
  3950. else
  3951. #endif
  3952. {
  3953. unsigned hash = ((unsigned) tolua_tonumber(tolua_S,1,0));
  3954. unsigned char c = ((unsigned char) tolua_tonumber(tolua_S,2,0));
  3955. {
  3956. unsigned tolua_ret = (unsigned) SDBMHash(hash,c);
  3957. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3958. }
  3959. }
  3960. return 1;
  3961. #ifndef TOLUA_RELEASE
  3962. tolua_lerror:
  3963. tolua_error(tolua_S,"#ferror in function 'SDBMHash'.",&tolua_err);
  3964. return 0;
  3965. #endif
  3966. }
  3967. #endif //#ifndef TOLUA_DISABLE
  3968. /* function: Random */
  3969. #ifndef TOLUA_DISABLE_tolua_Math_Random00
  3970. static int tolua_Math_Random00(lua_State* tolua_S)
  3971. {
  3972. #ifndef TOLUA_RELEASE
  3973. tolua_Error tolua_err;
  3974. if (
  3975. !tolua_isnoobj(tolua_S,1,&tolua_err)
  3976. )
  3977. goto tolua_lerror;
  3978. else
  3979. #endif
  3980. {
  3981. {
  3982. float tolua_ret = (float) Random();
  3983. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3984. }
  3985. }
  3986. return 1;
  3987. #ifndef TOLUA_RELEASE
  3988. tolua_lerror:
  3989. tolua_error(tolua_S,"#ferror in function 'Random'.",&tolua_err);
  3990. return 0;
  3991. #endif
  3992. }
  3993. #endif //#ifndef TOLUA_DISABLE
  3994. /* function: Random */
  3995. #ifndef TOLUA_DISABLE_tolua_Math_Random01
  3996. static int tolua_Math_Random01(lua_State* tolua_S)
  3997. {
  3998. tolua_Error tolua_err;
  3999. if (
  4000. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  4001. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4002. )
  4003. goto tolua_lerror;
  4004. else
  4005. {
  4006. float range = ((float) tolua_tonumber(tolua_S,1,0));
  4007. {
  4008. float tolua_ret = (float) Random(range);
  4009. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4010. }
  4011. }
  4012. return 1;
  4013. tolua_lerror:
  4014. return tolua_Math_Random00(tolua_S);
  4015. }
  4016. #endif //#ifndef TOLUA_DISABLE
  4017. /* function: Random */
  4018. #ifndef TOLUA_DISABLE_tolua_Math_RandomInt00
  4019. static int tolua_Math_RandomInt00(lua_State* tolua_S)
  4020. {
  4021. #ifndef TOLUA_RELEASE
  4022. tolua_Error tolua_err;
  4023. if (
  4024. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  4025. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4026. )
  4027. goto tolua_lerror;
  4028. else
  4029. #endif
  4030. {
  4031. int range = ((int) tolua_tonumber(tolua_S,1,0));
  4032. {
  4033. int tolua_ret = (int) Random(range);
  4034. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  4035. }
  4036. }
  4037. return 1;
  4038. #ifndef TOLUA_RELEASE
  4039. tolua_lerror:
  4040. tolua_error(tolua_S,"#ferror in function 'RandomInt'.",&tolua_err);
  4041. return 0;
  4042. #endif
  4043. }
  4044. #endif //#ifndef TOLUA_DISABLE
  4045. /* method: new of class Matrix3 */
  4046. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new00
  4047. static int tolua_Math_Matrix3_new00(lua_State* tolua_S)
  4048. {
  4049. #ifndef TOLUA_RELEASE
  4050. tolua_Error tolua_err;
  4051. if (
  4052. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4053. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4054. )
  4055. goto tolua_lerror;
  4056. else
  4057. #endif
  4058. {
  4059. {
  4060. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)());
  4061. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4062. }
  4063. }
  4064. return 1;
  4065. #ifndef TOLUA_RELEASE
  4066. tolua_lerror:
  4067. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  4068. return 0;
  4069. #endif
  4070. }
  4071. #endif //#ifndef TOLUA_DISABLE
  4072. /* method: new_local of class Matrix3 */
  4073. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new00_local
  4074. static int tolua_Math_Matrix3_new00_local(lua_State* tolua_S)
  4075. {
  4076. #ifndef TOLUA_RELEASE
  4077. tolua_Error tolua_err;
  4078. if (
  4079. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4080. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4081. )
  4082. goto tolua_lerror;
  4083. else
  4084. #endif
  4085. {
  4086. {
  4087. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)());
  4088. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4089. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4090. }
  4091. }
  4092. return 1;
  4093. #ifndef TOLUA_RELEASE
  4094. tolua_lerror:
  4095. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  4096. return 0;
  4097. #endif
  4098. }
  4099. #endif //#ifndef TOLUA_DISABLE
  4100. /* method: new of class Matrix3 */
  4101. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new01
  4102. static int tolua_Math_Matrix3_new01(lua_State* tolua_S)
  4103. {
  4104. tolua_Error tolua_err;
  4105. if (
  4106. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4107. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4108. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4109. )
  4110. goto tolua_lerror;
  4111. else
  4112. {
  4113. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4114. {
  4115. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(*matrix));
  4116. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4117. }
  4118. }
  4119. return 1;
  4120. tolua_lerror:
  4121. return tolua_Math_Matrix3_new00(tolua_S);
  4122. }
  4123. #endif //#ifndef TOLUA_DISABLE
  4124. /* method: new_local of class Matrix3 */
  4125. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new01_local
  4126. static int tolua_Math_Matrix3_new01_local(lua_State* tolua_S)
  4127. {
  4128. tolua_Error tolua_err;
  4129. if (
  4130. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4131. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4132. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4133. )
  4134. goto tolua_lerror;
  4135. else
  4136. {
  4137. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4138. {
  4139. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(*matrix));
  4140. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4141. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4142. }
  4143. }
  4144. return 1;
  4145. tolua_lerror:
  4146. return tolua_Math_Matrix3_new00_local(tolua_S);
  4147. }
  4148. #endif //#ifndef TOLUA_DISABLE
  4149. /* method: new of class Matrix3 */
  4150. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new02
  4151. static int tolua_Math_Matrix3_new02(lua_State* tolua_S)
  4152. {
  4153. tolua_Error tolua_err;
  4154. if (
  4155. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4156. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4157. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  4158. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  4159. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  4160. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  4161. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  4162. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  4163. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  4164. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  4165. !tolua_isnoobj(tolua_S,11,&tolua_err)
  4166. )
  4167. goto tolua_lerror;
  4168. else
  4169. {
  4170. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  4171. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  4172. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  4173. float v10 = ((float) tolua_tonumber(tolua_S,5,0));
  4174. float v11 = ((float) tolua_tonumber(tolua_S,6,0));
  4175. float v12 = ((float) tolua_tonumber(tolua_S,7,0));
  4176. float v20 = ((float) tolua_tonumber(tolua_S,8,0));
  4177. float v21 = ((float) tolua_tonumber(tolua_S,9,0));
  4178. float v22 = ((float) tolua_tonumber(tolua_S,10,0));
  4179. {
  4180. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(v00,v01,v02,v10,v11,v12,v20,v21,v22));
  4181. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4182. }
  4183. }
  4184. return 1;
  4185. tolua_lerror:
  4186. return tolua_Math_Matrix3_new01(tolua_S);
  4187. }
  4188. #endif //#ifndef TOLUA_DISABLE
  4189. /* method: new_local of class Matrix3 */
  4190. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_new02_local
  4191. static int tolua_Math_Matrix3_new02_local(lua_State* tolua_S)
  4192. {
  4193. tolua_Error tolua_err;
  4194. if (
  4195. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4196. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4197. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  4198. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  4199. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  4200. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  4201. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  4202. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  4203. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  4204. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  4205. !tolua_isnoobj(tolua_S,11,&tolua_err)
  4206. )
  4207. goto tolua_lerror;
  4208. else
  4209. {
  4210. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  4211. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  4212. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  4213. float v10 = ((float) tolua_tonumber(tolua_S,5,0));
  4214. float v11 = ((float) tolua_tonumber(tolua_S,6,0));
  4215. float v12 = ((float) tolua_tonumber(tolua_S,7,0));
  4216. float v20 = ((float) tolua_tonumber(tolua_S,8,0));
  4217. float v21 = ((float) tolua_tonumber(tolua_S,9,0));
  4218. float v22 = ((float) tolua_tonumber(tolua_S,10,0));
  4219. {
  4220. Matrix3* tolua_ret = (Matrix3*) Mtolua_new((Matrix3)(v00,v01,v02,v10,v11,v12,v20,v21,v22));
  4221. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3");
  4222. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4223. }
  4224. }
  4225. return 1;
  4226. tolua_lerror:
  4227. return tolua_Math_Matrix3_new01_local(tolua_S);
  4228. }
  4229. #endif //#ifndef TOLUA_DISABLE
  4230. /* method: operator== of class Matrix3 */
  4231. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__eq00
  4232. static int tolua_Math_Matrix3__eq00(lua_State* tolua_S)
  4233. {
  4234. #ifndef TOLUA_RELEASE
  4235. tolua_Error tolua_err;
  4236. if (
  4237. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4238. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4239. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4240. )
  4241. goto tolua_lerror;
  4242. else
  4243. #endif
  4244. {
  4245. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4246. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4247. #ifndef TOLUA_RELEASE
  4248. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  4249. #endif
  4250. {
  4251. bool tolua_ret = (bool) self->operator==(*rhs);
  4252. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  4253. }
  4254. }
  4255. return 1;
  4256. #ifndef TOLUA_RELEASE
  4257. tolua_lerror:
  4258. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  4259. return 0;
  4260. #endif
  4261. }
  4262. #endif //#ifndef TOLUA_DISABLE
  4263. /* method: operator* of class Matrix3 */
  4264. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__mul00
  4265. static int tolua_Math_Matrix3__mul00(lua_State* tolua_S)
  4266. {
  4267. #ifndef TOLUA_RELEASE
  4268. tolua_Error tolua_err;
  4269. if (
  4270. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4271. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4272. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4273. )
  4274. goto tolua_lerror;
  4275. else
  4276. #endif
  4277. {
  4278. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4279. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4280. #ifndef TOLUA_RELEASE
  4281. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  4282. #endif
  4283. {
  4284. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  4285. {
  4286. #ifdef __cplusplus
  4287. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  4288. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4289. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4290. #else
  4291. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  4292. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4293. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4294. #endif
  4295. }
  4296. }
  4297. }
  4298. return 1;
  4299. #ifndef TOLUA_RELEASE
  4300. tolua_lerror:
  4301. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  4302. return 0;
  4303. #endif
  4304. }
  4305. #endif //#ifndef TOLUA_DISABLE
  4306. /* method: operator+ of class Matrix3 */
  4307. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__add00
  4308. static int tolua_Math_Matrix3__add00(lua_State* tolua_S)
  4309. {
  4310. #ifndef TOLUA_RELEASE
  4311. tolua_Error tolua_err;
  4312. if (
  4313. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4314. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4315. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4316. )
  4317. goto tolua_lerror;
  4318. else
  4319. #endif
  4320. {
  4321. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4322. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4323. #ifndef TOLUA_RELEASE
  4324. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  4325. #endif
  4326. {
  4327. Matrix3 tolua_ret = (Matrix3) self->operator+(*rhs);
  4328. {
  4329. #ifdef __cplusplus
  4330. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4331. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4332. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4333. #else
  4334. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4335. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4336. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4337. #endif
  4338. }
  4339. }
  4340. }
  4341. return 1;
  4342. #ifndef TOLUA_RELEASE
  4343. tolua_lerror:
  4344. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  4345. return 0;
  4346. #endif
  4347. }
  4348. #endif //#ifndef TOLUA_DISABLE
  4349. /* method: operator- of class Matrix3 */
  4350. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__sub00
  4351. static int tolua_Math_Matrix3__sub00(lua_State* tolua_S)
  4352. {
  4353. #ifndef TOLUA_RELEASE
  4354. tolua_Error tolua_err;
  4355. if (
  4356. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4357. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4358. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4359. )
  4360. goto tolua_lerror;
  4361. else
  4362. #endif
  4363. {
  4364. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4365. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4366. #ifndef TOLUA_RELEASE
  4367. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  4368. #endif
  4369. {
  4370. Matrix3 tolua_ret = (Matrix3) self->operator-(*rhs);
  4371. {
  4372. #ifdef __cplusplus
  4373. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4374. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4375. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4376. #else
  4377. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4378. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4379. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4380. #endif
  4381. }
  4382. }
  4383. }
  4384. return 1;
  4385. #ifndef TOLUA_RELEASE
  4386. tolua_lerror:
  4387. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  4388. return 0;
  4389. #endif
  4390. }
  4391. #endif //#ifndef TOLUA_DISABLE
  4392. /* method: operator* of class Matrix3 */
  4393. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__mul01
  4394. static int tolua_Math_Matrix3__mul01(lua_State* tolua_S)
  4395. {
  4396. tolua_Error tolua_err;
  4397. if (
  4398. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4399. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4400. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4401. )
  4402. goto tolua_lerror;
  4403. else
  4404. {
  4405. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4406. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  4407. #ifndef TOLUA_RELEASE
  4408. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  4409. #endif
  4410. {
  4411. Matrix3 tolua_ret = (Matrix3) self->operator*(rhs);
  4412. {
  4413. #ifdef __cplusplus
  4414. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4415. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4416. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4417. #else
  4418. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4419. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4420. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4421. #endif
  4422. }
  4423. }
  4424. }
  4425. return 1;
  4426. tolua_lerror:
  4427. return tolua_Math_Matrix3__mul00(tolua_S);
  4428. }
  4429. #endif //#ifndef TOLUA_DISABLE
  4430. /* method: operator* of class Matrix3 */
  4431. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3__mul02
  4432. static int tolua_Math_Matrix3__mul02(lua_State* tolua_S)
  4433. {
  4434. tolua_Error tolua_err;
  4435. if (
  4436. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4437. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4438. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4439. )
  4440. goto tolua_lerror;
  4441. else
  4442. {
  4443. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4444. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4445. #ifndef TOLUA_RELEASE
  4446. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  4447. #endif
  4448. {
  4449. Matrix3 tolua_ret = (Matrix3) self->operator*(*rhs);
  4450. {
  4451. #ifdef __cplusplus
  4452. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4453. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4454. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4455. #else
  4456. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4457. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4458. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4459. #endif
  4460. }
  4461. }
  4462. }
  4463. return 1;
  4464. tolua_lerror:
  4465. return tolua_Math_Matrix3__mul01(tolua_S);
  4466. }
  4467. #endif //#ifndef TOLUA_DISABLE
  4468. /* method: SetScale of class Matrix3 */
  4469. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_SetScale00
  4470. static int tolua_Math_Matrix3_SetScale00(lua_State* tolua_S)
  4471. {
  4472. #ifndef TOLUA_RELEASE
  4473. tolua_Error tolua_err;
  4474. if (
  4475. !tolua_isusertype(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4476. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4477. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4478. )
  4479. goto tolua_lerror;
  4480. else
  4481. #endif
  4482. {
  4483. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4484. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4485. #ifndef TOLUA_RELEASE
  4486. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  4487. #endif
  4488. {
  4489. self->SetScale(*scale);
  4490. }
  4491. }
  4492. return 0;
  4493. #ifndef TOLUA_RELEASE
  4494. tolua_lerror:
  4495. tolua_error(tolua_S,"#ferror in function 'SetScale'.",&tolua_err);
  4496. return 0;
  4497. #endif
  4498. }
  4499. #endif //#ifndef TOLUA_DISABLE
  4500. /* method: SetScale of class Matrix3 */
  4501. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_SetScale01
  4502. static int tolua_Math_Matrix3_SetScale01(lua_State* tolua_S)
  4503. {
  4504. tolua_Error tolua_err;
  4505. if (
  4506. !tolua_isusertype(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4507. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4508. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4509. )
  4510. goto tolua_lerror;
  4511. else
  4512. {
  4513. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4514. float scale = ((float) tolua_tonumber(tolua_S,2,0));
  4515. #ifndef TOLUA_RELEASE
  4516. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  4517. #endif
  4518. {
  4519. self->SetScale(scale);
  4520. }
  4521. }
  4522. return 0;
  4523. tolua_lerror:
  4524. return tolua_Math_Matrix3_SetScale00(tolua_S);
  4525. }
  4526. #endif //#ifndef TOLUA_DISABLE
  4527. /* method: Scale of class Matrix3 */
  4528. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Scale00
  4529. static int tolua_Math_Matrix3_Scale00(lua_State* tolua_S)
  4530. {
  4531. #ifndef TOLUA_RELEASE
  4532. tolua_Error tolua_err;
  4533. if (
  4534. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4535. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4536. )
  4537. goto tolua_lerror;
  4538. else
  4539. #endif
  4540. {
  4541. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4542. #ifndef TOLUA_RELEASE
  4543. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL);
  4544. #endif
  4545. {
  4546. Vector3 tolua_ret = (Vector3) self->Scale();
  4547. {
  4548. #ifdef __cplusplus
  4549. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  4550. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4551. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4552. #else
  4553. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  4554. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  4555. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4556. #endif
  4557. }
  4558. }
  4559. }
  4560. return 1;
  4561. #ifndef TOLUA_RELEASE
  4562. tolua_lerror:
  4563. tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err);
  4564. return 0;
  4565. #endif
  4566. }
  4567. #endif //#ifndef TOLUA_DISABLE
  4568. /* method: Transpose of class Matrix3 */
  4569. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Transpose00
  4570. static int tolua_Math_Matrix3_Transpose00(lua_State* tolua_S)
  4571. {
  4572. #ifndef TOLUA_RELEASE
  4573. tolua_Error tolua_err;
  4574. if (
  4575. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4576. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4577. )
  4578. goto tolua_lerror;
  4579. else
  4580. #endif
  4581. {
  4582. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4583. #ifndef TOLUA_RELEASE
  4584. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transpose'", NULL);
  4585. #endif
  4586. {
  4587. Matrix3 tolua_ret = (Matrix3) self->Transpose();
  4588. {
  4589. #ifdef __cplusplus
  4590. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4591. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4592. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4593. #else
  4594. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4595. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4596. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4597. #endif
  4598. }
  4599. }
  4600. }
  4601. return 1;
  4602. #ifndef TOLUA_RELEASE
  4603. tolua_lerror:
  4604. tolua_error(tolua_S,"#ferror in function 'Transpose'.",&tolua_err);
  4605. return 0;
  4606. #endif
  4607. }
  4608. #endif //#ifndef TOLUA_DISABLE
  4609. /* method: Scaled of class Matrix3 */
  4610. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Scaled00
  4611. static int tolua_Math_Matrix3_Scaled00(lua_State* tolua_S)
  4612. {
  4613. #ifndef TOLUA_RELEASE
  4614. tolua_Error tolua_err;
  4615. if (
  4616. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4617. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4618. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4619. )
  4620. goto tolua_lerror;
  4621. else
  4622. #endif
  4623. {
  4624. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4625. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4626. #ifndef TOLUA_RELEASE
  4627. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scaled'", NULL);
  4628. #endif
  4629. {
  4630. Matrix3 tolua_ret = (Matrix3) self->Scaled(*scale);
  4631. {
  4632. #ifdef __cplusplus
  4633. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4634. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4635. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4636. #else
  4637. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4638. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4639. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4640. #endif
  4641. }
  4642. }
  4643. }
  4644. return 1;
  4645. #ifndef TOLUA_RELEASE
  4646. tolua_lerror:
  4647. tolua_error(tolua_S,"#ferror in function 'Scaled'.",&tolua_err);
  4648. return 0;
  4649. #endif
  4650. }
  4651. #endif //#ifndef TOLUA_DISABLE
  4652. /* method: Equals of class Matrix3 */
  4653. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Equals00
  4654. static int tolua_Math_Matrix3_Equals00(lua_State* tolua_S)
  4655. {
  4656. #ifndef TOLUA_RELEASE
  4657. tolua_Error tolua_err;
  4658. if (
  4659. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4660. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  4661. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4662. )
  4663. goto tolua_lerror;
  4664. else
  4665. #endif
  4666. {
  4667. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4668. const Matrix3* rhs = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  4669. #ifndef TOLUA_RELEASE
  4670. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  4671. #endif
  4672. {
  4673. bool tolua_ret = (bool) self->Equals(*rhs);
  4674. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  4675. }
  4676. }
  4677. return 1;
  4678. #ifndef TOLUA_RELEASE
  4679. tolua_lerror:
  4680. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  4681. return 0;
  4682. #endif
  4683. }
  4684. #endif //#ifndef TOLUA_DISABLE
  4685. /* method: Inverse of class Matrix3 */
  4686. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_Inverse00
  4687. static int tolua_Math_Matrix3_Inverse00(lua_State* tolua_S)
  4688. {
  4689. #ifndef TOLUA_RELEASE
  4690. tolua_Error tolua_err;
  4691. if (
  4692. !tolua_isusertype(tolua_S,1,"const Matrix3",0,&tolua_err) ||
  4693. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4694. )
  4695. goto tolua_lerror;
  4696. else
  4697. #endif
  4698. {
  4699. const Matrix3* self = (const Matrix3*) tolua_tousertype(tolua_S,1,0);
  4700. #ifndef TOLUA_RELEASE
  4701. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  4702. #endif
  4703. {
  4704. Matrix3 tolua_ret = (Matrix3) self->Inverse();
  4705. {
  4706. #ifdef __cplusplus
  4707. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  4708. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4709. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4710. #else
  4711. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  4712. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  4713. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  4714. #endif
  4715. }
  4716. }
  4717. }
  4718. return 1;
  4719. #ifndef TOLUA_RELEASE
  4720. tolua_lerror:
  4721. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  4722. return 0;
  4723. #endif
  4724. }
  4725. #endif //#ifndef TOLUA_DISABLE
  4726. /* get function: m00_ of class Matrix3 */
  4727. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m00
  4728. static int tolua_get_Matrix3_m00(lua_State* tolua_S)
  4729. {
  4730. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4731. #ifndef TOLUA_RELEASE
  4732. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  4733. #endif
  4734. tolua_pushnumber(tolua_S,(lua_Number)self->m00_);
  4735. return 1;
  4736. }
  4737. #endif //#ifndef TOLUA_DISABLE
  4738. /* set function: m00_ of class Matrix3 */
  4739. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m00
  4740. static int tolua_set_Matrix3_m00(lua_State* tolua_S)
  4741. {
  4742. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4743. #ifndef TOLUA_RELEASE
  4744. tolua_Error tolua_err;
  4745. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  4746. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4747. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4748. #endif
  4749. self->m00_ = ((float) tolua_tonumber(tolua_S,2,0))
  4750. ;
  4751. return 0;
  4752. }
  4753. #endif //#ifndef TOLUA_DISABLE
  4754. /* get function: m01_ of class Matrix3 */
  4755. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m01
  4756. static int tolua_get_Matrix3_m01(lua_State* tolua_S)
  4757. {
  4758. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4759. #ifndef TOLUA_RELEASE
  4760. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  4761. #endif
  4762. tolua_pushnumber(tolua_S,(lua_Number)self->m01_);
  4763. return 1;
  4764. }
  4765. #endif //#ifndef TOLUA_DISABLE
  4766. /* set function: m01_ of class Matrix3 */
  4767. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m01
  4768. static int tolua_set_Matrix3_m01(lua_State* tolua_S)
  4769. {
  4770. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4771. #ifndef TOLUA_RELEASE
  4772. tolua_Error tolua_err;
  4773. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  4774. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4775. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4776. #endif
  4777. self->m01_ = ((float) tolua_tonumber(tolua_S,2,0))
  4778. ;
  4779. return 0;
  4780. }
  4781. #endif //#ifndef TOLUA_DISABLE
  4782. /* get function: m02_ of class Matrix3 */
  4783. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m02
  4784. static int tolua_get_Matrix3_m02(lua_State* tolua_S)
  4785. {
  4786. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4787. #ifndef TOLUA_RELEASE
  4788. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  4789. #endif
  4790. tolua_pushnumber(tolua_S,(lua_Number)self->m02_);
  4791. return 1;
  4792. }
  4793. #endif //#ifndef TOLUA_DISABLE
  4794. /* set function: m02_ of class Matrix3 */
  4795. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m02
  4796. static int tolua_set_Matrix3_m02(lua_State* tolua_S)
  4797. {
  4798. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4799. #ifndef TOLUA_RELEASE
  4800. tolua_Error tolua_err;
  4801. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  4802. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4803. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4804. #endif
  4805. self->m02_ = ((float) tolua_tonumber(tolua_S,2,0))
  4806. ;
  4807. return 0;
  4808. }
  4809. #endif //#ifndef TOLUA_DISABLE
  4810. /* get function: m10_ of class Matrix3 */
  4811. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m10
  4812. static int tolua_get_Matrix3_m10(lua_State* tolua_S)
  4813. {
  4814. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4815. #ifndef TOLUA_RELEASE
  4816. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  4817. #endif
  4818. tolua_pushnumber(tolua_S,(lua_Number)self->m10_);
  4819. return 1;
  4820. }
  4821. #endif //#ifndef TOLUA_DISABLE
  4822. /* set function: m10_ of class Matrix3 */
  4823. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m10
  4824. static int tolua_set_Matrix3_m10(lua_State* tolua_S)
  4825. {
  4826. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4827. #ifndef TOLUA_RELEASE
  4828. tolua_Error tolua_err;
  4829. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  4830. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4831. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4832. #endif
  4833. self->m10_ = ((float) tolua_tonumber(tolua_S,2,0))
  4834. ;
  4835. return 0;
  4836. }
  4837. #endif //#ifndef TOLUA_DISABLE
  4838. /* get function: m11_ of class Matrix3 */
  4839. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m11
  4840. static int tolua_get_Matrix3_m11(lua_State* tolua_S)
  4841. {
  4842. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4843. #ifndef TOLUA_RELEASE
  4844. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  4845. #endif
  4846. tolua_pushnumber(tolua_S,(lua_Number)self->m11_);
  4847. return 1;
  4848. }
  4849. #endif //#ifndef TOLUA_DISABLE
  4850. /* set function: m11_ of class Matrix3 */
  4851. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m11
  4852. static int tolua_set_Matrix3_m11(lua_State* tolua_S)
  4853. {
  4854. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4855. #ifndef TOLUA_RELEASE
  4856. tolua_Error tolua_err;
  4857. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  4858. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4859. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4860. #endif
  4861. self->m11_ = ((float) tolua_tonumber(tolua_S,2,0))
  4862. ;
  4863. return 0;
  4864. }
  4865. #endif //#ifndef TOLUA_DISABLE
  4866. /* get function: m12_ of class Matrix3 */
  4867. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m12
  4868. static int tolua_get_Matrix3_m12(lua_State* tolua_S)
  4869. {
  4870. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4871. #ifndef TOLUA_RELEASE
  4872. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  4873. #endif
  4874. tolua_pushnumber(tolua_S,(lua_Number)self->m12_);
  4875. return 1;
  4876. }
  4877. #endif //#ifndef TOLUA_DISABLE
  4878. /* set function: m12_ of class Matrix3 */
  4879. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m12
  4880. static int tolua_set_Matrix3_m12(lua_State* tolua_S)
  4881. {
  4882. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4883. #ifndef TOLUA_RELEASE
  4884. tolua_Error tolua_err;
  4885. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  4886. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4887. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4888. #endif
  4889. self->m12_ = ((float) tolua_tonumber(tolua_S,2,0))
  4890. ;
  4891. return 0;
  4892. }
  4893. #endif //#ifndef TOLUA_DISABLE
  4894. /* get function: m20_ of class Matrix3 */
  4895. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m20
  4896. static int tolua_get_Matrix3_m20(lua_State* tolua_S)
  4897. {
  4898. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4899. #ifndef TOLUA_RELEASE
  4900. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  4901. #endif
  4902. tolua_pushnumber(tolua_S,(lua_Number)self->m20_);
  4903. return 1;
  4904. }
  4905. #endif //#ifndef TOLUA_DISABLE
  4906. /* set function: m20_ of class Matrix3 */
  4907. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m20
  4908. static int tolua_set_Matrix3_m20(lua_State* tolua_S)
  4909. {
  4910. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4911. #ifndef TOLUA_RELEASE
  4912. tolua_Error tolua_err;
  4913. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  4914. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4915. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4916. #endif
  4917. self->m20_ = ((float) tolua_tonumber(tolua_S,2,0))
  4918. ;
  4919. return 0;
  4920. }
  4921. #endif //#ifndef TOLUA_DISABLE
  4922. /* get function: m21_ of class Matrix3 */
  4923. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m21
  4924. static int tolua_get_Matrix3_m21(lua_State* tolua_S)
  4925. {
  4926. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4927. #ifndef TOLUA_RELEASE
  4928. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  4929. #endif
  4930. tolua_pushnumber(tolua_S,(lua_Number)self->m21_);
  4931. return 1;
  4932. }
  4933. #endif //#ifndef TOLUA_DISABLE
  4934. /* set function: m21_ of class Matrix3 */
  4935. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m21
  4936. static int tolua_set_Matrix3_m21(lua_State* tolua_S)
  4937. {
  4938. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4939. #ifndef TOLUA_RELEASE
  4940. tolua_Error tolua_err;
  4941. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  4942. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4943. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4944. #endif
  4945. self->m21_ = ((float) tolua_tonumber(tolua_S,2,0))
  4946. ;
  4947. return 0;
  4948. }
  4949. #endif //#ifndef TOLUA_DISABLE
  4950. /* get function: m22_ of class Matrix3 */
  4951. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_m22
  4952. static int tolua_get_Matrix3_m22(lua_State* tolua_S)
  4953. {
  4954. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4955. #ifndef TOLUA_RELEASE
  4956. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  4957. #endif
  4958. tolua_pushnumber(tolua_S,(lua_Number)self->m22_);
  4959. return 1;
  4960. }
  4961. #endif //#ifndef TOLUA_DISABLE
  4962. /* set function: m22_ of class Matrix3 */
  4963. #ifndef TOLUA_DISABLE_tolua_set_Matrix3_m22
  4964. static int tolua_set_Matrix3_m22(lua_State* tolua_S)
  4965. {
  4966. Matrix3* self = (Matrix3*) tolua_tousertype(tolua_S,1,0);
  4967. #ifndef TOLUA_RELEASE
  4968. tolua_Error tolua_err;
  4969. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  4970. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  4971. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  4972. #endif
  4973. self->m22_ = ((float) tolua_tonumber(tolua_S,2,0))
  4974. ;
  4975. return 0;
  4976. }
  4977. #endif //#ifndef TOLUA_DISABLE
  4978. /* method: BulkTranspose of class Matrix3 */
  4979. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3_BulkTranspose00
  4980. static int tolua_Math_Matrix3_BulkTranspose00(lua_State* tolua_S)
  4981. {
  4982. #ifndef TOLUA_RELEASE
  4983. tolua_Error tolua_err;
  4984. if (
  4985. !tolua_isusertable(tolua_S,1,"Matrix3",0,&tolua_err) ||
  4986. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4987. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  4988. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  4989. !tolua_isnoobj(tolua_S,5,&tolua_err)
  4990. )
  4991. goto tolua_lerror;
  4992. else
  4993. #endif
  4994. {
  4995. float dest = ((float) tolua_tonumber(tolua_S,2,0));
  4996. const float src = ((const float) tolua_tonumber(tolua_S,3,0));
  4997. unsigned count = ((unsigned) tolua_tonumber(tolua_S,4,0));
  4998. {
  4999. Matrix3::BulkTranspose(&dest,&src,count);
  5000. tolua_pushnumber(tolua_S,(lua_Number)dest);
  5001. tolua_pushnumber(tolua_S,(lua_Number)src);
  5002. }
  5003. }
  5004. return 2;
  5005. #ifndef TOLUA_RELEASE
  5006. tolua_lerror:
  5007. tolua_error(tolua_S,"#ferror in function 'BulkTranspose'.",&tolua_err);
  5008. return 0;
  5009. #endif
  5010. }
  5011. #endif //#ifndef TOLUA_DISABLE
  5012. /* get function: ZERO of class Matrix3 */
  5013. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_ZERO
  5014. static int tolua_get_Matrix3_ZERO(lua_State* tolua_S)
  5015. {
  5016. tolua_pushusertype(tolua_S,(void*)&Matrix3::ZERO,"const Matrix3");
  5017. return 1;
  5018. }
  5019. #endif //#ifndef TOLUA_DISABLE
  5020. /* get function: IDENTITY of class Matrix3 */
  5021. #ifndef TOLUA_DISABLE_tolua_get_Matrix3_IDENTITY
  5022. static int tolua_get_Matrix3_IDENTITY(lua_State* tolua_S)
  5023. {
  5024. tolua_pushusertype(tolua_S,(void*)&Matrix3::IDENTITY,"const Matrix3");
  5025. return 1;
  5026. }
  5027. #endif //#ifndef TOLUA_DISABLE
  5028. /* method: new of class Matrix3x4 */
  5029. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new00
  5030. static int tolua_Math_Matrix3x4_new00(lua_State* tolua_S)
  5031. {
  5032. #ifndef TOLUA_RELEASE
  5033. tolua_Error tolua_err;
  5034. if (
  5035. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5036. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5037. )
  5038. goto tolua_lerror;
  5039. else
  5040. #endif
  5041. {
  5042. {
  5043. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)());
  5044. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5045. }
  5046. }
  5047. return 1;
  5048. #ifndef TOLUA_RELEASE
  5049. tolua_lerror:
  5050. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  5051. return 0;
  5052. #endif
  5053. }
  5054. #endif //#ifndef TOLUA_DISABLE
  5055. /* method: new_local of class Matrix3x4 */
  5056. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new00_local
  5057. static int tolua_Math_Matrix3x4_new00_local(lua_State* tolua_S)
  5058. {
  5059. #ifndef TOLUA_RELEASE
  5060. tolua_Error tolua_err;
  5061. if (
  5062. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5063. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5064. )
  5065. goto tolua_lerror;
  5066. else
  5067. #endif
  5068. {
  5069. {
  5070. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)());
  5071. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5072. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5073. }
  5074. }
  5075. return 1;
  5076. #ifndef TOLUA_RELEASE
  5077. tolua_lerror:
  5078. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  5079. return 0;
  5080. #endif
  5081. }
  5082. #endif //#ifndef TOLUA_DISABLE
  5083. /* method: new of class Matrix3x4 */
  5084. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new01
  5085. static int tolua_Math_Matrix3x4_new01(lua_State* tolua_S)
  5086. {
  5087. tolua_Error tolua_err;
  5088. if (
  5089. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5090. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5091. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5092. )
  5093. goto tolua_lerror;
  5094. else
  5095. {
  5096. const Matrix3x4* matrix = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5097. {
  5098. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5099. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5100. }
  5101. }
  5102. return 1;
  5103. tolua_lerror:
  5104. return tolua_Math_Matrix3x4_new00(tolua_S);
  5105. }
  5106. #endif //#ifndef TOLUA_DISABLE
  5107. /* method: new_local of class Matrix3x4 */
  5108. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new01_local
  5109. static int tolua_Math_Matrix3x4_new01_local(lua_State* tolua_S)
  5110. {
  5111. tolua_Error tolua_err;
  5112. if (
  5113. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5114. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5115. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5116. )
  5117. goto tolua_lerror;
  5118. else
  5119. {
  5120. const Matrix3x4* matrix = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5121. {
  5122. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5123. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5124. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5125. }
  5126. }
  5127. return 1;
  5128. tolua_lerror:
  5129. return tolua_Math_Matrix3x4_new00_local(tolua_S);
  5130. }
  5131. #endif //#ifndef TOLUA_DISABLE
  5132. /* method: new of class Matrix3x4 */
  5133. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new02
  5134. static int tolua_Math_Matrix3x4_new02(lua_State* tolua_S)
  5135. {
  5136. tolua_Error tolua_err;
  5137. if (
  5138. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5139. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  5140. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5141. )
  5142. goto tolua_lerror;
  5143. else
  5144. {
  5145. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  5146. {
  5147. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5148. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5149. }
  5150. }
  5151. return 1;
  5152. tolua_lerror:
  5153. return tolua_Math_Matrix3x4_new01(tolua_S);
  5154. }
  5155. #endif //#ifndef TOLUA_DISABLE
  5156. /* method: new_local of class Matrix3x4 */
  5157. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new02_local
  5158. static int tolua_Math_Matrix3x4_new02_local(lua_State* tolua_S)
  5159. {
  5160. tolua_Error tolua_err;
  5161. if (
  5162. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5163. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  5164. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5165. )
  5166. goto tolua_lerror;
  5167. else
  5168. {
  5169. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  5170. {
  5171. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5172. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5173. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5174. }
  5175. }
  5176. return 1;
  5177. tolua_lerror:
  5178. return tolua_Math_Matrix3x4_new01_local(tolua_S);
  5179. }
  5180. #endif //#ifndef TOLUA_DISABLE
  5181. /* method: new of class Matrix3x4 */
  5182. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new03
  5183. static int tolua_Math_Matrix3x4_new03(lua_State* tolua_S)
  5184. {
  5185. tolua_Error tolua_err;
  5186. if (
  5187. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5188. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  5189. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5190. )
  5191. goto tolua_lerror;
  5192. else
  5193. {
  5194. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  5195. {
  5196. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5197. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5198. }
  5199. }
  5200. return 1;
  5201. tolua_lerror:
  5202. return tolua_Math_Matrix3x4_new02(tolua_S);
  5203. }
  5204. #endif //#ifndef TOLUA_DISABLE
  5205. /* method: new_local of class Matrix3x4 */
  5206. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new03_local
  5207. static int tolua_Math_Matrix3x4_new03_local(lua_State* tolua_S)
  5208. {
  5209. tolua_Error tolua_err;
  5210. if (
  5211. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5212. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  5213. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5214. )
  5215. goto tolua_lerror;
  5216. else
  5217. {
  5218. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  5219. {
  5220. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*matrix));
  5221. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5222. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5223. }
  5224. }
  5225. return 1;
  5226. tolua_lerror:
  5227. return tolua_Math_Matrix3x4_new02_local(tolua_S);
  5228. }
  5229. #endif //#ifndef TOLUA_DISABLE
  5230. /* method: new of class Matrix3x4 */
  5231. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new04
  5232. static int tolua_Math_Matrix3x4_new04(lua_State* tolua_S)
  5233. {
  5234. tolua_Error tolua_err;
  5235. if (
  5236. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5237. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5238. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  5239. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5240. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  5241. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  5242. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  5243. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  5244. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  5245. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  5246. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  5247. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  5248. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  5249. !tolua_isnoobj(tolua_S,14,&tolua_err)
  5250. )
  5251. goto tolua_lerror;
  5252. else
  5253. {
  5254. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  5255. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  5256. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  5257. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  5258. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  5259. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  5260. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  5261. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  5262. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  5263. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  5264. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  5265. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  5266. {
  5267. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23));
  5268. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5269. }
  5270. }
  5271. return 1;
  5272. tolua_lerror:
  5273. return tolua_Math_Matrix3x4_new03(tolua_S);
  5274. }
  5275. #endif //#ifndef TOLUA_DISABLE
  5276. /* method: new_local of class Matrix3x4 */
  5277. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new04_local
  5278. static int tolua_Math_Matrix3x4_new04_local(lua_State* tolua_S)
  5279. {
  5280. tolua_Error tolua_err;
  5281. if (
  5282. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5283. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5284. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  5285. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5286. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  5287. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  5288. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  5289. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  5290. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  5291. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  5292. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  5293. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  5294. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  5295. !tolua_isnoobj(tolua_S,14,&tolua_err)
  5296. )
  5297. goto tolua_lerror;
  5298. else
  5299. {
  5300. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  5301. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  5302. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  5303. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  5304. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  5305. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  5306. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  5307. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  5308. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  5309. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  5310. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  5311. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  5312. {
  5313. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23));
  5314. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5315. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5316. }
  5317. }
  5318. return 1;
  5319. tolua_lerror:
  5320. return tolua_Math_Matrix3x4_new03_local(tolua_S);
  5321. }
  5322. #endif //#ifndef TOLUA_DISABLE
  5323. /* method: new of class Matrix3x4 */
  5324. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new05
  5325. static int tolua_Math_Matrix3x4_new05(lua_State* tolua_S)
  5326. {
  5327. tolua_Error tolua_err;
  5328. if (
  5329. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5330. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5331. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5332. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5333. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5334. )
  5335. goto tolua_lerror;
  5336. else
  5337. {
  5338. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5339. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5340. float scale = ((float) tolua_tonumber(tolua_S,4,0));
  5341. {
  5342. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,scale));
  5343. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5344. }
  5345. }
  5346. return 1;
  5347. tolua_lerror:
  5348. return tolua_Math_Matrix3x4_new04(tolua_S);
  5349. }
  5350. #endif //#ifndef TOLUA_DISABLE
  5351. /* method: new_local of class Matrix3x4 */
  5352. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new05_local
  5353. static int tolua_Math_Matrix3x4_new05_local(lua_State* tolua_S)
  5354. {
  5355. tolua_Error tolua_err;
  5356. if (
  5357. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5358. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5359. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5360. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  5361. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5362. )
  5363. goto tolua_lerror;
  5364. else
  5365. {
  5366. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5367. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5368. float scale = ((float) tolua_tonumber(tolua_S,4,0));
  5369. {
  5370. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,scale));
  5371. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5372. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5373. }
  5374. }
  5375. return 1;
  5376. tolua_lerror:
  5377. return tolua_Math_Matrix3x4_new04_local(tolua_S);
  5378. }
  5379. #endif //#ifndef TOLUA_DISABLE
  5380. /* method: new of class Matrix3x4 */
  5381. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new06
  5382. static int tolua_Math_Matrix3x4_new06(lua_State* tolua_S)
  5383. {
  5384. tolua_Error tolua_err;
  5385. if (
  5386. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5387. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5388. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5389. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  5390. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5391. )
  5392. goto tolua_lerror;
  5393. else
  5394. {
  5395. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5396. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5397. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  5398. {
  5399. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,*scale));
  5400. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5401. }
  5402. }
  5403. return 1;
  5404. tolua_lerror:
  5405. return tolua_Math_Matrix3x4_new05(tolua_S);
  5406. }
  5407. #endif //#ifndef TOLUA_DISABLE
  5408. /* method: new_local of class Matrix3x4 */
  5409. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_new06_local
  5410. static int tolua_Math_Matrix3x4_new06_local(lua_State* tolua_S)
  5411. {
  5412. tolua_Error tolua_err;
  5413. if (
  5414. !tolua_isusertable(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5415. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5416. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5417. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  5418. !tolua_isnoobj(tolua_S,5,&tolua_err)
  5419. )
  5420. goto tolua_lerror;
  5421. else
  5422. {
  5423. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5424. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5425. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  5426. {
  5427. Matrix3x4* tolua_ret = (Matrix3x4*) Mtolua_new((Matrix3x4)(*translation,*rotation,*scale));
  5428. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix3x4");
  5429. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5430. }
  5431. }
  5432. return 1;
  5433. tolua_lerror:
  5434. return tolua_Math_Matrix3x4_new05_local(tolua_S);
  5435. }
  5436. #endif //#ifndef TOLUA_DISABLE
  5437. /* method: operator== of class Matrix3x4 */
  5438. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__eq00
  5439. static int tolua_Math_Matrix3x4__eq00(lua_State* tolua_S)
  5440. {
  5441. #ifndef TOLUA_RELEASE
  5442. tolua_Error tolua_err;
  5443. if (
  5444. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5445. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5446. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5447. )
  5448. goto tolua_lerror;
  5449. else
  5450. #endif
  5451. {
  5452. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5453. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5454. #ifndef TOLUA_RELEASE
  5455. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  5456. #endif
  5457. {
  5458. bool tolua_ret = (bool) self->operator==(*rhs);
  5459. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  5460. }
  5461. }
  5462. return 1;
  5463. #ifndef TOLUA_RELEASE
  5464. tolua_lerror:
  5465. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  5466. return 0;
  5467. #endif
  5468. }
  5469. #endif //#ifndef TOLUA_DISABLE
  5470. /* method: operator* of class Matrix3x4 */
  5471. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul00
  5472. static int tolua_Math_Matrix3x4__mul00(lua_State* tolua_S)
  5473. {
  5474. #ifndef TOLUA_RELEASE
  5475. tolua_Error tolua_err;
  5476. if (
  5477. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5478. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5479. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5480. )
  5481. goto tolua_lerror;
  5482. else
  5483. #endif
  5484. {
  5485. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5486. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5487. #ifndef TOLUA_RELEASE
  5488. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5489. #endif
  5490. {
  5491. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  5492. {
  5493. #ifdef __cplusplus
  5494. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5495. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5496. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5497. #else
  5498. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5499. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5500. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5501. #endif
  5502. }
  5503. }
  5504. }
  5505. return 1;
  5506. #ifndef TOLUA_RELEASE
  5507. tolua_lerror:
  5508. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  5509. return 0;
  5510. #endif
  5511. }
  5512. #endif //#ifndef TOLUA_DISABLE
  5513. /* method: operator* of class Matrix3x4 */
  5514. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul01
  5515. static int tolua_Math_Matrix3x4__mul01(lua_State* tolua_S)
  5516. {
  5517. tolua_Error tolua_err;
  5518. if (
  5519. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5520. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  5521. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5522. )
  5523. goto tolua_lerror;
  5524. else
  5525. {
  5526. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5527. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  5528. #ifndef TOLUA_RELEASE
  5529. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5530. #endif
  5531. {
  5532. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  5533. {
  5534. #ifdef __cplusplus
  5535. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5536. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5537. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5538. #else
  5539. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5540. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5541. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5542. #endif
  5543. }
  5544. }
  5545. }
  5546. return 1;
  5547. tolua_lerror:
  5548. return tolua_Math_Matrix3x4__mul00(tolua_S);
  5549. }
  5550. #endif //#ifndef TOLUA_DISABLE
  5551. /* method: operator+ of class Matrix3x4 */
  5552. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__add00
  5553. static int tolua_Math_Matrix3x4__add00(lua_State* tolua_S)
  5554. {
  5555. #ifndef TOLUA_RELEASE
  5556. tolua_Error tolua_err;
  5557. if (
  5558. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5559. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5560. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5561. )
  5562. goto tolua_lerror;
  5563. else
  5564. #endif
  5565. {
  5566. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5567. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5568. #ifndef TOLUA_RELEASE
  5569. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  5570. #endif
  5571. {
  5572. Matrix3x4 tolua_ret = (Matrix3x4) self->operator+(*rhs);
  5573. {
  5574. #ifdef __cplusplus
  5575. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5576. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5577. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5578. #else
  5579. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5580. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5581. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5582. #endif
  5583. }
  5584. }
  5585. }
  5586. return 1;
  5587. #ifndef TOLUA_RELEASE
  5588. tolua_lerror:
  5589. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  5590. return 0;
  5591. #endif
  5592. }
  5593. #endif //#ifndef TOLUA_DISABLE
  5594. /* method: operator- of class Matrix3x4 */
  5595. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__sub00
  5596. static int tolua_Math_Matrix3x4__sub00(lua_State* tolua_S)
  5597. {
  5598. #ifndef TOLUA_RELEASE
  5599. tolua_Error tolua_err;
  5600. if (
  5601. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5602. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5603. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5604. )
  5605. goto tolua_lerror;
  5606. else
  5607. #endif
  5608. {
  5609. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5610. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5611. #ifndef TOLUA_RELEASE
  5612. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  5613. #endif
  5614. {
  5615. Matrix3x4 tolua_ret = (Matrix3x4) self->operator-(*rhs);
  5616. {
  5617. #ifdef __cplusplus
  5618. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5619. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5620. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5621. #else
  5622. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5623. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5624. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5625. #endif
  5626. }
  5627. }
  5628. }
  5629. return 1;
  5630. #ifndef TOLUA_RELEASE
  5631. tolua_lerror:
  5632. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  5633. return 0;
  5634. #endif
  5635. }
  5636. #endif //#ifndef TOLUA_DISABLE
  5637. /* method: operator* of class Matrix3x4 */
  5638. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul02
  5639. static int tolua_Math_Matrix3x4__mul02(lua_State* tolua_S)
  5640. {
  5641. tolua_Error tolua_err;
  5642. if (
  5643. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5644. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5645. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5646. )
  5647. goto tolua_lerror;
  5648. else
  5649. {
  5650. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5651. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  5652. #ifndef TOLUA_RELEASE
  5653. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5654. #endif
  5655. {
  5656. Matrix3x4 tolua_ret = (Matrix3x4) self->operator*(rhs);
  5657. {
  5658. #ifdef __cplusplus
  5659. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5660. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5661. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5662. #else
  5663. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5664. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5665. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5666. #endif
  5667. }
  5668. }
  5669. }
  5670. return 1;
  5671. tolua_lerror:
  5672. return tolua_Math_Matrix3x4__mul01(tolua_S);
  5673. }
  5674. #endif //#ifndef TOLUA_DISABLE
  5675. /* method: operator* of class Matrix3x4 */
  5676. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul03
  5677. static int tolua_Math_Matrix3x4__mul03(lua_State* tolua_S)
  5678. {
  5679. tolua_Error tolua_err;
  5680. if (
  5681. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5682. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  5683. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5684. )
  5685. goto tolua_lerror;
  5686. else
  5687. {
  5688. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5689. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  5690. #ifndef TOLUA_RELEASE
  5691. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5692. #endif
  5693. {
  5694. Matrix3x4 tolua_ret = (Matrix3x4) self->operator*(*rhs);
  5695. {
  5696. #ifdef __cplusplus
  5697. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  5698. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5699. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5700. #else
  5701. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  5702. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  5703. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5704. #endif
  5705. }
  5706. }
  5707. }
  5708. return 1;
  5709. tolua_lerror:
  5710. return tolua_Math_Matrix3x4__mul02(tolua_S);
  5711. }
  5712. #endif //#ifndef TOLUA_DISABLE
  5713. /* method: operator* of class Matrix3x4 */
  5714. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4__mul04
  5715. static int tolua_Math_Matrix3x4__mul04(lua_State* tolua_S)
  5716. {
  5717. tolua_Error tolua_err;
  5718. if (
  5719. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5720. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  5721. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5722. )
  5723. goto tolua_lerror;
  5724. else
  5725. {
  5726. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5727. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  5728. #ifndef TOLUA_RELEASE
  5729. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  5730. #endif
  5731. {
  5732. Matrix4 tolua_ret = (Matrix4) self->operator*(*rhs);
  5733. {
  5734. #ifdef __cplusplus
  5735. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  5736. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  5737. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5738. #else
  5739. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  5740. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  5741. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5742. #endif
  5743. }
  5744. }
  5745. }
  5746. return 1;
  5747. tolua_lerror:
  5748. return tolua_Math_Matrix3x4__mul03(tolua_S);
  5749. }
  5750. #endif //#ifndef TOLUA_DISABLE
  5751. /* method: SetTranslation of class Matrix3x4 */
  5752. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetTranslation00
  5753. static int tolua_Math_Matrix3x4_SetTranslation00(lua_State* tolua_S)
  5754. {
  5755. #ifndef TOLUA_RELEASE
  5756. tolua_Error tolua_err;
  5757. if (
  5758. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5759. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5760. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5761. )
  5762. goto tolua_lerror;
  5763. else
  5764. #endif
  5765. {
  5766. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5767. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5768. #ifndef TOLUA_RELEASE
  5769. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTranslation'", NULL);
  5770. #endif
  5771. {
  5772. self->SetTranslation(*translation);
  5773. }
  5774. }
  5775. return 0;
  5776. #ifndef TOLUA_RELEASE
  5777. tolua_lerror:
  5778. tolua_error(tolua_S,"#ferror in function 'SetTranslation'.",&tolua_err);
  5779. return 0;
  5780. #endif
  5781. }
  5782. #endif //#ifndef TOLUA_DISABLE
  5783. /* method: SetRotation of class Matrix3x4 */
  5784. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetRotation00
  5785. static int tolua_Math_Matrix3x4_SetRotation00(lua_State* tolua_S)
  5786. {
  5787. #ifndef TOLUA_RELEASE
  5788. tolua_Error tolua_err;
  5789. if (
  5790. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5791. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  5792. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5793. )
  5794. goto tolua_lerror;
  5795. else
  5796. #endif
  5797. {
  5798. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5799. const Matrix3* rotation = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  5800. #ifndef TOLUA_RELEASE
  5801. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  5802. #endif
  5803. {
  5804. self->SetRotation(*rotation);
  5805. }
  5806. }
  5807. return 0;
  5808. #ifndef TOLUA_RELEASE
  5809. tolua_lerror:
  5810. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  5811. return 0;
  5812. #endif
  5813. }
  5814. #endif //#ifndef TOLUA_DISABLE
  5815. /* method: SetScale of class Matrix3x4 */
  5816. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetScale00
  5817. static int tolua_Math_Matrix3x4_SetScale00(lua_State* tolua_S)
  5818. {
  5819. #ifndef TOLUA_RELEASE
  5820. tolua_Error tolua_err;
  5821. if (
  5822. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5823. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5824. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5825. )
  5826. goto tolua_lerror;
  5827. else
  5828. #endif
  5829. {
  5830. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5831. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5832. #ifndef TOLUA_RELEASE
  5833. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  5834. #endif
  5835. {
  5836. self->SetScale(*scale);
  5837. }
  5838. }
  5839. return 0;
  5840. #ifndef TOLUA_RELEASE
  5841. tolua_lerror:
  5842. tolua_error(tolua_S,"#ferror in function 'SetScale'.",&tolua_err);
  5843. return 0;
  5844. #endif
  5845. }
  5846. #endif //#ifndef TOLUA_DISABLE
  5847. /* method: SetScale of class Matrix3x4 */
  5848. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_SetScale01
  5849. static int tolua_Math_Matrix3x4_SetScale01(lua_State* tolua_S)
  5850. {
  5851. tolua_Error tolua_err;
  5852. if (
  5853. !tolua_isusertype(tolua_S,1,"Matrix3x4",0,&tolua_err) ||
  5854. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  5855. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5856. )
  5857. goto tolua_lerror;
  5858. else
  5859. {
  5860. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5861. float scale = ((float) tolua_tonumber(tolua_S,2,0));
  5862. #ifndef TOLUA_RELEASE
  5863. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  5864. #endif
  5865. {
  5866. self->SetScale(scale);
  5867. }
  5868. }
  5869. return 0;
  5870. tolua_lerror:
  5871. return tolua_Math_Matrix3x4_SetScale00(tolua_S);
  5872. }
  5873. #endif //#ifndef TOLUA_DISABLE
  5874. /* method: ToMatrix3 of class Matrix3x4 */
  5875. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_ToMatrix300
  5876. static int tolua_Math_Matrix3x4_ToMatrix300(lua_State* tolua_S)
  5877. {
  5878. #ifndef TOLUA_RELEASE
  5879. tolua_Error tolua_err;
  5880. if (
  5881. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5882. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5883. )
  5884. goto tolua_lerror;
  5885. else
  5886. #endif
  5887. {
  5888. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5889. #ifndef TOLUA_RELEASE
  5890. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToMatrix3'", NULL);
  5891. #endif
  5892. {
  5893. Matrix3 tolua_ret = (Matrix3) self->ToMatrix3();
  5894. {
  5895. #ifdef __cplusplus
  5896. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  5897. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  5898. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5899. #else
  5900. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  5901. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  5902. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5903. #endif
  5904. }
  5905. }
  5906. }
  5907. return 1;
  5908. #ifndef TOLUA_RELEASE
  5909. tolua_lerror:
  5910. tolua_error(tolua_S,"#ferror in function 'ToMatrix3'.",&tolua_err);
  5911. return 0;
  5912. #endif
  5913. }
  5914. #endif //#ifndef TOLUA_DISABLE
  5915. /* method: RotationMatrix of class Matrix3x4 */
  5916. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_RotationMatrix00
  5917. static int tolua_Math_Matrix3x4_RotationMatrix00(lua_State* tolua_S)
  5918. {
  5919. #ifndef TOLUA_RELEASE
  5920. tolua_Error tolua_err;
  5921. if (
  5922. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5923. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5924. )
  5925. goto tolua_lerror;
  5926. else
  5927. #endif
  5928. {
  5929. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5930. #ifndef TOLUA_RELEASE
  5931. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotationMatrix'", NULL);
  5932. #endif
  5933. {
  5934. Matrix3 tolua_ret = (Matrix3) self->RotationMatrix();
  5935. {
  5936. #ifdef __cplusplus
  5937. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  5938. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  5939. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5940. #else
  5941. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  5942. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  5943. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5944. #endif
  5945. }
  5946. }
  5947. }
  5948. return 1;
  5949. #ifndef TOLUA_RELEASE
  5950. tolua_lerror:
  5951. tolua_error(tolua_S,"#ferror in function 'RotationMatrix'.",&tolua_err);
  5952. return 0;
  5953. #endif
  5954. }
  5955. #endif //#ifndef TOLUA_DISABLE
  5956. /* method: Translation of class Matrix3x4 */
  5957. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Translation00
  5958. static int tolua_Math_Matrix3x4_Translation00(lua_State* tolua_S)
  5959. {
  5960. #ifndef TOLUA_RELEASE
  5961. tolua_Error tolua_err;
  5962. if (
  5963. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  5964. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5965. )
  5966. goto tolua_lerror;
  5967. else
  5968. #endif
  5969. {
  5970. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  5971. #ifndef TOLUA_RELEASE
  5972. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Translation'", NULL);
  5973. #endif
  5974. {
  5975. Vector3 tolua_ret = (Vector3) self->Translation();
  5976. {
  5977. #ifdef __cplusplus
  5978. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5979. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5980. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5981. #else
  5982. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5983. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5984. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5985. #endif
  5986. }
  5987. }
  5988. }
  5989. return 1;
  5990. #ifndef TOLUA_RELEASE
  5991. tolua_lerror:
  5992. tolua_error(tolua_S,"#ferror in function 'Translation'.",&tolua_err);
  5993. return 0;
  5994. #endif
  5995. }
  5996. #endif //#ifndef TOLUA_DISABLE
  5997. /* method: Rotation of class Matrix3x4 */
  5998. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Rotation00
  5999. static int tolua_Math_Matrix3x4_Rotation00(lua_State* tolua_S)
  6000. {
  6001. #ifndef TOLUA_RELEASE
  6002. tolua_Error tolua_err;
  6003. if (
  6004. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6005. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6006. )
  6007. goto tolua_lerror;
  6008. else
  6009. #endif
  6010. {
  6011. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6012. #ifndef TOLUA_RELEASE
  6013. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Rotation'", NULL);
  6014. #endif
  6015. {
  6016. Quaternion tolua_ret = (Quaternion) self->Rotation();
  6017. {
  6018. #ifdef __cplusplus
  6019. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  6020. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  6021. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6022. #else
  6023. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  6024. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  6025. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6026. #endif
  6027. }
  6028. }
  6029. }
  6030. return 1;
  6031. #ifndef TOLUA_RELEASE
  6032. tolua_lerror:
  6033. tolua_error(tolua_S,"#ferror in function 'Rotation'.",&tolua_err);
  6034. return 0;
  6035. #endif
  6036. }
  6037. #endif //#ifndef TOLUA_DISABLE
  6038. /* method: Scale of class Matrix3x4 */
  6039. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Scale00
  6040. static int tolua_Math_Matrix3x4_Scale00(lua_State* tolua_S)
  6041. {
  6042. #ifndef TOLUA_RELEASE
  6043. tolua_Error tolua_err;
  6044. if (
  6045. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6046. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6047. )
  6048. goto tolua_lerror;
  6049. else
  6050. #endif
  6051. {
  6052. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6053. #ifndef TOLUA_RELEASE
  6054. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL);
  6055. #endif
  6056. {
  6057. Vector3 tolua_ret = (Vector3) self->Scale();
  6058. {
  6059. #ifdef __cplusplus
  6060. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  6061. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6062. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6063. #else
  6064. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  6065. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6066. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6067. #endif
  6068. }
  6069. }
  6070. }
  6071. return 1;
  6072. #ifndef TOLUA_RELEASE
  6073. tolua_lerror:
  6074. tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err);
  6075. return 0;
  6076. #endif
  6077. }
  6078. #endif //#ifndef TOLUA_DISABLE
  6079. /* method: Equals of class Matrix3x4 */
  6080. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Equals00
  6081. static int tolua_Math_Matrix3x4_Equals00(lua_State* tolua_S)
  6082. {
  6083. #ifndef TOLUA_RELEASE
  6084. tolua_Error tolua_err;
  6085. if (
  6086. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6087. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  6088. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6089. )
  6090. goto tolua_lerror;
  6091. else
  6092. #endif
  6093. {
  6094. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6095. const Matrix3x4* rhs = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  6096. #ifndef TOLUA_RELEASE
  6097. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  6098. #endif
  6099. {
  6100. bool tolua_ret = (bool) self->Equals(*rhs);
  6101. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  6102. }
  6103. }
  6104. return 1;
  6105. #ifndef TOLUA_RELEASE
  6106. tolua_lerror:
  6107. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  6108. return 0;
  6109. #endif
  6110. }
  6111. #endif //#ifndef TOLUA_DISABLE
  6112. /* method: Decompose of class Matrix3x4 */
  6113. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Decompose00
  6114. static int tolua_Math_Matrix3x4_Decompose00(lua_State* tolua_S)
  6115. {
  6116. #ifndef TOLUA_RELEASE
  6117. tolua_Error tolua_err;
  6118. if (
  6119. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6120. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  6121. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"Quaternion",0,&tolua_err)) ||
  6122. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"Vector3",0,&tolua_err)) ||
  6123. !tolua_isnoobj(tolua_S,5,&tolua_err)
  6124. )
  6125. goto tolua_lerror;
  6126. else
  6127. #endif
  6128. {
  6129. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6130. Vector3* translation = ((Vector3*) tolua_tousertype(tolua_S,2,0));
  6131. Quaternion* rotation = ((Quaternion*) tolua_tousertype(tolua_S,3,0));
  6132. Vector3* scale = ((Vector3*) tolua_tousertype(tolua_S,4,0));
  6133. #ifndef TOLUA_RELEASE
  6134. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Decompose'", NULL);
  6135. #endif
  6136. {
  6137. self->Decompose(*translation,*rotation,*scale);
  6138. }
  6139. }
  6140. return 0;
  6141. #ifndef TOLUA_RELEASE
  6142. tolua_lerror:
  6143. tolua_error(tolua_S,"#ferror in function 'Decompose'.",&tolua_err);
  6144. return 0;
  6145. #endif
  6146. }
  6147. #endif //#ifndef TOLUA_DISABLE
  6148. /* method: Inverse of class Matrix3x4 */
  6149. #ifndef TOLUA_DISABLE_tolua_Math_Matrix3x4_Inverse00
  6150. static int tolua_Math_Matrix3x4_Inverse00(lua_State* tolua_S)
  6151. {
  6152. #ifndef TOLUA_RELEASE
  6153. tolua_Error tolua_err;
  6154. if (
  6155. !tolua_isusertype(tolua_S,1,"const Matrix3x4",0,&tolua_err) ||
  6156. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6157. )
  6158. goto tolua_lerror;
  6159. else
  6160. #endif
  6161. {
  6162. const Matrix3x4* self = (const Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6163. #ifndef TOLUA_RELEASE
  6164. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  6165. #endif
  6166. {
  6167. Matrix3x4 tolua_ret = (Matrix3x4) self->Inverse();
  6168. {
  6169. #ifdef __cplusplus
  6170. void* tolua_obj = Mtolua_new((Matrix3x4)(tolua_ret));
  6171. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  6172. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6173. #else
  6174. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3x4));
  6175. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3x4");
  6176. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6177. #endif
  6178. }
  6179. }
  6180. }
  6181. return 1;
  6182. #ifndef TOLUA_RELEASE
  6183. tolua_lerror:
  6184. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  6185. return 0;
  6186. #endif
  6187. }
  6188. #endif //#ifndef TOLUA_DISABLE
  6189. /* get function: m00_ of class Matrix3x4 */
  6190. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m00
  6191. static int tolua_get_Matrix3x4_m00(lua_State* tolua_S)
  6192. {
  6193. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6194. #ifndef TOLUA_RELEASE
  6195. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  6196. #endif
  6197. tolua_pushnumber(tolua_S,(lua_Number)self->m00_);
  6198. return 1;
  6199. }
  6200. #endif //#ifndef TOLUA_DISABLE
  6201. /* set function: m00_ of class Matrix3x4 */
  6202. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m00
  6203. static int tolua_set_Matrix3x4_m00(lua_State* tolua_S)
  6204. {
  6205. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6206. #ifndef TOLUA_RELEASE
  6207. tolua_Error tolua_err;
  6208. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  6209. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6210. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6211. #endif
  6212. self->m00_ = ((float) tolua_tonumber(tolua_S,2,0))
  6213. ;
  6214. return 0;
  6215. }
  6216. #endif //#ifndef TOLUA_DISABLE
  6217. /* get function: m01_ of class Matrix3x4 */
  6218. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m01
  6219. static int tolua_get_Matrix3x4_m01(lua_State* tolua_S)
  6220. {
  6221. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6222. #ifndef TOLUA_RELEASE
  6223. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  6224. #endif
  6225. tolua_pushnumber(tolua_S,(lua_Number)self->m01_);
  6226. return 1;
  6227. }
  6228. #endif //#ifndef TOLUA_DISABLE
  6229. /* set function: m01_ of class Matrix3x4 */
  6230. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m01
  6231. static int tolua_set_Matrix3x4_m01(lua_State* tolua_S)
  6232. {
  6233. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6234. #ifndef TOLUA_RELEASE
  6235. tolua_Error tolua_err;
  6236. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  6237. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6238. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6239. #endif
  6240. self->m01_ = ((float) tolua_tonumber(tolua_S,2,0))
  6241. ;
  6242. return 0;
  6243. }
  6244. #endif //#ifndef TOLUA_DISABLE
  6245. /* get function: m02_ of class Matrix3x4 */
  6246. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m02
  6247. static int tolua_get_Matrix3x4_m02(lua_State* tolua_S)
  6248. {
  6249. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6250. #ifndef TOLUA_RELEASE
  6251. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  6252. #endif
  6253. tolua_pushnumber(tolua_S,(lua_Number)self->m02_);
  6254. return 1;
  6255. }
  6256. #endif //#ifndef TOLUA_DISABLE
  6257. /* set function: m02_ of class Matrix3x4 */
  6258. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m02
  6259. static int tolua_set_Matrix3x4_m02(lua_State* tolua_S)
  6260. {
  6261. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6262. #ifndef TOLUA_RELEASE
  6263. tolua_Error tolua_err;
  6264. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  6265. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6266. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6267. #endif
  6268. self->m02_ = ((float) tolua_tonumber(tolua_S,2,0))
  6269. ;
  6270. return 0;
  6271. }
  6272. #endif //#ifndef TOLUA_DISABLE
  6273. /* get function: m03_ of class Matrix3x4 */
  6274. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m03
  6275. static int tolua_get_Matrix3x4_m03(lua_State* tolua_S)
  6276. {
  6277. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6278. #ifndef TOLUA_RELEASE
  6279. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  6280. #endif
  6281. tolua_pushnumber(tolua_S,(lua_Number)self->m03_);
  6282. return 1;
  6283. }
  6284. #endif //#ifndef TOLUA_DISABLE
  6285. /* set function: m03_ of class Matrix3x4 */
  6286. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m03
  6287. static int tolua_set_Matrix3x4_m03(lua_State* tolua_S)
  6288. {
  6289. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6290. #ifndef TOLUA_RELEASE
  6291. tolua_Error tolua_err;
  6292. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  6293. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6294. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6295. #endif
  6296. self->m03_ = ((float) tolua_tonumber(tolua_S,2,0))
  6297. ;
  6298. return 0;
  6299. }
  6300. #endif //#ifndef TOLUA_DISABLE
  6301. /* get function: m10_ of class Matrix3x4 */
  6302. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m10
  6303. static int tolua_get_Matrix3x4_m10(lua_State* tolua_S)
  6304. {
  6305. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6306. #ifndef TOLUA_RELEASE
  6307. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  6308. #endif
  6309. tolua_pushnumber(tolua_S,(lua_Number)self->m10_);
  6310. return 1;
  6311. }
  6312. #endif //#ifndef TOLUA_DISABLE
  6313. /* set function: m10_ of class Matrix3x4 */
  6314. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m10
  6315. static int tolua_set_Matrix3x4_m10(lua_State* tolua_S)
  6316. {
  6317. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6318. #ifndef TOLUA_RELEASE
  6319. tolua_Error tolua_err;
  6320. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  6321. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6322. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6323. #endif
  6324. self->m10_ = ((float) tolua_tonumber(tolua_S,2,0))
  6325. ;
  6326. return 0;
  6327. }
  6328. #endif //#ifndef TOLUA_DISABLE
  6329. /* get function: m11_ of class Matrix3x4 */
  6330. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m11
  6331. static int tolua_get_Matrix3x4_m11(lua_State* tolua_S)
  6332. {
  6333. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6334. #ifndef TOLUA_RELEASE
  6335. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  6336. #endif
  6337. tolua_pushnumber(tolua_S,(lua_Number)self->m11_);
  6338. return 1;
  6339. }
  6340. #endif //#ifndef TOLUA_DISABLE
  6341. /* set function: m11_ of class Matrix3x4 */
  6342. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m11
  6343. static int tolua_set_Matrix3x4_m11(lua_State* tolua_S)
  6344. {
  6345. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6346. #ifndef TOLUA_RELEASE
  6347. tolua_Error tolua_err;
  6348. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  6349. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6350. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6351. #endif
  6352. self->m11_ = ((float) tolua_tonumber(tolua_S,2,0))
  6353. ;
  6354. return 0;
  6355. }
  6356. #endif //#ifndef TOLUA_DISABLE
  6357. /* get function: m12_ of class Matrix3x4 */
  6358. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m12
  6359. static int tolua_get_Matrix3x4_m12(lua_State* tolua_S)
  6360. {
  6361. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6362. #ifndef TOLUA_RELEASE
  6363. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  6364. #endif
  6365. tolua_pushnumber(tolua_S,(lua_Number)self->m12_);
  6366. return 1;
  6367. }
  6368. #endif //#ifndef TOLUA_DISABLE
  6369. /* set function: m12_ of class Matrix3x4 */
  6370. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m12
  6371. static int tolua_set_Matrix3x4_m12(lua_State* tolua_S)
  6372. {
  6373. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6374. #ifndef TOLUA_RELEASE
  6375. tolua_Error tolua_err;
  6376. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  6377. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6378. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6379. #endif
  6380. self->m12_ = ((float) tolua_tonumber(tolua_S,2,0))
  6381. ;
  6382. return 0;
  6383. }
  6384. #endif //#ifndef TOLUA_DISABLE
  6385. /* get function: m13_ of class Matrix3x4 */
  6386. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m13
  6387. static int tolua_get_Matrix3x4_m13(lua_State* tolua_S)
  6388. {
  6389. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6390. #ifndef TOLUA_RELEASE
  6391. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  6392. #endif
  6393. tolua_pushnumber(tolua_S,(lua_Number)self->m13_);
  6394. return 1;
  6395. }
  6396. #endif //#ifndef TOLUA_DISABLE
  6397. /* set function: m13_ of class Matrix3x4 */
  6398. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m13
  6399. static int tolua_set_Matrix3x4_m13(lua_State* tolua_S)
  6400. {
  6401. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6402. #ifndef TOLUA_RELEASE
  6403. tolua_Error tolua_err;
  6404. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  6405. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6406. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6407. #endif
  6408. self->m13_ = ((float) tolua_tonumber(tolua_S,2,0))
  6409. ;
  6410. return 0;
  6411. }
  6412. #endif //#ifndef TOLUA_DISABLE
  6413. /* get function: m20_ of class Matrix3x4 */
  6414. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m20
  6415. static int tolua_get_Matrix3x4_m20(lua_State* tolua_S)
  6416. {
  6417. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6418. #ifndef TOLUA_RELEASE
  6419. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  6420. #endif
  6421. tolua_pushnumber(tolua_S,(lua_Number)self->m20_);
  6422. return 1;
  6423. }
  6424. #endif //#ifndef TOLUA_DISABLE
  6425. /* set function: m20_ of class Matrix3x4 */
  6426. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m20
  6427. static int tolua_set_Matrix3x4_m20(lua_State* tolua_S)
  6428. {
  6429. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6430. #ifndef TOLUA_RELEASE
  6431. tolua_Error tolua_err;
  6432. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  6433. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6434. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6435. #endif
  6436. self->m20_ = ((float) tolua_tonumber(tolua_S,2,0))
  6437. ;
  6438. return 0;
  6439. }
  6440. #endif //#ifndef TOLUA_DISABLE
  6441. /* get function: m21_ of class Matrix3x4 */
  6442. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m21
  6443. static int tolua_get_Matrix3x4_m21(lua_State* tolua_S)
  6444. {
  6445. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6446. #ifndef TOLUA_RELEASE
  6447. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  6448. #endif
  6449. tolua_pushnumber(tolua_S,(lua_Number)self->m21_);
  6450. return 1;
  6451. }
  6452. #endif //#ifndef TOLUA_DISABLE
  6453. /* set function: m21_ of class Matrix3x4 */
  6454. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m21
  6455. static int tolua_set_Matrix3x4_m21(lua_State* tolua_S)
  6456. {
  6457. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6458. #ifndef TOLUA_RELEASE
  6459. tolua_Error tolua_err;
  6460. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  6461. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6462. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6463. #endif
  6464. self->m21_ = ((float) tolua_tonumber(tolua_S,2,0))
  6465. ;
  6466. return 0;
  6467. }
  6468. #endif //#ifndef TOLUA_DISABLE
  6469. /* get function: m22_ of class Matrix3x4 */
  6470. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m22
  6471. static int tolua_get_Matrix3x4_m22(lua_State* tolua_S)
  6472. {
  6473. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6474. #ifndef TOLUA_RELEASE
  6475. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  6476. #endif
  6477. tolua_pushnumber(tolua_S,(lua_Number)self->m22_);
  6478. return 1;
  6479. }
  6480. #endif //#ifndef TOLUA_DISABLE
  6481. /* set function: m22_ of class Matrix3x4 */
  6482. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m22
  6483. static int tolua_set_Matrix3x4_m22(lua_State* tolua_S)
  6484. {
  6485. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6486. #ifndef TOLUA_RELEASE
  6487. tolua_Error tolua_err;
  6488. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  6489. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6490. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6491. #endif
  6492. self->m22_ = ((float) tolua_tonumber(tolua_S,2,0))
  6493. ;
  6494. return 0;
  6495. }
  6496. #endif //#ifndef TOLUA_DISABLE
  6497. /* get function: m23_ of class Matrix3x4 */
  6498. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_m23
  6499. static int tolua_get_Matrix3x4_m23(lua_State* tolua_S)
  6500. {
  6501. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6502. #ifndef TOLUA_RELEASE
  6503. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  6504. #endif
  6505. tolua_pushnumber(tolua_S,(lua_Number)self->m23_);
  6506. return 1;
  6507. }
  6508. #endif //#ifndef TOLUA_DISABLE
  6509. /* set function: m23_ of class Matrix3x4 */
  6510. #ifndef TOLUA_DISABLE_tolua_set_Matrix3x4_m23
  6511. static int tolua_set_Matrix3x4_m23(lua_State* tolua_S)
  6512. {
  6513. Matrix3x4* self = (Matrix3x4*) tolua_tousertype(tolua_S,1,0);
  6514. #ifndef TOLUA_RELEASE
  6515. tolua_Error tolua_err;
  6516. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  6517. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  6518. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  6519. #endif
  6520. self->m23_ = ((float) tolua_tonumber(tolua_S,2,0))
  6521. ;
  6522. return 0;
  6523. }
  6524. #endif //#ifndef TOLUA_DISABLE
  6525. /* get function: ZERO of class Matrix3x4 */
  6526. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_ZERO
  6527. static int tolua_get_Matrix3x4_ZERO(lua_State* tolua_S)
  6528. {
  6529. tolua_pushusertype(tolua_S,(void*)&Matrix3x4::ZERO,"const Matrix3x4");
  6530. return 1;
  6531. }
  6532. #endif //#ifndef TOLUA_DISABLE
  6533. /* get function: IDENTITY of class Matrix3x4 */
  6534. #ifndef TOLUA_DISABLE_tolua_get_Matrix3x4_IDENTITY
  6535. static int tolua_get_Matrix3x4_IDENTITY(lua_State* tolua_S)
  6536. {
  6537. tolua_pushusertype(tolua_S,(void*)&Matrix3x4::IDENTITY,"const Matrix3x4");
  6538. return 1;
  6539. }
  6540. #endif //#ifndef TOLUA_DISABLE
  6541. /* method: new of class Matrix4 */
  6542. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new00
  6543. static int tolua_Math_Matrix4_new00(lua_State* tolua_S)
  6544. {
  6545. #ifndef TOLUA_RELEASE
  6546. tolua_Error tolua_err;
  6547. if (
  6548. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6549. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6550. )
  6551. goto tolua_lerror;
  6552. else
  6553. #endif
  6554. {
  6555. {
  6556. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)());
  6557. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6558. }
  6559. }
  6560. return 1;
  6561. #ifndef TOLUA_RELEASE
  6562. tolua_lerror:
  6563. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  6564. return 0;
  6565. #endif
  6566. }
  6567. #endif //#ifndef TOLUA_DISABLE
  6568. /* method: new_local of class Matrix4 */
  6569. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new00_local
  6570. static int tolua_Math_Matrix4_new00_local(lua_State* tolua_S)
  6571. {
  6572. #ifndef TOLUA_RELEASE
  6573. tolua_Error tolua_err;
  6574. if (
  6575. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6576. !tolua_isnoobj(tolua_S,2,&tolua_err)
  6577. )
  6578. goto tolua_lerror;
  6579. else
  6580. #endif
  6581. {
  6582. {
  6583. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)());
  6584. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6585. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6586. }
  6587. }
  6588. return 1;
  6589. #ifndef TOLUA_RELEASE
  6590. tolua_lerror:
  6591. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  6592. return 0;
  6593. #endif
  6594. }
  6595. #endif //#ifndef TOLUA_DISABLE
  6596. /* method: new of class Matrix4 */
  6597. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new01
  6598. static int tolua_Math_Matrix4_new01(lua_State* tolua_S)
  6599. {
  6600. tolua_Error tolua_err;
  6601. if (
  6602. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6603. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6604. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6605. )
  6606. goto tolua_lerror;
  6607. else
  6608. {
  6609. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6610. {
  6611. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6612. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6613. }
  6614. }
  6615. return 1;
  6616. tolua_lerror:
  6617. return tolua_Math_Matrix4_new00(tolua_S);
  6618. }
  6619. #endif //#ifndef TOLUA_DISABLE
  6620. /* method: new_local of class Matrix4 */
  6621. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new01_local
  6622. static int tolua_Math_Matrix4_new01_local(lua_State* tolua_S)
  6623. {
  6624. tolua_Error tolua_err;
  6625. if (
  6626. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6627. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6628. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6629. )
  6630. goto tolua_lerror;
  6631. else
  6632. {
  6633. const Matrix4* matrix = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6634. {
  6635. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6636. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6637. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6638. }
  6639. }
  6640. return 1;
  6641. tolua_lerror:
  6642. return tolua_Math_Matrix4_new00_local(tolua_S);
  6643. }
  6644. #endif //#ifndef TOLUA_DISABLE
  6645. /* method: new of class Matrix4 */
  6646. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new02
  6647. static int tolua_Math_Matrix4_new02(lua_State* tolua_S)
  6648. {
  6649. tolua_Error tolua_err;
  6650. if (
  6651. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6652. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  6653. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6654. )
  6655. goto tolua_lerror;
  6656. else
  6657. {
  6658. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  6659. {
  6660. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6661. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6662. }
  6663. }
  6664. return 1;
  6665. tolua_lerror:
  6666. return tolua_Math_Matrix4_new01(tolua_S);
  6667. }
  6668. #endif //#ifndef TOLUA_DISABLE
  6669. /* method: new_local of class Matrix4 */
  6670. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new02_local
  6671. static int tolua_Math_Matrix4_new02_local(lua_State* tolua_S)
  6672. {
  6673. tolua_Error tolua_err;
  6674. if (
  6675. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6676. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  6677. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6678. )
  6679. goto tolua_lerror;
  6680. else
  6681. {
  6682. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  6683. {
  6684. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(*matrix));
  6685. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6686. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6687. }
  6688. }
  6689. return 1;
  6690. tolua_lerror:
  6691. return tolua_Math_Matrix4_new01_local(tolua_S);
  6692. }
  6693. #endif //#ifndef TOLUA_DISABLE
  6694. /* method: new of class Matrix4 */
  6695. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new03
  6696. static int tolua_Math_Matrix4_new03(lua_State* tolua_S)
  6697. {
  6698. tolua_Error tolua_err;
  6699. if (
  6700. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6701. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  6702. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  6703. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  6704. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  6705. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  6706. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  6707. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  6708. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  6709. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  6710. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  6711. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  6712. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  6713. !tolua_isnumber(tolua_S,14,0,&tolua_err) ||
  6714. !tolua_isnumber(tolua_S,15,0,&tolua_err) ||
  6715. !tolua_isnumber(tolua_S,16,0,&tolua_err) ||
  6716. !tolua_isnumber(tolua_S,17,0,&tolua_err) ||
  6717. !tolua_isnoobj(tolua_S,18,&tolua_err)
  6718. )
  6719. goto tolua_lerror;
  6720. else
  6721. {
  6722. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  6723. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  6724. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  6725. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  6726. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  6727. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  6728. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  6729. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  6730. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  6731. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  6732. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  6733. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  6734. float v30 = ((float) tolua_tonumber(tolua_S,14,0));
  6735. float v31 = ((float) tolua_tonumber(tolua_S,15,0));
  6736. float v32 = ((float) tolua_tonumber(tolua_S,16,0));
  6737. float v33 = ((float) tolua_tonumber(tolua_S,17,0));
  6738. {
  6739. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23,v30,v31,v32,v33));
  6740. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6741. }
  6742. }
  6743. return 1;
  6744. tolua_lerror:
  6745. return tolua_Math_Matrix4_new02(tolua_S);
  6746. }
  6747. #endif //#ifndef TOLUA_DISABLE
  6748. /* method: new_local of class Matrix4 */
  6749. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_new03_local
  6750. static int tolua_Math_Matrix4_new03_local(lua_State* tolua_S)
  6751. {
  6752. tolua_Error tolua_err;
  6753. if (
  6754. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  6755. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  6756. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  6757. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  6758. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  6759. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  6760. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  6761. !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
  6762. !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
  6763. !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
  6764. !tolua_isnumber(tolua_S,11,0,&tolua_err) ||
  6765. !tolua_isnumber(tolua_S,12,0,&tolua_err) ||
  6766. !tolua_isnumber(tolua_S,13,0,&tolua_err) ||
  6767. !tolua_isnumber(tolua_S,14,0,&tolua_err) ||
  6768. !tolua_isnumber(tolua_S,15,0,&tolua_err) ||
  6769. !tolua_isnumber(tolua_S,16,0,&tolua_err) ||
  6770. !tolua_isnumber(tolua_S,17,0,&tolua_err) ||
  6771. !tolua_isnoobj(tolua_S,18,&tolua_err)
  6772. )
  6773. goto tolua_lerror;
  6774. else
  6775. {
  6776. float v00 = ((float) tolua_tonumber(tolua_S,2,0));
  6777. float v01 = ((float) tolua_tonumber(tolua_S,3,0));
  6778. float v02 = ((float) tolua_tonumber(tolua_S,4,0));
  6779. float v03 = ((float) tolua_tonumber(tolua_S,5,0));
  6780. float v10 = ((float) tolua_tonumber(tolua_S,6,0));
  6781. float v11 = ((float) tolua_tonumber(tolua_S,7,0));
  6782. float v12 = ((float) tolua_tonumber(tolua_S,8,0));
  6783. float v13 = ((float) tolua_tonumber(tolua_S,9,0));
  6784. float v20 = ((float) tolua_tonumber(tolua_S,10,0));
  6785. float v21 = ((float) tolua_tonumber(tolua_S,11,0));
  6786. float v22 = ((float) tolua_tonumber(tolua_S,12,0));
  6787. float v23 = ((float) tolua_tonumber(tolua_S,13,0));
  6788. float v30 = ((float) tolua_tonumber(tolua_S,14,0));
  6789. float v31 = ((float) tolua_tonumber(tolua_S,15,0));
  6790. float v32 = ((float) tolua_tonumber(tolua_S,16,0));
  6791. float v33 = ((float) tolua_tonumber(tolua_S,17,0));
  6792. {
  6793. Matrix4* tolua_ret = (Matrix4*) Mtolua_new((Matrix4)(v00,v01,v02,v03,v10,v11,v12,v13,v20,v21,v22,v23,v30,v31,v32,v33));
  6794. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Matrix4");
  6795. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6796. }
  6797. }
  6798. return 1;
  6799. tolua_lerror:
  6800. return tolua_Math_Matrix4_new02_local(tolua_S);
  6801. }
  6802. #endif //#ifndef TOLUA_DISABLE
  6803. /* method: operator== of class Matrix4 */
  6804. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__eq00
  6805. static int tolua_Math_Matrix4__eq00(lua_State* tolua_S)
  6806. {
  6807. #ifndef TOLUA_RELEASE
  6808. tolua_Error tolua_err;
  6809. if (
  6810. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6811. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6812. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6813. )
  6814. goto tolua_lerror;
  6815. else
  6816. #endif
  6817. {
  6818. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6819. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6820. #ifndef TOLUA_RELEASE
  6821. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  6822. #endif
  6823. {
  6824. bool tolua_ret = (bool) self->operator==(*rhs);
  6825. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  6826. }
  6827. }
  6828. return 1;
  6829. #ifndef TOLUA_RELEASE
  6830. tolua_lerror:
  6831. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  6832. return 0;
  6833. #endif
  6834. }
  6835. #endif //#ifndef TOLUA_DISABLE
  6836. /* method: operator* of class Matrix4 */
  6837. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul00
  6838. static int tolua_Math_Matrix4__mul00(lua_State* tolua_S)
  6839. {
  6840. #ifndef TOLUA_RELEASE
  6841. tolua_Error tolua_err;
  6842. if (
  6843. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6844. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  6845. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6846. )
  6847. goto tolua_lerror;
  6848. else
  6849. #endif
  6850. {
  6851. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6852. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  6853. #ifndef TOLUA_RELEASE
  6854. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  6855. #endif
  6856. {
  6857. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  6858. {
  6859. #ifdef __cplusplus
  6860. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  6861. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6862. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6863. #else
  6864. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  6865. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  6866. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6867. #endif
  6868. }
  6869. }
  6870. }
  6871. return 1;
  6872. #ifndef TOLUA_RELEASE
  6873. tolua_lerror:
  6874. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  6875. return 0;
  6876. #endif
  6877. }
  6878. #endif //#ifndef TOLUA_DISABLE
  6879. /* method: operator* of class Matrix4 */
  6880. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul01
  6881. static int tolua_Math_Matrix4__mul01(lua_State* tolua_S)
  6882. {
  6883. tolua_Error tolua_err;
  6884. if (
  6885. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6886. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  6887. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6888. )
  6889. goto tolua_lerror;
  6890. else
  6891. {
  6892. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6893. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  6894. #ifndef TOLUA_RELEASE
  6895. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  6896. #endif
  6897. {
  6898. Vector4 tolua_ret = (Vector4) self->operator*(*rhs);
  6899. {
  6900. #ifdef __cplusplus
  6901. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  6902. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  6903. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6904. #else
  6905. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  6906. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  6907. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6908. #endif
  6909. }
  6910. }
  6911. }
  6912. return 1;
  6913. tolua_lerror:
  6914. return tolua_Math_Matrix4__mul00(tolua_S);
  6915. }
  6916. #endif //#ifndef TOLUA_DISABLE
  6917. /* method: operator+ of class Matrix4 */
  6918. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__add00
  6919. static int tolua_Math_Matrix4__add00(lua_State* tolua_S)
  6920. {
  6921. #ifndef TOLUA_RELEASE
  6922. tolua_Error tolua_err;
  6923. if (
  6924. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6925. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6926. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6927. )
  6928. goto tolua_lerror;
  6929. else
  6930. #endif
  6931. {
  6932. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6933. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6934. #ifndef TOLUA_RELEASE
  6935. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  6936. #endif
  6937. {
  6938. Matrix4 tolua_ret = (Matrix4) self->operator+(*rhs);
  6939. {
  6940. #ifdef __cplusplus
  6941. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  6942. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  6943. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6944. #else
  6945. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  6946. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  6947. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6948. #endif
  6949. }
  6950. }
  6951. }
  6952. return 1;
  6953. #ifndef TOLUA_RELEASE
  6954. tolua_lerror:
  6955. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  6956. return 0;
  6957. #endif
  6958. }
  6959. #endif //#ifndef TOLUA_DISABLE
  6960. /* method: operator- of class Matrix4 */
  6961. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__sub00
  6962. static int tolua_Math_Matrix4__sub00(lua_State* tolua_S)
  6963. {
  6964. #ifndef TOLUA_RELEASE
  6965. tolua_Error tolua_err;
  6966. if (
  6967. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  6968. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  6969. !tolua_isnoobj(tolua_S,3,&tolua_err)
  6970. )
  6971. goto tolua_lerror;
  6972. else
  6973. #endif
  6974. {
  6975. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  6976. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  6977. #ifndef TOLUA_RELEASE
  6978. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  6979. #endif
  6980. {
  6981. Matrix4 tolua_ret = (Matrix4) self->operator-(*rhs);
  6982. {
  6983. #ifdef __cplusplus
  6984. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  6985. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  6986. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6987. #else
  6988. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  6989. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  6990. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  6991. #endif
  6992. }
  6993. }
  6994. }
  6995. return 1;
  6996. #ifndef TOLUA_RELEASE
  6997. tolua_lerror:
  6998. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  6999. return 0;
  7000. #endif
  7001. }
  7002. #endif //#ifndef TOLUA_DISABLE
  7003. /* method: operator* of class Matrix4 */
  7004. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul02
  7005. static int tolua_Math_Matrix4__mul02(lua_State* tolua_S)
  7006. {
  7007. tolua_Error tolua_err;
  7008. if (
  7009. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7010. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  7011. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7012. )
  7013. goto tolua_lerror;
  7014. else
  7015. {
  7016. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7017. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  7018. #ifndef TOLUA_RELEASE
  7019. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  7020. #endif
  7021. {
  7022. Matrix4 tolua_ret = (Matrix4) self->operator*(rhs);
  7023. {
  7024. #ifdef __cplusplus
  7025. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7026. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7027. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7028. #else
  7029. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7030. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7031. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7032. #endif
  7033. }
  7034. }
  7035. }
  7036. return 1;
  7037. tolua_lerror:
  7038. return tolua_Math_Matrix4__mul01(tolua_S);
  7039. }
  7040. #endif //#ifndef TOLUA_DISABLE
  7041. /* method: operator* of class Matrix4 */
  7042. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4__mul03
  7043. static int tolua_Math_Matrix4__mul03(lua_State* tolua_S)
  7044. {
  7045. tolua_Error tolua_err;
  7046. if (
  7047. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7048. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  7049. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7050. )
  7051. goto tolua_lerror;
  7052. else
  7053. {
  7054. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7055. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  7056. #ifndef TOLUA_RELEASE
  7057. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  7058. #endif
  7059. {
  7060. Matrix4 tolua_ret = (Matrix4) self->operator*(*rhs);
  7061. {
  7062. #ifdef __cplusplus
  7063. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7064. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7065. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7066. #else
  7067. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7068. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7069. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7070. #endif
  7071. }
  7072. }
  7073. }
  7074. return 1;
  7075. tolua_lerror:
  7076. return tolua_Math_Matrix4__mul02(tolua_S);
  7077. }
  7078. #endif //#ifndef TOLUA_DISABLE
  7079. /* method: SetTranslation of class Matrix4 */
  7080. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetTranslation00
  7081. static int tolua_Math_Matrix4_SetTranslation00(lua_State* tolua_S)
  7082. {
  7083. #ifndef TOLUA_RELEASE
  7084. tolua_Error tolua_err;
  7085. if (
  7086. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7087. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  7088. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7089. )
  7090. goto tolua_lerror;
  7091. else
  7092. #endif
  7093. {
  7094. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7095. const Vector3* translation = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  7096. #ifndef TOLUA_RELEASE
  7097. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTranslation'", NULL);
  7098. #endif
  7099. {
  7100. self->SetTranslation(*translation);
  7101. }
  7102. }
  7103. return 0;
  7104. #ifndef TOLUA_RELEASE
  7105. tolua_lerror:
  7106. tolua_error(tolua_S,"#ferror in function 'SetTranslation'.",&tolua_err);
  7107. return 0;
  7108. #endif
  7109. }
  7110. #endif //#ifndef TOLUA_DISABLE
  7111. /* method: SetRotation of class Matrix4 */
  7112. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetRotation00
  7113. static int tolua_Math_Matrix4_SetRotation00(lua_State* tolua_S)
  7114. {
  7115. #ifndef TOLUA_RELEASE
  7116. tolua_Error tolua_err;
  7117. if (
  7118. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7119. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  7120. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7121. )
  7122. goto tolua_lerror;
  7123. else
  7124. #endif
  7125. {
  7126. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7127. const Matrix3* rotation = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  7128. #ifndef TOLUA_RELEASE
  7129. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  7130. #endif
  7131. {
  7132. self->SetRotation(*rotation);
  7133. }
  7134. }
  7135. return 0;
  7136. #ifndef TOLUA_RELEASE
  7137. tolua_lerror:
  7138. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  7139. return 0;
  7140. #endif
  7141. }
  7142. #endif //#ifndef TOLUA_DISABLE
  7143. /* method: SetScale of class Matrix4 */
  7144. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetScale00
  7145. static int tolua_Math_Matrix4_SetScale00(lua_State* tolua_S)
  7146. {
  7147. #ifndef TOLUA_RELEASE
  7148. tolua_Error tolua_err;
  7149. if (
  7150. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7151. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  7152. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7153. )
  7154. goto tolua_lerror;
  7155. else
  7156. #endif
  7157. {
  7158. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7159. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  7160. #ifndef TOLUA_RELEASE
  7161. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  7162. #endif
  7163. {
  7164. self->SetScale(*scale);
  7165. }
  7166. }
  7167. return 0;
  7168. #ifndef TOLUA_RELEASE
  7169. tolua_lerror:
  7170. tolua_error(tolua_S,"#ferror in function 'SetScale'.",&tolua_err);
  7171. return 0;
  7172. #endif
  7173. }
  7174. #endif //#ifndef TOLUA_DISABLE
  7175. /* method: SetScale of class Matrix4 */
  7176. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_SetScale01
  7177. static int tolua_Math_Matrix4_SetScale01(lua_State* tolua_S)
  7178. {
  7179. tolua_Error tolua_err;
  7180. if (
  7181. !tolua_isusertype(tolua_S,1,"Matrix4",0,&tolua_err) ||
  7182. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  7183. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7184. )
  7185. goto tolua_lerror;
  7186. else
  7187. {
  7188. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7189. float scale = ((float) tolua_tonumber(tolua_S,2,0));
  7190. #ifndef TOLUA_RELEASE
  7191. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetScale'", NULL);
  7192. #endif
  7193. {
  7194. self->SetScale(scale);
  7195. }
  7196. }
  7197. return 0;
  7198. tolua_lerror:
  7199. return tolua_Math_Matrix4_SetScale00(tolua_S);
  7200. }
  7201. #endif //#ifndef TOLUA_DISABLE
  7202. /* method: ToMatrix3 of class Matrix4 */
  7203. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_ToMatrix300
  7204. static int tolua_Math_Matrix4_ToMatrix300(lua_State* tolua_S)
  7205. {
  7206. #ifndef TOLUA_RELEASE
  7207. tolua_Error tolua_err;
  7208. if (
  7209. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7210. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7211. )
  7212. goto tolua_lerror;
  7213. else
  7214. #endif
  7215. {
  7216. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7217. #ifndef TOLUA_RELEASE
  7218. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToMatrix3'", NULL);
  7219. #endif
  7220. {
  7221. Matrix3 tolua_ret = (Matrix3) self->ToMatrix3();
  7222. {
  7223. #ifdef __cplusplus
  7224. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  7225. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7226. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7227. #else
  7228. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  7229. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7230. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7231. #endif
  7232. }
  7233. }
  7234. }
  7235. return 1;
  7236. #ifndef TOLUA_RELEASE
  7237. tolua_lerror:
  7238. tolua_error(tolua_S,"#ferror in function 'ToMatrix3'.",&tolua_err);
  7239. return 0;
  7240. #endif
  7241. }
  7242. #endif //#ifndef TOLUA_DISABLE
  7243. /* method: RotationMatrix of class Matrix4 */
  7244. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_RotationMatrix00
  7245. static int tolua_Math_Matrix4_RotationMatrix00(lua_State* tolua_S)
  7246. {
  7247. #ifndef TOLUA_RELEASE
  7248. tolua_Error tolua_err;
  7249. if (
  7250. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7251. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7252. )
  7253. goto tolua_lerror;
  7254. else
  7255. #endif
  7256. {
  7257. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7258. #ifndef TOLUA_RELEASE
  7259. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotationMatrix'", NULL);
  7260. #endif
  7261. {
  7262. Matrix3 tolua_ret = (Matrix3) self->RotationMatrix();
  7263. {
  7264. #ifdef __cplusplus
  7265. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  7266. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7267. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7268. #else
  7269. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  7270. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  7271. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7272. #endif
  7273. }
  7274. }
  7275. }
  7276. return 1;
  7277. #ifndef TOLUA_RELEASE
  7278. tolua_lerror:
  7279. tolua_error(tolua_S,"#ferror in function 'RotationMatrix'.",&tolua_err);
  7280. return 0;
  7281. #endif
  7282. }
  7283. #endif //#ifndef TOLUA_DISABLE
  7284. /* method: Translation of class Matrix4 */
  7285. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Translation00
  7286. static int tolua_Math_Matrix4_Translation00(lua_State* tolua_S)
  7287. {
  7288. #ifndef TOLUA_RELEASE
  7289. tolua_Error tolua_err;
  7290. if (
  7291. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7292. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7293. )
  7294. goto tolua_lerror;
  7295. else
  7296. #endif
  7297. {
  7298. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7299. #ifndef TOLUA_RELEASE
  7300. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Translation'", NULL);
  7301. #endif
  7302. {
  7303. Vector3 tolua_ret = (Vector3) self->Translation();
  7304. {
  7305. #ifdef __cplusplus
  7306. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  7307. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7308. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7309. #else
  7310. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  7311. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7312. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7313. #endif
  7314. }
  7315. }
  7316. }
  7317. return 1;
  7318. #ifndef TOLUA_RELEASE
  7319. tolua_lerror:
  7320. tolua_error(tolua_S,"#ferror in function 'Translation'.",&tolua_err);
  7321. return 0;
  7322. #endif
  7323. }
  7324. #endif //#ifndef TOLUA_DISABLE
  7325. /* method: Rotation of class Matrix4 */
  7326. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Rotation00
  7327. static int tolua_Math_Matrix4_Rotation00(lua_State* tolua_S)
  7328. {
  7329. #ifndef TOLUA_RELEASE
  7330. tolua_Error tolua_err;
  7331. if (
  7332. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7333. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7334. )
  7335. goto tolua_lerror;
  7336. else
  7337. #endif
  7338. {
  7339. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7340. #ifndef TOLUA_RELEASE
  7341. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Rotation'", NULL);
  7342. #endif
  7343. {
  7344. Quaternion tolua_ret = (Quaternion) self->Rotation();
  7345. {
  7346. #ifdef __cplusplus
  7347. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  7348. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  7349. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7350. #else
  7351. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  7352. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  7353. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7354. #endif
  7355. }
  7356. }
  7357. }
  7358. return 1;
  7359. #ifndef TOLUA_RELEASE
  7360. tolua_lerror:
  7361. tolua_error(tolua_S,"#ferror in function 'Rotation'.",&tolua_err);
  7362. return 0;
  7363. #endif
  7364. }
  7365. #endif //#ifndef TOLUA_DISABLE
  7366. /* method: Scale of class Matrix4 */
  7367. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Scale00
  7368. static int tolua_Math_Matrix4_Scale00(lua_State* tolua_S)
  7369. {
  7370. #ifndef TOLUA_RELEASE
  7371. tolua_Error tolua_err;
  7372. if (
  7373. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7374. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7375. )
  7376. goto tolua_lerror;
  7377. else
  7378. #endif
  7379. {
  7380. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7381. #ifndef TOLUA_RELEASE
  7382. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Scale'", NULL);
  7383. #endif
  7384. {
  7385. Vector3 tolua_ret = (Vector3) self->Scale();
  7386. {
  7387. #ifdef __cplusplus
  7388. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  7389. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7390. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7391. #else
  7392. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  7393. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  7394. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7395. #endif
  7396. }
  7397. }
  7398. }
  7399. return 1;
  7400. #ifndef TOLUA_RELEASE
  7401. tolua_lerror:
  7402. tolua_error(tolua_S,"#ferror in function 'Scale'.",&tolua_err);
  7403. return 0;
  7404. #endif
  7405. }
  7406. #endif //#ifndef TOLUA_DISABLE
  7407. /* method: Transpose of class Matrix4 */
  7408. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Transpose00
  7409. static int tolua_Math_Matrix4_Transpose00(lua_State* tolua_S)
  7410. {
  7411. #ifndef TOLUA_RELEASE
  7412. tolua_Error tolua_err;
  7413. if (
  7414. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7415. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7416. )
  7417. goto tolua_lerror;
  7418. else
  7419. #endif
  7420. {
  7421. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7422. #ifndef TOLUA_RELEASE
  7423. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transpose'", NULL);
  7424. #endif
  7425. {
  7426. Matrix4 tolua_ret = (Matrix4) self->Transpose();
  7427. {
  7428. #ifdef __cplusplus
  7429. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7430. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7431. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7432. #else
  7433. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7434. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7435. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7436. #endif
  7437. }
  7438. }
  7439. }
  7440. return 1;
  7441. #ifndef TOLUA_RELEASE
  7442. tolua_lerror:
  7443. tolua_error(tolua_S,"#ferror in function 'Transpose'.",&tolua_err);
  7444. return 0;
  7445. #endif
  7446. }
  7447. #endif //#ifndef TOLUA_DISABLE
  7448. /* method: Equals of class Matrix4 */
  7449. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Equals00
  7450. static int tolua_Math_Matrix4_Equals00(lua_State* tolua_S)
  7451. {
  7452. #ifndef TOLUA_RELEASE
  7453. tolua_Error tolua_err;
  7454. if (
  7455. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7456. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix4",0,&tolua_err)) ||
  7457. !tolua_isnoobj(tolua_S,3,&tolua_err)
  7458. )
  7459. goto tolua_lerror;
  7460. else
  7461. #endif
  7462. {
  7463. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7464. const Matrix4* rhs = ((const Matrix4*) tolua_tousertype(tolua_S,2,0));
  7465. #ifndef TOLUA_RELEASE
  7466. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  7467. #endif
  7468. {
  7469. bool tolua_ret = (bool) self->Equals(*rhs);
  7470. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  7471. }
  7472. }
  7473. return 1;
  7474. #ifndef TOLUA_RELEASE
  7475. tolua_lerror:
  7476. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  7477. return 0;
  7478. #endif
  7479. }
  7480. #endif //#ifndef TOLUA_DISABLE
  7481. /* method: Decompose of class Matrix4 */
  7482. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Decompose00
  7483. static int tolua_Math_Matrix4_Decompose00(lua_State* tolua_S)
  7484. {
  7485. #ifndef TOLUA_RELEASE
  7486. tolua_Error tolua_err;
  7487. if (
  7488. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7489. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  7490. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"Quaternion",0,&tolua_err)) ||
  7491. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"Vector3",0,&tolua_err)) ||
  7492. !tolua_isnoobj(tolua_S,5,&tolua_err)
  7493. )
  7494. goto tolua_lerror;
  7495. else
  7496. #endif
  7497. {
  7498. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7499. Vector3* translation = ((Vector3*) tolua_tousertype(tolua_S,2,0));
  7500. Quaternion* rotation = ((Quaternion*) tolua_tousertype(tolua_S,3,0));
  7501. Vector3* scale = ((Vector3*) tolua_tousertype(tolua_S,4,0));
  7502. #ifndef TOLUA_RELEASE
  7503. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Decompose'", NULL);
  7504. #endif
  7505. {
  7506. self->Decompose(*translation,*rotation,*scale);
  7507. }
  7508. }
  7509. return 0;
  7510. #ifndef TOLUA_RELEASE
  7511. tolua_lerror:
  7512. tolua_error(tolua_S,"#ferror in function 'Decompose'.",&tolua_err);
  7513. return 0;
  7514. #endif
  7515. }
  7516. #endif //#ifndef TOLUA_DISABLE
  7517. /* method: Inverse of class Matrix4 */
  7518. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_Inverse00
  7519. static int tolua_Math_Matrix4_Inverse00(lua_State* tolua_S)
  7520. {
  7521. #ifndef TOLUA_RELEASE
  7522. tolua_Error tolua_err;
  7523. if (
  7524. !tolua_isusertype(tolua_S,1,"const Matrix4",0,&tolua_err) ||
  7525. !tolua_isnoobj(tolua_S,2,&tolua_err)
  7526. )
  7527. goto tolua_lerror;
  7528. else
  7529. #endif
  7530. {
  7531. const Matrix4* self = (const Matrix4*) tolua_tousertype(tolua_S,1,0);
  7532. #ifndef TOLUA_RELEASE
  7533. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  7534. #endif
  7535. {
  7536. Matrix4 tolua_ret = (Matrix4) self->Inverse();
  7537. {
  7538. #ifdef __cplusplus
  7539. void* tolua_obj = Mtolua_new((Matrix4)(tolua_ret));
  7540. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7541. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7542. #else
  7543. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix4));
  7544. tolua_pushusertype(tolua_S,tolua_obj,"Matrix4");
  7545. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  7546. #endif
  7547. }
  7548. }
  7549. }
  7550. return 1;
  7551. #ifndef TOLUA_RELEASE
  7552. tolua_lerror:
  7553. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  7554. return 0;
  7555. #endif
  7556. }
  7557. #endif //#ifndef TOLUA_DISABLE
  7558. /* get function: m00_ of class Matrix4 */
  7559. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m00
  7560. static int tolua_get_Matrix4_m00(lua_State* tolua_S)
  7561. {
  7562. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7563. #ifndef TOLUA_RELEASE
  7564. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  7565. #endif
  7566. tolua_pushnumber(tolua_S,(lua_Number)self->m00_);
  7567. return 1;
  7568. }
  7569. #endif //#ifndef TOLUA_DISABLE
  7570. /* set function: m00_ of class Matrix4 */
  7571. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m00
  7572. static int tolua_set_Matrix4_m00(lua_State* tolua_S)
  7573. {
  7574. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7575. #ifndef TOLUA_RELEASE
  7576. tolua_Error tolua_err;
  7577. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm00_'",NULL);
  7578. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7579. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7580. #endif
  7581. self->m00_ = ((float) tolua_tonumber(tolua_S,2,0))
  7582. ;
  7583. return 0;
  7584. }
  7585. #endif //#ifndef TOLUA_DISABLE
  7586. /* get function: m01_ of class Matrix4 */
  7587. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m01
  7588. static int tolua_get_Matrix4_m01(lua_State* tolua_S)
  7589. {
  7590. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7591. #ifndef TOLUA_RELEASE
  7592. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  7593. #endif
  7594. tolua_pushnumber(tolua_S,(lua_Number)self->m01_);
  7595. return 1;
  7596. }
  7597. #endif //#ifndef TOLUA_DISABLE
  7598. /* set function: m01_ of class Matrix4 */
  7599. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m01
  7600. static int tolua_set_Matrix4_m01(lua_State* tolua_S)
  7601. {
  7602. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7603. #ifndef TOLUA_RELEASE
  7604. tolua_Error tolua_err;
  7605. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm01_'",NULL);
  7606. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7607. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7608. #endif
  7609. self->m01_ = ((float) tolua_tonumber(tolua_S,2,0))
  7610. ;
  7611. return 0;
  7612. }
  7613. #endif //#ifndef TOLUA_DISABLE
  7614. /* get function: m02_ of class Matrix4 */
  7615. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m02
  7616. static int tolua_get_Matrix4_m02(lua_State* tolua_S)
  7617. {
  7618. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7619. #ifndef TOLUA_RELEASE
  7620. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  7621. #endif
  7622. tolua_pushnumber(tolua_S,(lua_Number)self->m02_);
  7623. return 1;
  7624. }
  7625. #endif //#ifndef TOLUA_DISABLE
  7626. /* set function: m02_ of class Matrix4 */
  7627. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m02
  7628. static int tolua_set_Matrix4_m02(lua_State* tolua_S)
  7629. {
  7630. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7631. #ifndef TOLUA_RELEASE
  7632. tolua_Error tolua_err;
  7633. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm02_'",NULL);
  7634. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7635. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7636. #endif
  7637. self->m02_ = ((float) tolua_tonumber(tolua_S,2,0))
  7638. ;
  7639. return 0;
  7640. }
  7641. #endif //#ifndef TOLUA_DISABLE
  7642. /* get function: m03_ of class Matrix4 */
  7643. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m03
  7644. static int tolua_get_Matrix4_m03(lua_State* tolua_S)
  7645. {
  7646. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7647. #ifndef TOLUA_RELEASE
  7648. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  7649. #endif
  7650. tolua_pushnumber(tolua_S,(lua_Number)self->m03_);
  7651. return 1;
  7652. }
  7653. #endif //#ifndef TOLUA_DISABLE
  7654. /* set function: m03_ of class Matrix4 */
  7655. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m03
  7656. static int tolua_set_Matrix4_m03(lua_State* tolua_S)
  7657. {
  7658. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7659. #ifndef TOLUA_RELEASE
  7660. tolua_Error tolua_err;
  7661. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm03_'",NULL);
  7662. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7663. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7664. #endif
  7665. self->m03_ = ((float) tolua_tonumber(tolua_S,2,0))
  7666. ;
  7667. return 0;
  7668. }
  7669. #endif //#ifndef TOLUA_DISABLE
  7670. /* get function: m10_ of class Matrix4 */
  7671. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m10
  7672. static int tolua_get_Matrix4_m10(lua_State* tolua_S)
  7673. {
  7674. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7675. #ifndef TOLUA_RELEASE
  7676. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  7677. #endif
  7678. tolua_pushnumber(tolua_S,(lua_Number)self->m10_);
  7679. return 1;
  7680. }
  7681. #endif //#ifndef TOLUA_DISABLE
  7682. /* set function: m10_ of class Matrix4 */
  7683. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m10
  7684. static int tolua_set_Matrix4_m10(lua_State* tolua_S)
  7685. {
  7686. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7687. #ifndef TOLUA_RELEASE
  7688. tolua_Error tolua_err;
  7689. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm10_'",NULL);
  7690. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7691. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7692. #endif
  7693. self->m10_ = ((float) tolua_tonumber(tolua_S,2,0))
  7694. ;
  7695. return 0;
  7696. }
  7697. #endif //#ifndef TOLUA_DISABLE
  7698. /* get function: m11_ of class Matrix4 */
  7699. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m11
  7700. static int tolua_get_Matrix4_m11(lua_State* tolua_S)
  7701. {
  7702. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7703. #ifndef TOLUA_RELEASE
  7704. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  7705. #endif
  7706. tolua_pushnumber(tolua_S,(lua_Number)self->m11_);
  7707. return 1;
  7708. }
  7709. #endif //#ifndef TOLUA_DISABLE
  7710. /* set function: m11_ of class Matrix4 */
  7711. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m11
  7712. static int tolua_set_Matrix4_m11(lua_State* tolua_S)
  7713. {
  7714. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7715. #ifndef TOLUA_RELEASE
  7716. tolua_Error tolua_err;
  7717. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm11_'",NULL);
  7718. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7719. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7720. #endif
  7721. self->m11_ = ((float) tolua_tonumber(tolua_S,2,0))
  7722. ;
  7723. return 0;
  7724. }
  7725. #endif //#ifndef TOLUA_DISABLE
  7726. /* get function: m12_ of class Matrix4 */
  7727. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m12
  7728. static int tolua_get_Matrix4_m12(lua_State* tolua_S)
  7729. {
  7730. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7731. #ifndef TOLUA_RELEASE
  7732. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  7733. #endif
  7734. tolua_pushnumber(tolua_S,(lua_Number)self->m12_);
  7735. return 1;
  7736. }
  7737. #endif //#ifndef TOLUA_DISABLE
  7738. /* set function: m12_ of class Matrix4 */
  7739. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m12
  7740. static int tolua_set_Matrix4_m12(lua_State* tolua_S)
  7741. {
  7742. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7743. #ifndef TOLUA_RELEASE
  7744. tolua_Error tolua_err;
  7745. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm12_'",NULL);
  7746. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7747. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7748. #endif
  7749. self->m12_ = ((float) tolua_tonumber(tolua_S,2,0))
  7750. ;
  7751. return 0;
  7752. }
  7753. #endif //#ifndef TOLUA_DISABLE
  7754. /* get function: m13_ of class Matrix4 */
  7755. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m13
  7756. static int tolua_get_Matrix4_m13(lua_State* tolua_S)
  7757. {
  7758. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7759. #ifndef TOLUA_RELEASE
  7760. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  7761. #endif
  7762. tolua_pushnumber(tolua_S,(lua_Number)self->m13_);
  7763. return 1;
  7764. }
  7765. #endif //#ifndef TOLUA_DISABLE
  7766. /* set function: m13_ of class Matrix4 */
  7767. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m13
  7768. static int tolua_set_Matrix4_m13(lua_State* tolua_S)
  7769. {
  7770. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7771. #ifndef TOLUA_RELEASE
  7772. tolua_Error tolua_err;
  7773. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm13_'",NULL);
  7774. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7775. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7776. #endif
  7777. self->m13_ = ((float) tolua_tonumber(tolua_S,2,0))
  7778. ;
  7779. return 0;
  7780. }
  7781. #endif //#ifndef TOLUA_DISABLE
  7782. /* get function: m20_ of class Matrix4 */
  7783. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m20
  7784. static int tolua_get_Matrix4_m20(lua_State* tolua_S)
  7785. {
  7786. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7787. #ifndef TOLUA_RELEASE
  7788. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  7789. #endif
  7790. tolua_pushnumber(tolua_S,(lua_Number)self->m20_);
  7791. return 1;
  7792. }
  7793. #endif //#ifndef TOLUA_DISABLE
  7794. /* set function: m20_ of class Matrix4 */
  7795. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m20
  7796. static int tolua_set_Matrix4_m20(lua_State* tolua_S)
  7797. {
  7798. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7799. #ifndef TOLUA_RELEASE
  7800. tolua_Error tolua_err;
  7801. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm20_'",NULL);
  7802. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7803. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7804. #endif
  7805. self->m20_ = ((float) tolua_tonumber(tolua_S,2,0))
  7806. ;
  7807. return 0;
  7808. }
  7809. #endif //#ifndef TOLUA_DISABLE
  7810. /* get function: m21_ of class Matrix4 */
  7811. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m21
  7812. static int tolua_get_Matrix4_m21(lua_State* tolua_S)
  7813. {
  7814. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7815. #ifndef TOLUA_RELEASE
  7816. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  7817. #endif
  7818. tolua_pushnumber(tolua_S,(lua_Number)self->m21_);
  7819. return 1;
  7820. }
  7821. #endif //#ifndef TOLUA_DISABLE
  7822. /* set function: m21_ of class Matrix4 */
  7823. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m21
  7824. static int tolua_set_Matrix4_m21(lua_State* tolua_S)
  7825. {
  7826. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7827. #ifndef TOLUA_RELEASE
  7828. tolua_Error tolua_err;
  7829. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm21_'",NULL);
  7830. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7831. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7832. #endif
  7833. self->m21_ = ((float) tolua_tonumber(tolua_S,2,0))
  7834. ;
  7835. return 0;
  7836. }
  7837. #endif //#ifndef TOLUA_DISABLE
  7838. /* get function: m22_ of class Matrix4 */
  7839. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m22
  7840. static int tolua_get_Matrix4_m22(lua_State* tolua_S)
  7841. {
  7842. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7843. #ifndef TOLUA_RELEASE
  7844. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  7845. #endif
  7846. tolua_pushnumber(tolua_S,(lua_Number)self->m22_);
  7847. return 1;
  7848. }
  7849. #endif //#ifndef TOLUA_DISABLE
  7850. /* set function: m22_ of class Matrix4 */
  7851. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m22
  7852. static int tolua_set_Matrix4_m22(lua_State* tolua_S)
  7853. {
  7854. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7855. #ifndef TOLUA_RELEASE
  7856. tolua_Error tolua_err;
  7857. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm22_'",NULL);
  7858. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7859. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7860. #endif
  7861. self->m22_ = ((float) tolua_tonumber(tolua_S,2,0))
  7862. ;
  7863. return 0;
  7864. }
  7865. #endif //#ifndef TOLUA_DISABLE
  7866. /* get function: m23_ of class Matrix4 */
  7867. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m23
  7868. static int tolua_get_Matrix4_m23(lua_State* tolua_S)
  7869. {
  7870. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7871. #ifndef TOLUA_RELEASE
  7872. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  7873. #endif
  7874. tolua_pushnumber(tolua_S,(lua_Number)self->m23_);
  7875. return 1;
  7876. }
  7877. #endif //#ifndef TOLUA_DISABLE
  7878. /* set function: m23_ of class Matrix4 */
  7879. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m23
  7880. static int tolua_set_Matrix4_m23(lua_State* tolua_S)
  7881. {
  7882. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7883. #ifndef TOLUA_RELEASE
  7884. tolua_Error tolua_err;
  7885. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm23_'",NULL);
  7886. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7887. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7888. #endif
  7889. self->m23_ = ((float) tolua_tonumber(tolua_S,2,0))
  7890. ;
  7891. return 0;
  7892. }
  7893. #endif //#ifndef TOLUA_DISABLE
  7894. /* get function: m30_ of class Matrix4 */
  7895. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m30
  7896. static int tolua_get_Matrix4_m30(lua_State* tolua_S)
  7897. {
  7898. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7899. #ifndef TOLUA_RELEASE
  7900. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm30_'",NULL);
  7901. #endif
  7902. tolua_pushnumber(tolua_S,(lua_Number)self->m30_);
  7903. return 1;
  7904. }
  7905. #endif //#ifndef TOLUA_DISABLE
  7906. /* set function: m30_ of class Matrix4 */
  7907. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m30
  7908. static int tolua_set_Matrix4_m30(lua_State* tolua_S)
  7909. {
  7910. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7911. #ifndef TOLUA_RELEASE
  7912. tolua_Error tolua_err;
  7913. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm30_'",NULL);
  7914. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7915. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7916. #endif
  7917. self->m30_ = ((float) tolua_tonumber(tolua_S,2,0))
  7918. ;
  7919. return 0;
  7920. }
  7921. #endif //#ifndef TOLUA_DISABLE
  7922. /* get function: m31_ of class Matrix4 */
  7923. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m31
  7924. static int tolua_get_Matrix4_m31(lua_State* tolua_S)
  7925. {
  7926. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7927. #ifndef TOLUA_RELEASE
  7928. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm31_'",NULL);
  7929. #endif
  7930. tolua_pushnumber(tolua_S,(lua_Number)self->m31_);
  7931. return 1;
  7932. }
  7933. #endif //#ifndef TOLUA_DISABLE
  7934. /* set function: m31_ of class Matrix4 */
  7935. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m31
  7936. static int tolua_set_Matrix4_m31(lua_State* tolua_S)
  7937. {
  7938. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7939. #ifndef TOLUA_RELEASE
  7940. tolua_Error tolua_err;
  7941. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm31_'",NULL);
  7942. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7943. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7944. #endif
  7945. self->m31_ = ((float) tolua_tonumber(tolua_S,2,0))
  7946. ;
  7947. return 0;
  7948. }
  7949. #endif //#ifndef TOLUA_DISABLE
  7950. /* get function: m32_ of class Matrix4 */
  7951. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m32
  7952. static int tolua_get_Matrix4_m32(lua_State* tolua_S)
  7953. {
  7954. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7955. #ifndef TOLUA_RELEASE
  7956. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm32_'",NULL);
  7957. #endif
  7958. tolua_pushnumber(tolua_S,(lua_Number)self->m32_);
  7959. return 1;
  7960. }
  7961. #endif //#ifndef TOLUA_DISABLE
  7962. /* set function: m32_ of class Matrix4 */
  7963. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m32
  7964. static int tolua_set_Matrix4_m32(lua_State* tolua_S)
  7965. {
  7966. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7967. #ifndef TOLUA_RELEASE
  7968. tolua_Error tolua_err;
  7969. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm32_'",NULL);
  7970. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7971. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  7972. #endif
  7973. self->m32_ = ((float) tolua_tonumber(tolua_S,2,0))
  7974. ;
  7975. return 0;
  7976. }
  7977. #endif //#ifndef TOLUA_DISABLE
  7978. /* get function: m33_ of class Matrix4 */
  7979. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_m33
  7980. static int tolua_get_Matrix4_m33(lua_State* tolua_S)
  7981. {
  7982. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7983. #ifndef TOLUA_RELEASE
  7984. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm33_'",NULL);
  7985. #endif
  7986. tolua_pushnumber(tolua_S,(lua_Number)self->m33_);
  7987. return 1;
  7988. }
  7989. #endif //#ifndef TOLUA_DISABLE
  7990. /* set function: m33_ of class Matrix4 */
  7991. #ifndef TOLUA_DISABLE_tolua_set_Matrix4_m33
  7992. static int tolua_set_Matrix4_m33(lua_State* tolua_S)
  7993. {
  7994. Matrix4* self = (Matrix4*) tolua_tousertype(tolua_S,1,0);
  7995. #ifndef TOLUA_RELEASE
  7996. tolua_Error tolua_err;
  7997. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm33_'",NULL);
  7998. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  7999. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8000. #endif
  8001. self->m33_ = ((float) tolua_tonumber(tolua_S,2,0))
  8002. ;
  8003. return 0;
  8004. }
  8005. #endif //#ifndef TOLUA_DISABLE
  8006. /* method: BulkTranspose of class Matrix4 */
  8007. #ifndef TOLUA_DISABLE_tolua_Math_Matrix4_BulkTranspose00
  8008. static int tolua_Math_Matrix4_BulkTranspose00(lua_State* tolua_S)
  8009. {
  8010. #ifndef TOLUA_RELEASE
  8011. tolua_Error tolua_err;
  8012. if (
  8013. !tolua_isusertable(tolua_S,1,"Matrix4",0,&tolua_err) ||
  8014. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  8015. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  8016. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  8017. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8018. )
  8019. goto tolua_lerror;
  8020. else
  8021. #endif
  8022. {
  8023. float dest = ((float) tolua_tonumber(tolua_S,2,0));
  8024. const float src = ((const float) tolua_tonumber(tolua_S,3,0));
  8025. unsigned count = ((unsigned) tolua_tonumber(tolua_S,4,0));
  8026. {
  8027. Matrix4::BulkTranspose(&dest,&src,count);
  8028. tolua_pushnumber(tolua_S,(lua_Number)dest);
  8029. tolua_pushnumber(tolua_S,(lua_Number)src);
  8030. }
  8031. }
  8032. return 2;
  8033. #ifndef TOLUA_RELEASE
  8034. tolua_lerror:
  8035. tolua_error(tolua_S,"#ferror in function 'BulkTranspose'.",&tolua_err);
  8036. return 0;
  8037. #endif
  8038. }
  8039. #endif //#ifndef TOLUA_DISABLE
  8040. /* get function: ZERO of class Matrix4 */
  8041. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_ZERO
  8042. static int tolua_get_Matrix4_ZERO(lua_State* tolua_S)
  8043. {
  8044. tolua_pushusertype(tolua_S,(void*)&Matrix4::ZERO,"const Matrix4");
  8045. return 1;
  8046. }
  8047. #endif //#ifndef TOLUA_DISABLE
  8048. /* get function: IDENTITY of class Matrix4 */
  8049. #ifndef TOLUA_DISABLE_tolua_get_Matrix4_IDENTITY
  8050. static int tolua_get_Matrix4_IDENTITY(lua_State* tolua_S)
  8051. {
  8052. tolua_pushusertype(tolua_S,(void*)&Matrix4::IDENTITY,"const Matrix4");
  8053. return 1;
  8054. }
  8055. #endif //#ifndef TOLUA_DISABLE
  8056. /* method: new of class Plane */
  8057. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new00
  8058. static int tolua_Math_Plane_new00(lua_State* tolua_S)
  8059. {
  8060. #ifndef TOLUA_RELEASE
  8061. tolua_Error tolua_err;
  8062. if (
  8063. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8064. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8065. )
  8066. goto tolua_lerror;
  8067. else
  8068. #endif
  8069. {
  8070. {
  8071. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)());
  8072. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8073. }
  8074. }
  8075. return 1;
  8076. #ifndef TOLUA_RELEASE
  8077. tolua_lerror:
  8078. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8079. return 0;
  8080. #endif
  8081. }
  8082. #endif //#ifndef TOLUA_DISABLE
  8083. /* method: new_local of class Plane */
  8084. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new00_local
  8085. static int tolua_Math_Plane_new00_local(lua_State* tolua_S)
  8086. {
  8087. #ifndef TOLUA_RELEASE
  8088. tolua_Error tolua_err;
  8089. if (
  8090. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8091. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8092. )
  8093. goto tolua_lerror;
  8094. else
  8095. #endif
  8096. {
  8097. {
  8098. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)());
  8099. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8100. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8101. }
  8102. }
  8103. return 1;
  8104. #ifndef TOLUA_RELEASE
  8105. tolua_lerror:
  8106. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8107. return 0;
  8108. #endif
  8109. }
  8110. #endif //#ifndef TOLUA_DISABLE
  8111. /* method: new of class Plane */
  8112. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new01
  8113. static int tolua_Math_Plane_new01(lua_State* tolua_S)
  8114. {
  8115. tolua_Error tolua_err;
  8116. if (
  8117. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8118. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  8119. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8120. )
  8121. goto tolua_lerror;
  8122. else
  8123. {
  8124. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  8125. {
  8126. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*plane));
  8127. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8128. }
  8129. }
  8130. return 1;
  8131. tolua_lerror:
  8132. return tolua_Math_Plane_new00(tolua_S);
  8133. }
  8134. #endif //#ifndef TOLUA_DISABLE
  8135. /* method: new_local of class Plane */
  8136. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new01_local
  8137. static int tolua_Math_Plane_new01_local(lua_State* tolua_S)
  8138. {
  8139. tolua_Error tolua_err;
  8140. if (
  8141. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8142. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  8143. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8144. )
  8145. goto tolua_lerror;
  8146. else
  8147. {
  8148. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  8149. {
  8150. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*plane));
  8151. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8152. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8153. }
  8154. }
  8155. return 1;
  8156. tolua_lerror:
  8157. return tolua_Math_Plane_new00_local(tolua_S);
  8158. }
  8159. #endif //#ifndef TOLUA_DISABLE
  8160. /* method: new of class Plane */
  8161. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new02
  8162. static int tolua_Math_Plane_new02(lua_State* tolua_S)
  8163. {
  8164. tolua_Error tolua_err;
  8165. if (
  8166. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8167. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8168. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8169. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8170. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8171. )
  8172. goto tolua_lerror;
  8173. else
  8174. {
  8175. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8176. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8177. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8178. {
  8179. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*v0,*v1,*v2));
  8180. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8181. }
  8182. }
  8183. return 1;
  8184. tolua_lerror:
  8185. return tolua_Math_Plane_new01(tolua_S);
  8186. }
  8187. #endif //#ifndef TOLUA_DISABLE
  8188. /* method: new_local of class Plane */
  8189. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new02_local
  8190. static int tolua_Math_Plane_new02_local(lua_State* tolua_S)
  8191. {
  8192. tolua_Error tolua_err;
  8193. if (
  8194. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8195. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8196. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8197. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8198. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8199. )
  8200. goto tolua_lerror;
  8201. else
  8202. {
  8203. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8204. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8205. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8206. {
  8207. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*v0,*v1,*v2));
  8208. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8209. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8210. }
  8211. }
  8212. return 1;
  8213. tolua_lerror:
  8214. return tolua_Math_Plane_new01_local(tolua_S);
  8215. }
  8216. #endif //#ifndef TOLUA_DISABLE
  8217. /* method: new of class Plane */
  8218. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new03
  8219. static int tolua_Math_Plane_new03(lua_State* tolua_S)
  8220. {
  8221. tolua_Error tolua_err;
  8222. if (
  8223. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8224. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8225. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8226. !tolua_isnoobj(tolua_S,4,&tolua_err)
  8227. )
  8228. goto tolua_lerror;
  8229. else
  8230. {
  8231. const Vector3* normal = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8232. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8233. {
  8234. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*normal,*point));
  8235. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8236. }
  8237. }
  8238. return 1;
  8239. tolua_lerror:
  8240. return tolua_Math_Plane_new02(tolua_S);
  8241. }
  8242. #endif //#ifndef TOLUA_DISABLE
  8243. /* method: new_local of class Plane */
  8244. #ifndef TOLUA_DISABLE_tolua_Math_Plane_new03_local
  8245. static int tolua_Math_Plane_new03_local(lua_State* tolua_S)
  8246. {
  8247. tolua_Error tolua_err;
  8248. if (
  8249. !tolua_isusertable(tolua_S,1,"Plane",0,&tolua_err) ||
  8250. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8251. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8252. !tolua_isnoobj(tolua_S,4,&tolua_err)
  8253. )
  8254. goto tolua_lerror;
  8255. else
  8256. {
  8257. const Vector3* normal = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8258. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8259. {
  8260. Plane* tolua_ret = (Plane*) Mtolua_new((Plane)(*normal,*point));
  8261. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Plane");
  8262. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8263. }
  8264. }
  8265. return 1;
  8266. tolua_lerror:
  8267. return tolua_Math_Plane_new02_local(tolua_S);
  8268. }
  8269. #endif //#ifndef TOLUA_DISABLE
  8270. /* method: Define of class Plane */
  8271. #ifndef TOLUA_DISABLE_tolua_Math_Plane_Define00
  8272. static int tolua_Math_Plane_Define00(lua_State* tolua_S)
  8273. {
  8274. #ifndef TOLUA_RELEASE
  8275. tolua_Error tolua_err;
  8276. if (
  8277. !tolua_isusertype(tolua_S,1,"Plane",0,&tolua_err) ||
  8278. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8279. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8280. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8281. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8282. )
  8283. goto tolua_lerror;
  8284. else
  8285. #endif
  8286. {
  8287. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8288. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8289. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8290. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8291. #ifndef TOLUA_RELEASE
  8292. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8293. #endif
  8294. {
  8295. self->Define(*v0,*v1,*v2);
  8296. }
  8297. }
  8298. return 0;
  8299. #ifndef TOLUA_RELEASE
  8300. tolua_lerror:
  8301. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  8302. return 0;
  8303. #endif
  8304. }
  8305. #endif //#ifndef TOLUA_DISABLE
  8306. /* method: Define of class Plane */
  8307. #ifndef TOLUA_DISABLE_tolua_Math_Plane_Define01
  8308. static int tolua_Math_Plane_Define01(lua_State* tolua_S)
  8309. {
  8310. tolua_Error tolua_err;
  8311. if (
  8312. !tolua_isusertype(tolua_S,1,"Plane",0,&tolua_err) ||
  8313. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8314. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8315. !tolua_isnoobj(tolua_S,4,&tolua_err)
  8316. )
  8317. goto tolua_lerror;
  8318. else
  8319. {
  8320. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8321. const Vector3* normal = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8322. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8323. #ifndef TOLUA_RELEASE
  8324. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8325. #endif
  8326. {
  8327. self->Define(*normal,*point);
  8328. }
  8329. }
  8330. return 0;
  8331. tolua_lerror:
  8332. return tolua_Math_Plane_Define00(tolua_S);
  8333. }
  8334. #endif //#ifndef TOLUA_DISABLE
  8335. /* method: Distance of class Plane */
  8336. #ifndef TOLUA_DISABLE_tolua_Math_Plane_Distance00
  8337. static int tolua_Math_Plane_Distance00(lua_State* tolua_S)
  8338. {
  8339. #ifndef TOLUA_RELEASE
  8340. tolua_Error tolua_err;
  8341. if (
  8342. !tolua_isusertype(tolua_S,1,"const Plane",0,&tolua_err) ||
  8343. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8344. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8345. )
  8346. goto tolua_lerror;
  8347. else
  8348. #endif
  8349. {
  8350. const Plane* self = (const Plane*) tolua_tousertype(tolua_S,1,0);
  8351. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8352. #ifndef TOLUA_RELEASE
  8353. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  8354. #endif
  8355. {
  8356. float tolua_ret = (float) self->Distance(*point);
  8357. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  8358. }
  8359. }
  8360. return 1;
  8361. #ifndef TOLUA_RELEASE
  8362. tolua_lerror:
  8363. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  8364. return 0;
  8365. #endif
  8366. }
  8367. #endif //#ifndef TOLUA_DISABLE
  8368. /* get function: normal_ of class Plane */
  8369. #ifndef TOLUA_DISABLE_tolua_get_Plane_normal
  8370. static int tolua_get_Plane_normal(lua_State* tolua_S)
  8371. {
  8372. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8373. #ifndef TOLUA_RELEASE
  8374. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal_'",NULL);
  8375. #endif
  8376. tolua_pushusertype(tolua_S,(void*)&self->normal_,"Vector3");
  8377. return 1;
  8378. }
  8379. #endif //#ifndef TOLUA_DISABLE
  8380. /* set function: normal_ of class Plane */
  8381. #ifndef TOLUA_DISABLE_tolua_set_Plane_normal
  8382. static int tolua_set_Plane_normal(lua_State* tolua_S)
  8383. {
  8384. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8385. #ifndef TOLUA_RELEASE
  8386. tolua_Error tolua_err;
  8387. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal_'",NULL);
  8388. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  8389. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8390. #endif
  8391. self->normal_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  8392. ;
  8393. return 0;
  8394. }
  8395. #endif //#ifndef TOLUA_DISABLE
  8396. /* get function: absNormal_ of class Plane */
  8397. #ifndef TOLUA_DISABLE_tolua_get_Plane_absNormal
  8398. static int tolua_get_Plane_absNormal(lua_State* tolua_S)
  8399. {
  8400. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8401. #ifndef TOLUA_RELEASE
  8402. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'absNormal_'",NULL);
  8403. #endif
  8404. tolua_pushusertype(tolua_S,(void*)&self->absNormal_,"Vector3");
  8405. return 1;
  8406. }
  8407. #endif //#ifndef TOLUA_DISABLE
  8408. /* set function: absNormal_ of class Plane */
  8409. #ifndef TOLUA_DISABLE_tolua_set_Plane_absNormal
  8410. static int tolua_set_Plane_absNormal(lua_State* tolua_S)
  8411. {
  8412. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8413. #ifndef TOLUA_RELEASE
  8414. tolua_Error tolua_err;
  8415. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'absNormal_'",NULL);
  8416. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  8417. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8418. #endif
  8419. self->absNormal_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  8420. ;
  8421. return 0;
  8422. }
  8423. #endif //#ifndef TOLUA_DISABLE
  8424. /* get function: intercept_ of class Plane */
  8425. #ifndef TOLUA_DISABLE_tolua_get_Plane_intercept
  8426. static int tolua_get_Plane_intercept(lua_State* tolua_S)
  8427. {
  8428. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8429. #ifndef TOLUA_RELEASE
  8430. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'intercept_'",NULL);
  8431. #endif
  8432. tolua_pushnumber(tolua_S,(lua_Number)self->intercept_);
  8433. return 1;
  8434. }
  8435. #endif //#ifndef TOLUA_DISABLE
  8436. /* set function: intercept_ of class Plane */
  8437. #ifndef TOLUA_DISABLE_tolua_set_Plane_intercept
  8438. static int tolua_set_Plane_intercept(lua_State* tolua_S)
  8439. {
  8440. Plane* self = (Plane*) tolua_tousertype(tolua_S,1,0);
  8441. #ifndef TOLUA_RELEASE
  8442. tolua_Error tolua_err;
  8443. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'intercept_'",NULL);
  8444. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  8445. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  8446. #endif
  8447. self->intercept_ = ((float) tolua_tonumber(tolua_S,2,0))
  8448. ;
  8449. return 0;
  8450. }
  8451. #endif //#ifndef TOLUA_DISABLE
  8452. /* method: new of class Polyhedron */
  8453. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new00
  8454. static int tolua_Math_Polyhedron_new00(lua_State* tolua_S)
  8455. {
  8456. #ifndef TOLUA_RELEASE
  8457. tolua_Error tolua_err;
  8458. if (
  8459. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8460. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8461. )
  8462. goto tolua_lerror;
  8463. else
  8464. #endif
  8465. {
  8466. {
  8467. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)());
  8468. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8469. }
  8470. }
  8471. return 1;
  8472. #ifndef TOLUA_RELEASE
  8473. tolua_lerror:
  8474. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8475. return 0;
  8476. #endif
  8477. }
  8478. #endif //#ifndef TOLUA_DISABLE
  8479. /* method: new_local of class Polyhedron */
  8480. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new00_local
  8481. static int tolua_Math_Polyhedron_new00_local(lua_State* tolua_S)
  8482. {
  8483. #ifndef TOLUA_RELEASE
  8484. tolua_Error tolua_err;
  8485. if (
  8486. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8487. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8488. )
  8489. goto tolua_lerror;
  8490. else
  8491. #endif
  8492. {
  8493. {
  8494. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)());
  8495. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8496. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8497. }
  8498. }
  8499. return 1;
  8500. #ifndef TOLUA_RELEASE
  8501. tolua_lerror:
  8502. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  8503. return 0;
  8504. #endif
  8505. }
  8506. #endif //#ifndef TOLUA_DISABLE
  8507. /* method: new of class Polyhedron */
  8508. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new01
  8509. static int tolua_Math_Polyhedron_new01(lua_State* tolua_S)
  8510. {
  8511. tolua_Error tolua_err;
  8512. if (
  8513. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8514. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  8515. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8516. )
  8517. goto tolua_lerror;
  8518. else
  8519. {
  8520. const Polyhedron* polyhedron = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  8521. {
  8522. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*polyhedron));
  8523. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8524. }
  8525. }
  8526. return 1;
  8527. tolua_lerror:
  8528. return tolua_Math_Polyhedron_new00(tolua_S);
  8529. }
  8530. #endif //#ifndef TOLUA_DISABLE
  8531. /* method: new_local of class Polyhedron */
  8532. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new01_local
  8533. static int tolua_Math_Polyhedron_new01_local(lua_State* tolua_S)
  8534. {
  8535. tolua_Error tolua_err;
  8536. if (
  8537. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8538. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  8539. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8540. )
  8541. goto tolua_lerror;
  8542. else
  8543. {
  8544. const Polyhedron* polyhedron = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  8545. {
  8546. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*polyhedron));
  8547. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8548. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8549. }
  8550. }
  8551. return 1;
  8552. tolua_lerror:
  8553. return tolua_Math_Polyhedron_new00_local(tolua_S);
  8554. }
  8555. #endif //#ifndef TOLUA_DISABLE
  8556. /* method: new of class Polyhedron */
  8557. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new02
  8558. static int tolua_Math_Polyhedron_new02(lua_State* tolua_S)
  8559. {
  8560. tolua_Error tolua_err;
  8561. if (
  8562. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8563. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8564. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8565. )
  8566. goto tolua_lerror;
  8567. else
  8568. {
  8569. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8570. {
  8571. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*box));
  8572. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8573. }
  8574. }
  8575. return 1;
  8576. tolua_lerror:
  8577. return tolua_Math_Polyhedron_new01(tolua_S);
  8578. }
  8579. #endif //#ifndef TOLUA_DISABLE
  8580. /* method: new_local of class Polyhedron */
  8581. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new02_local
  8582. static int tolua_Math_Polyhedron_new02_local(lua_State* tolua_S)
  8583. {
  8584. tolua_Error tolua_err;
  8585. if (
  8586. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8587. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8588. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8589. )
  8590. goto tolua_lerror;
  8591. else
  8592. {
  8593. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8594. {
  8595. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*box));
  8596. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8597. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8598. }
  8599. }
  8600. return 1;
  8601. tolua_lerror:
  8602. return tolua_Math_Polyhedron_new01_local(tolua_S);
  8603. }
  8604. #endif //#ifndef TOLUA_DISABLE
  8605. /* method: new of class Polyhedron */
  8606. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new03
  8607. static int tolua_Math_Polyhedron_new03(lua_State* tolua_S)
  8608. {
  8609. tolua_Error tolua_err;
  8610. if (
  8611. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8612. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8613. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8614. )
  8615. goto tolua_lerror;
  8616. else
  8617. {
  8618. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8619. {
  8620. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*frustum));
  8621. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8622. }
  8623. }
  8624. return 1;
  8625. tolua_lerror:
  8626. return tolua_Math_Polyhedron_new02(tolua_S);
  8627. }
  8628. #endif //#ifndef TOLUA_DISABLE
  8629. /* method: new_local of class Polyhedron */
  8630. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_new03_local
  8631. static int tolua_Math_Polyhedron_new03_local(lua_State* tolua_S)
  8632. {
  8633. tolua_Error tolua_err;
  8634. if (
  8635. !tolua_isusertable(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8636. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8637. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8638. )
  8639. goto tolua_lerror;
  8640. else
  8641. {
  8642. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8643. {
  8644. Polyhedron* tolua_ret = (Polyhedron*) Mtolua_new((Polyhedron)(*frustum));
  8645. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Polyhedron");
  8646. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  8647. }
  8648. }
  8649. return 1;
  8650. tolua_lerror:
  8651. return tolua_Math_Polyhedron_new02_local(tolua_S);
  8652. }
  8653. #endif //#ifndef TOLUA_DISABLE
  8654. /* method: delete of class Polyhedron */
  8655. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_delete00
  8656. static int tolua_Math_Polyhedron_delete00(lua_State* tolua_S)
  8657. {
  8658. #ifndef TOLUA_RELEASE
  8659. tolua_Error tolua_err;
  8660. if (
  8661. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8662. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8663. )
  8664. goto tolua_lerror;
  8665. else
  8666. #endif
  8667. {
  8668. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8669. #ifndef TOLUA_RELEASE
  8670. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
  8671. #endif
  8672. Mtolua_delete(self);
  8673. }
  8674. return 0;
  8675. #ifndef TOLUA_RELEASE
  8676. tolua_lerror:
  8677. tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
  8678. return 0;
  8679. #endif
  8680. }
  8681. #endif //#ifndef TOLUA_DISABLE
  8682. /* method: Define of class Polyhedron */
  8683. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Define00
  8684. static int tolua_Math_Polyhedron_Define00(lua_State* tolua_S)
  8685. {
  8686. #ifndef TOLUA_RELEASE
  8687. tolua_Error tolua_err;
  8688. if (
  8689. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8690. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8691. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8692. )
  8693. goto tolua_lerror;
  8694. else
  8695. #endif
  8696. {
  8697. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8698. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8699. #ifndef TOLUA_RELEASE
  8700. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8701. #endif
  8702. {
  8703. self->Define(*box);
  8704. }
  8705. }
  8706. return 0;
  8707. #ifndef TOLUA_RELEASE
  8708. tolua_lerror:
  8709. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  8710. return 0;
  8711. #endif
  8712. }
  8713. #endif //#ifndef TOLUA_DISABLE
  8714. /* method: Define of class Polyhedron */
  8715. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Define01
  8716. static int tolua_Math_Polyhedron_Define01(lua_State* tolua_S)
  8717. {
  8718. tolua_Error tolua_err;
  8719. if (
  8720. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8721. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8722. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8723. )
  8724. goto tolua_lerror;
  8725. else
  8726. {
  8727. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8728. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8729. #ifndef TOLUA_RELEASE
  8730. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  8731. #endif
  8732. {
  8733. self->Define(*frustum);
  8734. }
  8735. }
  8736. return 0;
  8737. tolua_lerror:
  8738. return tolua_Math_Polyhedron_Define00(tolua_S);
  8739. }
  8740. #endif //#ifndef TOLUA_DISABLE
  8741. /* method: AddFace of class Polyhedron */
  8742. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_AddFace00
  8743. static int tolua_Math_Polyhedron_AddFace00(lua_State* tolua_S)
  8744. {
  8745. #ifndef TOLUA_RELEASE
  8746. tolua_Error tolua_err;
  8747. if (
  8748. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8749. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8750. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8751. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8752. !tolua_isnoobj(tolua_S,5,&tolua_err)
  8753. )
  8754. goto tolua_lerror;
  8755. else
  8756. #endif
  8757. {
  8758. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8759. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8760. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8761. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8762. #ifndef TOLUA_RELEASE
  8763. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddFace'", NULL);
  8764. #endif
  8765. {
  8766. self->AddFace(*v0,*v1,*v2);
  8767. }
  8768. }
  8769. return 0;
  8770. #ifndef TOLUA_RELEASE
  8771. tolua_lerror:
  8772. tolua_error(tolua_S,"#ferror in function 'AddFace'.",&tolua_err);
  8773. return 0;
  8774. #endif
  8775. }
  8776. #endif //#ifndef TOLUA_DISABLE
  8777. /* method: AddFace of class Polyhedron */
  8778. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_AddFace01
  8779. static int tolua_Math_Polyhedron_AddFace01(lua_State* tolua_S)
  8780. {
  8781. tolua_Error tolua_err;
  8782. if (
  8783. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8784. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  8785. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  8786. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  8787. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) ||
  8788. !tolua_isnoobj(tolua_S,6,&tolua_err)
  8789. )
  8790. goto tolua_lerror;
  8791. else
  8792. {
  8793. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8794. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  8795. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  8796. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  8797. const Vector3* v3 = ((const Vector3*) tolua_tousertype(tolua_S,5,0));
  8798. #ifndef TOLUA_RELEASE
  8799. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddFace'", NULL);
  8800. #endif
  8801. {
  8802. self->AddFace(*v0,*v1,*v2,*v3);
  8803. }
  8804. }
  8805. return 0;
  8806. tolua_lerror:
  8807. return tolua_Math_Polyhedron_AddFace00(tolua_S);
  8808. }
  8809. #endif //#ifndef TOLUA_DISABLE
  8810. /* method: Clip of class Polyhedron */
  8811. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clip00
  8812. static int tolua_Math_Polyhedron_Clip00(lua_State* tolua_S)
  8813. {
  8814. #ifndef TOLUA_RELEASE
  8815. tolua_Error tolua_err;
  8816. if (
  8817. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8818. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  8819. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8820. )
  8821. goto tolua_lerror;
  8822. else
  8823. #endif
  8824. {
  8825. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8826. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  8827. #ifndef TOLUA_RELEASE
  8828. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  8829. #endif
  8830. {
  8831. self->Clip(*plane);
  8832. }
  8833. }
  8834. return 0;
  8835. #ifndef TOLUA_RELEASE
  8836. tolua_lerror:
  8837. tolua_error(tolua_S,"#ferror in function 'Clip'.",&tolua_err);
  8838. return 0;
  8839. #endif
  8840. }
  8841. #endif //#ifndef TOLUA_DISABLE
  8842. /* method: Clip of class Polyhedron */
  8843. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clip01
  8844. static int tolua_Math_Polyhedron_Clip01(lua_State* tolua_S)
  8845. {
  8846. tolua_Error tolua_err;
  8847. if (
  8848. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8849. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  8850. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8851. )
  8852. goto tolua_lerror;
  8853. else
  8854. {
  8855. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8856. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  8857. #ifndef TOLUA_RELEASE
  8858. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  8859. #endif
  8860. {
  8861. self->Clip(*box);
  8862. }
  8863. }
  8864. return 0;
  8865. tolua_lerror:
  8866. return tolua_Math_Polyhedron_Clip00(tolua_S);
  8867. }
  8868. #endif //#ifndef TOLUA_DISABLE
  8869. /* method: Clip of class Polyhedron */
  8870. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clip02
  8871. static int tolua_Math_Polyhedron_Clip02(lua_State* tolua_S)
  8872. {
  8873. tolua_Error tolua_err;
  8874. if (
  8875. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8876. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  8877. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8878. )
  8879. goto tolua_lerror;
  8880. else
  8881. {
  8882. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8883. const Frustum* box = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  8884. #ifndef TOLUA_RELEASE
  8885. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  8886. #endif
  8887. {
  8888. self->Clip(*box);
  8889. }
  8890. }
  8891. return 0;
  8892. tolua_lerror:
  8893. return tolua_Math_Polyhedron_Clip01(tolua_S);
  8894. }
  8895. #endif //#ifndef TOLUA_DISABLE
  8896. /* method: Clear of class Polyhedron */
  8897. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Clear00
  8898. static int tolua_Math_Polyhedron_Clear00(lua_State* tolua_S)
  8899. {
  8900. #ifndef TOLUA_RELEASE
  8901. tolua_Error tolua_err;
  8902. if (
  8903. !tolua_isusertype(tolua_S,1,"Polyhedron",0,&tolua_err) ||
  8904. !tolua_isnoobj(tolua_S,2,&tolua_err)
  8905. )
  8906. goto tolua_lerror;
  8907. else
  8908. #endif
  8909. {
  8910. Polyhedron* self = (Polyhedron*) tolua_tousertype(tolua_S,1,0);
  8911. #ifndef TOLUA_RELEASE
  8912. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  8913. #endif
  8914. {
  8915. self->Clear();
  8916. }
  8917. }
  8918. return 0;
  8919. #ifndef TOLUA_RELEASE
  8920. tolua_lerror:
  8921. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  8922. return 0;
  8923. #endif
  8924. }
  8925. #endif //#ifndef TOLUA_DISABLE
  8926. /* method: Transform of class Polyhedron */
  8927. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transform00
  8928. static int tolua_Math_Polyhedron_Transform00(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 Matrix3",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 Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  8943. #ifndef TOLUA_RELEASE
  8944. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  8945. #endif
  8946. {
  8947. self->Transform(*transform);
  8948. }
  8949. }
  8950. return 0;
  8951. #ifndef TOLUA_RELEASE
  8952. tolua_lerror:
  8953. tolua_error(tolua_S,"#ferror in function 'Transform'.",&tolua_err);
  8954. return 0;
  8955. #endif
  8956. }
  8957. #endif //#ifndef TOLUA_DISABLE
  8958. /* method: Transform of class Polyhedron */
  8959. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transform01
  8960. static int tolua_Math_Polyhedron_Transform01(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 Matrix3x4",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 Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  8973. #ifndef TOLUA_RELEASE
  8974. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transform'", NULL);
  8975. #endif
  8976. {
  8977. self->Transform(*transform);
  8978. }
  8979. }
  8980. return 0;
  8981. tolua_lerror:
  8982. return tolua_Math_Polyhedron_Transform00(tolua_S);
  8983. }
  8984. #endif //#ifndef TOLUA_DISABLE
  8985. /* method: Transformed of class Polyhedron */
  8986. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transformed00
  8987. static int tolua_Math_Polyhedron_Transformed00(lua_State* tolua_S)
  8988. {
  8989. #ifndef TOLUA_RELEASE
  8990. tolua_Error tolua_err;
  8991. if (
  8992. !tolua_isusertype(tolua_S,1,"const Polyhedron",0,&tolua_err) ||
  8993. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  8994. !tolua_isnoobj(tolua_S,3,&tolua_err)
  8995. )
  8996. goto tolua_lerror;
  8997. else
  8998. #endif
  8999. {
  9000. const Polyhedron* self = (const Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9001. const Matrix3* transform = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9002. #ifndef TOLUA_RELEASE
  9003. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  9004. #endif
  9005. {
  9006. Polyhedron tolua_ret = (Polyhedron) self->Transformed(*transform);
  9007. {
  9008. #ifdef __cplusplus
  9009. void* tolua_obj = Mtolua_new((Polyhedron)(tolua_ret));
  9010. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9011. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9012. #else
  9013. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Polyhedron));
  9014. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9015. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9016. #endif
  9017. }
  9018. }
  9019. }
  9020. return 1;
  9021. #ifndef TOLUA_RELEASE
  9022. tolua_lerror:
  9023. tolua_error(tolua_S,"#ferror in function 'Transformed'.",&tolua_err);
  9024. return 0;
  9025. #endif
  9026. }
  9027. #endif //#ifndef TOLUA_DISABLE
  9028. /* method: Transformed of class Polyhedron */
  9029. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Transformed01
  9030. static int tolua_Math_Polyhedron_Transformed01(lua_State* tolua_S)
  9031. {
  9032. tolua_Error tolua_err;
  9033. if (
  9034. !tolua_isusertype(tolua_S,1,"const Polyhedron",0,&tolua_err) ||
  9035. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3x4",0,&tolua_err)) ||
  9036. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9037. )
  9038. goto tolua_lerror;
  9039. else
  9040. {
  9041. const Polyhedron* self = (const Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9042. const Matrix3x4* transform = ((const Matrix3x4*) tolua_tousertype(tolua_S,2,0));
  9043. #ifndef TOLUA_RELEASE
  9044. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Transformed'", NULL);
  9045. #endif
  9046. {
  9047. Polyhedron tolua_ret = (Polyhedron) self->Transformed(*transform);
  9048. {
  9049. #ifdef __cplusplus
  9050. void* tolua_obj = Mtolua_new((Polyhedron)(tolua_ret));
  9051. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9052. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9053. #else
  9054. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Polyhedron));
  9055. tolua_pushusertype(tolua_S,tolua_obj,"Polyhedron");
  9056. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9057. #endif
  9058. }
  9059. }
  9060. }
  9061. return 1;
  9062. tolua_lerror:
  9063. return tolua_Math_Polyhedron_Transformed00(tolua_S);
  9064. }
  9065. #endif //#ifndef TOLUA_DISABLE
  9066. /* method: Empty of class Polyhedron */
  9067. #ifndef TOLUA_DISABLE_tolua_Math_Polyhedron_Empty00
  9068. static int tolua_Math_Polyhedron_Empty00(lua_State* tolua_S)
  9069. {
  9070. #ifndef TOLUA_RELEASE
  9071. tolua_Error tolua_err;
  9072. if (
  9073. !tolua_isusertype(tolua_S,1,"const Polyhedron",0,&tolua_err) ||
  9074. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9075. )
  9076. goto tolua_lerror;
  9077. else
  9078. #endif
  9079. {
  9080. const Polyhedron* self = (const Polyhedron*) tolua_tousertype(tolua_S,1,0);
  9081. #ifndef TOLUA_RELEASE
  9082. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Empty'", NULL);
  9083. #endif
  9084. {
  9085. bool tolua_ret = (bool) self->Empty();
  9086. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  9087. }
  9088. }
  9089. return 1;
  9090. #ifndef TOLUA_RELEASE
  9091. tolua_lerror:
  9092. tolua_error(tolua_S,"#ferror in function 'Empty'.",&tolua_err);
  9093. return 0;
  9094. #endif
  9095. }
  9096. #endif //#ifndef TOLUA_DISABLE
  9097. /* method: new of class Quaternion */
  9098. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new00
  9099. static int tolua_Math_Quaternion_new00(lua_State* tolua_S)
  9100. {
  9101. #ifndef TOLUA_RELEASE
  9102. tolua_Error tolua_err;
  9103. if (
  9104. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9105. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9106. )
  9107. goto tolua_lerror;
  9108. else
  9109. #endif
  9110. {
  9111. {
  9112. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)());
  9113. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9114. }
  9115. }
  9116. return 1;
  9117. #ifndef TOLUA_RELEASE
  9118. tolua_lerror:
  9119. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  9120. return 0;
  9121. #endif
  9122. }
  9123. #endif //#ifndef TOLUA_DISABLE
  9124. /* method: new_local of class Quaternion */
  9125. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new00_local
  9126. static int tolua_Math_Quaternion_new00_local(lua_State* tolua_S)
  9127. {
  9128. #ifndef TOLUA_RELEASE
  9129. tolua_Error tolua_err;
  9130. if (
  9131. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9132. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9133. )
  9134. goto tolua_lerror;
  9135. else
  9136. #endif
  9137. {
  9138. {
  9139. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)());
  9140. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9141. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9142. }
  9143. }
  9144. return 1;
  9145. #ifndef TOLUA_RELEASE
  9146. tolua_lerror:
  9147. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  9148. return 0;
  9149. #endif
  9150. }
  9151. #endif //#ifndef TOLUA_DISABLE
  9152. /* method: new of class Quaternion */
  9153. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new01
  9154. static int tolua_Math_Quaternion_new01(lua_State* tolua_S)
  9155. {
  9156. tolua_Error tolua_err;
  9157. if (
  9158. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9159. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9160. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9161. )
  9162. goto tolua_lerror;
  9163. else
  9164. {
  9165. const Quaternion* quat = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9166. {
  9167. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*quat));
  9168. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9169. }
  9170. }
  9171. return 1;
  9172. tolua_lerror:
  9173. return tolua_Math_Quaternion_new00(tolua_S);
  9174. }
  9175. #endif //#ifndef TOLUA_DISABLE
  9176. /* method: new_local of class Quaternion */
  9177. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new01_local
  9178. static int tolua_Math_Quaternion_new01_local(lua_State* tolua_S)
  9179. {
  9180. tolua_Error tolua_err;
  9181. if (
  9182. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9183. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9184. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9185. )
  9186. goto tolua_lerror;
  9187. else
  9188. {
  9189. const Quaternion* quat = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9190. {
  9191. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*quat));
  9192. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9193. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9194. }
  9195. }
  9196. return 1;
  9197. tolua_lerror:
  9198. return tolua_Math_Quaternion_new00_local(tolua_S);
  9199. }
  9200. #endif //#ifndef TOLUA_DISABLE
  9201. /* method: new of class Quaternion */
  9202. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new02
  9203. static int tolua_Math_Quaternion_new02(lua_State* tolua_S)
  9204. {
  9205. tolua_Error tolua_err;
  9206. if (
  9207. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9208. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9209. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9210. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9211. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  9212. !tolua_isnoobj(tolua_S,6,&tolua_err)
  9213. )
  9214. goto tolua_lerror;
  9215. else
  9216. {
  9217. float w = ((float) tolua_tonumber(tolua_S,2,0));
  9218. float x = ((float) tolua_tonumber(tolua_S,3,0));
  9219. float y = ((float) tolua_tonumber(tolua_S,4,0));
  9220. float z = ((float) tolua_tonumber(tolua_S,5,0));
  9221. {
  9222. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(w,x,y,z));
  9223. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9224. }
  9225. }
  9226. return 1;
  9227. tolua_lerror:
  9228. return tolua_Math_Quaternion_new01(tolua_S);
  9229. }
  9230. #endif //#ifndef TOLUA_DISABLE
  9231. /* method: new_local of class Quaternion */
  9232. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new02_local
  9233. static int tolua_Math_Quaternion_new02_local(lua_State* tolua_S)
  9234. {
  9235. tolua_Error tolua_err;
  9236. if (
  9237. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9238. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9239. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9240. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9241. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  9242. !tolua_isnoobj(tolua_S,6,&tolua_err)
  9243. )
  9244. goto tolua_lerror;
  9245. else
  9246. {
  9247. float w = ((float) tolua_tonumber(tolua_S,2,0));
  9248. float x = ((float) tolua_tonumber(tolua_S,3,0));
  9249. float y = ((float) tolua_tonumber(tolua_S,4,0));
  9250. float z = ((float) tolua_tonumber(tolua_S,5,0));
  9251. {
  9252. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(w,x,y,z));
  9253. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9254. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9255. }
  9256. }
  9257. return 1;
  9258. tolua_lerror:
  9259. return tolua_Math_Quaternion_new01_local(tolua_S);
  9260. }
  9261. #endif //#ifndef TOLUA_DISABLE
  9262. /* method: new of class Quaternion */
  9263. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new03
  9264. static int tolua_Math_Quaternion_new03(lua_State* tolua_S)
  9265. {
  9266. tolua_Error tolua_err;
  9267. if (
  9268. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9269. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9270. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9271. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9272. )
  9273. goto tolua_lerror;
  9274. else
  9275. {
  9276. float angle = ((float) tolua_tonumber(tolua_S,2,0));
  9277. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9278. {
  9279. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(angle,*axis));
  9280. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9281. }
  9282. }
  9283. return 1;
  9284. tolua_lerror:
  9285. return tolua_Math_Quaternion_new02(tolua_S);
  9286. }
  9287. #endif //#ifndef TOLUA_DISABLE
  9288. /* method: new_local of class Quaternion */
  9289. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new03_local
  9290. static int tolua_Math_Quaternion_new03_local(lua_State* tolua_S)
  9291. {
  9292. tolua_Error tolua_err;
  9293. if (
  9294. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9295. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9296. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9297. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9298. )
  9299. goto tolua_lerror;
  9300. else
  9301. {
  9302. float angle = ((float) tolua_tonumber(tolua_S,2,0));
  9303. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9304. {
  9305. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(angle,*axis));
  9306. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9307. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9308. }
  9309. }
  9310. return 1;
  9311. tolua_lerror:
  9312. return tolua_Math_Quaternion_new02_local(tolua_S);
  9313. }
  9314. #endif //#ifndef TOLUA_DISABLE
  9315. /* method: new of class Quaternion */
  9316. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new04
  9317. static int tolua_Math_Quaternion_new04(lua_State* tolua_S)
  9318. {
  9319. tolua_Error tolua_err;
  9320. if (
  9321. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9322. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9323. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9324. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9325. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9326. )
  9327. goto tolua_lerror;
  9328. else
  9329. {
  9330. float x = ((float) tolua_tonumber(tolua_S,2,0));
  9331. float y = ((float) tolua_tonumber(tolua_S,3,0));
  9332. float z = ((float) tolua_tonumber(tolua_S,4,0));
  9333. {
  9334. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(x,y,z));
  9335. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9336. }
  9337. }
  9338. return 1;
  9339. tolua_lerror:
  9340. return tolua_Math_Quaternion_new03(tolua_S);
  9341. }
  9342. #endif //#ifndef TOLUA_DISABLE
  9343. /* method: new_local of class Quaternion */
  9344. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new04_local
  9345. static int tolua_Math_Quaternion_new04_local(lua_State* tolua_S)
  9346. {
  9347. tolua_Error tolua_err;
  9348. if (
  9349. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9350. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9351. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9352. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9353. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9354. )
  9355. goto tolua_lerror;
  9356. else
  9357. {
  9358. float x = ((float) tolua_tonumber(tolua_S,2,0));
  9359. float y = ((float) tolua_tonumber(tolua_S,3,0));
  9360. float z = ((float) tolua_tonumber(tolua_S,4,0));
  9361. {
  9362. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(x,y,z));
  9363. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9364. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9365. }
  9366. }
  9367. return 1;
  9368. tolua_lerror:
  9369. return tolua_Math_Quaternion_new03_local(tolua_S);
  9370. }
  9371. #endif //#ifndef TOLUA_DISABLE
  9372. /* method: new of class Quaternion */
  9373. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new05
  9374. static int tolua_Math_Quaternion_new05(lua_State* tolua_S)
  9375. {
  9376. tolua_Error tolua_err;
  9377. if (
  9378. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9379. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9380. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9381. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9382. )
  9383. goto tolua_lerror;
  9384. else
  9385. {
  9386. const Vector3* start = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9387. const Vector3* end = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9388. {
  9389. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*start,*end));
  9390. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9391. }
  9392. }
  9393. return 1;
  9394. tolua_lerror:
  9395. return tolua_Math_Quaternion_new04(tolua_S);
  9396. }
  9397. #endif //#ifndef TOLUA_DISABLE
  9398. /* method: new_local of class Quaternion */
  9399. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new05_local
  9400. static int tolua_Math_Quaternion_new05_local(lua_State* tolua_S)
  9401. {
  9402. tolua_Error tolua_err;
  9403. if (
  9404. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9405. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9406. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9407. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9408. )
  9409. goto tolua_lerror;
  9410. else
  9411. {
  9412. const Vector3* start = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9413. const Vector3* end = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9414. {
  9415. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*start,*end));
  9416. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9417. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9418. }
  9419. }
  9420. return 1;
  9421. tolua_lerror:
  9422. return tolua_Math_Quaternion_new04_local(tolua_S);
  9423. }
  9424. #endif //#ifndef TOLUA_DISABLE
  9425. /* method: new of class Quaternion */
  9426. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new06
  9427. static int tolua_Math_Quaternion_new06(lua_State* tolua_S)
  9428. {
  9429. tolua_Error tolua_err;
  9430. if (
  9431. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9432. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9433. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9434. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  9435. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9436. )
  9437. goto tolua_lerror;
  9438. else
  9439. {
  9440. const Vector3* xAxis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9441. const Vector3* yAxis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9442. const Vector3* zAxis = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  9443. {
  9444. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*xAxis,*yAxis,*zAxis));
  9445. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9446. }
  9447. }
  9448. return 1;
  9449. tolua_lerror:
  9450. return tolua_Math_Quaternion_new05(tolua_S);
  9451. }
  9452. #endif //#ifndef TOLUA_DISABLE
  9453. /* method: new_local of class Quaternion */
  9454. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new06_local
  9455. static int tolua_Math_Quaternion_new06_local(lua_State* tolua_S)
  9456. {
  9457. tolua_Error tolua_err;
  9458. if (
  9459. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9460. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9461. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9462. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  9463. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9464. )
  9465. goto tolua_lerror;
  9466. else
  9467. {
  9468. const Vector3* xAxis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9469. const Vector3* yAxis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9470. const Vector3* zAxis = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  9471. {
  9472. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*xAxis,*yAxis,*zAxis));
  9473. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9474. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9475. }
  9476. }
  9477. return 1;
  9478. tolua_lerror:
  9479. return tolua_Math_Quaternion_new05_local(tolua_S);
  9480. }
  9481. #endif //#ifndef TOLUA_DISABLE
  9482. /* method: new of class Quaternion */
  9483. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new07
  9484. static int tolua_Math_Quaternion_new07(lua_State* tolua_S)
  9485. {
  9486. tolua_Error tolua_err;
  9487. if (
  9488. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9489. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9490. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9491. )
  9492. goto tolua_lerror;
  9493. else
  9494. {
  9495. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9496. {
  9497. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*matrix));
  9498. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9499. }
  9500. }
  9501. return 1;
  9502. tolua_lerror:
  9503. return tolua_Math_Quaternion_new06(tolua_S);
  9504. }
  9505. #endif //#ifndef TOLUA_DISABLE
  9506. /* method: new_local of class Quaternion */
  9507. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_new07_local
  9508. static int tolua_Math_Quaternion_new07_local(lua_State* tolua_S)
  9509. {
  9510. tolua_Error tolua_err;
  9511. if (
  9512. !tolua_isusertable(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9513. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9514. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9515. )
  9516. goto tolua_lerror;
  9517. else
  9518. {
  9519. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9520. {
  9521. Quaternion* tolua_ret = (Quaternion*) Mtolua_new((Quaternion)(*matrix));
  9522. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Quaternion");
  9523. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9524. }
  9525. }
  9526. return 1;
  9527. tolua_lerror:
  9528. return tolua_Math_Quaternion_new06_local(tolua_S);
  9529. }
  9530. #endif //#ifndef TOLUA_DISABLE
  9531. /* method: operator== of class Quaternion */
  9532. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__eq00
  9533. static int tolua_Math_Quaternion__eq00(lua_State* tolua_S)
  9534. {
  9535. #ifndef TOLUA_RELEASE
  9536. tolua_Error tolua_err;
  9537. if (
  9538. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9539. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9540. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9541. )
  9542. goto tolua_lerror;
  9543. else
  9544. #endif
  9545. {
  9546. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9547. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9548. #ifndef TOLUA_RELEASE
  9549. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  9550. #endif
  9551. {
  9552. bool tolua_ret = (bool) self->operator==(*rhs);
  9553. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  9554. }
  9555. }
  9556. return 1;
  9557. #ifndef TOLUA_RELEASE
  9558. tolua_lerror:
  9559. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  9560. return 0;
  9561. #endif
  9562. }
  9563. #endif //#ifndef TOLUA_DISABLE
  9564. /* method: operator* of class Quaternion */
  9565. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul00
  9566. static int tolua_Math_Quaternion__mul00(lua_State* tolua_S)
  9567. {
  9568. #ifndef TOLUA_RELEASE
  9569. tolua_Error tolua_err;
  9570. if (
  9571. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9572. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9573. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9574. )
  9575. goto tolua_lerror;
  9576. else
  9577. #endif
  9578. {
  9579. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9580. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  9581. #ifndef TOLUA_RELEASE
  9582. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  9583. #endif
  9584. {
  9585. Quaternion tolua_ret = (Quaternion) self->operator*(rhs);
  9586. {
  9587. #ifdef __cplusplus
  9588. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9589. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9590. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9591. #else
  9592. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9593. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9594. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9595. #endif
  9596. }
  9597. }
  9598. }
  9599. return 1;
  9600. #ifndef TOLUA_RELEASE
  9601. tolua_lerror:
  9602. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  9603. return 0;
  9604. #endif
  9605. }
  9606. #endif //#ifndef TOLUA_DISABLE
  9607. /* method: operator- of class Quaternion */
  9608. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__sub00
  9609. static int tolua_Math_Quaternion__sub00(lua_State* tolua_S)
  9610. {
  9611. #ifndef TOLUA_RELEASE
  9612. tolua_Error tolua_err;
  9613. if (
  9614. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9615. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9616. )
  9617. goto tolua_lerror;
  9618. else
  9619. #endif
  9620. {
  9621. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9622. #ifndef TOLUA_RELEASE
  9623. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  9624. #endif
  9625. {
  9626. Quaternion tolua_ret = (Quaternion) self->operator-();
  9627. {
  9628. #ifdef __cplusplus
  9629. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9630. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9631. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9632. #else
  9633. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9634. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9635. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9636. #endif
  9637. }
  9638. }
  9639. }
  9640. return 1;
  9641. #ifndef TOLUA_RELEASE
  9642. tolua_lerror:
  9643. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  9644. return 0;
  9645. #endif
  9646. }
  9647. #endif //#ifndef TOLUA_DISABLE
  9648. /* method: operator+ of class Quaternion */
  9649. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__add00
  9650. static int tolua_Math_Quaternion__add00(lua_State* tolua_S)
  9651. {
  9652. #ifndef TOLUA_RELEASE
  9653. tolua_Error tolua_err;
  9654. if (
  9655. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9656. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9657. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9658. )
  9659. goto tolua_lerror;
  9660. else
  9661. #endif
  9662. {
  9663. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9664. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9665. #ifndef TOLUA_RELEASE
  9666. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  9667. #endif
  9668. {
  9669. Quaternion tolua_ret = (Quaternion) self->operator+(*rhs);
  9670. {
  9671. #ifdef __cplusplus
  9672. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9673. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9674. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9675. #else
  9676. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9677. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9678. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9679. #endif
  9680. }
  9681. }
  9682. }
  9683. return 1;
  9684. #ifndef TOLUA_RELEASE
  9685. tolua_lerror:
  9686. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  9687. return 0;
  9688. #endif
  9689. }
  9690. #endif //#ifndef TOLUA_DISABLE
  9691. /* method: operator- of class Quaternion */
  9692. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__sub01
  9693. static int tolua_Math_Quaternion__sub01(lua_State* tolua_S)
  9694. {
  9695. tolua_Error tolua_err;
  9696. if (
  9697. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9698. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9699. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9700. )
  9701. goto tolua_lerror;
  9702. else
  9703. {
  9704. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9705. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9706. #ifndef TOLUA_RELEASE
  9707. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  9708. #endif
  9709. {
  9710. Quaternion tolua_ret = (Quaternion) self->operator-(*rhs);
  9711. {
  9712. #ifdef __cplusplus
  9713. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9714. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9715. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9716. #else
  9717. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9718. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9719. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9720. #endif
  9721. }
  9722. }
  9723. }
  9724. return 1;
  9725. tolua_lerror:
  9726. return tolua_Math_Quaternion__sub00(tolua_S);
  9727. }
  9728. #endif //#ifndef TOLUA_DISABLE
  9729. /* method: operator* of class Quaternion */
  9730. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul01
  9731. static int tolua_Math_Quaternion__mul01(lua_State* tolua_S)
  9732. {
  9733. tolua_Error tolua_err;
  9734. if (
  9735. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9736. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  9737. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9738. )
  9739. goto tolua_lerror;
  9740. else
  9741. {
  9742. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9743. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  9744. #ifndef TOLUA_RELEASE
  9745. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  9746. #endif
  9747. {
  9748. Quaternion tolua_ret = (Quaternion) self->operator*(*rhs);
  9749. {
  9750. #ifdef __cplusplus
  9751. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  9752. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9753. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9754. #else
  9755. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  9756. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  9757. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9758. #endif
  9759. }
  9760. }
  9761. }
  9762. return 1;
  9763. tolua_lerror:
  9764. return tolua_Math_Quaternion__mul00(tolua_S);
  9765. }
  9766. #endif //#ifndef TOLUA_DISABLE
  9767. /* method: operator* of class Quaternion */
  9768. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion__mul02
  9769. static int tolua_Math_Quaternion__mul02(lua_State* tolua_S)
  9770. {
  9771. tolua_Error tolua_err;
  9772. if (
  9773. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  9774. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9775. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9776. )
  9777. goto tolua_lerror;
  9778. else
  9779. {
  9780. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  9781. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9782. #ifndef TOLUA_RELEASE
  9783. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  9784. #endif
  9785. {
  9786. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  9787. {
  9788. #ifdef __cplusplus
  9789. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  9790. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  9791. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9792. #else
  9793. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  9794. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  9795. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  9796. #endif
  9797. }
  9798. }
  9799. }
  9800. return 1;
  9801. tolua_lerror:
  9802. return tolua_Math_Quaternion__mul01(tolua_S);
  9803. }
  9804. #endif //#ifndef TOLUA_DISABLE
  9805. /* method: FromAngleAxis of class Quaternion */
  9806. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromAngleAxis00
  9807. static int tolua_Math_Quaternion_FromAngleAxis00(lua_State* tolua_S)
  9808. {
  9809. #ifndef TOLUA_RELEASE
  9810. tolua_Error tolua_err;
  9811. if (
  9812. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9813. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9814. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9815. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9816. )
  9817. goto tolua_lerror;
  9818. else
  9819. #endif
  9820. {
  9821. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  9822. float angle = ((float) tolua_tonumber(tolua_S,2,0));
  9823. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9824. #ifndef TOLUA_RELEASE
  9825. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromAngleAxis'", NULL);
  9826. #endif
  9827. {
  9828. self->FromAngleAxis(angle,*axis);
  9829. }
  9830. }
  9831. return 0;
  9832. #ifndef TOLUA_RELEASE
  9833. tolua_lerror:
  9834. tolua_error(tolua_S,"#ferror in function 'FromAngleAxis'.",&tolua_err);
  9835. return 0;
  9836. #endif
  9837. }
  9838. #endif //#ifndef TOLUA_DISABLE
  9839. /* method: FromEulerAngles of class Quaternion */
  9840. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromEulerAngles00
  9841. static int tolua_Math_Quaternion_FromEulerAngles00(lua_State* tolua_S)
  9842. {
  9843. #ifndef TOLUA_RELEASE
  9844. tolua_Error tolua_err;
  9845. if (
  9846. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9847. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  9848. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  9849. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  9850. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9851. )
  9852. goto tolua_lerror;
  9853. else
  9854. #endif
  9855. {
  9856. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  9857. float x = ((float) tolua_tonumber(tolua_S,2,0));
  9858. float y = ((float) tolua_tonumber(tolua_S,3,0));
  9859. float z = ((float) tolua_tonumber(tolua_S,4,0));
  9860. #ifndef TOLUA_RELEASE
  9861. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromEulerAngles'", NULL);
  9862. #endif
  9863. {
  9864. self->FromEulerAngles(x,y,z);
  9865. }
  9866. }
  9867. return 0;
  9868. #ifndef TOLUA_RELEASE
  9869. tolua_lerror:
  9870. tolua_error(tolua_S,"#ferror in function 'FromEulerAngles'.",&tolua_err);
  9871. return 0;
  9872. #endif
  9873. }
  9874. #endif //#ifndef TOLUA_DISABLE
  9875. /* method: FromRotationTo of class Quaternion */
  9876. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromRotationTo00
  9877. static int tolua_Math_Quaternion_FromRotationTo00(lua_State* tolua_S)
  9878. {
  9879. #ifndef TOLUA_RELEASE
  9880. tolua_Error tolua_err;
  9881. if (
  9882. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9883. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9884. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9885. !tolua_isnoobj(tolua_S,4,&tolua_err)
  9886. )
  9887. goto tolua_lerror;
  9888. else
  9889. #endif
  9890. {
  9891. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  9892. const Vector3* start = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9893. const Vector3* end = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9894. #ifndef TOLUA_RELEASE
  9895. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromRotationTo'", NULL);
  9896. #endif
  9897. {
  9898. self->FromRotationTo(*start,*end);
  9899. }
  9900. }
  9901. return 0;
  9902. #ifndef TOLUA_RELEASE
  9903. tolua_lerror:
  9904. tolua_error(tolua_S,"#ferror in function 'FromRotationTo'.",&tolua_err);
  9905. return 0;
  9906. #endif
  9907. }
  9908. #endif //#ifndef TOLUA_DISABLE
  9909. /* method: FromAxes of class Quaternion */
  9910. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromAxes00
  9911. static int tolua_Math_Quaternion_FromAxes00(lua_State* tolua_S)
  9912. {
  9913. #ifndef TOLUA_RELEASE
  9914. tolua_Error tolua_err;
  9915. if (
  9916. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9917. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  9918. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  9919. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  9920. !tolua_isnoobj(tolua_S,5,&tolua_err)
  9921. )
  9922. goto tolua_lerror;
  9923. else
  9924. #endif
  9925. {
  9926. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  9927. const Vector3* xAxis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  9928. const Vector3* yAxis = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  9929. const Vector3* zAxis = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  9930. #ifndef TOLUA_RELEASE
  9931. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromAxes'", NULL);
  9932. #endif
  9933. {
  9934. self->FromAxes(*xAxis,*yAxis,*zAxis);
  9935. }
  9936. }
  9937. return 0;
  9938. #ifndef TOLUA_RELEASE
  9939. tolua_lerror:
  9940. tolua_error(tolua_S,"#ferror in function 'FromAxes'.",&tolua_err);
  9941. return 0;
  9942. #endif
  9943. }
  9944. #endif //#ifndef TOLUA_DISABLE
  9945. /* method: FromRotationMatrix of class Quaternion */
  9946. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_FromRotationMatrix00
  9947. static int tolua_Math_Quaternion_FromRotationMatrix00(lua_State* tolua_S)
  9948. {
  9949. #ifndef TOLUA_RELEASE
  9950. tolua_Error tolua_err;
  9951. if (
  9952. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9953. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Matrix3",0,&tolua_err)) ||
  9954. !tolua_isnoobj(tolua_S,3,&tolua_err)
  9955. )
  9956. goto tolua_lerror;
  9957. else
  9958. #endif
  9959. {
  9960. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  9961. const Matrix3* matrix = ((const Matrix3*) tolua_tousertype(tolua_S,2,0));
  9962. #ifndef TOLUA_RELEASE
  9963. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'FromRotationMatrix'", NULL);
  9964. #endif
  9965. {
  9966. self->FromRotationMatrix(*matrix);
  9967. }
  9968. }
  9969. return 0;
  9970. #ifndef TOLUA_RELEASE
  9971. tolua_lerror:
  9972. tolua_error(tolua_S,"#ferror in function 'FromRotationMatrix'.",&tolua_err);
  9973. return 0;
  9974. #endif
  9975. }
  9976. #endif //#ifndef TOLUA_DISABLE
  9977. /* method: Normalize of class Quaternion */
  9978. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Normalize00
  9979. static int tolua_Math_Quaternion_Normalize00(lua_State* tolua_S)
  9980. {
  9981. #ifndef TOLUA_RELEASE
  9982. tolua_Error tolua_err;
  9983. if (
  9984. !tolua_isusertype(tolua_S,1,"Quaternion",0,&tolua_err) ||
  9985. !tolua_isnoobj(tolua_S,2,&tolua_err)
  9986. )
  9987. goto tolua_lerror;
  9988. else
  9989. #endif
  9990. {
  9991. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  9992. #ifndef TOLUA_RELEASE
  9993. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
  9994. #endif
  9995. {
  9996. float tolua_ret = (float) self->Normalize();
  9997. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  9998. }
  9999. }
  10000. return 1;
  10001. #ifndef TOLUA_RELEASE
  10002. tolua_lerror:
  10003. tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
  10004. return 0;
  10005. #endif
  10006. }
  10007. #endif //#ifndef TOLUA_DISABLE
  10008. /* method: Normalized of class Quaternion */
  10009. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Normalized00
  10010. static int tolua_Math_Quaternion_Normalized00(lua_State* tolua_S)
  10011. {
  10012. #ifndef TOLUA_RELEASE
  10013. tolua_Error tolua_err;
  10014. if (
  10015. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10016. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10017. )
  10018. goto tolua_lerror;
  10019. else
  10020. #endif
  10021. {
  10022. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10023. #ifndef TOLUA_RELEASE
  10024. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalized'", NULL);
  10025. #endif
  10026. {
  10027. Quaternion tolua_ret = (Quaternion) self->Normalized();
  10028. {
  10029. #ifdef __cplusplus
  10030. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10031. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10032. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10033. #else
  10034. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10035. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10036. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10037. #endif
  10038. }
  10039. }
  10040. }
  10041. return 1;
  10042. #ifndef TOLUA_RELEASE
  10043. tolua_lerror:
  10044. tolua_error(tolua_S,"#ferror in function 'Normalized'.",&tolua_err);
  10045. return 0;
  10046. #endif
  10047. }
  10048. #endif //#ifndef TOLUA_DISABLE
  10049. /* method: Inverse of class Quaternion */
  10050. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Inverse00
  10051. static int tolua_Math_Quaternion_Inverse00(lua_State* tolua_S)
  10052. {
  10053. #ifndef TOLUA_RELEASE
  10054. tolua_Error tolua_err;
  10055. if (
  10056. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10057. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10058. )
  10059. goto tolua_lerror;
  10060. else
  10061. #endif
  10062. {
  10063. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10064. #ifndef TOLUA_RELEASE
  10065. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Inverse'", NULL);
  10066. #endif
  10067. {
  10068. Quaternion tolua_ret = (Quaternion) self->Inverse();
  10069. {
  10070. #ifdef __cplusplus
  10071. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10072. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10073. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10074. #else
  10075. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10076. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10077. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10078. #endif
  10079. }
  10080. }
  10081. }
  10082. return 1;
  10083. #ifndef TOLUA_RELEASE
  10084. tolua_lerror:
  10085. tolua_error(tolua_S,"#ferror in function 'Inverse'.",&tolua_err);
  10086. return 0;
  10087. #endif
  10088. }
  10089. #endif //#ifndef TOLUA_DISABLE
  10090. /* method: LengthSquared of class Quaternion */
  10091. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_LengthSquared00
  10092. static int tolua_Math_Quaternion_LengthSquared00(lua_State* tolua_S)
  10093. {
  10094. #ifndef TOLUA_RELEASE
  10095. tolua_Error tolua_err;
  10096. if (
  10097. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10098. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10099. )
  10100. goto tolua_lerror;
  10101. else
  10102. #endif
  10103. {
  10104. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10105. #ifndef TOLUA_RELEASE
  10106. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
  10107. #endif
  10108. {
  10109. float tolua_ret = (float) self->LengthSquared();
  10110. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10111. }
  10112. }
  10113. return 1;
  10114. #ifndef TOLUA_RELEASE
  10115. tolua_lerror:
  10116. tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
  10117. return 0;
  10118. #endif
  10119. }
  10120. #endif //#ifndef TOLUA_DISABLE
  10121. /* method: DotProduct of class Quaternion */
  10122. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_DotProduct00
  10123. static int tolua_Math_Quaternion_DotProduct00(lua_State* tolua_S)
  10124. {
  10125. #ifndef TOLUA_RELEASE
  10126. tolua_Error tolua_err;
  10127. if (
  10128. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10129. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  10130. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10131. )
  10132. goto tolua_lerror;
  10133. else
  10134. #endif
  10135. {
  10136. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10137. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  10138. #ifndef TOLUA_RELEASE
  10139. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  10140. #endif
  10141. {
  10142. float tolua_ret = (float) self->DotProduct(*rhs);
  10143. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10144. }
  10145. }
  10146. return 1;
  10147. #ifndef TOLUA_RELEASE
  10148. tolua_lerror:
  10149. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  10150. return 0;
  10151. #endif
  10152. }
  10153. #endif //#ifndef TOLUA_DISABLE
  10154. /* method: Equals of class Quaternion */
  10155. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Equals00
  10156. static int tolua_Math_Quaternion_Equals00(lua_State* tolua_S)
  10157. {
  10158. #ifndef TOLUA_RELEASE
  10159. tolua_Error tolua_err;
  10160. if (
  10161. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10162. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  10163. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10164. )
  10165. goto tolua_lerror;
  10166. else
  10167. #endif
  10168. {
  10169. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10170. const Quaternion* rhs = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  10171. #ifndef TOLUA_RELEASE
  10172. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  10173. #endif
  10174. {
  10175. bool tolua_ret = (bool) self->Equals(*rhs);
  10176. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  10177. }
  10178. }
  10179. return 1;
  10180. #ifndef TOLUA_RELEASE
  10181. tolua_lerror:
  10182. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  10183. return 0;
  10184. #endif
  10185. }
  10186. #endif //#ifndef TOLUA_DISABLE
  10187. /* method: Conjugate of class Quaternion */
  10188. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Conjugate00
  10189. static int tolua_Math_Quaternion_Conjugate00(lua_State* tolua_S)
  10190. {
  10191. #ifndef TOLUA_RELEASE
  10192. tolua_Error tolua_err;
  10193. if (
  10194. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10195. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10196. )
  10197. goto tolua_lerror;
  10198. else
  10199. #endif
  10200. {
  10201. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10202. #ifndef TOLUA_RELEASE
  10203. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Conjugate'", NULL);
  10204. #endif
  10205. {
  10206. Quaternion tolua_ret = (Quaternion) self->Conjugate();
  10207. {
  10208. #ifdef __cplusplus
  10209. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10210. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10211. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10212. #else
  10213. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10214. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10215. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10216. #endif
  10217. }
  10218. }
  10219. }
  10220. return 1;
  10221. #ifndef TOLUA_RELEASE
  10222. tolua_lerror:
  10223. tolua_error(tolua_S,"#ferror in function 'Conjugate'.",&tolua_err);
  10224. return 0;
  10225. #endif
  10226. }
  10227. #endif //#ifndef TOLUA_DISABLE
  10228. /* method: EulerAngles of class Quaternion */
  10229. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_EulerAngles00
  10230. static int tolua_Math_Quaternion_EulerAngles00(lua_State* tolua_S)
  10231. {
  10232. #ifndef TOLUA_RELEASE
  10233. tolua_Error tolua_err;
  10234. if (
  10235. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10236. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10237. )
  10238. goto tolua_lerror;
  10239. else
  10240. #endif
  10241. {
  10242. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10243. #ifndef TOLUA_RELEASE
  10244. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'EulerAngles'", NULL);
  10245. #endif
  10246. {
  10247. Vector3 tolua_ret = (Vector3) self->EulerAngles();
  10248. {
  10249. #ifdef __cplusplus
  10250. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  10251. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10252. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10253. #else
  10254. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  10255. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10256. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10257. #endif
  10258. }
  10259. }
  10260. }
  10261. return 1;
  10262. #ifndef TOLUA_RELEASE
  10263. tolua_lerror:
  10264. tolua_error(tolua_S,"#ferror in function 'EulerAngles'.",&tolua_err);
  10265. return 0;
  10266. #endif
  10267. }
  10268. #endif //#ifndef TOLUA_DISABLE
  10269. /* method: YawAngle of class Quaternion */
  10270. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_YawAngle00
  10271. static int tolua_Math_Quaternion_YawAngle00(lua_State* tolua_S)
  10272. {
  10273. #ifndef TOLUA_RELEASE
  10274. tolua_Error tolua_err;
  10275. if (
  10276. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10277. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10278. )
  10279. goto tolua_lerror;
  10280. else
  10281. #endif
  10282. {
  10283. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10284. #ifndef TOLUA_RELEASE
  10285. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'YawAngle'", NULL);
  10286. #endif
  10287. {
  10288. float tolua_ret = (float) self->YawAngle();
  10289. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10290. }
  10291. }
  10292. return 1;
  10293. #ifndef TOLUA_RELEASE
  10294. tolua_lerror:
  10295. tolua_error(tolua_S,"#ferror in function 'YawAngle'.",&tolua_err);
  10296. return 0;
  10297. #endif
  10298. }
  10299. #endif //#ifndef TOLUA_DISABLE
  10300. /* method: PitchAngle of class Quaternion */
  10301. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_PitchAngle00
  10302. static int tolua_Math_Quaternion_PitchAngle00(lua_State* tolua_S)
  10303. {
  10304. #ifndef TOLUA_RELEASE
  10305. tolua_Error tolua_err;
  10306. if (
  10307. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10308. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10309. )
  10310. goto tolua_lerror;
  10311. else
  10312. #endif
  10313. {
  10314. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10315. #ifndef TOLUA_RELEASE
  10316. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'PitchAngle'", NULL);
  10317. #endif
  10318. {
  10319. float tolua_ret = (float) self->PitchAngle();
  10320. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10321. }
  10322. }
  10323. return 1;
  10324. #ifndef TOLUA_RELEASE
  10325. tolua_lerror:
  10326. tolua_error(tolua_S,"#ferror in function 'PitchAngle'.",&tolua_err);
  10327. return 0;
  10328. #endif
  10329. }
  10330. #endif //#ifndef TOLUA_DISABLE
  10331. /* method: RollAngle of class Quaternion */
  10332. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_RollAngle00
  10333. static int tolua_Math_Quaternion_RollAngle00(lua_State* tolua_S)
  10334. {
  10335. #ifndef TOLUA_RELEASE
  10336. tolua_Error tolua_err;
  10337. if (
  10338. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10339. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10340. )
  10341. goto tolua_lerror;
  10342. else
  10343. #endif
  10344. {
  10345. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10346. #ifndef TOLUA_RELEASE
  10347. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RollAngle'", NULL);
  10348. #endif
  10349. {
  10350. float tolua_ret = (float) self->RollAngle();
  10351. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10352. }
  10353. }
  10354. return 1;
  10355. #ifndef TOLUA_RELEASE
  10356. tolua_lerror:
  10357. tolua_error(tolua_S,"#ferror in function 'RollAngle'.",&tolua_err);
  10358. return 0;
  10359. #endif
  10360. }
  10361. #endif //#ifndef TOLUA_DISABLE
  10362. /* method: RotationMatrix of class Quaternion */
  10363. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_RotationMatrix00
  10364. static int tolua_Math_Quaternion_RotationMatrix00(lua_State* tolua_S)
  10365. {
  10366. #ifndef TOLUA_RELEASE
  10367. tolua_Error tolua_err;
  10368. if (
  10369. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10370. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10371. )
  10372. goto tolua_lerror;
  10373. else
  10374. #endif
  10375. {
  10376. const Quaternion* self = (const Quaternion*) tolua_tousertype(tolua_S,1,0);
  10377. #ifndef TOLUA_RELEASE
  10378. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RotationMatrix'", NULL);
  10379. #endif
  10380. {
  10381. Matrix3 tolua_ret = (Matrix3) self->RotationMatrix();
  10382. {
  10383. #ifdef __cplusplus
  10384. void* tolua_obj = Mtolua_new((Matrix3)(tolua_ret));
  10385. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  10386. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10387. #else
  10388. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Matrix3));
  10389. tolua_pushusertype(tolua_S,tolua_obj,"Matrix3");
  10390. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10391. #endif
  10392. }
  10393. }
  10394. }
  10395. return 1;
  10396. #ifndef TOLUA_RELEASE
  10397. tolua_lerror:
  10398. tolua_error(tolua_S,"#ferror in function 'RotationMatrix'.",&tolua_err);
  10399. return 0;
  10400. #endif
  10401. }
  10402. #endif //#ifndef TOLUA_DISABLE
  10403. /* method: Slerp of class Quaternion */
  10404. #ifndef TOLUA_DISABLE_tolua_Math_Quaternion_Slerp00
  10405. static int tolua_Math_Quaternion_Slerp00(lua_State* tolua_S)
  10406. {
  10407. #ifndef TOLUA_RELEASE
  10408. tolua_Error tolua_err;
  10409. if (
  10410. !tolua_isusertype(tolua_S,1,"const Quaternion",0,&tolua_err) ||
  10411. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Quaternion",0,&tolua_err)) ||
  10412. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  10413. !tolua_isnoobj(tolua_S,4,&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. Quaternion rhs = *((Quaternion*) tolua_tousertype(tolua_S,2,0));
  10421. float t = ((float) tolua_tonumber(tolua_S,3,0));
  10422. #ifndef TOLUA_RELEASE
  10423. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Slerp'", NULL);
  10424. #endif
  10425. {
  10426. Quaternion tolua_ret = (Quaternion) self->Slerp(rhs,t);
  10427. {
  10428. #ifdef __cplusplus
  10429. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  10430. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10431. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10432. #else
  10433. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  10434. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  10435. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10436. #endif
  10437. }
  10438. }
  10439. }
  10440. return 1;
  10441. #ifndef TOLUA_RELEASE
  10442. tolua_lerror:
  10443. tolua_error(tolua_S,"#ferror in function 'Slerp'.",&tolua_err);
  10444. return 0;
  10445. #endif
  10446. }
  10447. #endif //#ifndef TOLUA_DISABLE
  10448. /* get function: w_ of class Quaternion */
  10449. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_w
  10450. static int tolua_get_Quaternion_w(lua_State* tolua_S)
  10451. {
  10452. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10453. #ifndef TOLUA_RELEASE
  10454. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  10455. #endif
  10456. tolua_pushnumber(tolua_S,(lua_Number)self->w_);
  10457. return 1;
  10458. }
  10459. #endif //#ifndef TOLUA_DISABLE
  10460. /* set function: w_ of class Quaternion */
  10461. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_w
  10462. static int tolua_set_Quaternion_w(lua_State* tolua_S)
  10463. {
  10464. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10465. #ifndef TOLUA_RELEASE
  10466. tolua_Error tolua_err;
  10467. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  10468. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10469. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10470. #endif
  10471. self->w_ = ((float) tolua_tonumber(tolua_S,2,0))
  10472. ;
  10473. return 0;
  10474. }
  10475. #endif //#ifndef TOLUA_DISABLE
  10476. /* get function: x_ of class Quaternion */
  10477. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_x
  10478. static int tolua_get_Quaternion_x(lua_State* tolua_S)
  10479. {
  10480. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10481. #ifndef TOLUA_RELEASE
  10482. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  10483. #endif
  10484. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  10485. return 1;
  10486. }
  10487. #endif //#ifndef TOLUA_DISABLE
  10488. /* set function: x_ of class Quaternion */
  10489. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_x
  10490. static int tolua_set_Quaternion_x(lua_State* tolua_S)
  10491. {
  10492. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10493. #ifndef TOLUA_RELEASE
  10494. tolua_Error tolua_err;
  10495. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  10496. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10497. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10498. #endif
  10499. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  10500. ;
  10501. return 0;
  10502. }
  10503. #endif //#ifndef TOLUA_DISABLE
  10504. /* get function: y_ of class Quaternion */
  10505. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_y
  10506. static int tolua_get_Quaternion_y(lua_State* tolua_S)
  10507. {
  10508. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10509. #ifndef TOLUA_RELEASE
  10510. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  10511. #endif
  10512. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  10513. return 1;
  10514. }
  10515. #endif //#ifndef TOLUA_DISABLE
  10516. /* set function: y_ of class Quaternion */
  10517. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_y
  10518. static int tolua_set_Quaternion_y(lua_State* tolua_S)
  10519. {
  10520. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10521. #ifndef TOLUA_RELEASE
  10522. tolua_Error tolua_err;
  10523. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  10524. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10525. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10526. #endif
  10527. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  10528. ;
  10529. return 0;
  10530. }
  10531. #endif //#ifndef TOLUA_DISABLE
  10532. /* get function: z_ of class Quaternion */
  10533. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_z
  10534. static int tolua_get_Quaternion_z(lua_State* tolua_S)
  10535. {
  10536. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10537. #ifndef TOLUA_RELEASE
  10538. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  10539. #endif
  10540. tolua_pushnumber(tolua_S,(lua_Number)self->z_);
  10541. return 1;
  10542. }
  10543. #endif //#ifndef TOLUA_DISABLE
  10544. /* set function: z_ of class Quaternion */
  10545. #ifndef TOLUA_DISABLE_tolua_set_Quaternion_z
  10546. static int tolua_set_Quaternion_z(lua_State* tolua_S)
  10547. {
  10548. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  10549. #ifndef TOLUA_RELEASE
  10550. tolua_Error tolua_err;
  10551. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  10552. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  10553. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  10554. #endif
  10555. self->z_ = ((float) tolua_tonumber(tolua_S,2,0))
  10556. ;
  10557. return 0;
  10558. }
  10559. #endif //#ifndef TOLUA_DISABLE
  10560. /* get function: IDENTITY of class Quaternion */
  10561. #ifndef TOLUA_DISABLE_tolua_get_Quaternion_IDENTITY
  10562. static int tolua_get_Quaternion_IDENTITY(lua_State* tolua_S)
  10563. {
  10564. tolua_pushusertype(tolua_S,(void*)&Quaternion::IDENTITY,"const Quaternion");
  10565. return 1;
  10566. }
  10567. #endif //#ifndef TOLUA_DISABLE
  10568. /* function: SetRandomSeed */
  10569. #ifndef TOLUA_DISABLE_tolua_Math_SetRandomSeed00
  10570. static int tolua_Math_SetRandomSeed00(lua_State* tolua_S)
  10571. {
  10572. #ifndef TOLUA_RELEASE
  10573. tolua_Error tolua_err;
  10574. if (
  10575. !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
  10576. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10577. )
  10578. goto tolua_lerror;
  10579. else
  10580. #endif
  10581. {
  10582. unsigned seed = ((unsigned) tolua_tonumber(tolua_S,1,0));
  10583. {
  10584. SetRandomSeed(seed);
  10585. }
  10586. }
  10587. return 0;
  10588. #ifndef TOLUA_RELEASE
  10589. tolua_lerror:
  10590. tolua_error(tolua_S,"#ferror in function 'SetRandomSeed'.",&tolua_err);
  10591. return 0;
  10592. #endif
  10593. }
  10594. #endif //#ifndef TOLUA_DISABLE
  10595. /* function: GetRandomSeed */
  10596. #ifndef TOLUA_DISABLE_tolua_Math_GetRandomSeed00
  10597. static int tolua_Math_GetRandomSeed00(lua_State* tolua_S)
  10598. {
  10599. #ifndef TOLUA_RELEASE
  10600. tolua_Error tolua_err;
  10601. if (
  10602. !tolua_isnoobj(tolua_S,1,&tolua_err)
  10603. )
  10604. goto tolua_lerror;
  10605. else
  10606. #endif
  10607. {
  10608. {
  10609. unsigned tolua_ret = (unsigned) GetRandomSeed();
  10610. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10611. }
  10612. }
  10613. return 1;
  10614. #ifndef TOLUA_RELEASE
  10615. tolua_lerror:
  10616. tolua_error(tolua_S,"#ferror in function 'GetRandomSeed'.",&tolua_err);
  10617. return 0;
  10618. #endif
  10619. }
  10620. #endif //#ifndef TOLUA_DISABLE
  10621. /* function: Rand */
  10622. #ifndef TOLUA_DISABLE_tolua_Math_Rand00
  10623. static int tolua_Math_Rand00(lua_State* tolua_S)
  10624. {
  10625. #ifndef TOLUA_RELEASE
  10626. tolua_Error tolua_err;
  10627. if (
  10628. !tolua_isnoobj(tolua_S,1,&tolua_err)
  10629. )
  10630. goto tolua_lerror;
  10631. else
  10632. #endif
  10633. {
  10634. {
  10635. int tolua_ret = (int) Rand();
  10636. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10637. }
  10638. }
  10639. return 1;
  10640. #ifndef TOLUA_RELEASE
  10641. tolua_lerror:
  10642. tolua_error(tolua_S,"#ferror in function 'Rand'.",&tolua_err);
  10643. return 0;
  10644. #endif
  10645. }
  10646. #endif //#ifndef TOLUA_DISABLE
  10647. /* method: new of class Ray */
  10648. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new00
  10649. static int tolua_Math_Ray_new00(lua_State* tolua_S)
  10650. {
  10651. #ifndef TOLUA_RELEASE
  10652. tolua_Error tolua_err;
  10653. if (
  10654. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10655. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10656. )
  10657. goto tolua_lerror;
  10658. else
  10659. #endif
  10660. {
  10661. {
  10662. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)());
  10663. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10664. }
  10665. }
  10666. return 1;
  10667. #ifndef TOLUA_RELEASE
  10668. tolua_lerror:
  10669. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  10670. return 0;
  10671. #endif
  10672. }
  10673. #endif //#ifndef TOLUA_DISABLE
  10674. /* method: new_local of class Ray */
  10675. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new00_local
  10676. static int tolua_Math_Ray_new00_local(lua_State* tolua_S)
  10677. {
  10678. #ifndef TOLUA_RELEASE
  10679. tolua_Error tolua_err;
  10680. if (
  10681. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10682. !tolua_isnoobj(tolua_S,2,&tolua_err)
  10683. )
  10684. goto tolua_lerror;
  10685. else
  10686. #endif
  10687. {
  10688. {
  10689. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)());
  10690. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10691. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10692. }
  10693. }
  10694. return 1;
  10695. #ifndef TOLUA_RELEASE
  10696. tolua_lerror:
  10697. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  10698. return 0;
  10699. #endif
  10700. }
  10701. #endif //#ifndef TOLUA_DISABLE
  10702. /* method: new of class Ray */
  10703. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new01
  10704. static int tolua_Math_Ray_new01(lua_State* tolua_S)
  10705. {
  10706. tolua_Error tolua_err;
  10707. if (
  10708. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10709. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10710. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10711. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10712. )
  10713. goto tolua_lerror;
  10714. else
  10715. {
  10716. const Vector3* origin = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10717. const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10718. {
  10719. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*origin,*direction));
  10720. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10721. }
  10722. }
  10723. return 1;
  10724. tolua_lerror:
  10725. return tolua_Math_Ray_new00(tolua_S);
  10726. }
  10727. #endif //#ifndef TOLUA_DISABLE
  10728. /* method: new_local of class Ray */
  10729. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new01_local
  10730. static int tolua_Math_Ray_new01_local(lua_State* tolua_S)
  10731. {
  10732. tolua_Error tolua_err;
  10733. if (
  10734. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10735. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10736. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10737. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10738. )
  10739. goto tolua_lerror;
  10740. else
  10741. {
  10742. const Vector3* origin = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10743. const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10744. {
  10745. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*origin,*direction));
  10746. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10747. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10748. }
  10749. }
  10750. return 1;
  10751. tolua_lerror:
  10752. return tolua_Math_Ray_new00_local(tolua_S);
  10753. }
  10754. #endif //#ifndef TOLUA_DISABLE
  10755. /* method: new of class Ray */
  10756. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new02
  10757. static int tolua_Math_Ray_new02(lua_State* tolua_S)
  10758. {
  10759. tolua_Error tolua_err;
  10760. if (
  10761. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10762. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  10763. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10764. )
  10765. goto tolua_lerror;
  10766. else
  10767. {
  10768. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  10769. {
  10770. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*ray));
  10771. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10772. }
  10773. }
  10774. return 1;
  10775. tolua_lerror:
  10776. return tolua_Math_Ray_new01(tolua_S);
  10777. }
  10778. #endif //#ifndef TOLUA_DISABLE
  10779. /* method: new_local of class Ray */
  10780. #ifndef TOLUA_DISABLE_tolua_Math_Ray_new02_local
  10781. static int tolua_Math_Ray_new02_local(lua_State* tolua_S)
  10782. {
  10783. tolua_Error tolua_err;
  10784. if (
  10785. !tolua_isusertable(tolua_S,1,"Ray",0,&tolua_err) ||
  10786. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  10787. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10788. )
  10789. goto tolua_lerror;
  10790. else
  10791. {
  10792. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  10793. {
  10794. Ray* tolua_ret = (Ray*) Mtolua_new((Ray)(*ray));
  10795. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Ray");
  10796. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10797. }
  10798. }
  10799. return 1;
  10800. tolua_lerror:
  10801. return tolua_Math_Ray_new01_local(tolua_S);
  10802. }
  10803. #endif //#ifndef TOLUA_DISABLE
  10804. /* method: operator== of class Ray */
  10805. #ifndef TOLUA_DISABLE_tolua_Math_Ray__eq00
  10806. static int tolua_Math_Ray__eq00(lua_State* tolua_S)
  10807. {
  10808. #ifndef TOLUA_RELEASE
  10809. tolua_Error tolua_err;
  10810. if (
  10811. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  10812. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  10813. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10814. )
  10815. goto tolua_lerror;
  10816. else
  10817. #endif
  10818. {
  10819. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  10820. const Ray* rhs = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  10821. #ifndef TOLUA_RELEASE
  10822. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  10823. #endif
  10824. {
  10825. bool tolua_ret = (bool) self->operator==(*rhs);
  10826. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  10827. }
  10828. }
  10829. return 1;
  10830. #ifndef TOLUA_RELEASE
  10831. tolua_lerror:
  10832. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  10833. return 0;
  10834. #endif
  10835. }
  10836. #endif //#ifndef TOLUA_DISABLE
  10837. /* method: Define of class Ray */
  10838. #ifndef TOLUA_DISABLE_tolua_Math_Ray_Define00
  10839. static int tolua_Math_Ray_Define00(lua_State* tolua_S)
  10840. {
  10841. #ifndef TOLUA_RELEASE
  10842. tolua_Error tolua_err;
  10843. if (
  10844. !tolua_isusertype(tolua_S,1,"Ray",0,&tolua_err) ||
  10845. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10846. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  10847. !tolua_isnoobj(tolua_S,4,&tolua_err)
  10848. )
  10849. goto tolua_lerror;
  10850. else
  10851. #endif
  10852. {
  10853. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  10854. const Vector3* origin = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10855. const Vector3* direction = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  10856. #ifndef TOLUA_RELEASE
  10857. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  10858. #endif
  10859. {
  10860. self->Define(*origin,*direction);
  10861. }
  10862. }
  10863. return 0;
  10864. #ifndef TOLUA_RELEASE
  10865. tolua_lerror:
  10866. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  10867. return 0;
  10868. #endif
  10869. }
  10870. #endif //#ifndef TOLUA_DISABLE
  10871. /* method: Project of class Ray */
  10872. #ifndef TOLUA_DISABLE_tolua_Math_Ray_Project00
  10873. static int tolua_Math_Ray_Project00(lua_State* tolua_S)
  10874. {
  10875. #ifndef TOLUA_RELEASE
  10876. tolua_Error tolua_err;
  10877. if (
  10878. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  10879. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10880. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10881. )
  10882. goto tolua_lerror;
  10883. else
  10884. #endif
  10885. {
  10886. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  10887. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10888. #ifndef TOLUA_RELEASE
  10889. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Project'", NULL);
  10890. #endif
  10891. {
  10892. Vector3 tolua_ret = (Vector3) self->Project(*point);
  10893. {
  10894. #ifdef __cplusplus
  10895. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  10896. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10897. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10898. #else
  10899. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  10900. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10901. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10902. #endif
  10903. }
  10904. }
  10905. }
  10906. return 1;
  10907. #ifndef TOLUA_RELEASE
  10908. tolua_lerror:
  10909. tolua_error(tolua_S,"#ferror in function 'Project'.",&tolua_err);
  10910. return 0;
  10911. #endif
  10912. }
  10913. #endif //#ifndef TOLUA_DISABLE
  10914. /* method: Distance of class Ray */
  10915. #ifndef TOLUA_DISABLE_tolua_Math_Ray_Distance00
  10916. static int tolua_Math_Ray_Distance00(lua_State* tolua_S)
  10917. {
  10918. #ifndef TOLUA_RELEASE
  10919. tolua_Error tolua_err;
  10920. if (
  10921. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  10922. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  10923. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10924. )
  10925. goto tolua_lerror;
  10926. else
  10927. #endif
  10928. {
  10929. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  10930. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  10931. #ifndef TOLUA_RELEASE
  10932. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  10933. #endif
  10934. {
  10935. float tolua_ret = (float) self->Distance(*point);
  10936. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  10937. }
  10938. }
  10939. return 1;
  10940. #ifndef TOLUA_RELEASE
  10941. tolua_lerror:
  10942. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  10943. return 0;
  10944. #endif
  10945. }
  10946. #endif //#ifndef TOLUA_DISABLE
  10947. /* method: ClosestPoint of class Ray */
  10948. #ifndef TOLUA_DISABLE_tolua_Math_Ray_ClosestPoint00
  10949. static int tolua_Math_Ray_ClosestPoint00(lua_State* tolua_S)
  10950. {
  10951. #ifndef TOLUA_RELEASE
  10952. tolua_Error tolua_err;
  10953. if (
  10954. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  10955. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Ray",0,&tolua_err)) ||
  10956. !tolua_isnoobj(tolua_S,3,&tolua_err)
  10957. )
  10958. goto tolua_lerror;
  10959. else
  10960. #endif
  10961. {
  10962. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  10963. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,2,0));
  10964. #ifndef TOLUA_RELEASE
  10965. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ClosestPoint'", NULL);
  10966. #endif
  10967. {
  10968. Vector3 tolua_ret = (Vector3) self->ClosestPoint(*ray);
  10969. {
  10970. #ifdef __cplusplus
  10971. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  10972. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10973. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10974. #else
  10975. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  10976. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  10977. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  10978. #endif
  10979. }
  10980. }
  10981. }
  10982. return 1;
  10983. #ifndef TOLUA_RELEASE
  10984. tolua_lerror:
  10985. tolua_error(tolua_S,"#ferror in function 'ClosestPoint'.",&tolua_err);
  10986. return 0;
  10987. #endif
  10988. }
  10989. #endif //#ifndef TOLUA_DISABLE
  10990. /* method: HitDistance of class Ray */
  10991. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance00
  10992. static int tolua_Math_Ray_HitDistance00(lua_State* tolua_S)
  10993. {
  10994. #ifndef TOLUA_RELEASE
  10995. tolua_Error tolua_err;
  10996. if (
  10997. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  10998. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Plane",0,&tolua_err)) ||
  10999. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11000. )
  11001. goto tolua_lerror;
  11002. else
  11003. #endif
  11004. {
  11005. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11006. const Plane* plane = ((const Plane*) tolua_tousertype(tolua_S,2,0));
  11007. #ifndef TOLUA_RELEASE
  11008. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11009. #endif
  11010. {
  11011. float tolua_ret = (float) self->HitDistance(*plane);
  11012. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11013. }
  11014. }
  11015. return 1;
  11016. #ifndef TOLUA_RELEASE
  11017. tolua_lerror:
  11018. tolua_error(tolua_S,"#ferror in function 'HitDistance'.",&tolua_err);
  11019. return 0;
  11020. #endif
  11021. }
  11022. #endif //#ifndef TOLUA_DISABLE
  11023. /* method: HitDistance of class Ray */
  11024. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance01
  11025. static int tolua_Math_Ray_HitDistance01(lua_State* tolua_S)
  11026. {
  11027. tolua_Error tolua_err;
  11028. if (
  11029. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11030. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  11031. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11032. )
  11033. goto tolua_lerror;
  11034. else
  11035. {
  11036. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11037. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  11038. #ifndef TOLUA_RELEASE
  11039. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11040. #endif
  11041. {
  11042. float tolua_ret = (float) self->HitDistance(*box);
  11043. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11044. }
  11045. }
  11046. return 1;
  11047. tolua_lerror:
  11048. return tolua_Math_Ray_HitDistance00(tolua_S);
  11049. }
  11050. #endif //#ifndef TOLUA_DISABLE
  11051. /* method: HitDistance of class Ray */
  11052. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance02
  11053. static int tolua_Math_Ray_HitDistance02(lua_State* tolua_S)
  11054. {
  11055. tolua_Error tolua_err;
  11056. if (
  11057. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11058. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  11059. !tolua_isboolean(tolua_S,3,1,&tolua_err) ||
  11060. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11061. )
  11062. goto tolua_lerror;
  11063. else
  11064. {
  11065. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11066. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  11067. bool solidInside = ((bool) tolua_toboolean(tolua_S,3,true));
  11068. #ifndef TOLUA_RELEASE
  11069. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11070. #endif
  11071. {
  11072. float tolua_ret = (float) self->HitDistance(*frustum,solidInside);
  11073. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11074. }
  11075. }
  11076. return 1;
  11077. tolua_lerror:
  11078. return tolua_Math_Ray_HitDistance01(tolua_S);
  11079. }
  11080. #endif //#ifndef TOLUA_DISABLE
  11081. /* method: HitDistance of class Ray */
  11082. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance03
  11083. static int tolua_Math_Ray_HitDistance03(lua_State* tolua_S)
  11084. {
  11085. tolua_Error tolua_err;
  11086. if (
  11087. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11088. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  11089. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11090. )
  11091. goto tolua_lerror;
  11092. else
  11093. {
  11094. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11095. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  11096. #ifndef TOLUA_RELEASE
  11097. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11098. #endif
  11099. {
  11100. float tolua_ret = (float) self->HitDistance(*sphere);
  11101. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11102. }
  11103. }
  11104. return 1;
  11105. tolua_lerror:
  11106. return tolua_Math_Ray_HitDistance02(tolua_S);
  11107. }
  11108. #endif //#ifndef TOLUA_DISABLE
  11109. /* method: HitDistance of class Ray */
  11110. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance04
  11111. static int tolua_Math_Ray_HitDistance04(lua_State* tolua_S)
  11112. {
  11113. tolua_Error tolua_err;
  11114. if (
  11115. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11116. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  11117. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  11118. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  11119. !tolua_isnoobj(tolua_S,5,&tolua_err)
  11120. )
  11121. goto tolua_lerror;
  11122. else
  11123. {
  11124. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11125. const Vector3* v0 = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  11126. const Vector3* v1 = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  11127. const Vector3* v2 = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  11128. #ifndef TOLUA_RELEASE
  11129. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11130. #endif
  11131. {
  11132. float tolua_ret = (float) self->HitDistance(*v0,*v1,*v2);
  11133. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11134. }
  11135. }
  11136. return 1;
  11137. tolua_lerror:
  11138. return tolua_Math_Ray_HitDistance03(tolua_S);
  11139. }
  11140. #endif //#ifndef TOLUA_DISABLE
  11141. /* method: HitDistance of class Ray */
  11142. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance05
  11143. static int tolua_Math_Ray_HitDistance05(lua_State* tolua_S)
  11144. {
  11145. tolua_Error tolua_err;
  11146. if (
  11147. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11148. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11149. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11150. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11151. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11152. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11153. )
  11154. goto tolua_lerror;
  11155. else
  11156. {
  11157. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11158. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11159. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11160. unsigned vertexStart = ((unsigned) tolua_tonumber(tolua_S,4,0));
  11161. unsigned vertexCount = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11162. #ifndef TOLUA_RELEASE
  11163. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11164. #endif
  11165. {
  11166. float tolua_ret = (float) self->HitDistance(vertexData,vertexSize,vertexStart,vertexCount);
  11167. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11168. }
  11169. }
  11170. return 1;
  11171. tolua_lerror:
  11172. return tolua_Math_Ray_HitDistance04(tolua_S);
  11173. }
  11174. #endif //#ifndef TOLUA_DISABLE
  11175. /* method: HitDistance of class Ray */
  11176. #ifndef TOLUA_DISABLE_tolua_Math_Ray_HitDistance06
  11177. static int tolua_Math_Ray_HitDistance06(lua_State* tolua_S)
  11178. {
  11179. tolua_Error tolua_err;
  11180. if (
  11181. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11182. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11183. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11184. !tolua_isuserdata(tolua_S,4,0,&tolua_err) ||
  11185. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11186. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  11187. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  11188. !tolua_isnoobj(tolua_S,8,&tolua_err)
  11189. )
  11190. goto tolua_lerror;
  11191. else
  11192. {
  11193. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11194. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11195. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11196. const void* indexData = ((const void*) tolua_touserdata(tolua_S,4,0));
  11197. unsigned indexSize = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11198. unsigned indexStart = ((unsigned) tolua_tonumber(tolua_S,6,0));
  11199. unsigned indexCount = ((unsigned) tolua_tonumber(tolua_S,7,0));
  11200. #ifndef TOLUA_RELEASE
  11201. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HitDistance'", NULL);
  11202. #endif
  11203. {
  11204. float tolua_ret = (float) self->HitDistance(vertexData,vertexSize,indexData,indexSize,indexStart,indexCount);
  11205. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  11206. }
  11207. }
  11208. return 1;
  11209. tolua_lerror:
  11210. return tolua_Math_Ray_HitDistance05(tolua_S);
  11211. }
  11212. #endif //#ifndef TOLUA_DISABLE
  11213. /* method: InsideGeometry of class Ray */
  11214. #ifndef TOLUA_DISABLE_tolua_Math_Ray_InsideGeometry00
  11215. static int tolua_Math_Ray_InsideGeometry00(lua_State* tolua_S)
  11216. {
  11217. #ifndef TOLUA_RELEASE
  11218. tolua_Error tolua_err;
  11219. if (
  11220. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11221. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11222. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11223. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11224. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11225. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11226. )
  11227. goto tolua_lerror;
  11228. else
  11229. #endif
  11230. {
  11231. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11232. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11233. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11234. unsigned vertexStart = ((unsigned) tolua_tonumber(tolua_S,4,0));
  11235. unsigned vertexCount = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11236. #ifndef TOLUA_RELEASE
  11237. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'InsideGeometry'", NULL);
  11238. #endif
  11239. {
  11240. bool tolua_ret = (bool) self->InsideGeometry(vertexData,vertexSize,vertexStart,vertexCount);
  11241. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11242. }
  11243. }
  11244. return 1;
  11245. #ifndef TOLUA_RELEASE
  11246. tolua_lerror:
  11247. tolua_error(tolua_S,"#ferror in function 'InsideGeometry'.",&tolua_err);
  11248. return 0;
  11249. #endif
  11250. }
  11251. #endif //#ifndef TOLUA_DISABLE
  11252. /* method: InsideGeometry of class Ray */
  11253. #ifndef TOLUA_DISABLE_tolua_Math_Ray_InsideGeometry01
  11254. static int tolua_Math_Ray_InsideGeometry01(lua_State* tolua_S)
  11255. {
  11256. tolua_Error tolua_err;
  11257. if (
  11258. !tolua_isusertype(tolua_S,1,"const Ray",0,&tolua_err) ||
  11259. !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
  11260. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11261. !tolua_isuserdata(tolua_S,4,0,&tolua_err) ||
  11262. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11263. !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
  11264. !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
  11265. !tolua_isnoobj(tolua_S,8,&tolua_err)
  11266. )
  11267. goto tolua_lerror;
  11268. else
  11269. {
  11270. const Ray* self = (const Ray*) tolua_tousertype(tolua_S,1,0);
  11271. const void* vertexData = ((const void*) tolua_touserdata(tolua_S,2,0));
  11272. unsigned vertexSize = ((unsigned) tolua_tonumber(tolua_S,3,0));
  11273. const void* indexData = ((const void*) tolua_touserdata(tolua_S,4,0));
  11274. unsigned indexSize = ((unsigned) tolua_tonumber(tolua_S,5,0));
  11275. unsigned indexStart = ((unsigned) tolua_tonumber(tolua_S,6,0));
  11276. unsigned indexCount = ((unsigned) tolua_tonumber(tolua_S,7,0));
  11277. #ifndef TOLUA_RELEASE
  11278. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'InsideGeometry'", NULL);
  11279. #endif
  11280. {
  11281. bool tolua_ret = (bool) self->InsideGeometry(vertexData,vertexSize,indexData,indexSize,indexStart,indexCount);
  11282. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11283. }
  11284. }
  11285. return 1;
  11286. tolua_lerror:
  11287. return tolua_Math_Ray_InsideGeometry00(tolua_S);
  11288. }
  11289. #endif //#ifndef TOLUA_DISABLE
  11290. /* get function: origin_ of class Ray */
  11291. #ifndef TOLUA_DISABLE_tolua_get_Ray_origin
  11292. static int tolua_get_Ray_origin(lua_State* tolua_S)
  11293. {
  11294. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11295. #ifndef TOLUA_RELEASE
  11296. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'origin_'",NULL);
  11297. #endif
  11298. tolua_pushusertype(tolua_S,(void*)&self->origin_,"Vector3");
  11299. return 1;
  11300. }
  11301. #endif //#ifndef TOLUA_DISABLE
  11302. /* set function: origin_ of class Ray */
  11303. #ifndef TOLUA_DISABLE_tolua_set_Ray_origin
  11304. static int tolua_set_Ray_origin(lua_State* tolua_S)
  11305. {
  11306. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11307. #ifndef TOLUA_RELEASE
  11308. tolua_Error tolua_err;
  11309. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'origin_'",NULL);
  11310. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  11311. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  11312. #endif
  11313. self->origin_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  11314. ;
  11315. return 0;
  11316. }
  11317. #endif //#ifndef TOLUA_DISABLE
  11318. /* get function: direction_ of class Ray */
  11319. #ifndef TOLUA_DISABLE_tolua_get_Ray_direction
  11320. static int tolua_get_Ray_direction(lua_State* tolua_S)
  11321. {
  11322. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11323. #ifndef TOLUA_RELEASE
  11324. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'direction_'",NULL);
  11325. #endif
  11326. tolua_pushusertype(tolua_S,(void*)&self->direction_,"Vector3");
  11327. return 1;
  11328. }
  11329. #endif //#ifndef TOLUA_DISABLE
  11330. /* set function: direction_ of class Ray */
  11331. #ifndef TOLUA_DISABLE_tolua_set_Ray_direction
  11332. static int tolua_set_Ray_direction(lua_State* tolua_S)
  11333. {
  11334. Ray* self = (Ray*) tolua_tousertype(tolua_S,1,0);
  11335. #ifndef TOLUA_RELEASE
  11336. tolua_Error tolua_err;
  11337. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'direction_'",NULL);
  11338. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  11339. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  11340. #endif
  11341. self->direction_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  11342. ;
  11343. return 0;
  11344. }
  11345. #endif //#ifndef TOLUA_DISABLE
  11346. /* method: new of class Rect */
  11347. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new00
  11348. static int tolua_Math_Rect_new00(lua_State* tolua_S)
  11349. {
  11350. #ifndef TOLUA_RELEASE
  11351. tolua_Error tolua_err;
  11352. if (
  11353. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11354. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11355. )
  11356. goto tolua_lerror;
  11357. else
  11358. #endif
  11359. {
  11360. {
  11361. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)());
  11362. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11363. }
  11364. }
  11365. return 1;
  11366. #ifndef TOLUA_RELEASE
  11367. tolua_lerror:
  11368. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  11369. return 0;
  11370. #endif
  11371. }
  11372. #endif //#ifndef TOLUA_DISABLE
  11373. /* method: new_local of class Rect */
  11374. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new00_local
  11375. static int tolua_Math_Rect_new00_local(lua_State* tolua_S)
  11376. {
  11377. #ifndef TOLUA_RELEASE
  11378. tolua_Error tolua_err;
  11379. if (
  11380. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11381. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11382. )
  11383. goto tolua_lerror;
  11384. else
  11385. #endif
  11386. {
  11387. {
  11388. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)());
  11389. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11390. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11391. }
  11392. }
  11393. return 1;
  11394. #ifndef TOLUA_RELEASE
  11395. tolua_lerror:
  11396. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  11397. return 0;
  11398. #endif
  11399. }
  11400. #endif //#ifndef TOLUA_DISABLE
  11401. /* method: new of class Rect */
  11402. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new01
  11403. static int tolua_Math_Rect_new01(lua_State* tolua_S)
  11404. {
  11405. tolua_Error tolua_err;
  11406. if (
  11407. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11408. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11409. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11410. )
  11411. goto tolua_lerror;
  11412. else
  11413. {
  11414. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11415. {
  11416. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*rect));
  11417. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11418. }
  11419. }
  11420. return 1;
  11421. tolua_lerror:
  11422. return tolua_Math_Rect_new00(tolua_S);
  11423. }
  11424. #endif //#ifndef TOLUA_DISABLE
  11425. /* method: new_local of class Rect */
  11426. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new01_local
  11427. static int tolua_Math_Rect_new01_local(lua_State* tolua_S)
  11428. {
  11429. tolua_Error tolua_err;
  11430. if (
  11431. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11432. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11433. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11434. )
  11435. goto tolua_lerror;
  11436. else
  11437. {
  11438. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11439. {
  11440. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*rect));
  11441. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11442. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11443. }
  11444. }
  11445. return 1;
  11446. tolua_lerror:
  11447. return tolua_Math_Rect_new00_local(tolua_S);
  11448. }
  11449. #endif //#ifndef TOLUA_DISABLE
  11450. /* method: new of class Rect */
  11451. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new02
  11452. static int tolua_Math_Rect_new02(lua_State* tolua_S)
  11453. {
  11454. tolua_Error tolua_err;
  11455. if (
  11456. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11457. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11458. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector2",0,&tolua_err)) ||
  11459. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11460. )
  11461. goto tolua_lerror;
  11462. else
  11463. {
  11464. const Vector2* min = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11465. const Vector2* max = ((const Vector2*) tolua_tousertype(tolua_S,3,0));
  11466. {
  11467. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*min,*max));
  11468. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11469. }
  11470. }
  11471. return 1;
  11472. tolua_lerror:
  11473. return tolua_Math_Rect_new01(tolua_S);
  11474. }
  11475. #endif //#ifndef TOLUA_DISABLE
  11476. /* method: new_local of class Rect */
  11477. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new02_local
  11478. static int tolua_Math_Rect_new02_local(lua_State* tolua_S)
  11479. {
  11480. tolua_Error tolua_err;
  11481. if (
  11482. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11483. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11484. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector2",0,&tolua_err)) ||
  11485. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11486. )
  11487. goto tolua_lerror;
  11488. else
  11489. {
  11490. const Vector2* min = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11491. const Vector2* max = ((const Vector2*) tolua_tousertype(tolua_S,3,0));
  11492. {
  11493. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*min,*max));
  11494. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11495. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11496. }
  11497. }
  11498. return 1;
  11499. tolua_lerror:
  11500. return tolua_Math_Rect_new01_local(tolua_S);
  11501. }
  11502. #endif //#ifndef TOLUA_DISABLE
  11503. /* method: new of class Rect */
  11504. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new03
  11505. static int tolua_Math_Rect_new03(lua_State* tolua_S)
  11506. {
  11507. tolua_Error tolua_err;
  11508. if (
  11509. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11510. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  11511. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11512. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11513. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11514. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11515. )
  11516. goto tolua_lerror;
  11517. else
  11518. {
  11519. float left = ((float) tolua_tonumber(tolua_S,2,0));
  11520. float top = ((float) tolua_tonumber(tolua_S,3,0));
  11521. float right = ((float) tolua_tonumber(tolua_S,4,0));
  11522. float bottom = ((float) tolua_tonumber(tolua_S,5,0));
  11523. {
  11524. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(left,top,right,bottom));
  11525. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11526. }
  11527. }
  11528. return 1;
  11529. tolua_lerror:
  11530. return tolua_Math_Rect_new02(tolua_S);
  11531. }
  11532. #endif //#ifndef TOLUA_DISABLE
  11533. /* method: new_local of class Rect */
  11534. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new03_local
  11535. static int tolua_Math_Rect_new03_local(lua_State* tolua_S)
  11536. {
  11537. tolua_Error tolua_err;
  11538. if (
  11539. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11540. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  11541. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  11542. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  11543. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  11544. !tolua_isnoobj(tolua_S,6,&tolua_err)
  11545. )
  11546. goto tolua_lerror;
  11547. else
  11548. {
  11549. float left = ((float) tolua_tonumber(tolua_S,2,0));
  11550. float top = ((float) tolua_tonumber(tolua_S,3,0));
  11551. float right = ((float) tolua_tonumber(tolua_S,4,0));
  11552. float bottom = ((float) tolua_tonumber(tolua_S,5,0));
  11553. {
  11554. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(left,top,right,bottom));
  11555. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11556. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11557. }
  11558. }
  11559. return 1;
  11560. tolua_lerror:
  11561. return tolua_Math_Rect_new02_local(tolua_S);
  11562. }
  11563. #endif //#ifndef TOLUA_DISABLE
  11564. /* method: new of class Rect */
  11565. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new04
  11566. static int tolua_Math_Rect_new04(lua_State* tolua_S)
  11567. {
  11568. tolua_Error tolua_err;
  11569. if (
  11570. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11571. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  11572. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11573. )
  11574. goto tolua_lerror;
  11575. else
  11576. {
  11577. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  11578. {
  11579. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*vector));
  11580. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11581. }
  11582. }
  11583. return 1;
  11584. tolua_lerror:
  11585. return tolua_Math_Rect_new03(tolua_S);
  11586. }
  11587. #endif //#ifndef TOLUA_DISABLE
  11588. /* method: new_local of class Rect */
  11589. #ifndef TOLUA_DISABLE_tolua_Math_Rect_new04_local
  11590. static int tolua_Math_Rect_new04_local(lua_State* tolua_S)
  11591. {
  11592. tolua_Error tolua_err;
  11593. if (
  11594. !tolua_isusertable(tolua_S,1,"Rect",0,&tolua_err) ||
  11595. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  11596. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11597. )
  11598. goto tolua_lerror;
  11599. else
  11600. {
  11601. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  11602. {
  11603. Rect* tolua_ret = (Rect*) Mtolua_new((Rect)(*vector));
  11604. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Rect");
  11605. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11606. }
  11607. }
  11608. return 1;
  11609. tolua_lerror:
  11610. return tolua_Math_Rect_new03_local(tolua_S);
  11611. }
  11612. #endif //#ifndef TOLUA_DISABLE
  11613. /* method: operator== of class Rect */
  11614. #ifndef TOLUA_DISABLE_tolua_Math_Rect__eq00
  11615. static int tolua_Math_Rect__eq00(lua_State* tolua_S)
  11616. {
  11617. #ifndef TOLUA_RELEASE
  11618. tolua_Error tolua_err;
  11619. if (
  11620. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  11621. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11622. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11623. )
  11624. goto tolua_lerror;
  11625. else
  11626. #endif
  11627. {
  11628. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  11629. const Rect* rhs = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11630. #ifndef TOLUA_RELEASE
  11631. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  11632. #endif
  11633. {
  11634. bool tolua_ret = (bool) self->operator==(*rhs);
  11635. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  11636. }
  11637. }
  11638. return 1;
  11639. #ifndef TOLUA_RELEASE
  11640. tolua_lerror:
  11641. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  11642. return 0;
  11643. #endif
  11644. }
  11645. #endif //#ifndef TOLUA_DISABLE
  11646. /* method: Define of class Rect */
  11647. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Define00
  11648. static int tolua_Math_Rect_Define00(lua_State* tolua_S)
  11649. {
  11650. #ifndef TOLUA_RELEASE
  11651. tolua_Error tolua_err;
  11652. if (
  11653. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11654. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11655. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11656. )
  11657. goto tolua_lerror;
  11658. else
  11659. #endif
  11660. {
  11661. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11662. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11663. #ifndef TOLUA_RELEASE
  11664. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11665. #endif
  11666. {
  11667. self->Define(*rect);
  11668. }
  11669. }
  11670. return 0;
  11671. #ifndef TOLUA_RELEASE
  11672. tolua_lerror:
  11673. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  11674. return 0;
  11675. #endif
  11676. }
  11677. #endif //#ifndef TOLUA_DISABLE
  11678. /* method: Define of class Rect */
  11679. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Define01
  11680. static int tolua_Math_Rect_Define01(lua_State* tolua_S)
  11681. {
  11682. tolua_Error tolua_err;
  11683. if (
  11684. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11685. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11686. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector2",0,&tolua_err)) ||
  11687. !tolua_isnoobj(tolua_S,4,&tolua_err)
  11688. )
  11689. goto tolua_lerror;
  11690. else
  11691. {
  11692. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11693. const Vector2* min = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11694. const Vector2* max = ((const Vector2*) tolua_tousertype(tolua_S,3,0));
  11695. #ifndef TOLUA_RELEASE
  11696. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11697. #endif
  11698. {
  11699. self->Define(*min,*max);
  11700. }
  11701. }
  11702. return 0;
  11703. tolua_lerror:
  11704. return tolua_Math_Rect_Define00(tolua_S);
  11705. }
  11706. #endif //#ifndef TOLUA_DISABLE
  11707. /* method: Define of class Rect */
  11708. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Define02
  11709. static int tolua_Math_Rect_Define02(lua_State* tolua_S)
  11710. {
  11711. tolua_Error tolua_err;
  11712. if (
  11713. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11714. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  11715. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11716. )
  11717. goto tolua_lerror;
  11718. else
  11719. {
  11720. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11721. const Vector2* point = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11722. #ifndef TOLUA_RELEASE
  11723. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  11724. #endif
  11725. {
  11726. self->Define(*point);
  11727. }
  11728. }
  11729. return 0;
  11730. tolua_lerror:
  11731. return tolua_Math_Rect_Define01(tolua_S);
  11732. }
  11733. #endif //#ifndef TOLUA_DISABLE
  11734. /* method: Merge of class Rect */
  11735. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Merge00
  11736. static int tolua_Math_Rect_Merge00(lua_State* tolua_S)
  11737. {
  11738. #ifndef TOLUA_RELEASE
  11739. tolua_Error tolua_err;
  11740. if (
  11741. !tolua_isusertype(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_isnoobj(tolua_S,3,&tolua_err)
  11744. )
  11745. goto tolua_lerror;
  11746. else
  11747. #endif
  11748. {
  11749. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11750. const Vector2* point = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  11751. #ifndef TOLUA_RELEASE
  11752. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  11753. #endif
  11754. {
  11755. self->Merge(*point);
  11756. }
  11757. }
  11758. return 0;
  11759. #ifndef TOLUA_RELEASE
  11760. tolua_lerror:
  11761. tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err);
  11762. return 0;
  11763. #endif
  11764. }
  11765. #endif //#ifndef TOLUA_DISABLE
  11766. /* method: Merge of class Rect */
  11767. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Merge01
  11768. static int tolua_Math_Rect_Merge01(lua_State* tolua_S)
  11769. {
  11770. tolua_Error tolua_err;
  11771. if (
  11772. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11773. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11774. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11775. )
  11776. goto tolua_lerror;
  11777. else
  11778. {
  11779. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11780. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11781. #ifndef TOLUA_RELEASE
  11782. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  11783. #endif
  11784. {
  11785. self->Merge(*rect);
  11786. }
  11787. }
  11788. return 0;
  11789. tolua_lerror:
  11790. return tolua_Math_Rect_Merge00(tolua_S);
  11791. }
  11792. #endif //#ifndef TOLUA_DISABLE
  11793. /* method: Clear of class Rect */
  11794. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Clear00
  11795. static int tolua_Math_Rect_Clear00(lua_State* tolua_S)
  11796. {
  11797. #ifndef TOLUA_RELEASE
  11798. tolua_Error tolua_err;
  11799. if (
  11800. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11801. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11802. )
  11803. goto tolua_lerror;
  11804. else
  11805. #endif
  11806. {
  11807. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11808. #ifndef TOLUA_RELEASE
  11809. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  11810. #endif
  11811. {
  11812. self->Clear();
  11813. }
  11814. }
  11815. return 0;
  11816. #ifndef TOLUA_RELEASE
  11817. tolua_lerror:
  11818. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  11819. return 0;
  11820. #endif
  11821. }
  11822. #endif //#ifndef TOLUA_DISABLE
  11823. /* method: Clip of class Rect */
  11824. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Clip00
  11825. static int tolua_Math_Rect_Clip00(lua_State* tolua_S)
  11826. {
  11827. #ifndef TOLUA_RELEASE
  11828. tolua_Error tolua_err;
  11829. if (
  11830. !tolua_isusertype(tolua_S,1,"Rect",0,&tolua_err) ||
  11831. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11832. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11833. )
  11834. goto tolua_lerror;
  11835. else
  11836. #endif
  11837. {
  11838. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  11839. const Rect* rect = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11840. #ifndef TOLUA_RELEASE
  11841. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clip'", NULL);
  11842. #endif
  11843. {
  11844. self->Clip(*rect);
  11845. }
  11846. }
  11847. return 0;
  11848. #ifndef TOLUA_RELEASE
  11849. tolua_lerror:
  11850. tolua_error(tolua_S,"#ferror in function 'Clip'.",&tolua_err);
  11851. return 0;
  11852. #endif
  11853. }
  11854. #endif //#ifndef TOLUA_DISABLE
  11855. /* method: Center of class Rect */
  11856. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Center00
  11857. static int tolua_Math_Rect_Center00(lua_State* tolua_S)
  11858. {
  11859. #ifndef TOLUA_RELEASE
  11860. tolua_Error tolua_err;
  11861. if (
  11862. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  11863. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11864. )
  11865. goto tolua_lerror;
  11866. else
  11867. #endif
  11868. {
  11869. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  11870. #ifndef TOLUA_RELEASE
  11871. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Center'", NULL);
  11872. #endif
  11873. {
  11874. Vector2 tolua_ret = (Vector2) self->Center();
  11875. {
  11876. #ifdef __cplusplus
  11877. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  11878. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  11879. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11880. #else
  11881. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  11882. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  11883. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11884. #endif
  11885. }
  11886. }
  11887. }
  11888. return 1;
  11889. #ifndef TOLUA_RELEASE
  11890. tolua_lerror:
  11891. tolua_error(tolua_S,"#ferror in function 'Center'.",&tolua_err);
  11892. return 0;
  11893. #endif
  11894. }
  11895. #endif //#ifndef TOLUA_DISABLE
  11896. /* method: Size of class Rect */
  11897. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Size00
  11898. static int tolua_Math_Rect_Size00(lua_State* tolua_S)
  11899. {
  11900. #ifndef TOLUA_RELEASE
  11901. tolua_Error tolua_err;
  11902. if (
  11903. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  11904. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11905. )
  11906. goto tolua_lerror;
  11907. else
  11908. #endif
  11909. {
  11910. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  11911. #ifndef TOLUA_RELEASE
  11912. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL);
  11913. #endif
  11914. {
  11915. Vector2 tolua_ret = (Vector2) self->Size();
  11916. {
  11917. #ifdef __cplusplus
  11918. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  11919. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  11920. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11921. #else
  11922. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  11923. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  11924. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11925. #endif
  11926. }
  11927. }
  11928. }
  11929. return 1;
  11930. #ifndef TOLUA_RELEASE
  11931. tolua_lerror:
  11932. tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err);
  11933. return 0;
  11934. #endif
  11935. }
  11936. #endif //#ifndef TOLUA_DISABLE
  11937. /* method: HalfSize of class Rect */
  11938. #ifndef TOLUA_DISABLE_tolua_Math_Rect_HalfSize00
  11939. static int tolua_Math_Rect_HalfSize00(lua_State* tolua_S)
  11940. {
  11941. #ifndef TOLUA_RELEASE
  11942. tolua_Error tolua_err;
  11943. if (
  11944. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  11945. !tolua_isnoobj(tolua_S,2,&tolua_err)
  11946. )
  11947. goto tolua_lerror;
  11948. else
  11949. #endif
  11950. {
  11951. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  11952. #ifndef TOLUA_RELEASE
  11953. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'HalfSize'", NULL);
  11954. #endif
  11955. {
  11956. Vector2 tolua_ret = (Vector2) self->HalfSize();
  11957. {
  11958. #ifdef __cplusplus
  11959. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  11960. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  11961. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11962. #else
  11963. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  11964. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  11965. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  11966. #endif
  11967. }
  11968. }
  11969. }
  11970. return 1;
  11971. #ifndef TOLUA_RELEASE
  11972. tolua_lerror:
  11973. tolua_error(tolua_S,"#ferror in function 'HalfSize'.",&tolua_err);
  11974. return 0;
  11975. #endif
  11976. }
  11977. #endif //#ifndef TOLUA_DISABLE
  11978. /* method: Equals of class Rect */
  11979. #ifndef TOLUA_DISABLE_tolua_Math_Rect_Equals00
  11980. static int tolua_Math_Rect_Equals00(lua_State* tolua_S)
  11981. {
  11982. #ifndef TOLUA_RELEASE
  11983. tolua_Error tolua_err;
  11984. if (
  11985. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  11986. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Rect",0,&tolua_err)) ||
  11987. !tolua_isnoobj(tolua_S,3,&tolua_err)
  11988. )
  11989. goto tolua_lerror;
  11990. else
  11991. #endif
  11992. {
  11993. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  11994. const Rect* rhs = ((const Rect*) tolua_tousertype(tolua_S,2,0));
  11995. #ifndef TOLUA_RELEASE
  11996. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  11997. #endif
  11998. {
  11999. bool tolua_ret = (bool) self->Equals(*rhs);
  12000. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  12001. }
  12002. }
  12003. return 1;
  12004. #ifndef TOLUA_RELEASE
  12005. tolua_lerror:
  12006. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  12007. return 0;
  12008. #endif
  12009. }
  12010. #endif //#ifndef TOLUA_DISABLE
  12011. /* method: ToVector4 of class Rect */
  12012. #ifndef TOLUA_DISABLE_tolua_Math_Rect_ToVector400
  12013. static int tolua_Math_Rect_ToVector400(lua_State* tolua_S)
  12014. {
  12015. #ifndef TOLUA_RELEASE
  12016. tolua_Error tolua_err;
  12017. if (
  12018. !tolua_isusertype(tolua_S,1,"const Rect",0,&tolua_err) ||
  12019. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12020. )
  12021. goto tolua_lerror;
  12022. else
  12023. #endif
  12024. {
  12025. const Rect* self = (const Rect*) tolua_tousertype(tolua_S,1,0);
  12026. #ifndef TOLUA_RELEASE
  12027. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ToVector4'", NULL);
  12028. #endif
  12029. {
  12030. Vector4 tolua_ret = (Vector4) self->ToVector4();
  12031. {
  12032. #ifdef __cplusplus
  12033. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  12034. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  12035. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12036. #else
  12037. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  12038. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  12039. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12040. #endif
  12041. }
  12042. }
  12043. }
  12044. return 1;
  12045. #ifndef TOLUA_RELEASE
  12046. tolua_lerror:
  12047. tolua_error(tolua_S,"#ferror in function 'ToVector4'.",&tolua_err);
  12048. return 0;
  12049. #endif
  12050. }
  12051. #endif //#ifndef TOLUA_DISABLE
  12052. /* get function: min_ of class Rect */
  12053. #ifndef TOLUA_DISABLE_tolua_get_Rect_min
  12054. static int tolua_get_Rect_min(lua_State* tolua_S)
  12055. {
  12056. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12057. #ifndef TOLUA_RELEASE
  12058. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  12059. #endif
  12060. tolua_pushusertype(tolua_S,(void*)&self->min_,"Vector2");
  12061. return 1;
  12062. }
  12063. #endif //#ifndef TOLUA_DISABLE
  12064. /* set function: min_ of class Rect */
  12065. #ifndef TOLUA_DISABLE_tolua_set_Rect_min
  12066. static int tolua_set_Rect_min(lua_State* tolua_S)
  12067. {
  12068. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12069. #ifndef TOLUA_RELEASE
  12070. tolua_Error tolua_err;
  12071. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'min_'",NULL);
  12072. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector2",0,&tolua_err)))
  12073. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12074. #endif
  12075. self->min_ = *((Vector2*) tolua_tousertype(tolua_S,2,0))
  12076. ;
  12077. return 0;
  12078. }
  12079. #endif //#ifndef TOLUA_DISABLE
  12080. /* get function: max_ of class Rect */
  12081. #ifndef TOLUA_DISABLE_tolua_get_Rect_max
  12082. static int tolua_get_Rect_max(lua_State* tolua_S)
  12083. {
  12084. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12085. #ifndef TOLUA_RELEASE
  12086. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  12087. #endif
  12088. tolua_pushusertype(tolua_S,(void*)&self->max_,"Vector2");
  12089. return 1;
  12090. }
  12091. #endif //#ifndef TOLUA_DISABLE
  12092. /* set function: max_ of class Rect */
  12093. #ifndef TOLUA_DISABLE_tolua_set_Rect_max
  12094. static int tolua_set_Rect_max(lua_State* tolua_S)
  12095. {
  12096. Rect* self = (Rect*) tolua_tousertype(tolua_S,1,0);
  12097. #ifndef TOLUA_RELEASE
  12098. tolua_Error tolua_err;
  12099. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_'",NULL);
  12100. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector2",0,&tolua_err)))
  12101. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12102. #endif
  12103. self->max_ = *((Vector2*) tolua_tousertype(tolua_S,2,0))
  12104. ;
  12105. return 0;
  12106. }
  12107. #endif //#ifndef TOLUA_DISABLE
  12108. /* get function: FULL of class Rect */
  12109. #ifndef TOLUA_DISABLE_tolua_get_Rect_FULL
  12110. static int tolua_get_Rect_FULL(lua_State* tolua_S)
  12111. {
  12112. tolua_pushusertype(tolua_S,(void*)&Rect::FULL,"const Rect");
  12113. return 1;
  12114. }
  12115. #endif //#ifndef TOLUA_DISABLE
  12116. /* get function: POSITIVE of class Rect */
  12117. #ifndef TOLUA_DISABLE_tolua_get_Rect_POSITIVE
  12118. static int tolua_get_Rect_POSITIVE(lua_State* tolua_S)
  12119. {
  12120. tolua_pushusertype(tolua_S,(void*)&Rect::POSITIVE,"const Rect");
  12121. return 1;
  12122. }
  12123. #endif //#ifndef TOLUA_DISABLE
  12124. /* get function: ZERO of class Rect */
  12125. #ifndef TOLUA_DISABLE_tolua_get_Rect_ZERO
  12126. static int tolua_get_Rect_ZERO(lua_State* tolua_S)
  12127. {
  12128. tolua_pushusertype(tolua_S,(void*)&Rect::ZERO,"const Rect");
  12129. return 1;
  12130. }
  12131. #endif //#ifndef TOLUA_DISABLE
  12132. /* method: new of class IntRect */
  12133. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new00
  12134. static int tolua_Math_IntRect_new00(lua_State* tolua_S)
  12135. {
  12136. #ifndef TOLUA_RELEASE
  12137. tolua_Error tolua_err;
  12138. if (
  12139. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12140. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12141. )
  12142. goto tolua_lerror;
  12143. else
  12144. #endif
  12145. {
  12146. {
  12147. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)());
  12148. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12149. }
  12150. }
  12151. return 1;
  12152. #ifndef TOLUA_RELEASE
  12153. tolua_lerror:
  12154. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12155. return 0;
  12156. #endif
  12157. }
  12158. #endif //#ifndef TOLUA_DISABLE
  12159. /* method: new_local of class IntRect */
  12160. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new00_local
  12161. static int tolua_Math_IntRect_new00_local(lua_State* tolua_S)
  12162. {
  12163. #ifndef TOLUA_RELEASE
  12164. tolua_Error tolua_err;
  12165. if (
  12166. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12167. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12168. )
  12169. goto tolua_lerror;
  12170. else
  12171. #endif
  12172. {
  12173. {
  12174. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)());
  12175. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12176. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12177. }
  12178. }
  12179. return 1;
  12180. #ifndef TOLUA_RELEASE
  12181. tolua_lerror:
  12182. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12183. return 0;
  12184. #endif
  12185. }
  12186. #endif //#ifndef TOLUA_DISABLE
  12187. /* method: new of class IntRect */
  12188. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new01
  12189. static int tolua_Math_IntRect_new01(lua_State* tolua_S)
  12190. {
  12191. tolua_Error tolua_err;
  12192. if (
  12193. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12194. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  12195. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12196. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  12197. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  12198. !tolua_isnoobj(tolua_S,6,&tolua_err)
  12199. )
  12200. goto tolua_lerror;
  12201. else
  12202. {
  12203. int left = ((int) tolua_tonumber(tolua_S,2,0));
  12204. int top = ((int) tolua_tonumber(tolua_S,3,0));
  12205. int right = ((int) tolua_tonumber(tolua_S,4,0));
  12206. int bottom = ((int) tolua_tonumber(tolua_S,5,0));
  12207. {
  12208. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)(left,top,right,bottom));
  12209. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12210. }
  12211. }
  12212. return 1;
  12213. tolua_lerror:
  12214. return tolua_Math_IntRect_new00(tolua_S);
  12215. }
  12216. #endif //#ifndef TOLUA_DISABLE
  12217. /* method: new_local of class IntRect */
  12218. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_new01_local
  12219. static int tolua_Math_IntRect_new01_local(lua_State* tolua_S)
  12220. {
  12221. tolua_Error tolua_err;
  12222. if (
  12223. !tolua_isusertable(tolua_S,1,"IntRect",0,&tolua_err) ||
  12224. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  12225. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12226. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  12227. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  12228. !tolua_isnoobj(tolua_S,6,&tolua_err)
  12229. )
  12230. goto tolua_lerror;
  12231. else
  12232. {
  12233. int left = ((int) tolua_tonumber(tolua_S,2,0));
  12234. int top = ((int) tolua_tonumber(tolua_S,3,0));
  12235. int right = ((int) tolua_tonumber(tolua_S,4,0));
  12236. int bottom = ((int) tolua_tonumber(tolua_S,5,0));
  12237. {
  12238. IntRect* tolua_ret = (IntRect*) Mtolua_new((IntRect)(left,top,right,bottom));
  12239. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntRect");
  12240. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12241. }
  12242. }
  12243. return 1;
  12244. tolua_lerror:
  12245. return tolua_Math_IntRect_new00_local(tolua_S);
  12246. }
  12247. #endif //#ifndef TOLUA_DISABLE
  12248. /* method: operator== of class IntRect */
  12249. #ifndef TOLUA_DISABLE_tolua_Math_IntRect__eq00
  12250. static int tolua_Math_IntRect__eq00(lua_State* tolua_S)
  12251. {
  12252. #ifndef TOLUA_RELEASE
  12253. tolua_Error tolua_err;
  12254. if (
  12255. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12256. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntRect",0,&tolua_err)) ||
  12257. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12258. )
  12259. goto tolua_lerror;
  12260. else
  12261. #endif
  12262. {
  12263. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12264. const IntRect* rhs = ((const IntRect*) tolua_tousertype(tolua_S,2,0));
  12265. #ifndef TOLUA_RELEASE
  12266. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  12267. #endif
  12268. {
  12269. bool tolua_ret = (bool) self->operator==(*rhs);
  12270. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  12271. }
  12272. }
  12273. return 1;
  12274. #ifndef TOLUA_RELEASE
  12275. tolua_lerror:
  12276. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  12277. return 0;
  12278. #endif
  12279. }
  12280. #endif //#ifndef TOLUA_DISABLE
  12281. /* method: Size of class IntRect */
  12282. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_Size00
  12283. static int tolua_Math_IntRect_Size00(lua_State* tolua_S)
  12284. {
  12285. #ifndef TOLUA_RELEASE
  12286. tolua_Error tolua_err;
  12287. if (
  12288. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12289. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12290. )
  12291. goto tolua_lerror;
  12292. else
  12293. #endif
  12294. {
  12295. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12296. #ifndef TOLUA_RELEASE
  12297. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Size'", NULL);
  12298. #endif
  12299. {
  12300. IntVector2 tolua_ret = (IntVector2) self->Size();
  12301. {
  12302. #ifdef __cplusplus
  12303. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  12304. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  12305. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12306. #else
  12307. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  12308. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  12309. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12310. #endif
  12311. }
  12312. }
  12313. }
  12314. return 1;
  12315. #ifndef TOLUA_RELEASE
  12316. tolua_lerror:
  12317. tolua_error(tolua_S,"#ferror in function 'Size'.",&tolua_err);
  12318. return 0;
  12319. #endif
  12320. }
  12321. #endif //#ifndef TOLUA_DISABLE
  12322. /* method: Width of class IntRect */
  12323. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_Width00
  12324. static int tolua_Math_IntRect_Width00(lua_State* tolua_S)
  12325. {
  12326. #ifndef TOLUA_RELEASE
  12327. tolua_Error tolua_err;
  12328. if (
  12329. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12330. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12331. )
  12332. goto tolua_lerror;
  12333. else
  12334. #endif
  12335. {
  12336. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12337. #ifndef TOLUA_RELEASE
  12338. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Width'", NULL);
  12339. #endif
  12340. {
  12341. int tolua_ret = (int) self->Width();
  12342. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  12343. }
  12344. }
  12345. return 1;
  12346. #ifndef TOLUA_RELEASE
  12347. tolua_lerror:
  12348. tolua_error(tolua_S,"#ferror in function 'Width'.",&tolua_err);
  12349. return 0;
  12350. #endif
  12351. }
  12352. #endif //#ifndef TOLUA_DISABLE
  12353. /* method: Height of class IntRect */
  12354. #ifndef TOLUA_DISABLE_tolua_Math_IntRect_Height00
  12355. static int tolua_Math_IntRect_Height00(lua_State* tolua_S)
  12356. {
  12357. #ifndef TOLUA_RELEASE
  12358. tolua_Error tolua_err;
  12359. if (
  12360. !tolua_isusertype(tolua_S,1,"const IntRect",0,&tolua_err) ||
  12361. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12362. )
  12363. goto tolua_lerror;
  12364. else
  12365. #endif
  12366. {
  12367. const IntRect* self = (const IntRect*) tolua_tousertype(tolua_S,1,0);
  12368. #ifndef TOLUA_RELEASE
  12369. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Height'", NULL);
  12370. #endif
  12371. {
  12372. int tolua_ret = (int) self->Height();
  12373. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  12374. }
  12375. }
  12376. return 1;
  12377. #ifndef TOLUA_RELEASE
  12378. tolua_lerror:
  12379. tolua_error(tolua_S,"#ferror in function 'Height'.",&tolua_err);
  12380. return 0;
  12381. #endif
  12382. }
  12383. #endif //#ifndef TOLUA_DISABLE
  12384. /* get function: left_ of class IntRect */
  12385. #ifndef TOLUA_DISABLE_tolua_get_IntRect_left
  12386. static int tolua_get_IntRect_left(lua_State* tolua_S)
  12387. {
  12388. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12389. #ifndef TOLUA_RELEASE
  12390. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'left_'",NULL);
  12391. #endif
  12392. tolua_pushnumber(tolua_S,(lua_Number)self->left_);
  12393. return 1;
  12394. }
  12395. #endif //#ifndef TOLUA_DISABLE
  12396. /* set function: left_ of class IntRect */
  12397. #ifndef TOLUA_DISABLE_tolua_set_IntRect_left
  12398. static int tolua_set_IntRect_left(lua_State* tolua_S)
  12399. {
  12400. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12401. #ifndef TOLUA_RELEASE
  12402. tolua_Error tolua_err;
  12403. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'left_'",NULL);
  12404. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12405. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12406. #endif
  12407. self->left_ = ((int) tolua_tonumber(tolua_S,2,0))
  12408. ;
  12409. return 0;
  12410. }
  12411. #endif //#ifndef TOLUA_DISABLE
  12412. /* get function: top_ of class IntRect */
  12413. #ifndef TOLUA_DISABLE_tolua_get_IntRect_top
  12414. static int tolua_get_IntRect_top(lua_State* tolua_S)
  12415. {
  12416. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12417. #ifndef TOLUA_RELEASE
  12418. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'top_'",NULL);
  12419. #endif
  12420. tolua_pushnumber(tolua_S,(lua_Number)self->top_);
  12421. return 1;
  12422. }
  12423. #endif //#ifndef TOLUA_DISABLE
  12424. /* set function: top_ of class IntRect */
  12425. #ifndef TOLUA_DISABLE_tolua_set_IntRect_top
  12426. static int tolua_set_IntRect_top(lua_State* tolua_S)
  12427. {
  12428. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12429. #ifndef TOLUA_RELEASE
  12430. tolua_Error tolua_err;
  12431. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'top_'",NULL);
  12432. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12433. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12434. #endif
  12435. self->top_ = ((int) tolua_tonumber(tolua_S,2,0))
  12436. ;
  12437. return 0;
  12438. }
  12439. #endif //#ifndef TOLUA_DISABLE
  12440. /* get function: right_ of class IntRect */
  12441. #ifndef TOLUA_DISABLE_tolua_get_IntRect_right
  12442. static int tolua_get_IntRect_right(lua_State* tolua_S)
  12443. {
  12444. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12445. #ifndef TOLUA_RELEASE
  12446. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'right_'",NULL);
  12447. #endif
  12448. tolua_pushnumber(tolua_S,(lua_Number)self->right_);
  12449. return 1;
  12450. }
  12451. #endif //#ifndef TOLUA_DISABLE
  12452. /* set function: right_ of class IntRect */
  12453. #ifndef TOLUA_DISABLE_tolua_set_IntRect_right
  12454. static int tolua_set_IntRect_right(lua_State* tolua_S)
  12455. {
  12456. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12457. #ifndef TOLUA_RELEASE
  12458. tolua_Error tolua_err;
  12459. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'right_'",NULL);
  12460. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12461. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12462. #endif
  12463. self->right_ = ((int) tolua_tonumber(tolua_S,2,0))
  12464. ;
  12465. return 0;
  12466. }
  12467. #endif //#ifndef TOLUA_DISABLE
  12468. /* get function: bottom_ of class IntRect */
  12469. #ifndef TOLUA_DISABLE_tolua_get_IntRect_bottom
  12470. static int tolua_get_IntRect_bottom(lua_State* tolua_S)
  12471. {
  12472. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12473. #ifndef TOLUA_RELEASE
  12474. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bottom_'",NULL);
  12475. #endif
  12476. tolua_pushnumber(tolua_S,(lua_Number)self->bottom_);
  12477. return 1;
  12478. }
  12479. #endif //#ifndef TOLUA_DISABLE
  12480. /* set function: bottom_ of class IntRect */
  12481. #ifndef TOLUA_DISABLE_tolua_set_IntRect_bottom
  12482. static int tolua_set_IntRect_bottom(lua_State* tolua_S)
  12483. {
  12484. IntRect* self = (IntRect*) tolua_tousertype(tolua_S,1,0);
  12485. #ifndef TOLUA_RELEASE
  12486. tolua_Error tolua_err;
  12487. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bottom_'",NULL);
  12488. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  12489. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  12490. #endif
  12491. self->bottom_ = ((int) tolua_tonumber(tolua_S,2,0))
  12492. ;
  12493. return 0;
  12494. }
  12495. #endif //#ifndef TOLUA_DISABLE
  12496. /* get function: ZERO of class IntRect */
  12497. #ifndef TOLUA_DISABLE_tolua_get_IntRect_ZERO
  12498. static int tolua_get_IntRect_ZERO(lua_State* tolua_S)
  12499. {
  12500. tolua_pushusertype(tolua_S,(void*)&IntRect::ZERO,"const IntRect");
  12501. return 1;
  12502. }
  12503. #endif //#ifndef TOLUA_DISABLE
  12504. /* method: new of class Sphere */
  12505. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new00
  12506. static int tolua_Math_Sphere_new00(lua_State* tolua_S)
  12507. {
  12508. #ifndef TOLUA_RELEASE
  12509. tolua_Error tolua_err;
  12510. if (
  12511. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12512. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12513. )
  12514. goto tolua_lerror;
  12515. else
  12516. #endif
  12517. {
  12518. {
  12519. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)());
  12520. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12521. }
  12522. }
  12523. return 1;
  12524. #ifndef TOLUA_RELEASE
  12525. tolua_lerror:
  12526. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12527. return 0;
  12528. #endif
  12529. }
  12530. #endif //#ifndef TOLUA_DISABLE
  12531. /* method: new_local of class Sphere */
  12532. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new00_local
  12533. static int tolua_Math_Sphere_new00_local(lua_State* tolua_S)
  12534. {
  12535. #ifndef TOLUA_RELEASE
  12536. tolua_Error tolua_err;
  12537. if (
  12538. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12539. !tolua_isnoobj(tolua_S,2,&tolua_err)
  12540. )
  12541. goto tolua_lerror;
  12542. else
  12543. #endif
  12544. {
  12545. {
  12546. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)());
  12547. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12548. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12549. }
  12550. }
  12551. return 1;
  12552. #ifndef TOLUA_RELEASE
  12553. tolua_lerror:
  12554. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  12555. return 0;
  12556. #endif
  12557. }
  12558. #endif //#ifndef TOLUA_DISABLE
  12559. /* method: new of class Sphere */
  12560. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new01
  12561. static int tolua_Math_Sphere_new01(lua_State* tolua_S)
  12562. {
  12563. tolua_Error tolua_err;
  12564. if (
  12565. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12566. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  12567. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12568. )
  12569. goto tolua_lerror;
  12570. else
  12571. {
  12572. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  12573. {
  12574. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*sphere));
  12575. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12576. }
  12577. }
  12578. return 1;
  12579. tolua_lerror:
  12580. return tolua_Math_Sphere_new00(tolua_S);
  12581. }
  12582. #endif //#ifndef TOLUA_DISABLE
  12583. /* method: new_local of class Sphere */
  12584. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new01_local
  12585. static int tolua_Math_Sphere_new01_local(lua_State* tolua_S)
  12586. {
  12587. tolua_Error tolua_err;
  12588. if (
  12589. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12590. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  12591. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12592. )
  12593. goto tolua_lerror;
  12594. else
  12595. {
  12596. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  12597. {
  12598. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*sphere));
  12599. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12600. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12601. }
  12602. }
  12603. return 1;
  12604. tolua_lerror:
  12605. return tolua_Math_Sphere_new00_local(tolua_S);
  12606. }
  12607. #endif //#ifndef TOLUA_DISABLE
  12608. /* method: new of class Sphere */
  12609. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new02
  12610. static int tolua_Math_Sphere_new02(lua_State* tolua_S)
  12611. {
  12612. tolua_Error tolua_err;
  12613. if (
  12614. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12615. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  12616. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12617. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12618. )
  12619. goto tolua_lerror;
  12620. else
  12621. {
  12622. const Vector3* center = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12623. float radius = ((float) tolua_tonumber(tolua_S,3,0));
  12624. {
  12625. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*center,radius));
  12626. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12627. }
  12628. }
  12629. return 1;
  12630. tolua_lerror:
  12631. return tolua_Math_Sphere_new01(tolua_S);
  12632. }
  12633. #endif //#ifndef TOLUA_DISABLE
  12634. /* method: new_local of class Sphere */
  12635. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new02_local
  12636. static int tolua_Math_Sphere_new02_local(lua_State* tolua_S)
  12637. {
  12638. tolua_Error tolua_err;
  12639. if (
  12640. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12641. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  12642. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12643. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12644. )
  12645. goto tolua_lerror;
  12646. else
  12647. {
  12648. const Vector3* center = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12649. float radius = ((float) tolua_tonumber(tolua_S,3,0));
  12650. {
  12651. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*center,radius));
  12652. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12653. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12654. }
  12655. }
  12656. return 1;
  12657. tolua_lerror:
  12658. return tolua_Math_Sphere_new01_local(tolua_S);
  12659. }
  12660. #endif //#ifndef TOLUA_DISABLE
  12661. /* method: new of class Sphere */
  12662. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new03
  12663. static int tolua_Math_Sphere_new03(lua_State* tolua_S)
  12664. {
  12665. tolua_Error tolua_err;
  12666. if (
  12667. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12668. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  12669. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12670. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12671. )
  12672. goto tolua_lerror;
  12673. else
  12674. {
  12675. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12676. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  12677. {
  12678. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(vertices,count));
  12679. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12680. }
  12681. }
  12682. return 1;
  12683. tolua_lerror:
  12684. return tolua_Math_Sphere_new02(tolua_S);
  12685. }
  12686. #endif //#ifndef TOLUA_DISABLE
  12687. /* method: new_local of class Sphere */
  12688. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new03_local
  12689. static int tolua_Math_Sphere_new03_local(lua_State* tolua_S)
  12690. {
  12691. tolua_Error tolua_err;
  12692. if (
  12693. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12694. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  12695. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12696. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12697. )
  12698. goto tolua_lerror;
  12699. else
  12700. {
  12701. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12702. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  12703. {
  12704. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(vertices,count));
  12705. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12706. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12707. }
  12708. }
  12709. return 1;
  12710. tolua_lerror:
  12711. return tolua_Math_Sphere_new02_local(tolua_S);
  12712. }
  12713. #endif //#ifndef TOLUA_DISABLE
  12714. /* method: new of class Sphere */
  12715. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new04
  12716. static int tolua_Math_Sphere_new04(lua_State* tolua_S)
  12717. {
  12718. tolua_Error tolua_err;
  12719. if (
  12720. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12721. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  12722. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12723. )
  12724. goto tolua_lerror;
  12725. else
  12726. {
  12727. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  12728. {
  12729. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*box));
  12730. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12731. }
  12732. }
  12733. return 1;
  12734. tolua_lerror:
  12735. return tolua_Math_Sphere_new03(tolua_S);
  12736. }
  12737. #endif //#ifndef TOLUA_DISABLE
  12738. /* method: new_local of class Sphere */
  12739. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new04_local
  12740. static int tolua_Math_Sphere_new04_local(lua_State* tolua_S)
  12741. {
  12742. tolua_Error tolua_err;
  12743. if (
  12744. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12745. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  12746. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12747. )
  12748. goto tolua_lerror;
  12749. else
  12750. {
  12751. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  12752. {
  12753. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*box));
  12754. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12755. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12756. }
  12757. }
  12758. return 1;
  12759. tolua_lerror:
  12760. return tolua_Math_Sphere_new03_local(tolua_S);
  12761. }
  12762. #endif //#ifndef TOLUA_DISABLE
  12763. /* method: new of class Sphere */
  12764. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new05
  12765. static int tolua_Math_Sphere_new05(lua_State* tolua_S)
  12766. {
  12767. tolua_Error tolua_err;
  12768. if (
  12769. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12770. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  12771. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12772. )
  12773. goto tolua_lerror;
  12774. else
  12775. {
  12776. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  12777. {
  12778. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*frustum));
  12779. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12780. }
  12781. }
  12782. return 1;
  12783. tolua_lerror:
  12784. return tolua_Math_Sphere_new04(tolua_S);
  12785. }
  12786. #endif //#ifndef TOLUA_DISABLE
  12787. /* method: new_local of class Sphere */
  12788. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new05_local
  12789. static int tolua_Math_Sphere_new05_local(lua_State* tolua_S)
  12790. {
  12791. tolua_Error tolua_err;
  12792. if (
  12793. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12794. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  12795. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12796. )
  12797. goto tolua_lerror;
  12798. else
  12799. {
  12800. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  12801. {
  12802. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*frustum));
  12803. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12804. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12805. }
  12806. }
  12807. return 1;
  12808. tolua_lerror:
  12809. return tolua_Math_Sphere_new04_local(tolua_S);
  12810. }
  12811. #endif //#ifndef TOLUA_DISABLE
  12812. /* method: new of class Sphere */
  12813. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new06
  12814. static int tolua_Math_Sphere_new06(lua_State* tolua_S)
  12815. {
  12816. tolua_Error tolua_err;
  12817. if (
  12818. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12819. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  12820. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12821. )
  12822. goto tolua_lerror;
  12823. else
  12824. {
  12825. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  12826. {
  12827. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*poly));
  12828. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12829. }
  12830. }
  12831. return 1;
  12832. tolua_lerror:
  12833. return tolua_Math_Sphere_new05(tolua_S);
  12834. }
  12835. #endif //#ifndef TOLUA_DISABLE
  12836. /* method: new_local of class Sphere */
  12837. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_new06_local
  12838. static int tolua_Math_Sphere_new06_local(lua_State* tolua_S)
  12839. {
  12840. tolua_Error tolua_err;
  12841. if (
  12842. !tolua_isusertable(tolua_S,1,"Sphere",0,&tolua_err) ||
  12843. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  12844. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12845. )
  12846. goto tolua_lerror;
  12847. else
  12848. {
  12849. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  12850. {
  12851. Sphere* tolua_ret = (Sphere*) Mtolua_new((Sphere)(*poly));
  12852. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Sphere");
  12853. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  12854. }
  12855. }
  12856. return 1;
  12857. tolua_lerror:
  12858. return tolua_Math_Sphere_new05_local(tolua_S);
  12859. }
  12860. #endif //#ifndef TOLUA_DISABLE
  12861. /* method: operator== of class Sphere */
  12862. #ifndef TOLUA_DISABLE_tolua_Math_Sphere__eq00
  12863. static int tolua_Math_Sphere__eq00(lua_State* tolua_S)
  12864. {
  12865. #ifndef TOLUA_RELEASE
  12866. tolua_Error tolua_err;
  12867. if (
  12868. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  12869. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  12870. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12871. )
  12872. goto tolua_lerror;
  12873. else
  12874. #endif
  12875. {
  12876. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  12877. const Sphere* rhs = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  12878. #ifndef TOLUA_RELEASE
  12879. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  12880. #endif
  12881. {
  12882. bool tolua_ret = (bool) self->operator==(*rhs);
  12883. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  12884. }
  12885. }
  12886. return 1;
  12887. #ifndef TOLUA_RELEASE
  12888. tolua_lerror:
  12889. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  12890. return 0;
  12891. #endif
  12892. }
  12893. #endif //#ifndef TOLUA_DISABLE
  12894. /* method: Define of class Sphere */
  12895. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define00
  12896. static int tolua_Math_Sphere_Define00(lua_State* tolua_S)
  12897. {
  12898. #ifndef TOLUA_RELEASE
  12899. tolua_Error tolua_err;
  12900. if (
  12901. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  12902. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  12903. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12904. )
  12905. goto tolua_lerror;
  12906. else
  12907. #endif
  12908. {
  12909. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  12910. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  12911. #ifndef TOLUA_RELEASE
  12912. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  12913. #endif
  12914. {
  12915. self->Define(*sphere);
  12916. }
  12917. }
  12918. return 0;
  12919. #ifndef TOLUA_RELEASE
  12920. tolua_lerror:
  12921. tolua_error(tolua_S,"#ferror in function 'Define'.",&tolua_err);
  12922. return 0;
  12923. #endif
  12924. }
  12925. #endif //#ifndef TOLUA_DISABLE
  12926. /* method: Define of class Sphere */
  12927. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define01
  12928. static int tolua_Math_Sphere_Define01(lua_State* tolua_S)
  12929. {
  12930. tolua_Error tolua_err;
  12931. if (
  12932. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  12933. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  12934. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12935. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12936. )
  12937. goto tolua_lerror;
  12938. else
  12939. {
  12940. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  12941. const Vector3* center = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12942. float radius = ((float) tolua_tonumber(tolua_S,3,0));
  12943. #ifndef TOLUA_RELEASE
  12944. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  12945. #endif
  12946. {
  12947. self->Define(*center,radius);
  12948. }
  12949. }
  12950. return 0;
  12951. tolua_lerror:
  12952. return tolua_Math_Sphere_Define00(tolua_S);
  12953. }
  12954. #endif //#ifndef TOLUA_DISABLE
  12955. /* method: Define of class Sphere */
  12956. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define02
  12957. static int tolua_Math_Sphere_Define02(lua_State* tolua_S)
  12958. {
  12959. tolua_Error tolua_err;
  12960. if (
  12961. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  12962. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  12963. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  12964. !tolua_isnoobj(tolua_S,4,&tolua_err)
  12965. )
  12966. goto tolua_lerror;
  12967. else
  12968. {
  12969. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  12970. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  12971. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  12972. #ifndef TOLUA_RELEASE
  12973. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  12974. #endif
  12975. {
  12976. self->Define(vertices,count);
  12977. }
  12978. }
  12979. return 0;
  12980. tolua_lerror:
  12981. return tolua_Math_Sphere_Define01(tolua_S);
  12982. }
  12983. #endif //#ifndef TOLUA_DISABLE
  12984. /* method: Define of class Sphere */
  12985. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define03
  12986. static int tolua_Math_Sphere_Define03(lua_State* tolua_S)
  12987. {
  12988. tolua_Error tolua_err;
  12989. if (
  12990. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  12991. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  12992. !tolua_isnoobj(tolua_S,3,&tolua_err)
  12993. )
  12994. goto tolua_lerror;
  12995. else
  12996. {
  12997. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  12998. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  12999. #ifndef TOLUA_RELEASE
  13000. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13001. #endif
  13002. {
  13003. self->Define(*box);
  13004. }
  13005. }
  13006. return 0;
  13007. tolua_lerror:
  13008. return tolua_Math_Sphere_Define02(tolua_S);
  13009. }
  13010. #endif //#ifndef TOLUA_DISABLE
  13011. /* method: Define of class Sphere */
  13012. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define04
  13013. static int tolua_Math_Sphere_Define04(lua_State* tolua_S)
  13014. {
  13015. tolua_Error tolua_err;
  13016. if (
  13017. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13018. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  13019. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13020. )
  13021. goto tolua_lerror;
  13022. else
  13023. {
  13024. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13025. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  13026. #ifndef TOLUA_RELEASE
  13027. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13028. #endif
  13029. {
  13030. self->Define(*frustum);
  13031. }
  13032. }
  13033. return 0;
  13034. tolua_lerror:
  13035. return tolua_Math_Sphere_Define03(tolua_S);
  13036. }
  13037. #endif //#ifndef TOLUA_DISABLE
  13038. /* method: Define of class Sphere */
  13039. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Define05
  13040. static int tolua_Math_Sphere_Define05(lua_State* tolua_S)
  13041. {
  13042. tolua_Error tolua_err;
  13043. if (
  13044. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13045. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  13046. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13047. )
  13048. goto tolua_lerror;
  13049. else
  13050. {
  13051. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13052. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  13053. #ifndef TOLUA_RELEASE
  13054. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Define'", NULL);
  13055. #endif
  13056. {
  13057. self->Define(*poly);
  13058. }
  13059. }
  13060. return 0;
  13061. tolua_lerror:
  13062. return tolua_Math_Sphere_Define04(tolua_S);
  13063. }
  13064. #endif //#ifndef TOLUA_DISABLE
  13065. /* method: Merge of class Sphere */
  13066. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge00
  13067. static int tolua_Math_Sphere_Merge00(lua_State* tolua_S)
  13068. {
  13069. #ifndef TOLUA_RELEASE
  13070. tolua_Error tolua_err;
  13071. if (
  13072. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13073. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13074. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13075. )
  13076. goto tolua_lerror;
  13077. else
  13078. #endif
  13079. {
  13080. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13081. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13082. #ifndef TOLUA_RELEASE
  13083. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13084. #endif
  13085. {
  13086. self->Merge(*point);
  13087. }
  13088. }
  13089. return 0;
  13090. #ifndef TOLUA_RELEASE
  13091. tolua_lerror:
  13092. tolua_error(tolua_S,"#ferror in function 'Merge'.",&tolua_err);
  13093. return 0;
  13094. #endif
  13095. }
  13096. #endif //#ifndef TOLUA_DISABLE
  13097. /* method: Merge of class Sphere */
  13098. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge01
  13099. static int tolua_Math_Sphere_Merge01(lua_State* tolua_S)
  13100. {
  13101. tolua_Error tolua_err;
  13102. if (
  13103. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13104. !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err) ||
  13105. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  13106. !tolua_isnoobj(tolua_S,4,&tolua_err)
  13107. )
  13108. goto tolua_lerror;
  13109. else
  13110. {
  13111. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13112. const Vector3* vertices = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13113. unsigned count = ((unsigned) tolua_tonumber(tolua_S,3,0));
  13114. #ifndef TOLUA_RELEASE
  13115. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13116. #endif
  13117. {
  13118. self->Merge(vertices,count);
  13119. }
  13120. }
  13121. return 0;
  13122. tolua_lerror:
  13123. return tolua_Math_Sphere_Merge00(tolua_S);
  13124. }
  13125. #endif //#ifndef TOLUA_DISABLE
  13126. /* method: Merge of class Sphere */
  13127. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge02
  13128. static int tolua_Math_Sphere_Merge02(lua_State* tolua_S)
  13129. {
  13130. tolua_Error tolua_err;
  13131. if (
  13132. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13133. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13134. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13135. )
  13136. goto tolua_lerror;
  13137. else
  13138. {
  13139. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13140. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13141. #ifndef TOLUA_RELEASE
  13142. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13143. #endif
  13144. {
  13145. self->Merge(*box);
  13146. }
  13147. }
  13148. return 0;
  13149. tolua_lerror:
  13150. return tolua_Math_Sphere_Merge01(tolua_S);
  13151. }
  13152. #endif //#ifndef TOLUA_DISABLE
  13153. /* method: Merge of class Sphere */
  13154. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge03
  13155. static int tolua_Math_Sphere_Merge03(lua_State* tolua_S)
  13156. {
  13157. tolua_Error tolua_err;
  13158. if (
  13159. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13160. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Frustum",0,&tolua_err)) ||
  13161. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13162. )
  13163. goto tolua_lerror;
  13164. else
  13165. {
  13166. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13167. const Frustum* frustum = ((const Frustum*) tolua_tousertype(tolua_S,2,0));
  13168. #ifndef TOLUA_RELEASE
  13169. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13170. #endif
  13171. {
  13172. self->Merge(*frustum);
  13173. }
  13174. }
  13175. return 0;
  13176. tolua_lerror:
  13177. return tolua_Math_Sphere_Merge02(tolua_S);
  13178. }
  13179. #endif //#ifndef TOLUA_DISABLE
  13180. /* method: Merge of class Sphere */
  13181. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge04
  13182. static int tolua_Math_Sphere_Merge04(lua_State* tolua_S)
  13183. {
  13184. tolua_Error tolua_err;
  13185. if (
  13186. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13187. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Polyhedron",0,&tolua_err)) ||
  13188. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13189. )
  13190. goto tolua_lerror;
  13191. else
  13192. {
  13193. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13194. const Polyhedron* poly = ((const Polyhedron*) tolua_tousertype(tolua_S,2,0));
  13195. #ifndef TOLUA_RELEASE
  13196. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13197. #endif
  13198. {
  13199. self->Merge(*poly);
  13200. }
  13201. }
  13202. return 0;
  13203. tolua_lerror:
  13204. return tolua_Math_Sphere_Merge03(tolua_S);
  13205. }
  13206. #endif //#ifndef TOLUA_DISABLE
  13207. /* method: Merge of class Sphere */
  13208. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Merge05
  13209. static int tolua_Math_Sphere_Merge05(lua_State* tolua_S)
  13210. {
  13211. tolua_Error tolua_err;
  13212. if (
  13213. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13214. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13215. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13216. )
  13217. goto tolua_lerror;
  13218. else
  13219. {
  13220. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13221. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13222. #ifndef TOLUA_RELEASE
  13223. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Merge'", NULL);
  13224. #endif
  13225. {
  13226. self->Merge(*sphere);
  13227. }
  13228. }
  13229. return 0;
  13230. tolua_lerror:
  13231. return tolua_Math_Sphere_Merge04(tolua_S);
  13232. }
  13233. #endif //#ifndef TOLUA_DISABLE
  13234. /* method: Clear of class Sphere */
  13235. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Clear00
  13236. static int tolua_Math_Sphere_Clear00(lua_State* tolua_S)
  13237. {
  13238. #ifndef TOLUA_RELEASE
  13239. tolua_Error tolua_err;
  13240. if (
  13241. !tolua_isusertype(tolua_S,1,"Sphere",0,&tolua_err) ||
  13242. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13243. )
  13244. goto tolua_lerror;
  13245. else
  13246. #endif
  13247. {
  13248. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13249. #ifndef TOLUA_RELEASE
  13250. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Clear'", NULL);
  13251. #endif
  13252. {
  13253. self->Clear();
  13254. }
  13255. }
  13256. return 0;
  13257. #ifndef TOLUA_RELEASE
  13258. tolua_lerror:
  13259. tolua_error(tolua_S,"#ferror in function 'Clear'.",&tolua_err);
  13260. return 0;
  13261. #endif
  13262. }
  13263. #endif //#ifndef TOLUA_DISABLE
  13264. /* method: IsInside of class Sphere */
  13265. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInside00
  13266. static int tolua_Math_Sphere_IsInside00(lua_State* tolua_S)
  13267. {
  13268. #ifndef TOLUA_RELEASE
  13269. tolua_Error tolua_err;
  13270. if (
  13271. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13272. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13273. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13274. )
  13275. goto tolua_lerror;
  13276. else
  13277. #endif
  13278. {
  13279. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13280. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13281. #ifndef TOLUA_RELEASE
  13282. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  13283. #endif
  13284. {
  13285. Intersection tolua_ret = (Intersection) self->IsInside(*point);
  13286. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13287. }
  13288. }
  13289. return 1;
  13290. #ifndef TOLUA_RELEASE
  13291. tolua_lerror:
  13292. tolua_error(tolua_S,"#ferror in function 'IsInside'.",&tolua_err);
  13293. return 0;
  13294. #endif
  13295. }
  13296. #endif //#ifndef TOLUA_DISABLE
  13297. /* method: IsInside of class Sphere */
  13298. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInside01
  13299. static int tolua_Math_Sphere_IsInside01(lua_State* tolua_S)
  13300. {
  13301. tolua_Error tolua_err;
  13302. if (
  13303. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13304. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13305. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13306. )
  13307. goto tolua_lerror;
  13308. else
  13309. {
  13310. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13311. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13312. #ifndef TOLUA_RELEASE
  13313. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  13314. #endif
  13315. {
  13316. Intersection tolua_ret = (Intersection) self->IsInside(*sphere);
  13317. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13318. }
  13319. }
  13320. return 1;
  13321. tolua_lerror:
  13322. return tolua_Math_Sphere_IsInside00(tolua_S);
  13323. }
  13324. #endif //#ifndef TOLUA_DISABLE
  13325. /* method: IsInsideFast of class Sphere */
  13326. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInsideFast00
  13327. static int tolua_Math_Sphere_IsInsideFast00(lua_State* tolua_S)
  13328. {
  13329. #ifndef TOLUA_RELEASE
  13330. tolua_Error tolua_err;
  13331. if (
  13332. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13333. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Sphere",0,&tolua_err)) ||
  13334. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13335. )
  13336. goto tolua_lerror;
  13337. else
  13338. #endif
  13339. {
  13340. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13341. const Sphere* sphere = ((const Sphere*) tolua_tousertype(tolua_S,2,0));
  13342. #ifndef TOLUA_RELEASE
  13343. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  13344. #endif
  13345. {
  13346. Intersection tolua_ret = (Intersection) self->IsInsideFast(*sphere);
  13347. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13348. }
  13349. }
  13350. return 1;
  13351. #ifndef TOLUA_RELEASE
  13352. tolua_lerror:
  13353. tolua_error(tolua_S,"#ferror in function 'IsInsideFast'.",&tolua_err);
  13354. return 0;
  13355. #endif
  13356. }
  13357. #endif //#ifndef TOLUA_DISABLE
  13358. /* method: IsInside of class Sphere */
  13359. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInside02
  13360. static int tolua_Math_Sphere_IsInside02(lua_State* tolua_S)
  13361. {
  13362. tolua_Error tolua_err;
  13363. if (
  13364. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13365. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13366. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13367. )
  13368. goto tolua_lerror;
  13369. else
  13370. {
  13371. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13372. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13373. #ifndef TOLUA_RELEASE
  13374. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInside'", NULL);
  13375. #endif
  13376. {
  13377. Intersection tolua_ret = (Intersection) self->IsInside(*box);
  13378. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13379. }
  13380. }
  13381. return 1;
  13382. tolua_lerror:
  13383. return tolua_Math_Sphere_IsInside01(tolua_S);
  13384. }
  13385. #endif //#ifndef TOLUA_DISABLE
  13386. /* method: IsInsideFast of class Sphere */
  13387. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_IsInsideFast01
  13388. static int tolua_Math_Sphere_IsInsideFast01(lua_State* tolua_S)
  13389. {
  13390. tolua_Error tolua_err;
  13391. if (
  13392. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13393. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const BoundingBox",0,&tolua_err)) ||
  13394. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13395. )
  13396. goto tolua_lerror;
  13397. else
  13398. {
  13399. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13400. const BoundingBox* box = ((const BoundingBox*) tolua_tousertype(tolua_S,2,0));
  13401. #ifndef TOLUA_RELEASE
  13402. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsInsideFast'", NULL);
  13403. #endif
  13404. {
  13405. Intersection tolua_ret = (Intersection) self->IsInsideFast(*box);
  13406. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13407. }
  13408. }
  13409. return 1;
  13410. tolua_lerror:
  13411. return tolua_Math_Sphere_IsInsideFast00(tolua_S);
  13412. }
  13413. #endif //#ifndef TOLUA_DISABLE
  13414. /* method: Distance of class Sphere */
  13415. #ifndef TOLUA_DISABLE_tolua_Math_Sphere_Distance00
  13416. static int tolua_Math_Sphere_Distance00(lua_State* tolua_S)
  13417. {
  13418. #ifndef TOLUA_RELEASE
  13419. tolua_Error tolua_err;
  13420. if (
  13421. !tolua_isusertype(tolua_S,1,"const Sphere",0,&tolua_err) ||
  13422. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  13423. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13424. )
  13425. goto tolua_lerror;
  13426. else
  13427. #endif
  13428. {
  13429. const Sphere* self = (const Sphere*) tolua_tousertype(tolua_S,1,0);
  13430. const Vector3* point = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  13431. #ifndef TOLUA_RELEASE
  13432. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Distance'", NULL);
  13433. #endif
  13434. {
  13435. float tolua_ret = (float) self->Distance(*point);
  13436. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13437. }
  13438. }
  13439. return 1;
  13440. #ifndef TOLUA_RELEASE
  13441. tolua_lerror:
  13442. tolua_error(tolua_S,"#ferror in function 'Distance'.",&tolua_err);
  13443. return 0;
  13444. #endif
  13445. }
  13446. #endif //#ifndef TOLUA_DISABLE
  13447. /* get function: center_ of class Sphere */
  13448. #ifndef TOLUA_DISABLE_tolua_get_Sphere_center
  13449. static int tolua_get_Sphere_center(lua_State* tolua_S)
  13450. {
  13451. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13452. #ifndef TOLUA_RELEASE
  13453. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'center_'",NULL);
  13454. #endif
  13455. tolua_pushusertype(tolua_S,(void*)&self->center_,"Vector3");
  13456. return 1;
  13457. }
  13458. #endif //#ifndef TOLUA_DISABLE
  13459. /* set function: center_ of class Sphere */
  13460. #ifndef TOLUA_DISABLE_tolua_set_Sphere_center
  13461. static int tolua_set_Sphere_center(lua_State* tolua_S)
  13462. {
  13463. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13464. #ifndef TOLUA_RELEASE
  13465. tolua_Error tolua_err;
  13466. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'center_'",NULL);
  13467. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  13468. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  13469. #endif
  13470. self->center_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  13471. ;
  13472. return 0;
  13473. }
  13474. #endif //#ifndef TOLUA_DISABLE
  13475. /* get function: radius_ of class Sphere */
  13476. #ifndef TOLUA_DISABLE_tolua_get_Sphere_radius
  13477. static int tolua_get_Sphere_radius(lua_State* tolua_S)
  13478. {
  13479. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13480. #ifndef TOLUA_RELEASE
  13481. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'radius_'",NULL);
  13482. #endif
  13483. tolua_pushnumber(tolua_S,(lua_Number)self->radius_);
  13484. return 1;
  13485. }
  13486. #endif //#ifndef TOLUA_DISABLE
  13487. /* set function: radius_ of class Sphere */
  13488. #ifndef TOLUA_DISABLE_tolua_set_Sphere_radius
  13489. static int tolua_set_Sphere_radius(lua_State* tolua_S)
  13490. {
  13491. Sphere* self = (Sphere*) tolua_tousertype(tolua_S,1,0);
  13492. #ifndef TOLUA_RELEASE
  13493. tolua_Error tolua_err;
  13494. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'radius_'",NULL);
  13495. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  13496. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  13497. #endif
  13498. self->radius_ = ((float) tolua_tonumber(tolua_S,2,0))
  13499. ;
  13500. return 0;
  13501. }
  13502. #endif //#ifndef TOLUA_DISABLE
  13503. /* method: new of class StringHash */
  13504. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new00
  13505. static int tolua_Math_StringHash_new00(lua_State* tolua_S)
  13506. {
  13507. #ifndef TOLUA_RELEASE
  13508. tolua_Error tolua_err;
  13509. if (
  13510. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13511. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13512. )
  13513. goto tolua_lerror;
  13514. else
  13515. #endif
  13516. {
  13517. {
  13518. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)());
  13519. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13520. }
  13521. }
  13522. return 1;
  13523. #ifndef TOLUA_RELEASE
  13524. tolua_lerror:
  13525. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  13526. return 0;
  13527. #endif
  13528. }
  13529. #endif //#ifndef TOLUA_DISABLE
  13530. /* method: new_local of class StringHash */
  13531. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new00_local
  13532. static int tolua_Math_StringHash_new00_local(lua_State* tolua_S)
  13533. {
  13534. #ifndef TOLUA_RELEASE
  13535. tolua_Error tolua_err;
  13536. if (
  13537. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13538. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13539. )
  13540. goto tolua_lerror;
  13541. else
  13542. #endif
  13543. {
  13544. {
  13545. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)());
  13546. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13547. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13548. }
  13549. }
  13550. return 1;
  13551. #ifndef TOLUA_RELEASE
  13552. tolua_lerror:
  13553. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  13554. return 0;
  13555. #endif
  13556. }
  13557. #endif //#ifndef TOLUA_DISABLE
  13558. /* method: new of class StringHash */
  13559. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new01
  13560. static int tolua_Math_StringHash_new01(lua_State* tolua_S)
  13561. {
  13562. tolua_Error tolua_err;
  13563. if (
  13564. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13565. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13566. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13567. )
  13568. goto tolua_lerror;
  13569. else
  13570. {
  13571. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13572. {
  13573. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*rhs));
  13574. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13575. }
  13576. }
  13577. return 1;
  13578. tolua_lerror:
  13579. return tolua_Math_StringHash_new00(tolua_S);
  13580. }
  13581. #endif //#ifndef TOLUA_DISABLE
  13582. /* method: new_local of class StringHash */
  13583. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new01_local
  13584. static int tolua_Math_StringHash_new01_local(lua_State* tolua_S)
  13585. {
  13586. tolua_Error tolua_err;
  13587. if (
  13588. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13589. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13590. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13591. )
  13592. goto tolua_lerror;
  13593. else
  13594. {
  13595. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13596. {
  13597. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*rhs));
  13598. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13599. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13600. }
  13601. }
  13602. return 1;
  13603. tolua_lerror:
  13604. return tolua_Math_StringHash_new00_local(tolua_S);
  13605. }
  13606. #endif //#ifndef TOLUA_DISABLE
  13607. /* method: new of class StringHash */
  13608. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new02
  13609. static int tolua_Math_StringHash_new02(lua_State* tolua_S)
  13610. {
  13611. tolua_Error tolua_err;
  13612. if (
  13613. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13614. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  13615. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13616. )
  13617. goto tolua_lerror;
  13618. else
  13619. {
  13620. unsigned value = ((unsigned) tolua_tonumber(tolua_S,2,0));
  13621. {
  13622. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(value));
  13623. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13624. }
  13625. }
  13626. return 1;
  13627. tolua_lerror:
  13628. return tolua_Math_StringHash_new01(tolua_S);
  13629. }
  13630. #endif //#ifndef TOLUA_DISABLE
  13631. /* method: new_local of class StringHash */
  13632. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new02_local
  13633. static int tolua_Math_StringHash_new02_local(lua_State* tolua_S)
  13634. {
  13635. tolua_Error tolua_err;
  13636. if (
  13637. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13638. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  13639. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13640. )
  13641. goto tolua_lerror;
  13642. else
  13643. {
  13644. unsigned value = ((unsigned) tolua_tonumber(tolua_S,2,0));
  13645. {
  13646. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(value));
  13647. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13648. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13649. }
  13650. }
  13651. return 1;
  13652. tolua_lerror:
  13653. return tolua_Math_StringHash_new01_local(tolua_S);
  13654. }
  13655. #endif //#ifndef TOLUA_DISABLE
  13656. /* method: new of class StringHash */
  13657. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new03
  13658. static int tolua_Math_StringHash_new03(lua_State* tolua_S)
  13659. {
  13660. tolua_Error tolua_err;
  13661. if (
  13662. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13663. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  13664. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13665. )
  13666. goto tolua_lerror;
  13667. else
  13668. {
  13669. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  13670. {
  13671. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(str));
  13672. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13673. }
  13674. }
  13675. return 1;
  13676. tolua_lerror:
  13677. return tolua_Math_StringHash_new02(tolua_S);
  13678. }
  13679. #endif //#ifndef TOLUA_DISABLE
  13680. /* method: new_local of class StringHash */
  13681. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new03_local
  13682. static int tolua_Math_StringHash_new03_local(lua_State* tolua_S)
  13683. {
  13684. tolua_Error tolua_err;
  13685. if (
  13686. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13687. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  13688. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13689. )
  13690. goto tolua_lerror;
  13691. else
  13692. {
  13693. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  13694. {
  13695. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(str));
  13696. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13697. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13698. }
  13699. }
  13700. return 1;
  13701. tolua_lerror:
  13702. return tolua_Math_StringHash_new02_local(tolua_S);
  13703. }
  13704. #endif //#ifndef TOLUA_DISABLE
  13705. /* method: new of class StringHash */
  13706. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new04
  13707. static int tolua_Math_StringHash_new04(lua_State* tolua_S)
  13708. {
  13709. tolua_Error tolua_err;
  13710. if (
  13711. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13712. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  13713. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13714. )
  13715. goto tolua_lerror;
  13716. else
  13717. {
  13718. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  13719. {
  13720. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*str));
  13721. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13722. }
  13723. }
  13724. return 1;
  13725. tolua_lerror:
  13726. return tolua_Math_StringHash_new03(tolua_S);
  13727. }
  13728. #endif //#ifndef TOLUA_DISABLE
  13729. /* method: new_local of class StringHash */
  13730. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_new04_local
  13731. static int tolua_Math_StringHash_new04_local(lua_State* tolua_S)
  13732. {
  13733. tolua_Error tolua_err;
  13734. if (
  13735. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13736. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  13737. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13738. )
  13739. goto tolua_lerror;
  13740. else
  13741. {
  13742. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  13743. {
  13744. StringHash* tolua_ret = (StringHash*) Mtolua_new((StringHash)(*str));
  13745. tolua_pushusertype(tolua_S,(void*)tolua_ret,"StringHash");
  13746. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13747. }
  13748. }
  13749. return 1;
  13750. tolua_lerror:
  13751. return tolua_Math_StringHash_new03_local(tolua_S);
  13752. }
  13753. #endif //#ifndef TOLUA_DISABLE
  13754. /* method: operator+ of class StringHash */
  13755. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__add00
  13756. static int tolua_Math_StringHash__add00(lua_State* tolua_S)
  13757. {
  13758. #ifndef TOLUA_RELEASE
  13759. tolua_Error tolua_err;
  13760. if (
  13761. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  13762. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13763. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13764. )
  13765. goto tolua_lerror;
  13766. else
  13767. #endif
  13768. {
  13769. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  13770. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13771. #ifndef TOLUA_RELEASE
  13772. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  13773. #endif
  13774. {
  13775. StringHash tolua_ret = (StringHash) self->operator+(*rhs);
  13776. {
  13777. #ifdef __cplusplus
  13778. void* tolua_obj = Mtolua_new((StringHash)(tolua_ret));
  13779. tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
  13780. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13781. #else
  13782. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(StringHash));
  13783. tolua_pushusertype(tolua_S,tolua_obj,"StringHash");
  13784. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13785. #endif
  13786. }
  13787. }
  13788. }
  13789. return 1;
  13790. #ifndef TOLUA_RELEASE
  13791. tolua_lerror:
  13792. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  13793. return 0;
  13794. #endif
  13795. }
  13796. #endif //#ifndef TOLUA_DISABLE
  13797. /* method: operator== of class StringHash */
  13798. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__eq00
  13799. static int tolua_Math_StringHash__eq00(lua_State* tolua_S)
  13800. {
  13801. #ifndef TOLUA_RELEASE
  13802. tolua_Error tolua_err;
  13803. if (
  13804. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  13805. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13806. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13807. )
  13808. goto tolua_lerror;
  13809. else
  13810. #endif
  13811. {
  13812. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  13813. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13814. #ifndef TOLUA_RELEASE
  13815. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  13816. #endif
  13817. {
  13818. bool tolua_ret = (bool) self->operator==(*rhs);
  13819. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  13820. }
  13821. }
  13822. return 1;
  13823. #ifndef TOLUA_RELEASE
  13824. tolua_lerror:
  13825. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  13826. return 0;
  13827. #endif
  13828. }
  13829. #endif //#ifndef TOLUA_DISABLE
  13830. /* method: operator< of class StringHash */
  13831. #ifndef TOLUA_DISABLE_tolua_Math_StringHash__lt00
  13832. static int tolua_Math_StringHash__lt00(lua_State* tolua_S)
  13833. {
  13834. #ifndef TOLUA_RELEASE
  13835. tolua_Error tolua_err;
  13836. if (
  13837. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  13838. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  13839. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13840. )
  13841. goto tolua_lerror;
  13842. else
  13843. #endif
  13844. {
  13845. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  13846. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  13847. #ifndef TOLUA_RELEASE
  13848. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator<'", NULL);
  13849. #endif
  13850. {
  13851. bool tolua_ret = (bool) self->operator<(*rhs);
  13852. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  13853. }
  13854. }
  13855. return 1;
  13856. #ifndef TOLUA_RELEASE
  13857. tolua_lerror:
  13858. tolua_error(tolua_S,"#ferror in function '.lt'.",&tolua_err);
  13859. return 0;
  13860. #endif
  13861. }
  13862. #endif //#ifndef TOLUA_DISABLE
  13863. /* method: Value of class StringHash */
  13864. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_Value00
  13865. static int tolua_Math_StringHash_Value00(lua_State* tolua_S)
  13866. {
  13867. #ifndef TOLUA_RELEASE
  13868. tolua_Error tolua_err;
  13869. if (
  13870. !tolua_isusertype(tolua_S,1,"const StringHash",0,&tolua_err) ||
  13871. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13872. )
  13873. goto tolua_lerror;
  13874. else
  13875. #endif
  13876. {
  13877. const StringHash* self = (const StringHash*) tolua_tousertype(tolua_S,1,0);
  13878. #ifndef TOLUA_RELEASE
  13879. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Value'", NULL);
  13880. #endif
  13881. {
  13882. unsigned tolua_ret = (unsigned) self->Value();
  13883. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13884. }
  13885. }
  13886. return 1;
  13887. #ifndef TOLUA_RELEASE
  13888. tolua_lerror:
  13889. tolua_error(tolua_S,"#ferror in function 'Value'.",&tolua_err);
  13890. return 0;
  13891. #endif
  13892. }
  13893. #endif //#ifndef TOLUA_DISABLE
  13894. /* method: Calculate of class StringHash */
  13895. #ifndef TOLUA_DISABLE_tolua_Math_StringHash_Calculate00
  13896. static int tolua_Math_StringHash_Calculate00(lua_State* tolua_S)
  13897. {
  13898. #ifndef TOLUA_RELEASE
  13899. tolua_Error tolua_err;
  13900. if (
  13901. !tolua_isusertable(tolua_S,1,"StringHash",0,&tolua_err) ||
  13902. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  13903. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13904. )
  13905. goto tolua_lerror;
  13906. else
  13907. #endif
  13908. {
  13909. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  13910. {
  13911. unsigned tolua_ret = (unsigned) StringHash::Calculate(str);
  13912. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  13913. }
  13914. }
  13915. return 1;
  13916. #ifndef TOLUA_RELEASE
  13917. tolua_lerror:
  13918. tolua_error(tolua_S,"#ferror in function 'Calculate'.",&tolua_err);
  13919. return 0;
  13920. #endif
  13921. }
  13922. #endif //#ifndef TOLUA_DISABLE
  13923. /* get function: ZERO of class StringHash */
  13924. #ifndef TOLUA_DISABLE_tolua_get_StringHash_ZERO
  13925. static int tolua_get_StringHash_ZERO(lua_State* tolua_S)
  13926. {
  13927. tolua_pushusertype(tolua_S,(void*)&StringHash::ZERO,"const StringHash");
  13928. return 1;
  13929. }
  13930. #endif //#ifndef TOLUA_DISABLE
  13931. /* method: new of class ShortStringHash */
  13932. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new00
  13933. static int tolua_Math_ShortStringHash_new00(lua_State* tolua_S)
  13934. {
  13935. #ifndef TOLUA_RELEASE
  13936. tolua_Error tolua_err;
  13937. if (
  13938. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  13939. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13940. )
  13941. goto tolua_lerror;
  13942. else
  13943. #endif
  13944. {
  13945. {
  13946. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)());
  13947. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  13948. }
  13949. }
  13950. return 1;
  13951. #ifndef TOLUA_RELEASE
  13952. tolua_lerror:
  13953. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  13954. return 0;
  13955. #endif
  13956. }
  13957. #endif //#ifndef TOLUA_DISABLE
  13958. /* method: new_local of class ShortStringHash */
  13959. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new00_local
  13960. static int tolua_Math_ShortStringHash_new00_local(lua_State* tolua_S)
  13961. {
  13962. #ifndef TOLUA_RELEASE
  13963. tolua_Error tolua_err;
  13964. if (
  13965. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  13966. !tolua_isnoobj(tolua_S,2,&tolua_err)
  13967. )
  13968. goto tolua_lerror;
  13969. else
  13970. #endif
  13971. {
  13972. {
  13973. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)());
  13974. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  13975. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  13976. }
  13977. }
  13978. return 1;
  13979. #ifndef TOLUA_RELEASE
  13980. tolua_lerror:
  13981. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  13982. return 0;
  13983. #endif
  13984. }
  13985. #endif //#ifndef TOLUA_DISABLE
  13986. /* method: new of class ShortStringHash */
  13987. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new01
  13988. static int tolua_Math_ShortStringHash_new01(lua_State* tolua_S)
  13989. {
  13990. tolua_Error tolua_err;
  13991. if (
  13992. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  13993. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  13994. !tolua_isnoobj(tolua_S,3,&tolua_err)
  13995. )
  13996. goto tolua_lerror;
  13997. else
  13998. {
  13999. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14000. {
  14001. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14002. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14003. }
  14004. }
  14005. return 1;
  14006. tolua_lerror:
  14007. return tolua_Math_ShortStringHash_new00(tolua_S);
  14008. }
  14009. #endif //#ifndef TOLUA_DISABLE
  14010. /* method: new_local of class ShortStringHash */
  14011. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new01_local
  14012. static int tolua_Math_ShortStringHash_new01_local(lua_State* tolua_S)
  14013. {
  14014. tolua_Error tolua_err;
  14015. if (
  14016. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14017. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14018. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14019. )
  14020. goto tolua_lerror;
  14021. else
  14022. {
  14023. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14024. {
  14025. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14026. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14027. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14028. }
  14029. }
  14030. return 1;
  14031. tolua_lerror:
  14032. return tolua_Math_ShortStringHash_new00_local(tolua_S);
  14033. }
  14034. #endif //#ifndef TOLUA_DISABLE
  14035. /* method: new of class ShortStringHash */
  14036. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new02
  14037. static int tolua_Math_ShortStringHash_new02(lua_State* tolua_S)
  14038. {
  14039. tolua_Error tolua_err;
  14040. if (
  14041. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14042. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14043. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14044. )
  14045. goto tolua_lerror;
  14046. else
  14047. {
  14048. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14049. {
  14050. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14051. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14052. }
  14053. }
  14054. return 1;
  14055. tolua_lerror:
  14056. return tolua_Math_ShortStringHash_new01(tolua_S);
  14057. }
  14058. #endif //#ifndef TOLUA_DISABLE
  14059. /* method: new_local of class ShortStringHash */
  14060. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new02_local
  14061. static int tolua_Math_ShortStringHash_new02_local(lua_State* tolua_S)
  14062. {
  14063. tolua_Error tolua_err;
  14064. if (
  14065. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14066. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const StringHash",0,&tolua_err)) ||
  14067. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14068. )
  14069. goto tolua_lerror;
  14070. else
  14071. {
  14072. const StringHash* rhs = ((const StringHash*) tolua_tousertype(tolua_S,2,0));
  14073. {
  14074. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*rhs));
  14075. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14076. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14077. }
  14078. }
  14079. return 1;
  14080. tolua_lerror:
  14081. return tolua_Math_ShortStringHash_new01_local(tolua_S);
  14082. }
  14083. #endif //#ifndef TOLUA_DISABLE
  14084. /* method: new of class ShortStringHash */
  14085. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new03
  14086. static int tolua_Math_ShortStringHash_new03(lua_State* tolua_S)
  14087. {
  14088. tolua_Error tolua_err;
  14089. if (
  14090. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14091. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14092. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14093. )
  14094. goto tolua_lerror;
  14095. else
  14096. {
  14097. unsigned short value = ((unsigned short) tolua_tonumber(tolua_S,2,0));
  14098. {
  14099. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(value));
  14100. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14101. }
  14102. }
  14103. return 1;
  14104. tolua_lerror:
  14105. return tolua_Math_ShortStringHash_new02(tolua_S);
  14106. }
  14107. #endif //#ifndef TOLUA_DISABLE
  14108. /* method: new_local of class ShortStringHash */
  14109. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new03_local
  14110. static int tolua_Math_ShortStringHash_new03_local(lua_State* tolua_S)
  14111. {
  14112. tolua_Error tolua_err;
  14113. if (
  14114. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14115. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14116. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14117. )
  14118. goto tolua_lerror;
  14119. else
  14120. {
  14121. unsigned short value = ((unsigned short) tolua_tonumber(tolua_S,2,0));
  14122. {
  14123. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(value));
  14124. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14125. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14126. }
  14127. }
  14128. return 1;
  14129. tolua_lerror:
  14130. return tolua_Math_ShortStringHash_new02_local(tolua_S);
  14131. }
  14132. #endif //#ifndef TOLUA_DISABLE
  14133. /* method: new of class ShortStringHash */
  14134. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new04
  14135. static int tolua_Math_ShortStringHash_new04(lua_State* tolua_S)
  14136. {
  14137. tolua_Error tolua_err;
  14138. if (
  14139. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14140. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14141. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14142. )
  14143. goto tolua_lerror;
  14144. else
  14145. {
  14146. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14147. {
  14148. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(str));
  14149. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14150. }
  14151. }
  14152. return 1;
  14153. tolua_lerror:
  14154. return tolua_Math_ShortStringHash_new03(tolua_S);
  14155. }
  14156. #endif //#ifndef TOLUA_DISABLE
  14157. /* method: new_local of class ShortStringHash */
  14158. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new04_local
  14159. static int tolua_Math_ShortStringHash_new04_local(lua_State* tolua_S)
  14160. {
  14161. tolua_Error tolua_err;
  14162. if (
  14163. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14164. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14165. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14166. )
  14167. goto tolua_lerror;
  14168. else
  14169. {
  14170. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14171. {
  14172. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(str));
  14173. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14174. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14175. }
  14176. }
  14177. return 1;
  14178. tolua_lerror:
  14179. return tolua_Math_ShortStringHash_new03_local(tolua_S);
  14180. }
  14181. #endif //#ifndef TOLUA_DISABLE
  14182. /* method: new of class ShortStringHash */
  14183. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new05
  14184. static int tolua_Math_ShortStringHash_new05(lua_State* tolua_S)
  14185. {
  14186. tolua_Error tolua_err;
  14187. if (
  14188. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14189. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  14190. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14191. )
  14192. goto tolua_lerror;
  14193. else
  14194. {
  14195. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  14196. {
  14197. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*str));
  14198. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14199. }
  14200. }
  14201. return 1;
  14202. tolua_lerror:
  14203. return tolua_Math_ShortStringHash_new04(tolua_S);
  14204. }
  14205. #endif //#ifndef TOLUA_DISABLE
  14206. /* method: new_local of class ShortStringHash */
  14207. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_new05_local
  14208. static int tolua_Math_ShortStringHash_new05_local(lua_State* tolua_S)
  14209. {
  14210. tolua_Error tolua_err;
  14211. if (
  14212. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14213. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const String",0,&tolua_err)) ||
  14214. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14215. )
  14216. goto tolua_lerror;
  14217. else
  14218. {
  14219. const String* str = ((const String*) tolua_tousertype(tolua_S,2,0));
  14220. {
  14221. ShortStringHash* tolua_ret = (ShortStringHash*) Mtolua_new((ShortStringHash)(*str));
  14222. tolua_pushusertype(tolua_S,(void*)tolua_ret,"ShortStringHash");
  14223. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14224. }
  14225. }
  14226. return 1;
  14227. tolua_lerror:
  14228. return tolua_Math_ShortStringHash_new04_local(tolua_S);
  14229. }
  14230. #endif //#ifndef TOLUA_DISABLE
  14231. /* method: operator+ of class ShortStringHash */
  14232. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash__add00
  14233. static int tolua_Math_ShortStringHash__add00(lua_State* tolua_S)
  14234. {
  14235. #ifndef TOLUA_RELEASE
  14236. tolua_Error tolua_err;
  14237. if (
  14238. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14239. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14240. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14241. )
  14242. goto tolua_lerror;
  14243. else
  14244. #endif
  14245. {
  14246. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14247. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14248. #ifndef TOLUA_RELEASE
  14249. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  14250. #endif
  14251. {
  14252. ShortStringHash tolua_ret = (ShortStringHash) self->operator+(*rhs);
  14253. {
  14254. #ifdef __cplusplus
  14255. void* tolua_obj = Mtolua_new((ShortStringHash)(tolua_ret));
  14256. tolua_pushusertype(tolua_S,tolua_obj,"ShortStringHash");
  14257. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14258. #else
  14259. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(ShortStringHash));
  14260. tolua_pushusertype(tolua_S,tolua_obj,"ShortStringHash");
  14261. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14262. #endif
  14263. }
  14264. }
  14265. }
  14266. return 1;
  14267. #ifndef TOLUA_RELEASE
  14268. tolua_lerror:
  14269. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  14270. return 0;
  14271. #endif
  14272. }
  14273. #endif //#ifndef TOLUA_DISABLE
  14274. /* method: operator== of class ShortStringHash */
  14275. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash__eq00
  14276. static int tolua_Math_ShortStringHash__eq00(lua_State* tolua_S)
  14277. {
  14278. #ifndef TOLUA_RELEASE
  14279. tolua_Error tolua_err;
  14280. if (
  14281. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14282. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14283. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14284. )
  14285. goto tolua_lerror;
  14286. else
  14287. #endif
  14288. {
  14289. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14290. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14291. #ifndef TOLUA_RELEASE
  14292. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  14293. #endif
  14294. {
  14295. bool tolua_ret = (bool) self->operator==(*rhs);
  14296. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14297. }
  14298. }
  14299. return 1;
  14300. #ifndef TOLUA_RELEASE
  14301. tolua_lerror:
  14302. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  14303. return 0;
  14304. #endif
  14305. }
  14306. #endif //#ifndef TOLUA_DISABLE
  14307. /* method: operator< of class ShortStringHash */
  14308. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash__lt00
  14309. static int tolua_Math_ShortStringHash__lt00(lua_State* tolua_S)
  14310. {
  14311. #ifndef TOLUA_RELEASE
  14312. tolua_Error tolua_err;
  14313. if (
  14314. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14315. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const ShortStringHash",0,&tolua_err)) ||
  14316. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14317. )
  14318. goto tolua_lerror;
  14319. else
  14320. #endif
  14321. {
  14322. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14323. const ShortStringHash* rhs = ((const ShortStringHash*) tolua_tousertype(tolua_S,2,0));
  14324. #ifndef TOLUA_RELEASE
  14325. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator<'", NULL);
  14326. #endif
  14327. {
  14328. bool tolua_ret = (bool) self->operator<(*rhs);
  14329. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14330. }
  14331. }
  14332. return 1;
  14333. #ifndef TOLUA_RELEASE
  14334. tolua_lerror:
  14335. tolua_error(tolua_S,"#ferror in function '.lt'.",&tolua_err);
  14336. return 0;
  14337. #endif
  14338. }
  14339. #endif //#ifndef TOLUA_DISABLE
  14340. /* method: Value of class ShortStringHash */
  14341. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_Value00
  14342. static int tolua_Math_ShortStringHash_Value00(lua_State* tolua_S)
  14343. {
  14344. #ifndef TOLUA_RELEASE
  14345. tolua_Error tolua_err;
  14346. if (
  14347. !tolua_isusertype(tolua_S,1,"const ShortStringHash",0,&tolua_err) ||
  14348. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14349. )
  14350. goto tolua_lerror;
  14351. else
  14352. #endif
  14353. {
  14354. const ShortStringHash* self = (const ShortStringHash*) tolua_tousertype(tolua_S,1,0);
  14355. #ifndef TOLUA_RELEASE
  14356. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Value'", NULL);
  14357. #endif
  14358. {
  14359. unsigned short tolua_ret = (unsigned short) self->Value();
  14360. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14361. }
  14362. }
  14363. return 1;
  14364. #ifndef TOLUA_RELEASE
  14365. tolua_lerror:
  14366. tolua_error(tolua_S,"#ferror in function 'Value'.",&tolua_err);
  14367. return 0;
  14368. #endif
  14369. }
  14370. #endif //#ifndef TOLUA_DISABLE
  14371. /* method: Calculate of class ShortStringHash */
  14372. #ifndef TOLUA_DISABLE_tolua_Math_ShortStringHash_Calculate00
  14373. static int tolua_Math_ShortStringHash_Calculate00(lua_State* tolua_S)
  14374. {
  14375. #ifndef TOLUA_RELEASE
  14376. tolua_Error tolua_err;
  14377. if (
  14378. !tolua_isusertable(tolua_S,1,"ShortStringHash",0,&tolua_err) ||
  14379. !tolua_isstring(tolua_S,2,0,&tolua_err) ||
  14380. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14381. )
  14382. goto tolua_lerror;
  14383. else
  14384. #endif
  14385. {
  14386. const char* str = ((const char*) tolua_tostring(tolua_S,2,0));
  14387. {
  14388. unsigned short tolua_ret = (unsigned short) ShortStringHash::Calculate(str);
  14389. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14390. }
  14391. }
  14392. return 1;
  14393. #ifndef TOLUA_RELEASE
  14394. tolua_lerror:
  14395. tolua_error(tolua_S,"#ferror in function 'Calculate'.",&tolua_err);
  14396. return 0;
  14397. #endif
  14398. }
  14399. #endif //#ifndef TOLUA_DISABLE
  14400. /* get function: ZERO of class ShortStringHash */
  14401. #ifndef TOLUA_DISABLE_tolua_get_ShortStringHash_ZERO
  14402. static int tolua_get_ShortStringHash_ZERO(lua_State* tolua_S)
  14403. {
  14404. tolua_pushusertype(tolua_S,(void*)&ShortStringHash::ZERO,"const ShortStringHash");
  14405. return 1;
  14406. }
  14407. #endif //#ifndef TOLUA_DISABLE
  14408. /* method: new of class Vector2 */
  14409. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new00
  14410. static int tolua_Math_Vector2_new00(lua_State* tolua_S)
  14411. {
  14412. #ifndef TOLUA_RELEASE
  14413. tolua_Error tolua_err;
  14414. if (
  14415. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14416. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14417. )
  14418. goto tolua_lerror;
  14419. else
  14420. #endif
  14421. {
  14422. {
  14423. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)());
  14424. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14425. }
  14426. }
  14427. return 1;
  14428. #ifndef TOLUA_RELEASE
  14429. tolua_lerror:
  14430. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  14431. return 0;
  14432. #endif
  14433. }
  14434. #endif //#ifndef TOLUA_DISABLE
  14435. /* method: new_local of class Vector2 */
  14436. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new00_local
  14437. static int tolua_Math_Vector2_new00_local(lua_State* tolua_S)
  14438. {
  14439. #ifndef TOLUA_RELEASE
  14440. tolua_Error tolua_err;
  14441. if (
  14442. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14443. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14444. )
  14445. goto tolua_lerror;
  14446. else
  14447. #endif
  14448. {
  14449. {
  14450. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)());
  14451. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14452. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14453. }
  14454. }
  14455. return 1;
  14456. #ifndef TOLUA_RELEASE
  14457. tolua_lerror:
  14458. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  14459. return 0;
  14460. #endif
  14461. }
  14462. #endif //#ifndef TOLUA_DISABLE
  14463. /* method: new of class Vector2 */
  14464. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new01
  14465. static int tolua_Math_Vector2_new01(lua_State* tolua_S)
  14466. {
  14467. tolua_Error tolua_err;
  14468. if (
  14469. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14470. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14471. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14472. )
  14473. goto tolua_lerror;
  14474. else
  14475. {
  14476. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14477. {
  14478. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(*vector));
  14479. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14480. }
  14481. }
  14482. return 1;
  14483. tolua_lerror:
  14484. return tolua_Math_Vector2_new00(tolua_S);
  14485. }
  14486. #endif //#ifndef TOLUA_DISABLE
  14487. /* method: new_local of class Vector2 */
  14488. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new01_local
  14489. static int tolua_Math_Vector2_new01_local(lua_State* tolua_S)
  14490. {
  14491. tolua_Error tolua_err;
  14492. if (
  14493. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14494. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14495. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14496. )
  14497. goto tolua_lerror;
  14498. else
  14499. {
  14500. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14501. {
  14502. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(*vector));
  14503. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14504. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14505. }
  14506. }
  14507. return 1;
  14508. tolua_lerror:
  14509. return tolua_Math_Vector2_new00_local(tolua_S);
  14510. }
  14511. #endif //#ifndef TOLUA_DISABLE
  14512. /* method: new of class Vector2 */
  14513. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new02
  14514. static int tolua_Math_Vector2_new02(lua_State* tolua_S)
  14515. {
  14516. tolua_Error tolua_err;
  14517. if (
  14518. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14519. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14520. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  14521. !tolua_isnoobj(tolua_S,4,&tolua_err)
  14522. )
  14523. goto tolua_lerror;
  14524. else
  14525. {
  14526. float x = ((float) tolua_tonumber(tolua_S,2,0));
  14527. float y = ((float) tolua_tonumber(tolua_S,3,0));
  14528. {
  14529. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(x,y));
  14530. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14531. }
  14532. }
  14533. return 1;
  14534. tolua_lerror:
  14535. return tolua_Math_Vector2_new01(tolua_S);
  14536. }
  14537. #endif //#ifndef TOLUA_DISABLE
  14538. /* method: new_local of class Vector2 */
  14539. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new02_local
  14540. static int tolua_Math_Vector2_new02_local(lua_State* tolua_S)
  14541. {
  14542. tolua_Error tolua_err;
  14543. if (
  14544. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14545. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14546. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  14547. !tolua_isnoobj(tolua_S,4,&tolua_err)
  14548. )
  14549. goto tolua_lerror;
  14550. else
  14551. {
  14552. float x = ((float) tolua_tonumber(tolua_S,2,0));
  14553. float y = ((float) tolua_tonumber(tolua_S,3,0));
  14554. {
  14555. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(x,y));
  14556. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14557. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14558. }
  14559. }
  14560. return 1;
  14561. tolua_lerror:
  14562. return tolua_Math_Vector2_new01_local(tolua_S);
  14563. }
  14564. #endif //#ifndef TOLUA_DISABLE
  14565. /* method: new of class Vector2 */
  14566. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new03
  14567. static int tolua_Math_Vector2_new03(lua_State* tolua_S)
  14568. {
  14569. tolua_Error tolua_err;
  14570. if (
  14571. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14572. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14573. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14574. )
  14575. goto tolua_lerror;
  14576. else
  14577. {
  14578. const float data = ((const float) tolua_tonumber(tolua_S,2,0));
  14579. {
  14580. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(&data));
  14581. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14582. tolua_pushnumber(tolua_S,(lua_Number)data);
  14583. }
  14584. }
  14585. return 2;
  14586. tolua_lerror:
  14587. return tolua_Math_Vector2_new02(tolua_S);
  14588. }
  14589. #endif //#ifndef TOLUA_DISABLE
  14590. /* method: new_local of class Vector2 */
  14591. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_new03_local
  14592. static int tolua_Math_Vector2_new03_local(lua_State* tolua_S)
  14593. {
  14594. tolua_Error tolua_err;
  14595. if (
  14596. !tolua_isusertable(tolua_S,1,"Vector2",0,&tolua_err) ||
  14597. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14598. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14599. )
  14600. goto tolua_lerror;
  14601. else
  14602. {
  14603. const float data = ((const float) tolua_tonumber(tolua_S,2,0));
  14604. {
  14605. Vector2* tolua_ret = (Vector2*) Mtolua_new((Vector2)(&data));
  14606. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector2");
  14607. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14608. tolua_pushnumber(tolua_S,(lua_Number)data);
  14609. }
  14610. }
  14611. return 2;
  14612. tolua_lerror:
  14613. return tolua_Math_Vector2_new02_local(tolua_S);
  14614. }
  14615. #endif //#ifndef TOLUA_DISABLE
  14616. /* method: operator== of class Vector2 */
  14617. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__eq00
  14618. static int tolua_Math_Vector2__eq00(lua_State* tolua_S)
  14619. {
  14620. #ifndef TOLUA_RELEASE
  14621. tolua_Error tolua_err;
  14622. if (
  14623. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14624. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14625. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14626. )
  14627. goto tolua_lerror;
  14628. else
  14629. #endif
  14630. {
  14631. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14632. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14633. #ifndef TOLUA_RELEASE
  14634. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  14635. #endif
  14636. {
  14637. bool tolua_ret = (bool) self->operator==(*rhs);
  14638. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  14639. }
  14640. }
  14641. return 1;
  14642. #ifndef TOLUA_RELEASE
  14643. tolua_lerror:
  14644. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  14645. return 0;
  14646. #endif
  14647. }
  14648. #endif //#ifndef TOLUA_DISABLE
  14649. /* method: operator+ of class Vector2 */
  14650. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__add00
  14651. static int tolua_Math_Vector2__add00(lua_State* tolua_S)
  14652. {
  14653. #ifndef TOLUA_RELEASE
  14654. tolua_Error tolua_err;
  14655. if (
  14656. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14657. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14658. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14659. )
  14660. goto tolua_lerror;
  14661. else
  14662. #endif
  14663. {
  14664. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14665. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14666. #ifndef TOLUA_RELEASE
  14667. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  14668. #endif
  14669. {
  14670. Vector2 tolua_ret = (Vector2) self->operator+(*rhs);
  14671. {
  14672. #ifdef __cplusplus
  14673. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14674. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14675. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14676. #else
  14677. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14678. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14679. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14680. #endif
  14681. }
  14682. }
  14683. }
  14684. return 1;
  14685. #ifndef TOLUA_RELEASE
  14686. tolua_lerror:
  14687. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  14688. return 0;
  14689. #endif
  14690. }
  14691. #endif //#ifndef TOLUA_DISABLE
  14692. /* method: operator- of class Vector2 */
  14693. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__sub00
  14694. static int tolua_Math_Vector2__sub00(lua_State* tolua_S)
  14695. {
  14696. #ifndef TOLUA_RELEASE
  14697. tolua_Error tolua_err;
  14698. if (
  14699. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14700. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14701. )
  14702. goto tolua_lerror;
  14703. else
  14704. #endif
  14705. {
  14706. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14707. #ifndef TOLUA_RELEASE
  14708. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  14709. #endif
  14710. {
  14711. Vector2 tolua_ret = (Vector2) self->operator-();
  14712. {
  14713. #ifdef __cplusplus
  14714. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14715. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14716. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14717. #else
  14718. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14719. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14720. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14721. #endif
  14722. }
  14723. }
  14724. }
  14725. return 1;
  14726. #ifndef TOLUA_RELEASE
  14727. tolua_lerror:
  14728. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  14729. return 0;
  14730. #endif
  14731. }
  14732. #endif //#ifndef TOLUA_DISABLE
  14733. /* method: operator- of class Vector2 */
  14734. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__sub01
  14735. static int tolua_Math_Vector2__sub01(lua_State* tolua_S)
  14736. {
  14737. tolua_Error tolua_err;
  14738. if (
  14739. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14740. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14741. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14742. )
  14743. goto tolua_lerror;
  14744. else
  14745. {
  14746. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14747. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14748. #ifndef TOLUA_RELEASE
  14749. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  14750. #endif
  14751. {
  14752. Vector2 tolua_ret = (Vector2) self->operator-(*rhs);
  14753. {
  14754. #ifdef __cplusplus
  14755. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14756. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14757. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14758. #else
  14759. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14760. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14761. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14762. #endif
  14763. }
  14764. }
  14765. }
  14766. return 1;
  14767. tolua_lerror:
  14768. return tolua_Math_Vector2__sub00(tolua_S);
  14769. }
  14770. #endif //#ifndef TOLUA_DISABLE
  14771. /* method: operator* of class Vector2 */
  14772. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__mul00
  14773. static int tolua_Math_Vector2__mul00(lua_State* tolua_S)
  14774. {
  14775. #ifndef TOLUA_RELEASE
  14776. tolua_Error tolua_err;
  14777. if (
  14778. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14779. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14780. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14781. )
  14782. goto tolua_lerror;
  14783. else
  14784. #endif
  14785. {
  14786. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14787. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  14788. #ifndef TOLUA_RELEASE
  14789. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  14790. #endif
  14791. {
  14792. Vector2 tolua_ret = (Vector2) self->operator*(rhs);
  14793. {
  14794. #ifdef __cplusplus
  14795. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14796. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14797. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14798. #else
  14799. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14800. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14801. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14802. #endif
  14803. }
  14804. }
  14805. }
  14806. return 1;
  14807. #ifndef TOLUA_RELEASE
  14808. tolua_lerror:
  14809. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  14810. return 0;
  14811. #endif
  14812. }
  14813. #endif //#ifndef TOLUA_DISABLE
  14814. /* method: operator* of class Vector2 */
  14815. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__mul01
  14816. static int tolua_Math_Vector2__mul01(lua_State* tolua_S)
  14817. {
  14818. tolua_Error tolua_err;
  14819. if (
  14820. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14821. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14822. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14823. )
  14824. goto tolua_lerror;
  14825. else
  14826. {
  14827. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14828. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14829. #ifndef TOLUA_RELEASE
  14830. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  14831. #endif
  14832. {
  14833. Vector2 tolua_ret = (Vector2) self->operator*(*rhs);
  14834. {
  14835. #ifdef __cplusplus
  14836. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14837. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14838. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14839. #else
  14840. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14841. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14842. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14843. #endif
  14844. }
  14845. }
  14846. }
  14847. return 1;
  14848. tolua_lerror:
  14849. return tolua_Math_Vector2__mul00(tolua_S);
  14850. }
  14851. #endif //#ifndef TOLUA_DISABLE
  14852. /* method: operator/ of class Vector2 */
  14853. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__div00
  14854. static int tolua_Math_Vector2__div00(lua_State* tolua_S)
  14855. {
  14856. #ifndef TOLUA_RELEASE
  14857. tolua_Error tolua_err;
  14858. if (
  14859. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14860. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  14861. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14862. )
  14863. goto tolua_lerror;
  14864. else
  14865. #endif
  14866. {
  14867. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14868. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  14869. #ifndef TOLUA_RELEASE
  14870. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  14871. #endif
  14872. {
  14873. Vector2 tolua_ret = (Vector2) self->operator/(rhs);
  14874. {
  14875. #ifdef __cplusplus
  14876. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14877. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14878. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14879. #else
  14880. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14881. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14882. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14883. #endif
  14884. }
  14885. }
  14886. }
  14887. return 1;
  14888. #ifndef TOLUA_RELEASE
  14889. tolua_lerror:
  14890. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  14891. return 0;
  14892. #endif
  14893. }
  14894. #endif //#ifndef TOLUA_DISABLE
  14895. /* method: operator/ of class Vector2 */
  14896. #ifndef TOLUA_DISABLE_tolua_Math_Vector2__div01
  14897. static int tolua_Math_Vector2__div01(lua_State* tolua_S)
  14898. {
  14899. tolua_Error tolua_err;
  14900. if (
  14901. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14902. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  14903. !tolua_isnoobj(tolua_S,3,&tolua_err)
  14904. )
  14905. goto tolua_lerror;
  14906. else
  14907. {
  14908. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14909. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  14910. #ifndef TOLUA_RELEASE
  14911. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  14912. #endif
  14913. {
  14914. Vector2 tolua_ret = (Vector2) self->operator/(*rhs);
  14915. {
  14916. #ifdef __cplusplus
  14917. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  14918. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14919. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14920. #else
  14921. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  14922. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  14923. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  14924. #endif
  14925. }
  14926. }
  14927. }
  14928. return 1;
  14929. tolua_lerror:
  14930. return tolua_Math_Vector2__div00(tolua_S);
  14931. }
  14932. #endif //#ifndef TOLUA_DISABLE
  14933. /* method: Normalize of class Vector2 */
  14934. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Normalize00
  14935. static int tolua_Math_Vector2_Normalize00(lua_State* tolua_S)
  14936. {
  14937. #ifndef TOLUA_RELEASE
  14938. tolua_Error tolua_err;
  14939. if (
  14940. !tolua_isusertype(tolua_S,1,"Vector2",0,&tolua_err) ||
  14941. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14942. )
  14943. goto tolua_lerror;
  14944. else
  14945. #endif
  14946. {
  14947. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  14948. #ifndef TOLUA_RELEASE
  14949. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
  14950. #endif
  14951. {
  14952. float tolua_ret = (float) self->Normalize();
  14953. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14954. }
  14955. }
  14956. return 1;
  14957. #ifndef TOLUA_RELEASE
  14958. tolua_lerror:
  14959. tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
  14960. return 0;
  14961. #endif
  14962. }
  14963. #endif //#ifndef TOLUA_DISABLE
  14964. /* method: Length of class Vector2 */
  14965. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Length00
  14966. static int tolua_Math_Vector2_Length00(lua_State* tolua_S)
  14967. {
  14968. #ifndef TOLUA_RELEASE
  14969. tolua_Error tolua_err;
  14970. if (
  14971. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  14972. !tolua_isnoobj(tolua_S,2,&tolua_err)
  14973. )
  14974. goto tolua_lerror;
  14975. else
  14976. #endif
  14977. {
  14978. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  14979. #ifndef TOLUA_RELEASE
  14980. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Length'", NULL);
  14981. #endif
  14982. {
  14983. float tolua_ret = (float) self->Length();
  14984. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  14985. }
  14986. }
  14987. return 1;
  14988. #ifndef TOLUA_RELEASE
  14989. tolua_lerror:
  14990. tolua_error(tolua_S,"#ferror in function 'Length'.",&tolua_err);
  14991. return 0;
  14992. #endif
  14993. }
  14994. #endif //#ifndef TOLUA_DISABLE
  14995. /* method: LengthSquared of class Vector2 */
  14996. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_LengthSquared00
  14997. static int tolua_Math_Vector2_LengthSquared00(lua_State* tolua_S)
  14998. {
  14999. #ifndef TOLUA_RELEASE
  15000. tolua_Error tolua_err;
  15001. if (
  15002. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15003. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15004. )
  15005. goto tolua_lerror;
  15006. else
  15007. #endif
  15008. {
  15009. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15010. #ifndef TOLUA_RELEASE
  15011. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
  15012. #endif
  15013. {
  15014. float tolua_ret = (float) self->LengthSquared();
  15015. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15016. }
  15017. }
  15018. return 1;
  15019. #ifndef TOLUA_RELEASE
  15020. tolua_lerror:
  15021. tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
  15022. return 0;
  15023. #endif
  15024. }
  15025. #endif //#ifndef TOLUA_DISABLE
  15026. /* method: DotProduct of class Vector2 */
  15027. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_DotProduct00
  15028. static int tolua_Math_Vector2_DotProduct00(lua_State* tolua_S)
  15029. {
  15030. #ifndef TOLUA_RELEASE
  15031. tolua_Error tolua_err;
  15032. if (
  15033. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15034. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15035. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15036. )
  15037. goto tolua_lerror;
  15038. else
  15039. #endif
  15040. {
  15041. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15042. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15043. #ifndef TOLUA_RELEASE
  15044. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  15045. #endif
  15046. {
  15047. float tolua_ret = (float) self->DotProduct(*rhs);
  15048. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15049. }
  15050. }
  15051. return 1;
  15052. #ifndef TOLUA_RELEASE
  15053. tolua_lerror:
  15054. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  15055. return 0;
  15056. #endif
  15057. }
  15058. #endif //#ifndef TOLUA_DISABLE
  15059. /* method: AbsDotProduct of class Vector2 */
  15060. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_AbsDotProduct00
  15061. static int tolua_Math_Vector2_AbsDotProduct00(lua_State* tolua_S)
  15062. {
  15063. #ifndef TOLUA_RELEASE
  15064. tolua_Error tolua_err;
  15065. if (
  15066. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15067. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15068. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15069. )
  15070. goto tolua_lerror;
  15071. else
  15072. #endif
  15073. {
  15074. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15075. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15076. #ifndef TOLUA_RELEASE
  15077. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AbsDotProduct'", NULL);
  15078. #endif
  15079. {
  15080. float tolua_ret = (float) self->AbsDotProduct(*rhs);
  15081. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  15082. }
  15083. }
  15084. return 1;
  15085. #ifndef TOLUA_RELEASE
  15086. tolua_lerror:
  15087. tolua_error(tolua_S,"#ferror in function 'AbsDotProduct'.",&tolua_err);
  15088. return 0;
  15089. #endif
  15090. }
  15091. #endif //#ifndef TOLUA_DISABLE
  15092. /* method: Abs of class Vector2 */
  15093. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Abs00
  15094. static int tolua_Math_Vector2_Abs00(lua_State* tolua_S)
  15095. {
  15096. #ifndef TOLUA_RELEASE
  15097. tolua_Error tolua_err;
  15098. if (
  15099. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15100. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15101. )
  15102. goto tolua_lerror;
  15103. else
  15104. #endif
  15105. {
  15106. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15107. #ifndef TOLUA_RELEASE
  15108. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Abs'", NULL);
  15109. #endif
  15110. {
  15111. Vector2 tolua_ret = (Vector2) self->Abs();
  15112. {
  15113. #ifdef __cplusplus
  15114. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15115. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15116. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15117. #else
  15118. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15119. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15120. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15121. #endif
  15122. }
  15123. }
  15124. }
  15125. return 1;
  15126. #ifndef TOLUA_RELEASE
  15127. tolua_lerror:
  15128. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  15129. return 0;
  15130. #endif
  15131. }
  15132. #endif //#ifndef TOLUA_DISABLE
  15133. /* method: Lerp of class Vector2 */
  15134. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Lerp00
  15135. static int tolua_Math_Vector2_Lerp00(lua_State* tolua_S)
  15136. {
  15137. #ifndef TOLUA_RELEASE
  15138. tolua_Error tolua_err;
  15139. if (
  15140. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15141. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15142. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15143. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15144. )
  15145. goto tolua_lerror;
  15146. else
  15147. #endif
  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. float t = ((float) tolua_tonumber(tolua_S,3,0));
  15152. #ifndef TOLUA_RELEASE
  15153. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  15154. #endif
  15155. {
  15156. Vector2 tolua_ret = (Vector2) self->Lerp(*rhs,t);
  15157. {
  15158. #ifdef __cplusplus
  15159. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15160. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15161. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15162. #else
  15163. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15164. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15165. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15166. #endif
  15167. }
  15168. }
  15169. }
  15170. return 1;
  15171. #ifndef TOLUA_RELEASE
  15172. tolua_lerror:
  15173. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  15174. return 0;
  15175. #endif
  15176. }
  15177. #endif //#ifndef TOLUA_DISABLE
  15178. /* method: Equals of class Vector2 */
  15179. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Equals00
  15180. static int tolua_Math_Vector2_Equals00(lua_State* tolua_S)
  15181. {
  15182. #ifndef TOLUA_RELEASE
  15183. tolua_Error tolua_err;
  15184. if (
  15185. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15186. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15187. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15188. )
  15189. goto tolua_lerror;
  15190. else
  15191. #endif
  15192. {
  15193. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15194. const Vector2* rhs = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15195. #ifndef TOLUA_RELEASE
  15196. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  15197. #endif
  15198. {
  15199. bool tolua_ret = (bool) self->Equals(*rhs);
  15200. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  15201. }
  15202. }
  15203. return 1;
  15204. #ifndef TOLUA_RELEASE
  15205. tolua_lerror:
  15206. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  15207. return 0;
  15208. #endif
  15209. }
  15210. #endif //#ifndef TOLUA_DISABLE
  15211. /* method: Normalized of class Vector2 */
  15212. #ifndef TOLUA_DISABLE_tolua_Math_Vector2_Normalized00
  15213. static int tolua_Math_Vector2_Normalized00(lua_State* tolua_S)
  15214. {
  15215. #ifndef TOLUA_RELEASE
  15216. tolua_Error tolua_err;
  15217. if (
  15218. !tolua_isusertype(tolua_S,1,"const Vector2",0,&tolua_err) ||
  15219. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15220. )
  15221. goto tolua_lerror;
  15222. else
  15223. #endif
  15224. {
  15225. const Vector2* self = (const Vector2*) tolua_tousertype(tolua_S,1,0);
  15226. #ifndef TOLUA_RELEASE
  15227. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalized'", NULL);
  15228. #endif
  15229. {
  15230. Vector2 tolua_ret = (Vector2) self->Normalized();
  15231. {
  15232. #ifdef __cplusplus
  15233. void* tolua_obj = Mtolua_new((Vector2)(tolua_ret));
  15234. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15235. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15236. #else
  15237. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector2));
  15238. tolua_pushusertype(tolua_S,tolua_obj,"Vector2");
  15239. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15240. #endif
  15241. }
  15242. }
  15243. }
  15244. return 1;
  15245. #ifndef TOLUA_RELEASE
  15246. tolua_lerror:
  15247. tolua_error(tolua_S,"#ferror in function 'Normalized'.",&tolua_err);
  15248. return 0;
  15249. #endif
  15250. }
  15251. #endif //#ifndef TOLUA_DISABLE
  15252. /* get function: x_ of class Vector2 */
  15253. #ifndef TOLUA_DISABLE_tolua_get_Vector2_x
  15254. static int tolua_get_Vector2_x(lua_State* tolua_S)
  15255. {
  15256. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15257. #ifndef TOLUA_RELEASE
  15258. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  15259. #endif
  15260. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  15261. return 1;
  15262. }
  15263. #endif //#ifndef TOLUA_DISABLE
  15264. /* set function: x_ of class Vector2 */
  15265. #ifndef TOLUA_DISABLE_tolua_set_Vector2_x
  15266. static int tolua_set_Vector2_x(lua_State* tolua_S)
  15267. {
  15268. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15269. #ifndef TOLUA_RELEASE
  15270. tolua_Error tolua_err;
  15271. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  15272. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  15273. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  15274. #endif
  15275. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  15276. ;
  15277. return 0;
  15278. }
  15279. #endif //#ifndef TOLUA_DISABLE
  15280. /* get function: y_ of class Vector2 */
  15281. #ifndef TOLUA_DISABLE_tolua_get_Vector2_y
  15282. static int tolua_get_Vector2_y(lua_State* tolua_S)
  15283. {
  15284. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15285. #ifndef TOLUA_RELEASE
  15286. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  15287. #endif
  15288. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  15289. return 1;
  15290. }
  15291. #endif //#ifndef TOLUA_DISABLE
  15292. /* set function: y_ of class Vector2 */
  15293. #ifndef TOLUA_DISABLE_tolua_set_Vector2_y
  15294. static int tolua_set_Vector2_y(lua_State* tolua_S)
  15295. {
  15296. Vector2* self = (Vector2*) tolua_tousertype(tolua_S,1,0);
  15297. #ifndef TOLUA_RELEASE
  15298. tolua_Error tolua_err;
  15299. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  15300. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  15301. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  15302. #endif
  15303. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  15304. ;
  15305. return 0;
  15306. }
  15307. #endif //#ifndef TOLUA_DISABLE
  15308. /* get function: ZERO of class Vector2 */
  15309. #ifndef TOLUA_DISABLE_tolua_get_Vector2_ZERO
  15310. static int tolua_get_Vector2_ZERO(lua_State* tolua_S)
  15311. {
  15312. tolua_pushusertype(tolua_S,(void*)&Vector2::ZERO,"const Vector2");
  15313. return 1;
  15314. }
  15315. #endif //#ifndef TOLUA_DISABLE
  15316. /* get function: LEFT of class Vector2 */
  15317. #ifndef TOLUA_DISABLE_tolua_get_Vector2_LEFT
  15318. static int tolua_get_Vector2_LEFT(lua_State* tolua_S)
  15319. {
  15320. tolua_pushusertype(tolua_S,(void*)&Vector2::LEFT,"const Vector2");
  15321. return 1;
  15322. }
  15323. #endif //#ifndef TOLUA_DISABLE
  15324. /* get function: RIGHT of class Vector2 */
  15325. #ifndef TOLUA_DISABLE_tolua_get_Vector2_RIGHT
  15326. static int tolua_get_Vector2_RIGHT(lua_State* tolua_S)
  15327. {
  15328. tolua_pushusertype(tolua_S,(void*)&Vector2::RIGHT,"const Vector2");
  15329. return 1;
  15330. }
  15331. #endif //#ifndef TOLUA_DISABLE
  15332. /* get function: UP of class Vector2 */
  15333. #ifndef TOLUA_DISABLE_tolua_get_Vector2_UP
  15334. static int tolua_get_Vector2_UP(lua_State* tolua_S)
  15335. {
  15336. tolua_pushusertype(tolua_S,(void*)&Vector2::UP,"const Vector2");
  15337. return 1;
  15338. }
  15339. #endif //#ifndef TOLUA_DISABLE
  15340. /* get function: DOWN of class Vector2 */
  15341. #ifndef TOLUA_DISABLE_tolua_get_Vector2_DOWN
  15342. static int tolua_get_Vector2_DOWN(lua_State* tolua_S)
  15343. {
  15344. tolua_pushusertype(tolua_S,(void*)&Vector2::DOWN,"const Vector2");
  15345. return 1;
  15346. }
  15347. #endif //#ifndef TOLUA_DISABLE
  15348. /* get function: ONE of class Vector2 */
  15349. #ifndef TOLUA_DISABLE_tolua_get_Vector2_ONE
  15350. static int tolua_get_Vector2_ONE(lua_State* tolua_S)
  15351. {
  15352. tolua_pushusertype(tolua_S,(void*)&Vector2::ONE,"const Vector2");
  15353. return 1;
  15354. }
  15355. #endif //#ifndef TOLUA_DISABLE
  15356. /* method: new of class IntVector2 */
  15357. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new00
  15358. static int tolua_Math_IntVector2_new00(lua_State* tolua_S)
  15359. {
  15360. #ifndef TOLUA_RELEASE
  15361. tolua_Error tolua_err;
  15362. if (
  15363. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15364. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15365. )
  15366. goto tolua_lerror;
  15367. else
  15368. #endif
  15369. {
  15370. {
  15371. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)());
  15372. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15373. }
  15374. }
  15375. return 1;
  15376. #ifndef TOLUA_RELEASE
  15377. tolua_lerror:
  15378. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  15379. return 0;
  15380. #endif
  15381. }
  15382. #endif //#ifndef TOLUA_DISABLE
  15383. /* method: new_local of class IntVector2 */
  15384. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new00_local
  15385. static int tolua_Math_IntVector2_new00_local(lua_State* tolua_S)
  15386. {
  15387. #ifndef TOLUA_RELEASE
  15388. tolua_Error tolua_err;
  15389. if (
  15390. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15391. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15392. )
  15393. goto tolua_lerror;
  15394. else
  15395. #endif
  15396. {
  15397. {
  15398. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)());
  15399. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15400. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15401. }
  15402. }
  15403. return 1;
  15404. #ifndef TOLUA_RELEASE
  15405. tolua_lerror:
  15406. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  15407. return 0;
  15408. #endif
  15409. }
  15410. #endif //#ifndef TOLUA_DISABLE
  15411. /* method: new of class IntVector2 */
  15412. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new01
  15413. static int tolua_Math_IntVector2_new01(lua_State* tolua_S)
  15414. {
  15415. tolua_Error tolua_err;
  15416. if (
  15417. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15418. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15419. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15420. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15421. )
  15422. goto tolua_lerror;
  15423. else
  15424. {
  15425. int x = ((int) tolua_tonumber(tolua_S,2,0));
  15426. int y = ((int) tolua_tonumber(tolua_S,3,0));
  15427. {
  15428. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(x,y));
  15429. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15430. }
  15431. }
  15432. return 1;
  15433. tolua_lerror:
  15434. return tolua_Math_IntVector2_new00(tolua_S);
  15435. }
  15436. #endif //#ifndef TOLUA_DISABLE
  15437. /* method: new_local of class IntVector2 */
  15438. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new01_local
  15439. static int tolua_Math_IntVector2_new01_local(lua_State* tolua_S)
  15440. {
  15441. tolua_Error tolua_err;
  15442. if (
  15443. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15444. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15445. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15446. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15447. )
  15448. goto tolua_lerror;
  15449. else
  15450. {
  15451. int x = ((int) tolua_tonumber(tolua_S,2,0));
  15452. int y = ((int) tolua_tonumber(tolua_S,3,0));
  15453. {
  15454. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(x,y));
  15455. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15456. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15457. }
  15458. }
  15459. return 1;
  15460. tolua_lerror:
  15461. return tolua_Math_IntVector2_new00_local(tolua_S);
  15462. }
  15463. #endif //#ifndef TOLUA_DISABLE
  15464. /* method: new of class IntVector2 */
  15465. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new02
  15466. static int tolua_Math_IntVector2_new02(lua_State* tolua_S)
  15467. {
  15468. tolua_Error tolua_err;
  15469. if (
  15470. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15471. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15472. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15473. )
  15474. goto tolua_lerror;
  15475. else
  15476. {
  15477. const int data = ((const int) tolua_tonumber(tolua_S,2,0));
  15478. {
  15479. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(&data));
  15480. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15481. tolua_pushnumber(tolua_S,(lua_Number)data);
  15482. }
  15483. }
  15484. return 2;
  15485. tolua_lerror:
  15486. return tolua_Math_IntVector2_new01(tolua_S);
  15487. }
  15488. #endif //#ifndef TOLUA_DISABLE
  15489. /* method: new_local of class IntVector2 */
  15490. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new02_local
  15491. static int tolua_Math_IntVector2_new02_local(lua_State* tolua_S)
  15492. {
  15493. tolua_Error tolua_err;
  15494. if (
  15495. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15496. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15497. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15498. )
  15499. goto tolua_lerror;
  15500. else
  15501. {
  15502. const int data = ((const int) tolua_tonumber(tolua_S,2,0));
  15503. {
  15504. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(&data));
  15505. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15506. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15507. tolua_pushnumber(tolua_S,(lua_Number)data);
  15508. }
  15509. }
  15510. return 2;
  15511. tolua_lerror:
  15512. return tolua_Math_IntVector2_new01_local(tolua_S);
  15513. }
  15514. #endif //#ifndef TOLUA_DISABLE
  15515. /* method: new of class IntVector2 */
  15516. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new03
  15517. static int tolua_Math_IntVector2_new03(lua_State* tolua_S)
  15518. {
  15519. tolua_Error tolua_err;
  15520. if (
  15521. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15522. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  15523. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15524. )
  15525. goto tolua_lerror;
  15526. else
  15527. {
  15528. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  15529. {
  15530. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(*rhs));
  15531. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15532. }
  15533. }
  15534. return 1;
  15535. tolua_lerror:
  15536. return tolua_Math_IntVector2_new02(tolua_S);
  15537. }
  15538. #endif //#ifndef TOLUA_DISABLE
  15539. /* method: new_local of class IntVector2 */
  15540. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2_new03_local
  15541. static int tolua_Math_IntVector2_new03_local(lua_State* tolua_S)
  15542. {
  15543. tolua_Error tolua_err;
  15544. if (
  15545. !tolua_isusertable(tolua_S,1,"IntVector2",0,&tolua_err) ||
  15546. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  15547. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15548. )
  15549. goto tolua_lerror;
  15550. else
  15551. {
  15552. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  15553. {
  15554. IntVector2* tolua_ret = (IntVector2*) Mtolua_new((IntVector2)(*rhs));
  15555. tolua_pushusertype(tolua_S,(void*)tolua_ret,"IntVector2");
  15556. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15557. }
  15558. }
  15559. return 1;
  15560. tolua_lerror:
  15561. return tolua_Math_IntVector2_new02_local(tolua_S);
  15562. }
  15563. #endif //#ifndef TOLUA_DISABLE
  15564. /* method: operator== of class IntVector2 */
  15565. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__eq00
  15566. static int tolua_Math_IntVector2__eq00(lua_State* tolua_S)
  15567. {
  15568. #ifndef TOLUA_RELEASE
  15569. tolua_Error tolua_err;
  15570. if (
  15571. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  15572. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  15573. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15574. )
  15575. goto tolua_lerror;
  15576. else
  15577. #endif
  15578. {
  15579. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  15580. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  15581. #ifndef TOLUA_RELEASE
  15582. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  15583. #endif
  15584. {
  15585. bool tolua_ret = (bool) self->operator==(*rhs);
  15586. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  15587. }
  15588. }
  15589. return 1;
  15590. #ifndef TOLUA_RELEASE
  15591. tolua_lerror:
  15592. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  15593. return 0;
  15594. #endif
  15595. }
  15596. #endif //#ifndef TOLUA_DISABLE
  15597. /* method: operator+ of class IntVector2 */
  15598. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__add00
  15599. static int tolua_Math_IntVector2__add00(lua_State* tolua_S)
  15600. {
  15601. #ifndef TOLUA_RELEASE
  15602. tolua_Error tolua_err;
  15603. if (
  15604. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  15605. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  15606. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15607. )
  15608. goto tolua_lerror;
  15609. else
  15610. #endif
  15611. {
  15612. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  15613. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  15614. #ifndef TOLUA_RELEASE
  15615. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  15616. #endif
  15617. {
  15618. IntVector2 tolua_ret = (IntVector2) self->operator+(*rhs);
  15619. {
  15620. #ifdef __cplusplus
  15621. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  15622. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15623. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15624. #else
  15625. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  15626. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15627. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15628. #endif
  15629. }
  15630. }
  15631. }
  15632. return 1;
  15633. #ifndef TOLUA_RELEASE
  15634. tolua_lerror:
  15635. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  15636. return 0;
  15637. #endif
  15638. }
  15639. #endif //#ifndef TOLUA_DISABLE
  15640. /* method: operator- of class IntVector2 */
  15641. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__sub00
  15642. static int tolua_Math_IntVector2__sub00(lua_State* tolua_S)
  15643. {
  15644. #ifndef TOLUA_RELEASE
  15645. tolua_Error tolua_err;
  15646. if (
  15647. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  15648. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15649. )
  15650. goto tolua_lerror;
  15651. else
  15652. #endif
  15653. {
  15654. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  15655. #ifndef TOLUA_RELEASE
  15656. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  15657. #endif
  15658. {
  15659. IntVector2 tolua_ret = (IntVector2) self->operator-();
  15660. {
  15661. #ifdef __cplusplus
  15662. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  15663. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15664. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15665. #else
  15666. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  15667. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15668. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15669. #endif
  15670. }
  15671. }
  15672. }
  15673. return 1;
  15674. #ifndef TOLUA_RELEASE
  15675. tolua_lerror:
  15676. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  15677. return 0;
  15678. #endif
  15679. }
  15680. #endif //#ifndef TOLUA_DISABLE
  15681. /* method: operator- of class IntVector2 */
  15682. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__sub01
  15683. static int tolua_Math_IntVector2__sub01(lua_State* tolua_S)
  15684. {
  15685. tolua_Error tolua_err;
  15686. if (
  15687. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  15688. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const IntVector2",0,&tolua_err)) ||
  15689. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15690. )
  15691. goto tolua_lerror;
  15692. else
  15693. {
  15694. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  15695. const IntVector2* rhs = ((const IntVector2*) tolua_tousertype(tolua_S,2,0));
  15696. #ifndef TOLUA_RELEASE
  15697. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  15698. #endif
  15699. {
  15700. IntVector2 tolua_ret = (IntVector2) self->operator-(*rhs);
  15701. {
  15702. #ifdef __cplusplus
  15703. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  15704. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15705. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15706. #else
  15707. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  15708. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15709. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15710. #endif
  15711. }
  15712. }
  15713. }
  15714. return 1;
  15715. tolua_lerror:
  15716. return tolua_Math_IntVector2__sub00(tolua_S);
  15717. }
  15718. #endif //#ifndef TOLUA_DISABLE
  15719. /* method: operator* of class IntVector2 */
  15720. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__mul00
  15721. static int tolua_Math_IntVector2__mul00(lua_State* tolua_S)
  15722. {
  15723. #ifndef TOLUA_RELEASE
  15724. tolua_Error tolua_err;
  15725. if (
  15726. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  15727. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15728. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15729. )
  15730. goto tolua_lerror;
  15731. else
  15732. #endif
  15733. {
  15734. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  15735. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  15736. #ifndef TOLUA_RELEASE
  15737. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  15738. #endif
  15739. {
  15740. IntVector2 tolua_ret = (IntVector2) self->operator*(rhs);
  15741. {
  15742. #ifdef __cplusplus
  15743. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  15744. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15745. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15746. #else
  15747. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  15748. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15749. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15750. #endif
  15751. }
  15752. }
  15753. }
  15754. return 1;
  15755. #ifndef TOLUA_RELEASE
  15756. tolua_lerror:
  15757. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  15758. return 0;
  15759. #endif
  15760. }
  15761. #endif //#ifndef TOLUA_DISABLE
  15762. /* method: operator/ of class IntVector2 */
  15763. #ifndef TOLUA_DISABLE_tolua_Math_IntVector2__div00
  15764. static int tolua_Math_IntVector2__div00(lua_State* tolua_S)
  15765. {
  15766. #ifndef TOLUA_RELEASE
  15767. tolua_Error tolua_err;
  15768. if (
  15769. !tolua_isusertype(tolua_S,1,"const IntVector2",0,&tolua_err) ||
  15770. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  15771. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15772. )
  15773. goto tolua_lerror;
  15774. else
  15775. #endif
  15776. {
  15777. const IntVector2* self = (const IntVector2*) tolua_tousertype(tolua_S,1,0);
  15778. int rhs = ((int) tolua_tonumber(tolua_S,2,0));
  15779. #ifndef TOLUA_RELEASE
  15780. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  15781. #endif
  15782. {
  15783. IntVector2 tolua_ret = (IntVector2) self->operator/(rhs);
  15784. {
  15785. #ifdef __cplusplus
  15786. void* tolua_obj = Mtolua_new((IntVector2)(tolua_ret));
  15787. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15788. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15789. #else
  15790. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(IntVector2));
  15791. tolua_pushusertype(tolua_S,tolua_obj,"IntVector2");
  15792. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15793. #endif
  15794. }
  15795. }
  15796. }
  15797. return 1;
  15798. #ifndef TOLUA_RELEASE
  15799. tolua_lerror:
  15800. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  15801. return 0;
  15802. #endif
  15803. }
  15804. #endif //#ifndef TOLUA_DISABLE
  15805. /* get function: x_ of class IntVector2 */
  15806. #ifndef TOLUA_DISABLE_tolua_get_IntVector2_x
  15807. static int tolua_get_IntVector2_x(lua_State* tolua_S)
  15808. {
  15809. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  15810. #ifndef TOLUA_RELEASE
  15811. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  15812. #endif
  15813. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  15814. return 1;
  15815. }
  15816. #endif //#ifndef TOLUA_DISABLE
  15817. /* set function: x_ of class IntVector2 */
  15818. #ifndef TOLUA_DISABLE_tolua_set_IntVector2_x
  15819. static int tolua_set_IntVector2_x(lua_State* tolua_S)
  15820. {
  15821. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  15822. #ifndef TOLUA_RELEASE
  15823. tolua_Error tolua_err;
  15824. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  15825. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  15826. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  15827. #endif
  15828. self->x_ = ((int) tolua_tonumber(tolua_S,2,0))
  15829. ;
  15830. return 0;
  15831. }
  15832. #endif //#ifndef TOLUA_DISABLE
  15833. /* get function: y_ of class IntVector2 */
  15834. #ifndef TOLUA_DISABLE_tolua_get_IntVector2_y
  15835. static int tolua_get_IntVector2_y(lua_State* tolua_S)
  15836. {
  15837. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  15838. #ifndef TOLUA_RELEASE
  15839. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  15840. #endif
  15841. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  15842. return 1;
  15843. }
  15844. #endif //#ifndef TOLUA_DISABLE
  15845. /* set function: y_ of class IntVector2 */
  15846. #ifndef TOLUA_DISABLE_tolua_set_IntVector2_y
  15847. static int tolua_set_IntVector2_y(lua_State* tolua_S)
  15848. {
  15849. IntVector2* self = (IntVector2*) tolua_tousertype(tolua_S,1,0);
  15850. #ifndef TOLUA_RELEASE
  15851. tolua_Error tolua_err;
  15852. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  15853. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  15854. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  15855. #endif
  15856. self->y_ = ((int) tolua_tonumber(tolua_S,2,0))
  15857. ;
  15858. return 0;
  15859. }
  15860. #endif //#ifndef TOLUA_DISABLE
  15861. /* get function: ZERO of class IntVector2 */
  15862. #ifndef TOLUA_DISABLE_tolua_get_IntVector2_ZERO
  15863. static int tolua_get_IntVector2_ZERO(lua_State* tolua_S)
  15864. {
  15865. tolua_pushusertype(tolua_S,(void*)&IntVector2::ZERO,"const IntVector2");
  15866. return 1;
  15867. }
  15868. #endif //#ifndef TOLUA_DISABLE
  15869. /* method: new of class Vector3 */
  15870. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new00
  15871. static int tolua_Math_Vector3_new00(lua_State* tolua_S)
  15872. {
  15873. #ifndef TOLUA_RELEASE
  15874. tolua_Error tolua_err;
  15875. if (
  15876. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  15877. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15878. )
  15879. goto tolua_lerror;
  15880. else
  15881. #endif
  15882. {
  15883. {
  15884. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)());
  15885. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  15886. }
  15887. }
  15888. return 1;
  15889. #ifndef TOLUA_RELEASE
  15890. tolua_lerror:
  15891. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  15892. return 0;
  15893. #endif
  15894. }
  15895. #endif //#ifndef TOLUA_DISABLE
  15896. /* method: new_local of class Vector3 */
  15897. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new00_local
  15898. static int tolua_Math_Vector3_new00_local(lua_State* tolua_S)
  15899. {
  15900. #ifndef TOLUA_RELEASE
  15901. tolua_Error tolua_err;
  15902. if (
  15903. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  15904. !tolua_isnoobj(tolua_S,2,&tolua_err)
  15905. )
  15906. goto tolua_lerror;
  15907. else
  15908. #endif
  15909. {
  15910. {
  15911. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)());
  15912. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  15913. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15914. }
  15915. }
  15916. return 1;
  15917. #ifndef TOLUA_RELEASE
  15918. tolua_lerror:
  15919. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  15920. return 0;
  15921. #endif
  15922. }
  15923. #endif //#ifndef TOLUA_DISABLE
  15924. /* method: new of class Vector3 */
  15925. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new01
  15926. static int tolua_Math_Vector3_new01(lua_State* tolua_S)
  15927. {
  15928. tolua_Error tolua_err;
  15929. if (
  15930. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  15931. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  15932. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15933. )
  15934. goto tolua_lerror;
  15935. else
  15936. {
  15937. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  15938. {
  15939. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector));
  15940. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  15941. }
  15942. }
  15943. return 1;
  15944. tolua_lerror:
  15945. return tolua_Math_Vector3_new00(tolua_S);
  15946. }
  15947. #endif //#ifndef TOLUA_DISABLE
  15948. /* method: new_local of class Vector3 */
  15949. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new01_local
  15950. static int tolua_Math_Vector3_new01_local(lua_State* tolua_S)
  15951. {
  15952. tolua_Error tolua_err;
  15953. if (
  15954. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  15955. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  15956. !tolua_isnoobj(tolua_S,3,&tolua_err)
  15957. )
  15958. goto tolua_lerror;
  15959. else
  15960. {
  15961. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  15962. {
  15963. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector));
  15964. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  15965. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  15966. }
  15967. }
  15968. return 1;
  15969. tolua_lerror:
  15970. return tolua_Math_Vector3_new00_local(tolua_S);
  15971. }
  15972. #endif //#ifndef TOLUA_DISABLE
  15973. /* method: new of class Vector3 */
  15974. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new02
  15975. static int tolua_Math_Vector3_new02(lua_State* tolua_S)
  15976. {
  15977. tolua_Error tolua_err;
  15978. if (
  15979. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  15980. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  15981. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  15982. !tolua_isnoobj(tolua_S,4,&tolua_err)
  15983. )
  15984. goto tolua_lerror;
  15985. else
  15986. {
  15987. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  15988. float z = ((float) tolua_tonumber(tolua_S,3,0));
  15989. {
  15990. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector,z));
  15991. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  15992. }
  15993. }
  15994. return 1;
  15995. tolua_lerror:
  15996. return tolua_Math_Vector3_new01(tolua_S);
  15997. }
  15998. #endif //#ifndef TOLUA_DISABLE
  15999. /* method: new_local of class Vector3 */
  16000. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new02_local
  16001. static int tolua_Math_Vector3_new02_local(lua_State* tolua_S)
  16002. {
  16003. tolua_Error tolua_err;
  16004. if (
  16005. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16006. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  16007. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16008. !tolua_isnoobj(tolua_S,4,&tolua_err)
  16009. )
  16010. goto tolua_lerror;
  16011. else
  16012. {
  16013. const Vector2* vector = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  16014. float z = ((float) tolua_tonumber(tolua_S,3,0));
  16015. {
  16016. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(*vector,z));
  16017. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16018. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16019. }
  16020. }
  16021. return 1;
  16022. tolua_lerror:
  16023. return tolua_Math_Vector3_new01_local(tolua_S);
  16024. }
  16025. #endif //#ifndef TOLUA_DISABLE
  16026. /* method: new of class Vector3 */
  16027. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new03
  16028. static int tolua_Math_Vector3_new03(lua_State* tolua_S)
  16029. {
  16030. tolua_Error tolua_err;
  16031. if (
  16032. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16033. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16034. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16035. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  16036. !tolua_isnoobj(tolua_S,5,&tolua_err)
  16037. )
  16038. goto tolua_lerror;
  16039. else
  16040. {
  16041. float x = ((float) tolua_tonumber(tolua_S,2,0));
  16042. float y = ((float) tolua_tonumber(tolua_S,3,0));
  16043. float z = ((float) tolua_tonumber(tolua_S,4,0));
  16044. {
  16045. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(x,y,z));
  16046. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16047. }
  16048. }
  16049. return 1;
  16050. tolua_lerror:
  16051. return tolua_Math_Vector3_new02(tolua_S);
  16052. }
  16053. #endif //#ifndef TOLUA_DISABLE
  16054. /* method: new_local of class Vector3 */
  16055. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_new03_local
  16056. static int tolua_Math_Vector3_new03_local(lua_State* tolua_S)
  16057. {
  16058. tolua_Error tolua_err;
  16059. if (
  16060. !tolua_isusertable(tolua_S,1,"Vector3",0,&tolua_err) ||
  16061. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16062. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16063. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  16064. !tolua_isnoobj(tolua_S,5,&tolua_err)
  16065. )
  16066. goto tolua_lerror;
  16067. else
  16068. {
  16069. float x = ((float) tolua_tonumber(tolua_S,2,0));
  16070. float y = ((float) tolua_tonumber(tolua_S,3,0));
  16071. float z = ((float) tolua_tonumber(tolua_S,4,0));
  16072. {
  16073. Vector3* tolua_ret = (Vector3*) Mtolua_new((Vector3)(x,y,z));
  16074. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector3");
  16075. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16076. }
  16077. }
  16078. return 1;
  16079. tolua_lerror:
  16080. return tolua_Math_Vector3_new02_local(tolua_S);
  16081. }
  16082. #endif //#ifndef TOLUA_DISABLE
  16083. /* method: operator== of class Vector3 */
  16084. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__eq00
  16085. static int tolua_Math_Vector3__eq00(lua_State* tolua_S)
  16086. {
  16087. #ifndef TOLUA_RELEASE
  16088. tolua_Error tolua_err;
  16089. if (
  16090. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16091. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16092. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16093. )
  16094. goto tolua_lerror;
  16095. else
  16096. #endif
  16097. {
  16098. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16099. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16100. #ifndef TOLUA_RELEASE
  16101. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  16102. #endif
  16103. {
  16104. bool tolua_ret = (bool) self->operator==(*rhs);
  16105. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  16106. }
  16107. }
  16108. return 1;
  16109. #ifndef TOLUA_RELEASE
  16110. tolua_lerror:
  16111. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  16112. return 0;
  16113. #endif
  16114. }
  16115. #endif //#ifndef TOLUA_DISABLE
  16116. /* method: operator+ of class Vector3 */
  16117. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__add00
  16118. static int tolua_Math_Vector3__add00(lua_State* tolua_S)
  16119. {
  16120. #ifndef TOLUA_RELEASE
  16121. tolua_Error tolua_err;
  16122. if (
  16123. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16124. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16125. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16126. )
  16127. goto tolua_lerror;
  16128. else
  16129. #endif
  16130. {
  16131. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16132. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16133. #ifndef TOLUA_RELEASE
  16134. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  16135. #endif
  16136. {
  16137. Vector3 tolua_ret = (Vector3) self->operator+(*rhs);
  16138. {
  16139. #ifdef __cplusplus
  16140. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16141. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16142. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16143. #else
  16144. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16145. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16146. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16147. #endif
  16148. }
  16149. }
  16150. }
  16151. return 1;
  16152. #ifndef TOLUA_RELEASE
  16153. tolua_lerror:
  16154. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  16155. return 0;
  16156. #endif
  16157. }
  16158. #endif //#ifndef TOLUA_DISABLE
  16159. /* method: operator- of class Vector3 */
  16160. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__sub00
  16161. static int tolua_Math_Vector3__sub00(lua_State* tolua_S)
  16162. {
  16163. #ifndef TOLUA_RELEASE
  16164. tolua_Error tolua_err;
  16165. if (
  16166. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16167. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16168. )
  16169. goto tolua_lerror;
  16170. else
  16171. #endif
  16172. {
  16173. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16174. #ifndef TOLUA_RELEASE
  16175. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  16176. #endif
  16177. {
  16178. Vector3 tolua_ret = (Vector3) self->operator-();
  16179. {
  16180. #ifdef __cplusplus
  16181. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16182. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16183. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16184. #else
  16185. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16186. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16187. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16188. #endif
  16189. }
  16190. }
  16191. }
  16192. return 1;
  16193. #ifndef TOLUA_RELEASE
  16194. tolua_lerror:
  16195. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  16196. return 0;
  16197. #endif
  16198. }
  16199. #endif //#ifndef TOLUA_DISABLE
  16200. /* method: operator- of class Vector3 */
  16201. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__sub01
  16202. static int tolua_Math_Vector3__sub01(lua_State* tolua_S)
  16203. {
  16204. tolua_Error tolua_err;
  16205. if (
  16206. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16207. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16208. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16209. )
  16210. goto tolua_lerror;
  16211. else
  16212. {
  16213. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16214. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16215. #ifndef TOLUA_RELEASE
  16216. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  16217. #endif
  16218. {
  16219. Vector3 tolua_ret = (Vector3) self->operator-(*rhs);
  16220. {
  16221. #ifdef __cplusplus
  16222. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16223. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16224. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16225. #else
  16226. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16227. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16228. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16229. #endif
  16230. }
  16231. }
  16232. }
  16233. return 1;
  16234. tolua_lerror:
  16235. return tolua_Math_Vector3__sub00(tolua_S);
  16236. }
  16237. #endif //#ifndef TOLUA_DISABLE
  16238. /* method: operator* of class Vector3 */
  16239. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__mul00
  16240. static int tolua_Math_Vector3__mul00(lua_State* tolua_S)
  16241. {
  16242. #ifndef TOLUA_RELEASE
  16243. tolua_Error tolua_err;
  16244. if (
  16245. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16246. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16247. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16248. )
  16249. goto tolua_lerror;
  16250. else
  16251. #endif
  16252. {
  16253. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16254. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  16255. #ifndef TOLUA_RELEASE
  16256. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  16257. #endif
  16258. {
  16259. Vector3 tolua_ret = (Vector3) self->operator*(rhs);
  16260. {
  16261. #ifdef __cplusplus
  16262. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16263. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16264. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16265. #else
  16266. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16267. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16268. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16269. #endif
  16270. }
  16271. }
  16272. }
  16273. return 1;
  16274. #ifndef TOLUA_RELEASE
  16275. tolua_lerror:
  16276. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  16277. return 0;
  16278. #endif
  16279. }
  16280. #endif //#ifndef TOLUA_DISABLE
  16281. /* method: operator* of class Vector3 */
  16282. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__mul01
  16283. static int tolua_Math_Vector3__mul01(lua_State* tolua_S)
  16284. {
  16285. tolua_Error tolua_err;
  16286. if (
  16287. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16288. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16289. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16290. )
  16291. goto tolua_lerror;
  16292. else
  16293. {
  16294. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16295. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16296. #ifndef TOLUA_RELEASE
  16297. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  16298. #endif
  16299. {
  16300. Vector3 tolua_ret = (Vector3) self->operator*(*rhs);
  16301. {
  16302. #ifdef __cplusplus
  16303. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16304. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16305. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16306. #else
  16307. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16308. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16309. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16310. #endif
  16311. }
  16312. }
  16313. }
  16314. return 1;
  16315. tolua_lerror:
  16316. return tolua_Math_Vector3__mul00(tolua_S);
  16317. }
  16318. #endif //#ifndef TOLUA_DISABLE
  16319. /* method: operator/ of class Vector3 */
  16320. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__div00
  16321. static int tolua_Math_Vector3__div00(lua_State* tolua_S)
  16322. {
  16323. #ifndef TOLUA_RELEASE
  16324. tolua_Error tolua_err;
  16325. if (
  16326. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16327. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  16328. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16329. )
  16330. goto tolua_lerror;
  16331. else
  16332. #endif
  16333. {
  16334. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16335. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  16336. #ifndef TOLUA_RELEASE
  16337. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16338. #endif
  16339. {
  16340. Vector3 tolua_ret = (Vector3) self->operator/(rhs);
  16341. {
  16342. #ifdef __cplusplus
  16343. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16344. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16345. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16346. #else
  16347. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16348. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16349. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16350. #endif
  16351. }
  16352. }
  16353. }
  16354. return 1;
  16355. #ifndef TOLUA_RELEASE
  16356. tolua_lerror:
  16357. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  16358. return 0;
  16359. #endif
  16360. }
  16361. #endif //#ifndef TOLUA_DISABLE
  16362. /* method: operator/ of class Vector3 */
  16363. #ifndef TOLUA_DISABLE_tolua_Math_Vector3__div01
  16364. static int tolua_Math_Vector3__div01(lua_State* tolua_S)
  16365. {
  16366. tolua_Error tolua_err;
  16367. if (
  16368. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16369. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16370. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16371. )
  16372. goto tolua_lerror;
  16373. else
  16374. {
  16375. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16376. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16377. #ifndef TOLUA_RELEASE
  16378. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  16379. #endif
  16380. {
  16381. Vector3 tolua_ret = (Vector3) self->operator/(*rhs);
  16382. {
  16383. #ifdef __cplusplus
  16384. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16385. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16386. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16387. #else
  16388. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16389. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16390. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16391. #endif
  16392. }
  16393. }
  16394. }
  16395. return 1;
  16396. tolua_lerror:
  16397. return tolua_Math_Vector3__div00(tolua_S);
  16398. }
  16399. #endif //#ifndef TOLUA_DISABLE
  16400. /* method: Normalize of class Vector3 */
  16401. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Normalize00
  16402. static int tolua_Math_Vector3_Normalize00(lua_State* tolua_S)
  16403. {
  16404. #ifndef TOLUA_RELEASE
  16405. tolua_Error tolua_err;
  16406. if (
  16407. !tolua_isusertype(tolua_S,1,"Vector3",0,&tolua_err) ||
  16408. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16409. )
  16410. goto tolua_lerror;
  16411. else
  16412. #endif
  16413. {
  16414. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16415. #ifndef TOLUA_RELEASE
  16416. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
  16417. #endif
  16418. {
  16419. float tolua_ret = (float) self->Normalize();
  16420. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  16421. }
  16422. }
  16423. return 1;
  16424. #ifndef TOLUA_RELEASE
  16425. tolua_lerror:
  16426. tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
  16427. return 0;
  16428. #endif
  16429. }
  16430. #endif //#ifndef TOLUA_DISABLE
  16431. /* method: Length of class Vector3 */
  16432. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Length00
  16433. static int tolua_Math_Vector3_Length00(lua_State* tolua_S)
  16434. {
  16435. #ifndef TOLUA_RELEASE
  16436. tolua_Error tolua_err;
  16437. if (
  16438. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16439. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16440. )
  16441. goto tolua_lerror;
  16442. else
  16443. #endif
  16444. {
  16445. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16446. #ifndef TOLUA_RELEASE
  16447. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Length'", NULL);
  16448. #endif
  16449. {
  16450. float tolua_ret = (float) self->Length();
  16451. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  16452. }
  16453. }
  16454. return 1;
  16455. #ifndef TOLUA_RELEASE
  16456. tolua_lerror:
  16457. tolua_error(tolua_S,"#ferror in function 'Length'.",&tolua_err);
  16458. return 0;
  16459. #endif
  16460. }
  16461. #endif //#ifndef TOLUA_DISABLE
  16462. /* method: LengthSquared of class Vector3 */
  16463. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_LengthSquared00
  16464. static int tolua_Math_Vector3_LengthSquared00(lua_State* tolua_S)
  16465. {
  16466. #ifndef TOLUA_RELEASE
  16467. tolua_Error tolua_err;
  16468. if (
  16469. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16470. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16471. )
  16472. goto tolua_lerror;
  16473. else
  16474. #endif
  16475. {
  16476. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16477. #ifndef TOLUA_RELEASE
  16478. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
  16479. #endif
  16480. {
  16481. float tolua_ret = (float) self->LengthSquared();
  16482. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  16483. }
  16484. }
  16485. return 1;
  16486. #ifndef TOLUA_RELEASE
  16487. tolua_lerror:
  16488. tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
  16489. return 0;
  16490. #endif
  16491. }
  16492. #endif //#ifndef TOLUA_DISABLE
  16493. /* method: DotProduct of class Vector3 */
  16494. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_DotProduct00
  16495. static int tolua_Math_Vector3_DotProduct00(lua_State* tolua_S)
  16496. {
  16497. #ifndef TOLUA_RELEASE
  16498. tolua_Error tolua_err;
  16499. if (
  16500. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16501. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16502. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16503. )
  16504. goto tolua_lerror;
  16505. else
  16506. #endif
  16507. {
  16508. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16509. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16510. #ifndef TOLUA_RELEASE
  16511. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  16512. #endif
  16513. {
  16514. float tolua_ret = (float) self->DotProduct(*rhs);
  16515. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  16516. }
  16517. }
  16518. return 1;
  16519. #ifndef TOLUA_RELEASE
  16520. tolua_lerror:
  16521. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  16522. return 0;
  16523. #endif
  16524. }
  16525. #endif //#ifndef TOLUA_DISABLE
  16526. /* method: AbsDotProduct of class Vector3 */
  16527. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_AbsDotProduct00
  16528. static int tolua_Math_Vector3_AbsDotProduct00(lua_State* tolua_S)
  16529. {
  16530. #ifndef TOLUA_RELEASE
  16531. tolua_Error tolua_err;
  16532. if (
  16533. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16534. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16535. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16536. )
  16537. goto tolua_lerror;
  16538. else
  16539. #endif
  16540. {
  16541. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16542. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16543. #ifndef TOLUA_RELEASE
  16544. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AbsDotProduct'", NULL);
  16545. #endif
  16546. {
  16547. float tolua_ret = (float) self->AbsDotProduct(*rhs);
  16548. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  16549. }
  16550. }
  16551. return 1;
  16552. #ifndef TOLUA_RELEASE
  16553. tolua_lerror:
  16554. tolua_error(tolua_S,"#ferror in function 'AbsDotProduct'.",&tolua_err);
  16555. return 0;
  16556. #endif
  16557. }
  16558. #endif //#ifndef TOLUA_DISABLE
  16559. /* method: CrossProduct of class Vector3 */
  16560. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_CrossProduct00
  16561. static int tolua_Math_Vector3_CrossProduct00(lua_State* tolua_S)
  16562. {
  16563. #ifndef TOLUA_RELEASE
  16564. tolua_Error tolua_err;
  16565. if (
  16566. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16567. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16568. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16569. )
  16570. goto tolua_lerror;
  16571. else
  16572. #endif
  16573. {
  16574. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16575. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16576. #ifndef TOLUA_RELEASE
  16577. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CrossProduct'", NULL);
  16578. #endif
  16579. {
  16580. Vector3 tolua_ret = (Vector3) self->CrossProduct(*rhs);
  16581. {
  16582. #ifdef __cplusplus
  16583. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16584. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16585. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16586. #else
  16587. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16588. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16589. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16590. #endif
  16591. }
  16592. }
  16593. }
  16594. return 1;
  16595. #ifndef TOLUA_RELEASE
  16596. tolua_lerror:
  16597. tolua_error(tolua_S,"#ferror in function 'CrossProduct'.",&tolua_err);
  16598. return 0;
  16599. #endif
  16600. }
  16601. #endif //#ifndef TOLUA_DISABLE
  16602. /* method: Abs of class Vector3 */
  16603. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Abs00
  16604. static int tolua_Math_Vector3_Abs00(lua_State* tolua_S)
  16605. {
  16606. #ifndef TOLUA_RELEASE
  16607. tolua_Error tolua_err;
  16608. if (
  16609. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16610. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16611. )
  16612. goto tolua_lerror;
  16613. else
  16614. #endif
  16615. {
  16616. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16617. #ifndef TOLUA_RELEASE
  16618. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Abs'", NULL);
  16619. #endif
  16620. {
  16621. Vector3 tolua_ret = (Vector3) self->Abs();
  16622. {
  16623. #ifdef __cplusplus
  16624. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16625. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16626. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16627. #else
  16628. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16629. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16630. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16631. #endif
  16632. }
  16633. }
  16634. }
  16635. return 1;
  16636. #ifndef TOLUA_RELEASE
  16637. tolua_lerror:
  16638. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  16639. return 0;
  16640. #endif
  16641. }
  16642. #endif //#ifndef TOLUA_DISABLE
  16643. /* method: Lerp of class Vector3 */
  16644. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Lerp00
  16645. static int tolua_Math_Vector3_Lerp00(lua_State* tolua_S)
  16646. {
  16647. #ifndef TOLUA_RELEASE
  16648. tolua_Error tolua_err;
  16649. if (
  16650. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16651. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16652. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  16653. !tolua_isnoobj(tolua_S,4,&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. float t = ((float) tolua_tonumber(tolua_S,3,0));
  16662. #ifndef TOLUA_RELEASE
  16663. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  16664. #endif
  16665. {
  16666. Vector3 tolua_ret = (Vector3) self->Lerp(*rhs,t);
  16667. {
  16668. #ifdef __cplusplus
  16669. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16670. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16671. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16672. #else
  16673. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16674. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16675. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16676. #endif
  16677. }
  16678. }
  16679. }
  16680. return 1;
  16681. #ifndef TOLUA_RELEASE
  16682. tolua_lerror:
  16683. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  16684. return 0;
  16685. #endif
  16686. }
  16687. #endif //#ifndef TOLUA_DISABLE
  16688. /* method: Equals of class Vector3 */
  16689. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Equals00
  16690. static int tolua_Math_Vector3_Equals00(lua_State* tolua_S)
  16691. {
  16692. #ifndef TOLUA_RELEASE
  16693. tolua_Error tolua_err;
  16694. if (
  16695. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16696. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  16697. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16698. )
  16699. goto tolua_lerror;
  16700. else
  16701. #endif
  16702. {
  16703. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16704. const Vector3* rhs = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  16705. #ifndef TOLUA_RELEASE
  16706. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  16707. #endif
  16708. {
  16709. bool tolua_ret = (bool) self->Equals(*rhs);
  16710. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  16711. }
  16712. }
  16713. return 1;
  16714. #ifndef TOLUA_RELEASE
  16715. tolua_lerror:
  16716. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  16717. return 0;
  16718. #endif
  16719. }
  16720. #endif //#ifndef TOLUA_DISABLE
  16721. /* method: Normalized of class Vector3 */
  16722. #ifndef TOLUA_DISABLE_tolua_Math_Vector3_Normalized00
  16723. static int tolua_Math_Vector3_Normalized00(lua_State* tolua_S)
  16724. {
  16725. #ifndef TOLUA_RELEASE
  16726. tolua_Error tolua_err;
  16727. if (
  16728. !tolua_isusertype(tolua_S,1,"const Vector3",0,&tolua_err) ||
  16729. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16730. )
  16731. goto tolua_lerror;
  16732. else
  16733. #endif
  16734. {
  16735. const Vector3* self = (const Vector3*) tolua_tousertype(tolua_S,1,0);
  16736. #ifndef TOLUA_RELEASE
  16737. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalized'", NULL);
  16738. #endif
  16739. {
  16740. Vector3 tolua_ret = (Vector3) self->Normalized();
  16741. {
  16742. #ifdef __cplusplus
  16743. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  16744. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16745. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16746. #else
  16747. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  16748. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  16749. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16750. #endif
  16751. }
  16752. }
  16753. }
  16754. return 1;
  16755. #ifndef TOLUA_RELEASE
  16756. tolua_lerror:
  16757. tolua_error(tolua_S,"#ferror in function 'Normalized'.",&tolua_err);
  16758. return 0;
  16759. #endif
  16760. }
  16761. #endif //#ifndef TOLUA_DISABLE
  16762. /* get function: x_ of class Vector3 */
  16763. #ifndef TOLUA_DISABLE_tolua_get_Vector3_x
  16764. static int tolua_get_Vector3_x(lua_State* tolua_S)
  16765. {
  16766. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16767. #ifndef TOLUA_RELEASE
  16768. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  16769. #endif
  16770. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  16771. return 1;
  16772. }
  16773. #endif //#ifndef TOLUA_DISABLE
  16774. /* set function: x_ of class Vector3 */
  16775. #ifndef TOLUA_DISABLE_tolua_set_Vector3_x
  16776. static int tolua_set_Vector3_x(lua_State* tolua_S)
  16777. {
  16778. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16779. #ifndef TOLUA_RELEASE
  16780. tolua_Error tolua_err;
  16781. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  16782. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  16783. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  16784. #endif
  16785. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  16786. ;
  16787. return 0;
  16788. }
  16789. #endif //#ifndef TOLUA_DISABLE
  16790. /* get function: y_ of class Vector3 */
  16791. #ifndef TOLUA_DISABLE_tolua_get_Vector3_y
  16792. static int tolua_get_Vector3_y(lua_State* tolua_S)
  16793. {
  16794. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16795. #ifndef TOLUA_RELEASE
  16796. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  16797. #endif
  16798. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  16799. return 1;
  16800. }
  16801. #endif //#ifndef TOLUA_DISABLE
  16802. /* set function: y_ of class Vector3 */
  16803. #ifndef TOLUA_DISABLE_tolua_set_Vector3_y
  16804. static int tolua_set_Vector3_y(lua_State* tolua_S)
  16805. {
  16806. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16807. #ifndef TOLUA_RELEASE
  16808. tolua_Error tolua_err;
  16809. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  16810. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  16811. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  16812. #endif
  16813. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  16814. ;
  16815. return 0;
  16816. }
  16817. #endif //#ifndef TOLUA_DISABLE
  16818. /* get function: z_ of class Vector3 */
  16819. #ifndef TOLUA_DISABLE_tolua_get_Vector3_z
  16820. static int tolua_get_Vector3_z(lua_State* tolua_S)
  16821. {
  16822. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16823. #ifndef TOLUA_RELEASE
  16824. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  16825. #endif
  16826. tolua_pushnumber(tolua_S,(lua_Number)self->z_);
  16827. return 1;
  16828. }
  16829. #endif //#ifndef TOLUA_DISABLE
  16830. /* set function: z_ of class Vector3 */
  16831. #ifndef TOLUA_DISABLE_tolua_set_Vector3_z
  16832. static int tolua_set_Vector3_z(lua_State* tolua_S)
  16833. {
  16834. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  16835. #ifndef TOLUA_RELEASE
  16836. tolua_Error tolua_err;
  16837. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  16838. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  16839. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  16840. #endif
  16841. self->z_ = ((float) tolua_tonumber(tolua_S,2,0))
  16842. ;
  16843. return 0;
  16844. }
  16845. #endif //#ifndef TOLUA_DISABLE
  16846. /* get function: ZERO of class Vector3 */
  16847. #ifndef TOLUA_DISABLE_tolua_get_Vector3_ZERO
  16848. static int tolua_get_Vector3_ZERO(lua_State* tolua_S)
  16849. {
  16850. tolua_pushusertype(tolua_S,(void*)&Vector3::ZERO,"const Vector3");
  16851. return 1;
  16852. }
  16853. #endif //#ifndef TOLUA_DISABLE
  16854. /* get function: LEFT of class Vector3 */
  16855. #ifndef TOLUA_DISABLE_tolua_get_Vector3_LEFT
  16856. static int tolua_get_Vector3_LEFT(lua_State* tolua_S)
  16857. {
  16858. tolua_pushusertype(tolua_S,(void*)&Vector3::LEFT,"const Vector3");
  16859. return 1;
  16860. }
  16861. #endif //#ifndef TOLUA_DISABLE
  16862. /* get function: RIGHT of class Vector3 */
  16863. #ifndef TOLUA_DISABLE_tolua_get_Vector3_RIGHT
  16864. static int tolua_get_Vector3_RIGHT(lua_State* tolua_S)
  16865. {
  16866. tolua_pushusertype(tolua_S,(void*)&Vector3::RIGHT,"const Vector3");
  16867. return 1;
  16868. }
  16869. #endif //#ifndef TOLUA_DISABLE
  16870. /* get function: UP of class Vector3 */
  16871. #ifndef TOLUA_DISABLE_tolua_get_Vector3_UP
  16872. static int tolua_get_Vector3_UP(lua_State* tolua_S)
  16873. {
  16874. tolua_pushusertype(tolua_S,(void*)&Vector3::UP,"const Vector3");
  16875. return 1;
  16876. }
  16877. #endif //#ifndef TOLUA_DISABLE
  16878. /* get function: DOWN of class Vector3 */
  16879. #ifndef TOLUA_DISABLE_tolua_get_Vector3_DOWN
  16880. static int tolua_get_Vector3_DOWN(lua_State* tolua_S)
  16881. {
  16882. tolua_pushusertype(tolua_S,(void*)&Vector3::DOWN,"const Vector3");
  16883. return 1;
  16884. }
  16885. #endif //#ifndef TOLUA_DISABLE
  16886. /* get function: FORWARD of class Vector3 */
  16887. #ifndef TOLUA_DISABLE_tolua_get_Vector3_FORWARD
  16888. static int tolua_get_Vector3_FORWARD(lua_State* tolua_S)
  16889. {
  16890. tolua_pushusertype(tolua_S,(void*)&Vector3::FORWARD,"const Vector3");
  16891. return 1;
  16892. }
  16893. #endif //#ifndef TOLUA_DISABLE
  16894. /* get function: BACK of class Vector3 */
  16895. #ifndef TOLUA_DISABLE_tolua_get_Vector3_BACK
  16896. static int tolua_get_Vector3_BACK(lua_State* tolua_S)
  16897. {
  16898. tolua_pushusertype(tolua_S,(void*)&Vector3::BACK,"const Vector3");
  16899. return 1;
  16900. }
  16901. #endif //#ifndef TOLUA_DISABLE
  16902. /* get function: ONE of class Vector3 */
  16903. #ifndef TOLUA_DISABLE_tolua_get_Vector3_ONE
  16904. static int tolua_get_Vector3_ONE(lua_State* tolua_S)
  16905. {
  16906. tolua_pushusertype(tolua_S,(void*)&Vector3::ONE,"const Vector3");
  16907. return 1;
  16908. }
  16909. #endif //#ifndef TOLUA_DISABLE
  16910. /* method: new of class Vector4 */
  16911. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new00
  16912. static int tolua_Math_Vector4_new00(lua_State* tolua_S)
  16913. {
  16914. #ifndef TOLUA_RELEASE
  16915. tolua_Error tolua_err;
  16916. if (
  16917. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  16918. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16919. )
  16920. goto tolua_lerror;
  16921. else
  16922. #endif
  16923. {
  16924. {
  16925. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)());
  16926. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  16927. }
  16928. }
  16929. return 1;
  16930. #ifndef TOLUA_RELEASE
  16931. tolua_lerror:
  16932. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  16933. return 0;
  16934. #endif
  16935. }
  16936. #endif //#ifndef TOLUA_DISABLE
  16937. /* method: new_local of class Vector4 */
  16938. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new00_local
  16939. static int tolua_Math_Vector4_new00_local(lua_State* tolua_S)
  16940. {
  16941. #ifndef TOLUA_RELEASE
  16942. tolua_Error tolua_err;
  16943. if (
  16944. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  16945. !tolua_isnoobj(tolua_S,2,&tolua_err)
  16946. )
  16947. goto tolua_lerror;
  16948. else
  16949. #endif
  16950. {
  16951. {
  16952. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)());
  16953. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  16954. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  16955. }
  16956. }
  16957. return 1;
  16958. #ifndef TOLUA_RELEASE
  16959. tolua_lerror:
  16960. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  16961. return 0;
  16962. #endif
  16963. }
  16964. #endif //#ifndef TOLUA_DISABLE
  16965. /* method: new of class Vector4 */
  16966. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new01
  16967. static int tolua_Math_Vector4_new01(lua_State* tolua_S)
  16968. {
  16969. tolua_Error tolua_err;
  16970. if (
  16971. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  16972. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  16973. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16974. )
  16975. goto tolua_lerror;
  16976. else
  16977. {
  16978. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  16979. {
  16980. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector));
  16981. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  16982. }
  16983. }
  16984. return 1;
  16985. tolua_lerror:
  16986. return tolua_Math_Vector4_new00(tolua_S);
  16987. }
  16988. #endif //#ifndef TOLUA_DISABLE
  16989. /* method: new_local of class Vector4 */
  16990. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new01_local
  16991. static int tolua_Math_Vector4_new01_local(lua_State* tolua_S)
  16992. {
  16993. tolua_Error tolua_err;
  16994. if (
  16995. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  16996. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  16997. !tolua_isnoobj(tolua_S,3,&tolua_err)
  16998. )
  16999. goto tolua_lerror;
  17000. else
  17001. {
  17002. const Vector4* vector = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17003. {
  17004. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector));
  17005. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17006. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17007. }
  17008. }
  17009. return 1;
  17010. tolua_lerror:
  17011. return tolua_Math_Vector4_new00_local(tolua_S);
  17012. }
  17013. #endif //#ifndef TOLUA_DISABLE
  17014. /* method: new of class Vector4 */
  17015. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new02
  17016. static int tolua_Math_Vector4_new02(lua_State* tolua_S)
  17017. {
  17018. tolua_Error tolua_err;
  17019. if (
  17020. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17021. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17022. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17023. !tolua_isnoobj(tolua_S,4,&tolua_err)
  17024. )
  17025. goto tolua_lerror;
  17026. else
  17027. {
  17028. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17029. float w = ((float) tolua_tonumber(tolua_S,3,0));
  17030. {
  17031. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector,w));
  17032. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17033. }
  17034. }
  17035. return 1;
  17036. tolua_lerror:
  17037. return tolua_Math_Vector4_new01(tolua_S);
  17038. }
  17039. #endif //#ifndef TOLUA_DISABLE
  17040. /* method: new_local of class Vector4 */
  17041. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new02_local
  17042. static int tolua_Math_Vector4_new02_local(lua_State* tolua_S)
  17043. {
  17044. tolua_Error tolua_err;
  17045. if (
  17046. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17047. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  17048. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17049. !tolua_isnoobj(tolua_S,4,&tolua_err)
  17050. )
  17051. goto tolua_lerror;
  17052. else
  17053. {
  17054. const Vector3* vector = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  17055. float w = ((float) tolua_tonumber(tolua_S,3,0));
  17056. {
  17057. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(*vector,w));
  17058. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17059. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17060. }
  17061. }
  17062. return 1;
  17063. tolua_lerror:
  17064. return tolua_Math_Vector4_new01_local(tolua_S);
  17065. }
  17066. #endif //#ifndef TOLUA_DISABLE
  17067. /* method: new of class Vector4 */
  17068. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new03
  17069. static int tolua_Math_Vector4_new03(lua_State* tolua_S)
  17070. {
  17071. tolua_Error tolua_err;
  17072. if (
  17073. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17074. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17075. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17076. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  17077. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  17078. !tolua_isnoobj(tolua_S,6,&tolua_err)
  17079. )
  17080. goto tolua_lerror;
  17081. else
  17082. {
  17083. float x = ((float) tolua_tonumber(tolua_S,2,0));
  17084. float y = ((float) tolua_tonumber(tolua_S,3,0));
  17085. float z = ((float) tolua_tonumber(tolua_S,4,0));
  17086. float w = ((float) tolua_tonumber(tolua_S,5,0));
  17087. {
  17088. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(x,y,z,w));
  17089. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17090. }
  17091. }
  17092. return 1;
  17093. tolua_lerror:
  17094. return tolua_Math_Vector4_new02(tolua_S);
  17095. }
  17096. #endif //#ifndef TOLUA_DISABLE
  17097. /* method: new_local of class Vector4 */
  17098. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_new03_local
  17099. static int tolua_Math_Vector4_new03_local(lua_State* tolua_S)
  17100. {
  17101. tolua_Error tolua_err;
  17102. if (
  17103. !tolua_isusertable(tolua_S,1,"Vector4",0,&tolua_err) ||
  17104. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17105. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17106. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  17107. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  17108. !tolua_isnoobj(tolua_S,6,&tolua_err)
  17109. )
  17110. goto tolua_lerror;
  17111. else
  17112. {
  17113. float x = ((float) tolua_tonumber(tolua_S,2,0));
  17114. float y = ((float) tolua_tonumber(tolua_S,3,0));
  17115. float z = ((float) tolua_tonumber(tolua_S,4,0));
  17116. float w = ((float) tolua_tonumber(tolua_S,5,0));
  17117. {
  17118. Vector4* tolua_ret = (Vector4*) Mtolua_new((Vector4)(x,y,z,w));
  17119. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Vector4");
  17120. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17121. }
  17122. }
  17123. return 1;
  17124. tolua_lerror:
  17125. return tolua_Math_Vector4_new02_local(tolua_S);
  17126. }
  17127. #endif //#ifndef TOLUA_DISABLE
  17128. /* method: operator== of class Vector4 */
  17129. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__eq00
  17130. static int tolua_Math_Vector4__eq00(lua_State* tolua_S)
  17131. {
  17132. #ifndef TOLUA_RELEASE
  17133. tolua_Error tolua_err;
  17134. if (
  17135. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17136. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17137. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17138. )
  17139. goto tolua_lerror;
  17140. else
  17141. #endif
  17142. {
  17143. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17144. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17145. #ifndef TOLUA_RELEASE
  17146. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator=='", NULL);
  17147. #endif
  17148. {
  17149. bool tolua_ret = (bool) self->operator==(*rhs);
  17150. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  17151. }
  17152. }
  17153. return 1;
  17154. #ifndef TOLUA_RELEASE
  17155. tolua_lerror:
  17156. tolua_error(tolua_S,"#ferror in function '.eq'.",&tolua_err);
  17157. return 0;
  17158. #endif
  17159. }
  17160. #endif //#ifndef TOLUA_DISABLE
  17161. /* method: operator+ of class Vector4 */
  17162. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__add00
  17163. static int tolua_Math_Vector4__add00(lua_State* tolua_S)
  17164. {
  17165. #ifndef TOLUA_RELEASE
  17166. tolua_Error tolua_err;
  17167. if (
  17168. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17169. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17170. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17171. )
  17172. goto tolua_lerror;
  17173. else
  17174. #endif
  17175. {
  17176. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17177. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17178. #ifndef TOLUA_RELEASE
  17179. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator+'", NULL);
  17180. #endif
  17181. {
  17182. Vector4 tolua_ret = (Vector4) self->operator+(*rhs);
  17183. {
  17184. #ifdef __cplusplus
  17185. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17186. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17187. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17188. #else
  17189. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17190. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17191. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17192. #endif
  17193. }
  17194. }
  17195. }
  17196. return 1;
  17197. #ifndef TOLUA_RELEASE
  17198. tolua_lerror:
  17199. tolua_error(tolua_S,"#ferror in function '.add'.",&tolua_err);
  17200. return 0;
  17201. #endif
  17202. }
  17203. #endif //#ifndef TOLUA_DISABLE
  17204. /* method: operator- of class Vector4 */
  17205. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__sub00
  17206. static int tolua_Math_Vector4__sub00(lua_State* tolua_S)
  17207. {
  17208. #ifndef TOLUA_RELEASE
  17209. tolua_Error tolua_err;
  17210. if (
  17211. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17212. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17213. )
  17214. goto tolua_lerror;
  17215. else
  17216. #endif
  17217. {
  17218. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17219. #ifndef TOLUA_RELEASE
  17220. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  17221. #endif
  17222. {
  17223. Vector4 tolua_ret = (Vector4) self->operator-();
  17224. {
  17225. #ifdef __cplusplus
  17226. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17227. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17228. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17229. #else
  17230. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17231. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17232. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17233. #endif
  17234. }
  17235. }
  17236. }
  17237. return 1;
  17238. #ifndef TOLUA_RELEASE
  17239. tolua_lerror:
  17240. tolua_error(tolua_S,"#ferror in function '.sub'.",&tolua_err);
  17241. return 0;
  17242. #endif
  17243. }
  17244. #endif //#ifndef TOLUA_DISABLE
  17245. /* method: operator- of class Vector4 */
  17246. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__sub01
  17247. static int tolua_Math_Vector4__sub01(lua_State* tolua_S)
  17248. {
  17249. tolua_Error tolua_err;
  17250. if (
  17251. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17252. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17253. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17254. )
  17255. goto tolua_lerror;
  17256. else
  17257. {
  17258. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17259. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17260. #ifndef TOLUA_RELEASE
  17261. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator-'", NULL);
  17262. #endif
  17263. {
  17264. Vector4 tolua_ret = (Vector4) self->operator-(*rhs);
  17265. {
  17266. #ifdef __cplusplus
  17267. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17268. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17269. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17270. #else
  17271. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17272. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17273. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17274. #endif
  17275. }
  17276. }
  17277. }
  17278. return 1;
  17279. tolua_lerror:
  17280. return tolua_Math_Vector4__sub00(tolua_S);
  17281. }
  17282. #endif //#ifndef TOLUA_DISABLE
  17283. /* method: operator* of class Vector4 */
  17284. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__mul00
  17285. static int tolua_Math_Vector4__mul00(lua_State* tolua_S)
  17286. {
  17287. #ifndef TOLUA_RELEASE
  17288. tolua_Error tolua_err;
  17289. if (
  17290. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17291. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17292. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17293. )
  17294. goto tolua_lerror;
  17295. else
  17296. #endif
  17297. {
  17298. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17299. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  17300. #ifndef TOLUA_RELEASE
  17301. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  17302. #endif
  17303. {
  17304. Vector4 tolua_ret = (Vector4) self->operator*(rhs);
  17305. {
  17306. #ifdef __cplusplus
  17307. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17308. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17309. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17310. #else
  17311. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17312. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17313. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17314. #endif
  17315. }
  17316. }
  17317. }
  17318. return 1;
  17319. #ifndef TOLUA_RELEASE
  17320. tolua_lerror:
  17321. tolua_error(tolua_S,"#ferror in function '.mul'.",&tolua_err);
  17322. return 0;
  17323. #endif
  17324. }
  17325. #endif //#ifndef TOLUA_DISABLE
  17326. /* method: operator* of class Vector4 */
  17327. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__mul01
  17328. static int tolua_Math_Vector4__mul01(lua_State* tolua_S)
  17329. {
  17330. tolua_Error tolua_err;
  17331. if (
  17332. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17333. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17334. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17335. )
  17336. goto tolua_lerror;
  17337. else
  17338. {
  17339. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17340. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17341. #ifndef TOLUA_RELEASE
  17342. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator*'", NULL);
  17343. #endif
  17344. {
  17345. Vector4 tolua_ret = (Vector4) self->operator*(*rhs);
  17346. {
  17347. #ifdef __cplusplus
  17348. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17349. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17350. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17351. #else
  17352. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17353. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17354. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17355. #endif
  17356. }
  17357. }
  17358. }
  17359. return 1;
  17360. tolua_lerror:
  17361. return tolua_Math_Vector4__mul00(tolua_S);
  17362. }
  17363. #endif //#ifndef TOLUA_DISABLE
  17364. /* method: operator/ of class Vector4 */
  17365. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__div00
  17366. static int tolua_Math_Vector4__div00(lua_State* tolua_S)
  17367. {
  17368. #ifndef TOLUA_RELEASE
  17369. tolua_Error tolua_err;
  17370. if (
  17371. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17372. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  17373. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17374. )
  17375. goto tolua_lerror;
  17376. else
  17377. #endif
  17378. {
  17379. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17380. float rhs = ((float) tolua_tonumber(tolua_S,2,0));
  17381. #ifndef TOLUA_RELEASE
  17382. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  17383. #endif
  17384. {
  17385. Vector4 tolua_ret = (Vector4) self->operator/(rhs);
  17386. {
  17387. #ifdef __cplusplus
  17388. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17389. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17390. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17391. #else
  17392. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17393. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17394. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17395. #endif
  17396. }
  17397. }
  17398. }
  17399. return 1;
  17400. #ifndef TOLUA_RELEASE
  17401. tolua_lerror:
  17402. tolua_error(tolua_S,"#ferror in function '.div'.",&tolua_err);
  17403. return 0;
  17404. #endif
  17405. }
  17406. #endif //#ifndef TOLUA_DISABLE
  17407. /* method: operator/ of class Vector4 */
  17408. #ifndef TOLUA_DISABLE_tolua_Math_Vector4__div01
  17409. static int tolua_Math_Vector4__div01(lua_State* tolua_S)
  17410. {
  17411. tolua_Error tolua_err;
  17412. if (
  17413. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17414. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17415. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17416. )
  17417. goto tolua_lerror;
  17418. else
  17419. {
  17420. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17421. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17422. #ifndef TOLUA_RELEASE
  17423. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operator/'", NULL);
  17424. #endif
  17425. {
  17426. Vector4 tolua_ret = (Vector4) self->operator/(*rhs);
  17427. {
  17428. #ifdef __cplusplus
  17429. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17430. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17431. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17432. #else
  17433. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17434. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17435. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17436. #endif
  17437. }
  17438. }
  17439. }
  17440. return 1;
  17441. tolua_lerror:
  17442. return tolua_Math_Vector4__div00(tolua_S);
  17443. }
  17444. #endif //#ifndef TOLUA_DISABLE
  17445. /* method: DotProduct of class Vector4 */
  17446. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_DotProduct00
  17447. static int tolua_Math_Vector4_DotProduct00(lua_State* tolua_S)
  17448. {
  17449. #ifndef TOLUA_RELEASE
  17450. tolua_Error tolua_err;
  17451. if (
  17452. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17453. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17454. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17455. )
  17456. goto tolua_lerror;
  17457. else
  17458. #endif
  17459. {
  17460. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17461. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17462. #ifndef TOLUA_RELEASE
  17463. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DotProduct'", NULL);
  17464. #endif
  17465. {
  17466. float tolua_ret = (float) self->DotProduct(*rhs);
  17467. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17468. }
  17469. }
  17470. return 1;
  17471. #ifndef TOLUA_RELEASE
  17472. tolua_lerror:
  17473. tolua_error(tolua_S,"#ferror in function 'DotProduct'.",&tolua_err);
  17474. return 0;
  17475. #endif
  17476. }
  17477. #endif //#ifndef TOLUA_DISABLE
  17478. /* method: AbsDotProduct of class Vector4 */
  17479. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_AbsDotProduct00
  17480. static int tolua_Math_Vector4_AbsDotProduct00(lua_State* tolua_S)
  17481. {
  17482. #ifndef TOLUA_RELEASE
  17483. tolua_Error tolua_err;
  17484. if (
  17485. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17486. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17487. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17488. )
  17489. goto tolua_lerror;
  17490. else
  17491. #endif
  17492. {
  17493. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17494. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17495. #ifndef TOLUA_RELEASE
  17496. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AbsDotProduct'", NULL);
  17497. #endif
  17498. {
  17499. float tolua_ret = (float) self->AbsDotProduct(*rhs);
  17500. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  17501. }
  17502. }
  17503. return 1;
  17504. #ifndef TOLUA_RELEASE
  17505. tolua_lerror:
  17506. tolua_error(tolua_S,"#ferror in function 'AbsDotProduct'.",&tolua_err);
  17507. return 0;
  17508. #endif
  17509. }
  17510. #endif //#ifndef TOLUA_DISABLE
  17511. /* method: Abs of class Vector4 */
  17512. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_Abs00
  17513. static int tolua_Math_Vector4_Abs00(lua_State* tolua_S)
  17514. {
  17515. #ifndef TOLUA_RELEASE
  17516. tolua_Error tolua_err;
  17517. if (
  17518. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17519. !tolua_isnoobj(tolua_S,2,&tolua_err)
  17520. )
  17521. goto tolua_lerror;
  17522. else
  17523. #endif
  17524. {
  17525. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17526. #ifndef TOLUA_RELEASE
  17527. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Abs'", NULL);
  17528. #endif
  17529. {
  17530. Vector4 tolua_ret = (Vector4) self->Abs();
  17531. {
  17532. #ifdef __cplusplus
  17533. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17534. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17535. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17536. #else
  17537. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17538. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17539. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17540. #endif
  17541. }
  17542. }
  17543. }
  17544. return 1;
  17545. #ifndef TOLUA_RELEASE
  17546. tolua_lerror:
  17547. tolua_error(tolua_S,"#ferror in function 'Abs'.",&tolua_err);
  17548. return 0;
  17549. #endif
  17550. }
  17551. #endif //#ifndef TOLUA_DISABLE
  17552. /* method: Lerp of class Vector4 */
  17553. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_Lerp00
  17554. static int tolua_Math_Vector4_Lerp00(lua_State* tolua_S)
  17555. {
  17556. #ifndef TOLUA_RELEASE
  17557. tolua_Error tolua_err;
  17558. if (
  17559. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17560. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17561. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  17562. !tolua_isnoobj(tolua_S,4,&tolua_err)
  17563. )
  17564. goto tolua_lerror;
  17565. else
  17566. #endif
  17567. {
  17568. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17569. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17570. float t = ((float) tolua_tonumber(tolua_S,3,0));
  17571. #ifndef TOLUA_RELEASE
  17572. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Lerp'", NULL);
  17573. #endif
  17574. {
  17575. Vector4 tolua_ret = (Vector4) self->Lerp(*rhs,t);
  17576. {
  17577. #ifdef __cplusplus
  17578. void* tolua_obj = Mtolua_new((Vector4)(tolua_ret));
  17579. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17580. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17581. #else
  17582. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector4));
  17583. tolua_pushusertype(tolua_S,tolua_obj,"Vector4");
  17584. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  17585. #endif
  17586. }
  17587. }
  17588. }
  17589. return 1;
  17590. #ifndef TOLUA_RELEASE
  17591. tolua_lerror:
  17592. tolua_error(tolua_S,"#ferror in function 'Lerp'.",&tolua_err);
  17593. return 0;
  17594. #endif
  17595. }
  17596. #endif //#ifndef TOLUA_DISABLE
  17597. /* method: Equals of class Vector4 */
  17598. #ifndef TOLUA_DISABLE_tolua_Math_Vector4_Equals00
  17599. static int tolua_Math_Vector4_Equals00(lua_State* tolua_S)
  17600. {
  17601. #ifndef TOLUA_RELEASE
  17602. tolua_Error tolua_err;
  17603. if (
  17604. !tolua_isusertype(tolua_S,1,"const Vector4",0,&tolua_err) ||
  17605. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector4",0,&tolua_err)) ||
  17606. !tolua_isnoobj(tolua_S,3,&tolua_err)
  17607. )
  17608. goto tolua_lerror;
  17609. else
  17610. #endif
  17611. {
  17612. const Vector4* self = (const Vector4*) tolua_tousertype(tolua_S,1,0);
  17613. const Vector4* rhs = ((const Vector4*) tolua_tousertype(tolua_S,2,0));
  17614. #ifndef TOLUA_RELEASE
  17615. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Equals'", NULL);
  17616. #endif
  17617. {
  17618. bool tolua_ret = (bool) self->Equals(*rhs);
  17619. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  17620. }
  17621. }
  17622. return 1;
  17623. #ifndef TOLUA_RELEASE
  17624. tolua_lerror:
  17625. tolua_error(tolua_S,"#ferror in function 'Equals'.",&tolua_err);
  17626. return 0;
  17627. #endif
  17628. }
  17629. #endif //#ifndef TOLUA_DISABLE
  17630. /* get function: x_ of class Vector4 */
  17631. #ifndef TOLUA_DISABLE_tolua_get_Vector4_x
  17632. static int tolua_get_Vector4_x(lua_State* tolua_S)
  17633. {
  17634. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17635. #ifndef TOLUA_RELEASE
  17636. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  17637. #endif
  17638. tolua_pushnumber(tolua_S,(lua_Number)self->x_);
  17639. return 1;
  17640. }
  17641. #endif //#ifndef TOLUA_DISABLE
  17642. /* set function: x_ of class Vector4 */
  17643. #ifndef TOLUA_DISABLE_tolua_set_Vector4_x
  17644. static int tolua_set_Vector4_x(lua_State* tolua_S)
  17645. {
  17646. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17647. #ifndef TOLUA_RELEASE
  17648. tolua_Error tolua_err;
  17649. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_'",NULL);
  17650. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17651. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17652. #endif
  17653. self->x_ = ((float) tolua_tonumber(tolua_S,2,0))
  17654. ;
  17655. return 0;
  17656. }
  17657. #endif //#ifndef TOLUA_DISABLE
  17658. /* get function: y_ of class Vector4 */
  17659. #ifndef TOLUA_DISABLE_tolua_get_Vector4_y
  17660. static int tolua_get_Vector4_y(lua_State* tolua_S)
  17661. {
  17662. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17663. #ifndef TOLUA_RELEASE
  17664. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  17665. #endif
  17666. tolua_pushnumber(tolua_S,(lua_Number)self->y_);
  17667. return 1;
  17668. }
  17669. #endif //#ifndef TOLUA_DISABLE
  17670. /* set function: y_ of class Vector4 */
  17671. #ifndef TOLUA_DISABLE_tolua_set_Vector4_y
  17672. static int tolua_set_Vector4_y(lua_State* tolua_S)
  17673. {
  17674. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17675. #ifndef TOLUA_RELEASE
  17676. tolua_Error tolua_err;
  17677. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_'",NULL);
  17678. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17679. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17680. #endif
  17681. self->y_ = ((float) tolua_tonumber(tolua_S,2,0))
  17682. ;
  17683. return 0;
  17684. }
  17685. #endif //#ifndef TOLUA_DISABLE
  17686. /* get function: z_ of class Vector4 */
  17687. #ifndef TOLUA_DISABLE_tolua_get_Vector4_z
  17688. static int tolua_get_Vector4_z(lua_State* tolua_S)
  17689. {
  17690. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17691. #ifndef TOLUA_RELEASE
  17692. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  17693. #endif
  17694. tolua_pushnumber(tolua_S,(lua_Number)self->z_);
  17695. return 1;
  17696. }
  17697. #endif //#ifndef TOLUA_DISABLE
  17698. /* set function: z_ of class Vector4 */
  17699. #ifndef TOLUA_DISABLE_tolua_set_Vector4_z
  17700. static int tolua_set_Vector4_z(lua_State* tolua_S)
  17701. {
  17702. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17703. #ifndef TOLUA_RELEASE
  17704. tolua_Error tolua_err;
  17705. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'z_'",NULL);
  17706. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17707. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17708. #endif
  17709. self->z_ = ((float) tolua_tonumber(tolua_S,2,0))
  17710. ;
  17711. return 0;
  17712. }
  17713. #endif //#ifndef TOLUA_DISABLE
  17714. /* get function: w_ of class Vector4 */
  17715. #ifndef TOLUA_DISABLE_tolua_get_Vector4_w
  17716. static int tolua_get_Vector4_w(lua_State* tolua_S)
  17717. {
  17718. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17719. #ifndef TOLUA_RELEASE
  17720. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  17721. #endif
  17722. tolua_pushnumber(tolua_S,(lua_Number)self->w_);
  17723. return 1;
  17724. }
  17725. #endif //#ifndef TOLUA_DISABLE
  17726. /* set function: w_ of class Vector4 */
  17727. #ifndef TOLUA_DISABLE_tolua_set_Vector4_w
  17728. static int tolua_set_Vector4_w(lua_State* tolua_S)
  17729. {
  17730. Vector4* self = (Vector4*) tolua_tousertype(tolua_S,1,0);
  17731. #ifndef TOLUA_RELEASE
  17732. tolua_Error tolua_err;
  17733. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'w_'",NULL);
  17734. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  17735. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  17736. #endif
  17737. self->w_ = ((float) tolua_tonumber(tolua_S,2,0))
  17738. ;
  17739. return 0;
  17740. }
  17741. #endif //#ifndef TOLUA_DISABLE
  17742. /* get function: ZERO of class Vector4 */
  17743. #ifndef TOLUA_DISABLE_tolua_get_Vector4_ZERO
  17744. static int tolua_get_Vector4_ZERO(lua_State* tolua_S)
  17745. {
  17746. tolua_pushusertype(tolua_S,(void*)&Vector4::ZERO,"const Vector4");
  17747. return 1;
  17748. }
  17749. #endif //#ifndef TOLUA_DISABLE
  17750. /* get function: ONE of class Vector4 */
  17751. #ifndef TOLUA_DISABLE_tolua_get_Vector4_ONE
  17752. static int tolua_get_Vector4_ONE(lua_State* tolua_S)
  17753. {
  17754. tolua_pushusertype(tolua_S,(void*)&Vector4::ONE,"const Vector4");
  17755. return 1;
  17756. }
  17757. #endif //#ifndef TOLUA_DISABLE
  17758. /* Open function */
  17759. TOLUA_API int tolua_Math_open (lua_State* tolua_S)
  17760. {
  17761. tolua_open(tolua_S);
  17762. tolua_reg_types(tolua_S);
  17763. tolua_module(tolua_S,NULL,1);
  17764. tolua_beginmodule(tolua_S,NULL);
  17765. #ifdef __cplusplus
  17766. tolua_cclass(tolua_S,"AreaAllocator","AreaAllocator","",tolua_collect_AreaAllocator);
  17767. #else
  17768. tolua_cclass(tolua_S,"AreaAllocator","AreaAllocator","",NULL);
  17769. #endif
  17770. tolua_beginmodule(tolua_S,"AreaAllocator");
  17771. tolua_function(tolua_S,"new",tolua_Math_AreaAllocator_new00);
  17772. tolua_function(tolua_S,"new_local",tolua_Math_AreaAllocator_new00_local);
  17773. tolua_function(tolua_S,".call",tolua_Math_AreaAllocator_new00_local);
  17774. tolua_function(tolua_S,"new",tolua_Math_AreaAllocator_new01);
  17775. tolua_function(tolua_S,"new_local",tolua_Math_AreaAllocator_new01_local);
  17776. tolua_function(tolua_S,".call",tolua_Math_AreaAllocator_new01_local);
  17777. tolua_function(tolua_S,"Reset",tolua_Math_AreaAllocator_Reset00);
  17778. tolua_function(tolua_S,"Allocate",tolua_Math_AreaAllocator_Allocate00);
  17779. tolua_function(tolua_S,"GetWidth",tolua_Math_AreaAllocator_GetWidth00);
  17780. tolua_function(tolua_S,"GetHeight",tolua_Math_AreaAllocator_GetHeight00);
  17781. tolua_endmodule(tolua_S);
  17782. #ifdef __cplusplus
  17783. tolua_cclass(tolua_S,"BoundingBox","BoundingBox","",tolua_collect_BoundingBox);
  17784. #else
  17785. tolua_cclass(tolua_S,"BoundingBox","BoundingBox","",NULL);
  17786. #endif
  17787. tolua_beginmodule(tolua_S,"BoundingBox");
  17788. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new00);
  17789. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new00_local);
  17790. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new00_local);
  17791. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new01);
  17792. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new01_local);
  17793. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new01_local);
  17794. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new02);
  17795. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new02_local);
  17796. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new02_local);
  17797. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new03);
  17798. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new03_local);
  17799. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new03_local);
  17800. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new04);
  17801. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new04_local);
  17802. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new04_local);
  17803. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new05);
  17804. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new05_local);
  17805. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new05_local);
  17806. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new06);
  17807. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new06_local);
  17808. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new06_local);
  17809. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new07);
  17810. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new07_local);
  17811. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new07_local);
  17812. tolua_function(tolua_S,"new",tolua_Math_BoundingBox_new08);
  17813. tolua_function(tolua_S,"new_local",tolua_Math_BoundingBox_new08_local);
  17814. tolua_function(tolua_S,".call",tolua_Math_BoundingBox_new08_local);
  17815. tolua_function(tolua_S,".eq",tolua_Math_BoundingBox__eq00);
  17816. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define00);
  17817. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define01);
  17818. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define02);
  17819. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define03);
  17820. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define04);
  17821. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge00);
  17822. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge01);
  17823. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define05);
  17824. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define06);
  17825. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define07);
  17826. tolua_function(tolua_S,"Define",tolua_Math_BoundingBox_Define08);
  17827. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge02);
  17828. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge03);
  17829. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge04);
  17830. tolua_function(tolua_S,"Merge",tolua_Math_BoundingBox_Merge05);
  17831. tolua_function(tolua_S,"Clip",tolua_Math_BoundingBox_Clip00);
  17832. tolua_function(tolua_S,"Transform",tolua_Math_BoundingBox_Transform00);
  17833. tolua_function(tolua_S,"Transform",tolua_Math_BoundingBox_Transform01);
  17834. tolua_function(tolua_S,"Clear",tolua_Math_BoundingBox_Clear00);
  17835. tolua_function(tolua_S,"Center",tolua_Math_BoundingBox_Center00);
  17836. tolua_function(tolua_S,"Size",tolua_Math_BoundingBox_Size00);
  17837. tolua_function(tolua_S,"HalfSize",tolua_Math_BoundingBox_HalfSize00);
  17838. tolua_function(tolua_S,"Transformed",tolua_Math_BoundingBox_Transformed00);
  17839. tolua_function(tolua_S,"Transformed",tolua_Math_BoundingBox_Transformed01);
  17840. tolua_function(tolua_S,"Projected",tolua_Math_BoundingBox_Projected00);
  17841. tolua_function(tolua_S,"IsInside",tolua_Math_BoundingBox_IsInside00);
  17842. tolua_function(tolua_S,"IsInside",tolua_Math_BoundingBox_IsInside01);
  17843. tolua_function(tolua_S,"IsInsideFast",tolua_Math_BoundingBox_IsInsideFast00);
  17844. tolua_function(tolua_S,"IsInside",tolua_Math_BoundingBox_IsInside02);
  17845. tolua_function(tolua_S,"IsInsideFast",tolua_Math_BoundingBox_IsInsideFast01);
  17846. tolua_variable(tolua_S,"min",tolua_get_BoundingBox_min,tolua_set_BoundingBox_min);
  17847. tolua_variable(tolua_S,"max",tolua_get_BoundingBox_max,tolua_set_BoundingBox_max);
  17848. tolua_endmodule(tolua_S);
  17849. #ifdef __cplusplus
  17850. tolua_cclass(tolua_S,"Color","Color","",tolua_collect_Color);
  17851. #else
  17852. tolua_cclass(tolua_S,"Color","Color","",NULL);
  17853. #endif
  17854. tolua_beginmodule(tolua_S,"Color");
  17855. tolua_function(tolua_S,"new",tolua_Math_Color_new00);
  17856. tolua_function(tolua_S,"new_local",tolua_Math_Color_new00_local);
  17857. tolua_function(tolua_S,".call",tolua_Math_Color_new00_local);
  17858. tolua_function(tolua_S,"new",tolua_Math_Color_new01);
  17859. tolua_function(tolua_S,"new_local",tolua_Math_Color_new01_local);
  17860. tolua_function(tolua_S,".call",tolua_Math_Color_new01_local);
  17861. tolua_function(tolua_S,"new",tolua_Math_Color_new02);
  17862. tolua_function(tolua_S,"new_local",tolua_Math_Color_new02_local);
  17863. tolua_function(tolua_S,".call",tolua_Math_Color_new02_local);
  17864. tolua_function(tolua_S,"new",tolua_Math_Color_new03);
  17865. tolua_function(tolua_S,"new_local",tolua_Math_Color_new03_local);
  17866. tolua_function(tolua_S,".call",tolua_Math_Color_new03_local);
  17867. tolua_function(tolua_S,"new",tolua_Math_Color_new04);
  17868. tolua_function(tolua_S,"new_local",tolua_Math_Color_new04_local);
  17869. tolua_function(tolua_S,".call",tolua_Math_Color_new04_local);
  17870. tolua_function(tolua_S,".eq",tolua_Math_Color__eq00);
  17871. tolua_function(tolua_S,".mul",tolua_Math_Color__mul00);
  17872. tolua_function(tolua_S,".add",tolua_Math_Color__add00);
  17873. tolua_function(tolua_S,"RGBValues",tolua_Math_Color_RGBValues00);
  17874. tolua_function(tolua_S,"Intensity",tolua_Math_Color_Intensity00);
  17875. tolua_function(tolua_S,"Lerp",tolua_Math_Color_Lerp00);
  17876. tolua_function(tolua_S,"ToUInt",tolua_Math_Color_ToUInt00);
  17877. tolua_function(tolua_S,"ToVector4",tolua_Math_Color_ToVector400);
  17878. tolua_variable(tolua_S,"r",tolua_get_Color_r,tolua_set_Color_r);
  17879. tolua_variable(tolua_S,"g",tolua_get_Color_g,tolua_set_Color_g);
  17880. tolua_variable(tolua_S,"b",tolua_get_Color_b,tolua_set_Color_b);
  17881. tolua_variable(tolua_S,"a",tolua_get_Color_a,tolua_set_Color_a);
  17882. tolua_variable(tolua_S,"WHITE",tolua_get_Color_WHITE,NULL);
  17883. tolua_variable(tolua_S,"YELLOW",tolua_get_Color_YELLOW,NULL);
  17884. tolua_variable(tolua_S,"RED",tolua_get_Color_RED,NULL);
  17885. tolua_variable(tolua_S,"GREEN",tolua_get_Color_GREEN,NULL);
  17886. tolua_variable(tolua_S,"BLUE",tolua_get_Color_BLUE,NULL);
  17887. tolua_variable(tolua_S,"BLACK",tolua_get_Color_BLACK,NULL);
  17888. tolua_variable(tolua_S,"TRANSPARENT",tolua_get_Color_TRANSPARENT,NULL);
  17889. tolua_endmodule(tolua_S);
  17890. tolua_constant(tolua_S,"PLANE_NEAR",PLANE_NEAR);
  17891. tolua_constant(tolua_S,"PLANE_LEFT",PLANE_LEFT);
  17892. tolua_constant(tolua_S,"PLANE_RIGHT",PLANE_RIGHT);
  17893. tolua_constant(tolua_S,"PLANE_UP",PLANE_UP);
  17894. tolua_constant(tolua_S,"PLANE_DOWN",PLANE_DOWN);
  17895. tolua_constant(tolua_S,"PLANE_FAR",PLANE_FAR);
  17896. tolua_variable(tolua_S,"NUM_FRUSTUM_PLANES",tolua_get_NUM_FRUSTUM_PLANES,NULL);
  17897. tolua_variable(tolua_S,"NUM_FRUSTUM_VERTICES",tolua_get_NUM_FRUSTUM_VERTICES,NULL);
  17898. #ifdef __cplusplus
  17899. tolua_cclass(tolua_S,"Frustum","Frustum","",tolua_collect_Frustum);
  17900. #else
  17901. tolua_cclass(tolua_S,"Frustum","Frustum","",NULL);
  17902. #endif
  17903. tolua_beginmodule(tolua_S,"Frustum");
  17904. tolua_function(tolua_S,"new",tolua_Math_Frustum_new00);
  17905. tolua_function(tolua_S,"new_local",tolua_Math_Frustum_new00_local);
  17906. tolua_function(tolua_S,".call",tolua_Math_Frustum_new00_local);
  17907. tolua_function(tolua_S,"new",tolua_Math_Frustum_new01);
  17908. tolua_function(tolua_S,"new_local",tolua_Math_Frustum_new01_local);
  17909. tolua_function(tolua_S,".call",tolua_Math_Frustum_new01_local);
  17910. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define00);
  17911. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define01);
  17912. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define02);
  17913. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define03);
  17914. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define04);
  17915. tolua_function(tolua_S,"Define",tolua_Math_Frustum_Define05);
  17916. tolua_function(tolua_S,"DefineOrtho",tolua_Math_Frustum_DefineOrtho00);
  17917. tolua_function(tolua_S,"DefineOrtho",tolua_Math_Frustum_DefineOrtho01);
  17918. tolua_function(tolua_S,"Transform",tolua_Math_Frustum_Transform00);
  17919. tolua_function(tolua_S,"Transform",tolua_Math_Frustum_Transform01);
  17920. tolua_function(tolua_S,"IsInside",tolua_Math_Frustum_IsInside00);
  17921. tolua_function(tolua_S,"IsInside",tolua_Math_Frustum_IsInside01);
  17922. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Frustum_IsInsideFast00);
  17923. tolua_function(tolua_S,"IsInside",tolua_Math_Frustum_IsInside02);
  17924. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Frustum_IsInsideFast01);
  17925. tolua_function(tolua_S,"Distance",tolua_Math_Frustum_Distance00);
  17926. tolua_function(tolua_S,"Transformed",tolua_Math_Frustum_Transformed00);
  17927. tolua_function(tolua_S,"Transformed",tolua_Math_Frustum_Transformed01);
  17928. tolua_function(tolua_S,"Projected",tolua_Math_Frustum_Projected00);
  17929. tolua_function(tolua_S,"UpdatePlanes",tolua_Math_Frustum_UpdatePlanes00);
  17930. tolua_endmodule(tolua_S);
  17931. tolua_variable(tolua_S,"M_PI",tolua_get_M_PI,NULL);
  17932. tolua_variable(tolua_S,"M_MIN_INT",tolua_get_M_MIN_INT,NULL);
  17933. tolua_variable(tolua_S,"M_MAX_INT",tolua_get_M_MAX_INT,NULL);
  17934. tolua_variable(tolua_S,"M_MIN_UNSIGNED",tolua_get_M_MIN_UNSIGNED,NULL);
  17935. tolua_variable(tolua_S,"M_MAX_UNSIGNED",tolua_get_M_MAX_UNSIGNED,NULL);
  17936. tolua_variable(tolua_S,"M_EPSILON",tolua_get_M_EPSILON,NULL);
  17937. tolua_variable(tolua_S,"M_LARGE_EPSILON",tolua_get_M_LARGE_EPSILON,NULL);
  17938. tolua_variable(tolua_S,"M_MIN_NEARCLIP",tolua_get_M_MIN_NEARCLIP,NULL);
  17939. tolua_variable(tolua_S,"M_MAX_FOV",tolua_get_M_MAX_FOV,NULL);
  17940. tolua_variable(tolua_S,"M_LARGE_VALUE",tolua_get_M_LARGE_VALUE,NULL);
  17941. tolua_variable(tolua_S,"M_INFINITY",tolua_get_M_INFINITY,NULL);
  17942. tolua_variable(tolua_S,"M_DEGTORAD",tolua_get_M_DEGTORAD,NULL);
  17943. tolua_variable(tolua_S,"M_DEGTORAD_2",tolua_get_M_DEGTORAD_2,NULL);
  17944. tolua_variable(tolua_S,"M_RADTODEG",tolua_get_M_RADTODEG,NULL);
  17945. tolua_constant(tolua_S,"OUTSIDE",OUTSIDE);
  17946. tolua_constant(tolua_S,"INTERSECTS",INTERSECTS);
  17947. tolua_constant(tolua_S,"INSIDE",INSIDE);
  17948. tolua_function(tolua_S,"Lerp",tolua_Math_Lerp00);
  17949. tolua_function(tolua_S,"Min",tolua_Math_Min00);
  17950. tolua_function(tolua_S,"Max",tolua_Math_Max00);
  17951. tolua_function(tolua_S,"Abs",tolua_Math_Abs00);
  17952. tolua_function(tolua_S,"Clamp",tolua_Math_Clamp00);
  17953. tolua_function(tolua_S,"Equals",tolua_Math_Equals00);
  17954. tolua_function(tolua_S,"Min",tolua_Math_Min01);
  17955. tolua_function(tolua_S,"Max",tolua_Math_Max01);
  17956. tolua_function(tolua_S,"Abs",tolua_Math_Abs01);
  17957. tolua_function(tolua_S,"Clamp",tolua_Math_Clamp01);
  17958. tolua_function(tolua_S,"IsPowerOfTwo",tolua_Math_IsPowerOfTwo00);
  17959. tolua_function(tolua_S,"NextPowerOfTwo",tolua_Math_NextPowerOfTwo00);
  17960. tolua_function(tolua_S,"SDBMHash",tolua_Math_SDBMHash00);
  17961. tolua_function(tolua_S,"Random",tolua_Math_Random00);
  17962. tolua_function(tolua_S,"Random",tolua_Math_Random01);
  17963. tolua_function(tolua_S,"RandomInt",tolua_Math_RandomInt00);
  17964. #ifdef __cplusplus
  17965. tolua_cclass(tolua_S,"Matrix3","Matrix3","",tolua_collect_Matrix3);
  17966. #else
  17967. tolua_cclass(tolua_S,"Matrix3","Matrix3","",NULL);
  17968. #endif
  17969. tolua_beginmodule(tolua_S,"Matrix3");
  17970. tolua_function(tolua_S,"new",tolua_Math_Matrix3_new00);
  17971. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3_new00_local);
  17972. tolua_function(tolua_S,".call",tolua_Math_Matrix3_new00_local);
  17973. tolua_function(tolua_S,"new",tolua_Math_Matrix3_new01);
  17974. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3_new01_local);
  17975. tolua_function(tolua_S,".call",tolua_Math_Matrix3_new01_local);
  17976. tolua_function(tolua_S,"new",tolua_Math_Matrix3_new02);
  17977. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3_new02_local);
  17978. tolua_function(tolua_S,".call",tolua_Math_Matrix3_new02_local);
  17979. tolua_function(tolua_S,".eq",tolua_Math_Matrix3__eq00);
  17980. tolua_function(tolua_S,".mul",tolua_Math_Matrix3__mul00);
  17981. tolua_function(tolua_S,".add",tolua_Math_Matrix3__add00);
  17982. tolua_function(tolua_S,".sub",tolua_Math_Matrix3__sub00);
  17983. tolua_function(tolua_S,".mul",tolua_Math_Matrix3__mul01);
  17984. tolua_function(tolua_S,".mul",tolua_Math_Matrix3__mul02);
  17985. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3_SetScale00);
  17986. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3_SetScale01);
  17987. tolua_function(tolua_S,"Scale",tolua_Math_Matrix3_Scale00);
  17988. tolua_function(tolua_S,"Transpose",tolua_Math_Matrix3_Transpose00);
  17989. tolua_function(tolua_S,"Scaled",tolua_Math_Matrix3_Scaled00);
  17990. tolua_function(tolua_S,"Equals",tolua_Math_Matrix3_Equals00);
  17991. tolua_function(tolua_S,"Inverse",tolua_Math_Matrix3_Inverse00);
  17992. tolua_variable(tolua_S,"m00",tolua_get_Matrix3_m00,tolua_set_Matrix3_m00);
  17993. tolua_variable(tolua_S,"m01",tolua_get_Matrix3_m01,tolua_set_Matrix3_m01);
  17994. tolua_variable(tolua_S,"m02",tolua_get_Matrix3_m02,tolua_set_Matrix3_m02);
  17995. tolua_variable(tolua_S,"m10",tolua_get_Matrix3_m10,tolua_set_Matrix3_m10);
  17996. tolua_variable(tolua_S,"m11",tolua_get_Matrix3_m11,tolua_set_Matrix3_m11);
  17997. tolua_variable(tolua_S,"m12",tolua_get_Matrix3_m12,tolua_set_Matrix3_m12);
  17998. tolua_variable(tolua_S,"m20",tolua_get_Matrix3_m20,tolua_set_Matrix3_m20);
  17999. tolua_variable(tolua_S,"m21",tolua_get_Matrix3_m21,tolua_set_Matrix3_m21);
  18000. tolua_variable(tolua_S,"m22",tolua_get_Matrix3_m22,tolua_set_Matrix3_m22);
  18001. tolua_function(tolua_S,"BulkTranspose",tolua_Math_Matrix3_BulkTranspose00);
  18002. tolua_variable(tolua_S,"ZERO",tolua_get_Matrix3_ZERO,NULL);
  18003. tolua_variable(tolua_S,"IDENTITY",tolua_get_Matrix3_IDENTITY,NULL);
  18004. tolua_endmodule(tolua_S);
  18005. #ifdef __cplusplus
  18006. tolua_cclass(tolua_S,"Matrix3x4","Matrix3x4","",tolua_collect_Matrix3x4);
  18007. #else
  18008. tolua_cclass(tolua_S,"Matrix3x4","Matrix3x4","",NULL);
  18009. #endif
  18010. tolua_beginmodule(tolua_S,"Matrix3x4");
  18011. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new00);
  18012. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new00_local);
  18013. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new00_local);
  18014. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new01);
  18015. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new01_local);
  18016. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new01_local);
  18017. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new02);
  18018. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new02_local);
  18019. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new02_local);
  18020. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new03);
  18021. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new03_local);
  18022. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new03_local);
  18023. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new04);
  18024. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new04_local);
  18025. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new04_local);
  18026. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new05);
  18027. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new05_local);
  18028. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new05_local);
  18029. tolua_function(tolua_S,"new",tolua_Math_Matrix3x4_new06);
  18030. tolua_function(tolua_S,"new_local",tolua_Math_Matrix3x4_new06_local);
  18031. tolua_function(tolua_S,".call",tolua_Math_Matrix3x4_new06_local);
  18032. tolua_function(tolua_S,".eq",tolua_Math_Matrix3x4__eq00);
  18033. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul00);
  18034. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul01);
  18035. tolua_function(tolua_S,".add",tolua_Math_Matrix3x4__add00);
  18036. tolua_function(tolua_S,".sub",tolua_Math_Matrix3x4__sub00);
  18037. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul02);
  18038. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul03);
  18039. tolua_function(tolua_S,".mul",tolua_Math_Matrix3x4__mul04);
  18040. tolua_function(tolua_S,"SetTranslation",tolua_Math_Matrix3x4_SetTranslation00);
  18041. tolua_function(tolua_S,"SetRotation",tolua_Math_Matrix3x4_SetRotation00);
  18042. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3x4_SetScale00);
  18043. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix3x4_SetScale01);
  18044. tolua_function(tolua_S,"ToMatrix3",tolua_Math_Matrix3x4_ToMatrix300);
  18045. tolua_function(tolua_S,"RotationMatrix",tolua_Math_Matrix3x4_RotationMatrix00);
  18046. tolua_function(tolua_S,"Translation",tolua_Math_Matrix3x4_Translation00);
  18047. tolua_function(tolua_S,"Rotation",tolua_Math_Matrix3x4_Rotation00);
  18048. tolua_function(tolua_S,"Scale",tolua_Math_Matrix3x4_Scale00);
  18049. tolua_function(tolua_S,"Equals",tolua_Math_Matrix3x4_Equals00);
  18050. tolua_function(tolua_S,"Decompose",tolua_Math_Matrix3x4_Decompose00);
  18051. tolua_function(tolua_S,"Inverse",tolua_Math_Matrix3x4_Inverse00);
  18052. tolua_variable(tolua_S,"m00",tolua_get_Matrix3x4_m00,tolua_set_Matrix3x4_m00);
  18053. tolua_variable(tolua_S,"m01",tolua_get_Matrix3x4_m01,tolua_set_Matrix3x4_m01);
  18054. tolua_variable(tolua_S,"m02",tolua_get_Matrix3x4_m02,tolua_set_Matrix3x4_m02);
  18055. tolua_variable(tolua_S,"m03",tolua_get_Matrix3x4_m03,tolua_set_Matrix3x4_m03);
  18056. tolua_variable(tolua_S,"m10",tolua_get_Matrix3x4_m10,tolua_set_Matrix3x4_m10);
  18057. tolua_variable(tolua_S,"m11",tolua_get_Matrix3x4_m11,tolua_set_Matrix3x4_m11);
  18058. tolua_variable(tolua_S,"m12",tolua_get_Matrix3x4_m12,tolua_set_Matrix3x4_m12);
  18059. tolua_variable(tolua_S,"m13",tolua_get_Matrix3x4_m13,tolua_set_Matrix3x4_m13);
  18060. tolua_variable(tolua_S,"m20",tolua_get_Matrix3x4_m20,tolua_set_Matrix3x4_m20);
  18061. tolua_variable(tolua_S,"m21",tolua_get_Matrix3x4_m21,tolua_set_Matrix3x4_m21);
  18062. tolua_variable(tolua_S,"m22",tolua_get_Matrix3x4_m22,tolua_set_Matrix3x4_m22);
  18063. tolua_variable(tolua_S,"m23",tolua_get_Matrix3x4_m23,tolua_set_Matrix3x4_m23);
  18064. tolua_variable(tolua_S,"ZERO",tolua_get_Matrix3x4_ZERO,NULL);
  18065. tolua_variable(tolua_S,"IDENTITY",tolua_get_Matrix3x4_IDENTITY,NULL);
  18066. tolua_endmodule(tolua_S);
  18067. #ifdef __cplusplus
  18068. tolua_cclass(tolua_S,"Matrix4","Matrix4","",tolua_collect_Matrix4);
  18069. #else
  18070. tolua_cclass(tolua_S,"Matrix4","Matrix4","",NULL);
  18071. #endif
  18072. tolua_beginmodule(tolua_S,"Matrix4");
  18073. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new00);
  18074. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new00_local);
  18075. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new00_local);
  18076. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new01);
  18077. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new01_local);
  18078. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new01_local);
  18079. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new02);
  18080. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new02_local);
  18081. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new02_local);
  18082. tolua_function(tolua_S,"new",tolua_Math_Matrix4_new03);
  18083. tolua_function(tolua_S,"new_local",tolua_Math_Matrix4_new03_local);
  18084. tolua_function(tolua_S,".call",tolua_Math_Matrix4_new03_local);
  18085. tolua_function(tolua_S,".eq",tolua_Math_Matrix4__eq00);
  18086. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul00);
  18087. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul01);
  18088. tolua_function(tolua_S,".add",tolua_Math_Matrix4__add00);
  18089. tolua_function(tolua_S,".sub",tolua_Math_Matrix4__sub00);
  18090. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul02);
  18091. tolua_function(tolua_S,".mul",tolua_Math_Matrix4__mul03);
  18092. tolua_function(tolua_S,"SetTranslation",tolua_Math_Matrix4_SetTranslation00);
  18093. tolua_function(tolua_S,"SetRotation",tolua_Math_Matrix4_SetRotation00);
  18094. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix4_SetScale00);
  18095. tolua_function(tolua_S,"SetScale",tolua_Math_Matrix4_SetScale01);
  18096. tolua_function(tolua_S,"ToMatrix3",tolua_Math_Matrix4_ToMatrix300);
  18097. tolua_function(tolua_S,"RotationMatrix",tolua_Math_Matrix4_RotationMatrix00);
  18098. tolua_function(tolua_S,"Translation",tolua_Math_Matrix4_Translation00);
  18099. tolua_function(tolua_S,"Rotation",tolua_Math_Matrix4_Rotation00);
  18100. tolua_function(tolua_S,"Scale",tolua_Math_Matrix4_Scale00);
  18101. tolua_function(tolua_S,"Transpose",tolua_Math_Matrix4_Transpose00);
  18102. tolua_function(tolua_S,"Equals",tolua_Math_Matrix4_Equals00);
  18103. tolua_function(tolua_S,"Decompose",tolua_Math_Matrix4_Decompose00);
  18104. tolua_function(tolua_S,"Inverse",tolua_Math_Matrix4_Inverse00);
  18105. tolua_variable(tolua_S,"m00",tolua_get_Matrix4_m00,tolua_set_Matrix4_m00);
  18106. tolua_variable(tolua_S,"m01",tolua_get_Matrix4_m01,tolua_set_Matrix4_m01);
  18107. tolua_variable(tolua_S,"m02",tolua_get_Matrix4_m02,tolua_set_Matrix4_m02);
  18108. tolua_variable(tolua_S,"m03",tolua_get_Matrix4_m03,tolua_set_Matrix4_m03);
  18109. tolua_variable(tolua_S,"m10",tolua_get_Matrix4_m10,tolua_set_Matrix4_m10);
  18110. tolua_variable(tolua_S,"m11",tolua_get_Matrix4_m11,tolua_set_Matrix4_m11);
  18111. tolua_variable(tolua_S,"m12",tolua_get_Matrix4_m12,tolua_set_Matrix4_m12);
  18112. tolua_variable(tolua_S,"m13",tolua_get_Matrix4_m13,tolua_set_Matrix4_m13);
  18113. tolua_variable(tolua_S,"m20",tolua_get_Matrix4_m20,tolua_set_Matrix4_m20);
  18114. tolua_variable(tolua_S,"m21",tolua_get_Matrix4_m21,tolua_set_Matrix4_m21);
  18115. tolua_variable(tolua_S,"m22",tolua_get_Matrix4_m22,tolua_set_Matrix4_m22);
  18116. tolua_variable(tolua_S,"m23",tolua_get_Matrix4_m23,tolua_set_Matrix4_m23);
  18117. tolua_variable(tolua_S,"m30",tolua_get_Matrix4_m30,tolua_set_Matrix4_m30);
  18118. tolua_variable(tolua_S,"m31",tolua_get_Matrix4_m31,tolua_set_Matrix4_m31);
  18119. tolua_variable(tolua_S,"m32",tolua_get_Matrix4_m32,tolua_set_Matrix4_m32);
  18120. tolua_variable(tolua_S,"m33",tolua_get_Matrix4_m33,tolua_set_Matrix4_m33);
  18121. tolua_function(tolua_S,"BulkTranspose",tolua_Math_Matrix4_BulkTranspose00);
  18122. tolua_variable(tolua_S,"ZERO",tolua_get_Matrix4_ZERO,NULL);
  18123. tolua_variable(tolua_S,"IDENTITY",tolua_get_Matrix4_IDENTITY,NULL);
  18124. tolua_endmodule(tolua_S);
  18125. #ifdef __cplusplus
  18126. tolua_cclass(tolua_S,"Plane","Plane","",tolua_collect_Plane);
  18127. #else
  18128. tolua_cclass(tolua_S,"Plane","Plane","",NULL);
  18129. #endif
  18130. tolua_beginmodule(tolua_S,"Plane");
  18131. tolua_function(tolua_S,"new",tolua_Math_Plane_new00);
  18132. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new00_local);
  18133. tolua_function(tolua_S,".call",tolua_Math_Plane_new00_local);
  18134. tolua_function(tolua_S,"new",tolua_Math_Plane_new01);
  18135. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new01_local);
  18136. tolua_function(tolua_S,".call",tolua_Math_Plane_new01_local);
  18137. tolua_function(tolua_S,"new",tolua_Math_Plane_new02);
  18138. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new02_local);
  18139. tolua_function(tolua_S,".call",tolua_Math_Plane_new02_local);
  18140. tolua_function(tolua_S,"new",tolua_Math_Plane_new03);
  18141. tolua_function(tolua_S,"new_local",tolua_Math_Plane_new03_local);
  18142. tolua_function(tolua_S,".call",tolua_Math_Plane_new03_local);
  18143. tolua_function(tolua_S,"Define",tolua_Math_Plane_Define00);
  18144. tolua_function(tolua_S,"Define",tolua_Math_Plane_Define01);
  18145. tolua_function(tolua_S,"Distance",tolua_Math_Plane_Distance00);
  18146. tolua_variable(tolua_S,"normal",tolua_get_Plane_normal,tolua_set_Plane_normal);
  18147. tolua_variable(tolua_S,"absNormal",tolua_get_Plane_absNormal,tolua_set_Plane_absNormal);
  18148. tolua_variable(tolua_S,"intercept",tolua_get_Plane_intercept,tolua_set_Plane_intercept);
  18149. tolua_endmodule(tolua_S);
  18150. #ifdef __cplusplus
  18151. tolua_cclass(tolua_S,"Polyhedron","Polyhedron","",tolua_collect_Polyhedron);
  18152. #else
  18153. tolua_cclass(tolua_S,"Polyhedron","Polyhedron","",NULL);
  18154. #endif
  18155. tolua_beginmodule(tolua_S,"Polyhedron");
  18156. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new00);
  18157. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new00_local);
  18158. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new00_local);
  18159. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new01);
  18160. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new01_local);
  18161. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new01_local);
  18162. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new02);
  18163. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new02_local);
  18164. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new02_local);
  18165. tolua_function(tolua_S,"new",tolua_Math_Polyhedron_new03);
  18166. tolua_function(tolua_S,"new_local",tolua_Math_Polyhedron_new03_local);
  18167. tolua_function(tolua_S,".call",tolua_Math_Polyhedron_new03_local);
  18168. tolua_function(tolua_S,"delete",tolua_Math_Polyhedron_delete00);
  18169. tolua_function(tolua_S,"Define",tolua_Math_Polyhedron_Define00);
  18170. tolua_function(tolua_S,"Define",tolua_Math_Polyhedron_Define01);
  18171. tolua_function(tolua_S,"AddFace",tolua_Math_Polyhedron_AddFace00);
  18172. tolua_function(tolua_S,"AddFace",tolua_Math_Polyhedron_AddFace01);
  18173. tolua_function(tolua_S,"Clip",tolua_Math_Polyhedron_Clip00);
  18174. tolua_function(tolua_S,"Clip",tolua_Math_Polyhedron_Clip01);
  18175. tolua_function(tolua_S,"Clip",tolua_Math_Polyhedron_Clip02);
  18176. tolua_function(tolua_S,"Clear",tolua_Math_Polyhedron_Clear00);
  18177. tolua_function(tolua_S,"Transform",tolua_Math_Polyhedron_Transform00);
  18178. tolua_function(tolua_S,"Transform",tolua_Math_Polyhedron_Transform01);
  18179. tolua_function(tolua_S,"Transformed",tolua_Math_Polyhedron_Transformed00);
  18180. tolua_function(tolua_S,"Transformed",tolua_Math_Polyhedron_Transformed01);
  18181. tolua_function(tolua_S,"Empty",tolua_Math_Polyhedron_Empty00);
  18182. tolua_endmodule(tolua_S);
  18183. #ifdef __cplusplus
  18184. tolua_cclass(tolua_S,"Quaternion","Quaternion","",tolua_collect_Quaternion);
  18185. #else
  18186. tolua_cclass(tolua_S,"Quaternion","Quaternion","",NULL);
  18187. #endif
  18188. tolua_beginmodule(tolua_S,"Quaternion");
  18189. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new00);
  18190. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new00_local);
  18191. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new00_local);
  18192. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new01);
  18193. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new01_local);
  18194. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new01_local);
  18195. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new02);
  18196. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new02_local);
  18197. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new02_local);
  18198. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new03);
  18199. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new03_local);
  18200. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new03_local);
  18201. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new04);
  18202. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new04_local);
  18203. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new04_local);
  18204. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new05);
  18205. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new05_local);
  18206. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new05_local);
  18207. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new06);
  18208. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new06_local);
  18209. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new06_local);
  18210. tolua_function(tolua_S,"new",tolua_Math_Quaternion_new07);
  18211. tolua_function(tolua_S,"new_local",tolua_Math_Quaternion_new07_local);
  18212. tolua_function(tolua_S,".call",tolua_Math_Quaternion_new07_local);
  18213. tolua_function(tolua_S,".eq",tolua_Math_Quaternion__eq00);
  18214. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul00);
  18215. tolua_function(tolua_S,".sub",tolua_Math_Quaternion__sub00);
  18216. tolua_function(tolua_S,".add",tolua_Math_Quaternion__add00);
  18217. tolua_function(tolua_S,".sub",tolua_Math_Quaternion__sub01);
  18218. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul01);
  18219. tolua_function(tolua_S,".mul",tolua_Math_Quaternion__mul02);
  18220. tolua_function(tolua_S,"FromAngleAxis",tolua_Math_Quaternion_FromAngleAxis00);
  18221. tolua_function(tolua_S,"FromEulerAngles",tolua_Math_Quaternion_FromEulerAngles00);
  18222. tolua_function(tolua_S,"FromRotationTo",tolua_Math_Quaternion_FromRotationTo00);
  18223. tolua_function(tolua_S,"FromAxes",tolua_Math_Quaternion_FromAxes00);
  18224. tolua_function(tolua_S,"FromRotationMatrix",tolua_Math_Quaternion_FromRotationMatrix00);
  18225. tolua_function(tolua_S,"Normalize",tolua_Math_Quaternion_Normalize00);
  18226. tolua_function(tolua_S,"Normalized",tolua_Math_Quaternion_Normalized00);
  18227. tolua_function(tolua_S,"Inverse",tolua_Math_Quaternion_Inverse00);
  18228. tolua_function(tolua_S,"LengthSquared",tolua_Math_Quaternion_LengthSquared00);
  18229. tolua_function(tolua_S,"DotProduct",tolua_Math_Quaternion_DotProduct00);
  18230. tolua_function(tolua_S,"Equals",tolua_Math_Quaternion_Equals00);
  18231. tolua_function(tolua_S,"Conjugate",tolua_Math_Quaternion_Conjugate00);
  18232. tolua_function(tolua_S,"EulerAngles",tolua_Math_Quaternion_EulerAngles00);
  18233. tolua_function(tolua_S,"YawAngle",tolua_Math_Quaternion_YawAngle00);
  18234. tolua_function(tolua_S,"PitchAngle",tolua_Math_Quaternion_PitchAngle00);
  18235. tolua_function(tolua_S,"RollAngle",tolua_Math_Quaternion_RollAngle00);
  18236. tolua_function(tolua_S,"RotationMatrix",tolua_Math_Quaternion_RotationMatrix00);
  18237. tolua_function(tolua_S,"Slerp",tolua_Math_Quaternion_Slerp00);
  18238. tolua_variable(tolua_S,"w",tolua_get_Quaternion_w,tolua_set_Quaternion_w);
  18239. tolua_variable(tolua_S,"x",tolua_get_Quaternion_x,tolua_set_Quaternion_x);
  18240. tolua_variable(tolua_S,"y",tolua_get_Quaternion_y,tolua_set_Quaternion_y);
  18241. tolua_variable(tolua_S,"z",tolua_get_Quaternion_z,tolua_set_Quaternion_z);
  18242. tolua_variable(tolua_S,"IDENTITY",tolua_get_Quaternion_IDENTITY,NULL);
  18243. tolua_endmodule(tolua_S);
  18244. tolua_function(tolua_S,"SetRandomSeed",tolua_Math_SetRandomSeed00);
  18245. tolua_function(tolua_S,"GetRandomSeed",tolua_Math_GetRandomSeed00);
  18246. tolua_function(tolua_S,"Rand",tolua_Math_Rand00);
  18247. #ifdef __cplusplus
  18248. tolua_cclass(tolua_S,"Ray","Ray","",tolua_collect_Ray);
  18249. #else
  18250. tolua_cclass(tolua_S,"Ray","Ray","",NULL);
  18251. #endif
  18252. tolua_beginmodule(tolua_S,"Ray");
  18253. tolua_function(tolua_S,"new",tolua_Math_Ray_new00);
  18254. tolua_function(tolua_S,"new_local",tolua_Math_Ray_new00_local);
  18255. tolua_function(tolua_S,".call",tolua_Math_Ray_new00_local);
  18256. tolua_function(tolua_S,"new",tolua_Math_Ray_new01);
  18257. tolua_function(tolua_S,"new_local",tolua_Math_Ray_new01_local);
  18258. tolua_function(tolua_S,".call",tolua_Math_Ray_new01_local);
  18259. tolua_function(tolua_S,"new",tolua_Math_Ray_new02);
  18260. tolua_function(tolua_S,"new_local",tolua_Math_Ray_new02_local);
  18261. tolua_function(tolua_S,".call",tolua_Math_Ray_new02_local);
  18262. tolua_function(tolua_S,".eq",tolua_Math_Ray__eq00);
  18263. tolua_function(tolua_S,"Define",tolua_Math_Ray_Define00);
  18264. tolua_function(tolua_S,"Project",tolua_Math_Ray_Project00);
  18265. tolua_function(tolua_S,"Distance",tolua_Math_Ray_Distance00);
  18266. tolua_function(tolua_S,"ClosestPoint",tolua_Math_Ray_ClosestPoint00);
  18267. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance00);
  18268. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance01);
  18269. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance02);
  18270. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance03);
  18271. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance04);
  18272. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance05);
  18273. tolua_function(tolua_S,"HitDistance",tolua_Math_Ray_HitDistance06);
  18274. tolua_function(tolua_S,"InsideGeometry",tolua_Math_Ray_InsideGeometry00);
  18275. tolua_function(tolua_S,"InsideGeometry",tolua_Math_Ray_InsideGeometry01);
  18276. tolua_variable(tolua_S,"origin",tolua_get_Ray_origin,tolua_set_Ray_origin);
  18277. tolua_variable(tolua_S,"direction",tolua_get_Ray_direction,tolua_set_Ray_direction);
  18278. tolua_endmodule(tolua_S);
  18279. #ifdef __cplusplus
  18280. tolua_cclass(tolua_S,"Rect","Rect","",tolua_collect_Rect);
  18281. #else
  18282. tolua_cclass(tolua_S,"Rect","Rect","",NULL);
  18283. #endif
  18284. tolua_beginmodule(tolua_S,"Rect");
  18285. tolua_function(tolua_S,"new",tolua_Math_Rect_new00);
  18286. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new00_local);
  18287. tolua_function(tolua_S,".call",tolua_Math_Rect_new00_local);
  18288. tolua_function(tolua_S,"new",tolua_Math_Rect_new01);
  18289. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new01_local);
  18290. tolua_function(tolua_S,".call",tolua_Math_Rect_new01_local);
  18291. tolua_function(tolua_S,"new",tolua_Math_Rect_new02);
  18292. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new02_local);
  18293. tolua_function(tolua_S,".call",tolua_Math_Rect_new02_local);
  18294. tolua_function(tolua_S,"new",tolua_Math_Rect_new03);
  18295. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new03_local);
  18296. tolua_function(tolua_S,".call",tolua_Math_Rect_new03_local);
  18297. tolua_function(tolua_S,"new",tolua_Math_Rect_new04);
  18298. tolua_function(tolua_S,"new_local",tolua_Math_Rect_new04_local);
  18299. tolua_function(tolua_S,".call",tolua_Math_Rect_new04_local);
  18300. tolua_function(tolua_S,".eq",tolua_Math_Rect__eq00);
  18301. tolua_function(tolua_S,"Define",tolua_Math_Rect_Define00);
  18302. tolua_function(tolua_S,"Define",tolua_Math_Rect_Define01);
  18303. tolua_function(tolua_S,"Define",tolua_Math_Rect_Define02);
  18304. tolua_function(tolua_S,"Merge",tolua_Math_Rect_Merge00);
  18305. tolua_function(tolua_S,"Merge",tolua_Math_Rect_Merge01);
  18306. tolua_function(tolua_S,"Clear",tolua_Math_Rect_Clear00);
  18307. tolua_function(tolua_S,"Clip",tolua_Math_Rect_Clip00);
  18308. tolua_function(tolua_S,"Center",tolua_Math_Rect_Center00);
  18309. tolua_function(tolua_S,"Size",tolua_Math_Rect_Size00);
  18310. tolua_function(tolua_S,"HalfSize",tolua_Math_Rect_HalfSize00);
  18311. tolua_function(tolua_S,"Equals",tolua_Math_Rect_Equals00);
  18312. tolua_function(tolua_S,"ToVector4",tolua_Math_Rect_ToVector400);
  18313. tolua_variable(tolua_S,"min",tolua_get_Rect_min,tolua_set_Rect_min);
  18314. tolua_variable(tolua_S,"max",tolua_get_Rect_max,tolua_set_Rect_max);
  18315. tolua_variable(tolua_S,"FULL",tolua_get_Rect_FULL,NULL);
  18316. tolua_variable(tolua_S,"POSITIVE",tolua_get_Rect_POSITIVE,NULL);
  18317. tolua_variable(tolua_S,"ZERO",tolua_get_Rect_ZERO,NULL);
  18318. tolua_endmodule(tolua_S);
  18319. #ifdef __cplusplus
  18320. tolua_cclass(tolua_S,"IntRect","IntRect","",tolua_collect_IntRect);
  18321. #else
  18322. tolua_cclass(tolua_S,"IntRect","IntRect","",NULL);
  18323. #endif
  18324. tolua_beginmodule(tolua_S,"IntRect");
  18325. tolua_function(tolua_S,"new",tolua_Math_IntRect_new00);
  18326. tolua_function(tolua_S,"new_local",tolua_Math_IntRect_new00_local);
  18327. tolua_function(tolua_S,".call",tolua_Math_IntRect_new00_local);
  18328. tolua_function(tolua_S,"new",tolua_Math_IntRect_new01);
  18329. tolua_function(tolua_S,"new_local",tolua_Math_IntRect_new01_local);
  18330. tolua_function(tolua_S,".call",tolua_Math_IntRect_new01_local);
  18331. tolua_function(tolua_S,".eq",tolua_Math_IntRect__eq00);
  18332. tolua_function(tolua_S,"Size",tolua_Math_IntRect_Size00);
  18333. tolua_function(tolua_S,"Width",tolua_Math_IntRect_Width00);
  18334. tolua_function(tolua_S,"Height",tolua_Math_IntRect_Height00);
  18335. tolua_variable(tolua_S,"left",tolua_get_IntRect_left,tolua_set_IntRect_left);
  18336. tolua_variable(tolua_S,"top",tolua_get_IntRect_top,tolua_set_IntRect_top);
  18337. tolua_variable(tolua_S,"right",tolua_get_IntRect_right,tolua_set_IntRect_right);
  18338. tolua_variable(tolua_S,"bottom",tolua_get_IntRect_bottom,tolua_set_IntRect_bottom);
  18339. tolua_variable(tolua_S,"ZERO",tolua_get_IntRect_ZERO,NULL);
  18340. tolua_endmodule(tolua_S);
  18341. #ifdef __cplusplus
  18342. tolua_cclass(tolua_S,"Sphere","Sphere","",tolua_collect_Sphere);
  18343. #else
  18344. tolua_cclass(tolua_S,"Sphere","Sphere","",NULL);
  18345. #endif
  18346. tolua_beginmodule(tolua_S,"Sphere");
  18347. tolua_function(tolua_S,"new",tolua_Math_Sphere_new00);
  18348. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new00_local);
  18349. tolua_function(tolua_S,".call",tolua_Math_Sphere_new00_local);
  18350. tolua_function(tolua_S,"new",tolua_Math_Sphere_new01);
  18351. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new01_local);
  18352. tolua_function(tolua_S,".call",tolua_Math_Sphere_new01_local);
  18353. tolua_function(tolua_S,"new",tolua_Math_Sphere_new02);
  18354. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new02_local);
  18355. tolua_function(tolua_S,".call",tolua_Math_Sphere_new02_local);
  18356. tolua_function(tolua_S,"new",tolua_Math_Sphere_new03);
  18357. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new03_local);
  18358. tolua_function(tolua_S,".call",tolua_Math_Sphere_new03_local);
  18359. tolua_function(tolua_S,"new",tolua_Math_Sphere_new04);
  18360. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new04_local);
  18361. tolua_function(tolua_S,".call",tolua_Math_Sphere_new04_local);
  18362. tolua_function(tolua_S,"new",tolua_Math_Sphere_new05);
  18363. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new05_local);
  18364. tolua_function(tolua_S,".call",tolua_Math_Sphere_new05_local);
  18365. tolua_function(tolua_S,"new",tolua_Math_Sphere_new06);
  18366. tolua_function(tolua_S,"new_local",tolua_Math_Sphere_new06_local);
  18367. tolua_function(tolua_S,".call",tolua_Math_Sphere_new06_local);
  18368. tolua_function(tolua_S,".eq",tolua_Math_Sphere__eq00);
  18369. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define00);
  18370. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define01);
  18371. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define02);
  18372. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define03);
  18373. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define04);
  18374. tolua_function(tolua_S,"Define",tolua_Math_Sphere_Define05);
  18375. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge00);
  18376. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge01);
  18377. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge02);
  18378. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge03);
  18379. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge04);
  18380. tolua_function(tolua_S,"Merge",tolua_Math_Sphere_Merge05);
  18381. tolua_function(tolua_S,"Clear",tolua_Math_Sphere_Clear00);
  18382. tolua_function(tolua_S,"IsInside",tolua_Math_Sphere_IsInside00);
  18383. tolua_function(tolua_S,"IsInside",tolua_Math_Sphere_IsInside01);
  18384. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Sphere_IsInsideFast00);
  18385. tolua_function(tolua_S,"IsInside",tolua_Math_Sphere_IsInside02);
  18386. tolua_function(tolua_S,"IsInsideFast",tolua_Math_Sphere_IsInsideFast01);
  18387. tolua_function(tolua_S,"Distance",tolua_Math_Sphere_Distance00);
  18388. tolua_variable(tolua_S,"center",tolua_get_Sphere_center,tolua_set_Sphere_center);
  18389. tolua_variable(tolua_S,"radius",tolua_get_Sphere_radius,tolua_set_Sphere_radius);
  18390. tolua_endmodule(tolua_S);
  18391. #ifdef __cplusplus
  18392. tolua_cclass(tolua_S,"StringHash","StringHash","",tolua_collect_StringHash);
  18393. #else
  18394. tolua_cclass(tolua_S,"StringHash","StringHash","",NULL);
  18395. #endif
  18396. tolua_beginmodule(tolua_S,"StringHash");
  18397. tolua_function(tolua_S,"new",tolua_Math_StringHash_new00);
  18398. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new00_local);
  18399. tolua_function(tolua_S,".call",tolua_Math_StringHash_new00_local);
  18400. tolua_function(tolua_S,"new",tolua_Math_StringHash_new01);
  18401. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new01_local);
  18402. tolua_function(tolua_S,".call",tolua_Math_StringHash_new01_local);
  18403. tolua_function(tolua_S,"new",tolua_Math_StringHash_new02);
  18404. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new02_local);
  18405. tolua_function(tolua_S,".call",tolua_Math_StringHash_new02_local);
  18406. tolua_function(tolua_S,"new",tolua_Math_StringHash_new03);
  18407. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new03_local);
  18408. tolua_function(tolua_S,".call",tolua_Math_StringHash_new03_local);
  18409. tolua_function(tolua_S,"new",tolua_Math_StringHash_new04);
  18410. tolua_function(tolua_S,"new_local",tolua_Math_StringHash_new04_local);
  18411. tolua_function(tolua_S,".call",tolua_Math_StringHash_new04_local);
  18412. tolua_function(tolua_S,".add",tolua_Math_StringHash__add00);
  18413. tolua_function(tolua_S,".eq",tolua_Math_StringHash__eq00);
  18414. tolua_function(tolua_S,".lt",tolua_Math_StringHash__lt00);
  18415. tolua_function(tolua_S,"Value",tolua_Math_StringHash_Value00);
  18416. tolua_function(tolua_S,"Calculate",tolua_Math_StringHash_Calculate00);
  18417. tolua_variable(tolua_S,"ZERO",tolua_get_StringHash_ZERO,NULL);
  18418. tolua_endmodule(tolua_S);
  18419. #ifdef __cplusplus
  18420. tolua_cclass(tolua_S,"ShortStringHash","ShortStringHash","",tolua_collect_ShortStringHash);
  18421. #else
  18422. tolua_cclass(tolua_S,"ShortStringHash","ShortStringHash","",NULL);
  18423. #endif
  18424. tolua_beginmodule(tolua_S,"ShortStringHash");
  18425. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new00);
  18426. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new00_local);
  18427. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new00_local);
  18428. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new01);
  18429. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new01_local);
  18430. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new01_local);
  18431. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new02);
  18432. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new02_local);
  18433. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new02_local);
  18434. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new03);
  18435. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new03_local);
  18436. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new03_local);
  18437. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new04);
  18438. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new04_local);
  18439. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new04_local);
  18440. tolua_function(tolua_S,"new",tolua_Math_ShortStringHash_new05);
  18441. tolua_function(tolua_S,"new_local",tolua_Math_ShortStringHash_new05_local);
  18442. tolua_function(tolua_S,".call",tolua_Math_ShortStringHash_new05_local);
  18443. tolua_function(tolua_S,".add",tolua_Math_ShortStringHash__add00);
  18444. tolua_function(tolua_S,".eq",tolua_Math_ShortStringHash__eq00);
  18445. tolua_function(tolua_S,".lt",tolua_Math_ShortStringHash__lt00);
  18446. tolua_function(tolua_S,"Value",tolua_Math_ShortStringHash_Value00);
  18447. tolua_function(tolua_S,"Calculate",tolua_Math_ShortStringHash_Calculate00);
  18448. tolua_variable(tolua_S,"ZERO",tolua_get_ShortStringHash_ZERO,NULL);
  18449. tolua_endmodule(tolua_S);
  18450. #ifdef __cplusplus
  18451. tolua_cclass(tolua_S,"Vector2","Vector2","",tolua_collect_Vector2);
  18452. #else
  18453. tolua_cclass(tolua_S,"Vector2","Vector2","",NULL);
  18454. #endif
  18455. tolua_beginmodule(tolua_S,"Vector2");
  18456. tolua_function(tolua_S,"new",tolua_Math_Vector2_new00);
  18457. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new00_local);
  18458. tolua_function(tolua_S,".call",tolua_Math_Vector2_new00_local);
  18459. tolua_function(tolua_S,"new",tolua_Math_Vector2_new01);
  18460. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new01_local);
  18461. tolua_function(tolua_S,".call",tolua_Math_Vector2_new01_local);
  18462. tolua_function(tolua_S,"new",tolua_Math_Vector2_new02);
  18463. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new02_local);
  18464. tolua_function(tolua_S,".call",tolua_Math_Vector2_new02_local);
  18465. tolua_function(tolua_S,"new",tolua_Math_Vector2_new03);
  18466. tolua_function(tolua_S,"new_local",tolua_Math_Vector2_new03_local);
  18467. tolua_function(tolua_S,".call",tolua_Math_Vector2_new03_local);
  18468. tolua_function(tolua_S,".eq",tolua_Math_Vector2__eq00);
  18469. tolua_function(tolua_S,".add",tolua_Math_Vector2__add00);
  18470. tolua_function(tolua_S,".sub",tolua_Math_Vector2__sub00);
  18471. tolua_function(tolua_S,".sub",tolua_Math_Vector2__sub01);
  18472. tolua_function(tolua_S,".mul",tolua_Math_Vector2__mul00);
  18473. tolua_function(tolua_S,".mul",tolua_Math_Vector2__mul01);
  18474. tolua_function(tolua_S,".div",tolua_Math_Vector2__div00);
  18475. tolua_function(tolua_S,".div",tolua_Math_Vector2__div01);
  18476. tolua_function(tolua_S,"Normalize",tolua_Math_Vector2_Normalize00);
  18477. tolua_function(tolua_S,"Length",tolua_Math_Vector2_Length00);
  18478. tolua_function(tolua_S,"LengthSquared",tolua_Math_Vector2_LengthSquared00);
  18479. tolua_function(tolua_S,"DotProduct",tolua_Math_Vector2_DotProduct00);
  18480. tolua_function(tolua_S,"AbsDotProduct",tolua_Math_Vector2_AbsDotProduct00);
  18481. tolua_function(tolua_S,"Abs",tolua_Math_Vector2_Abs00);
  18482. tolua_function(tolua_S,"Lerp",tolua_Math_Vector2_Lerp00);
  18483. tolua_function(tolua_S,"Equals",tolua_Math_Vector2_Equals00);
  18484. tolua_function(tolua_S,"Normalized",tolua_Math_Vector2_Normalized00);
  18485. tolua_variable(tolua_S,"x",tolua_get_Vector2_x,tolua_set_Vector2_x);
  18486. tolua_variable(tolua_S,"y",tolua_get_Vector2_y,tolua_set_Vector2_y);
  18487. tolua_variable(tolua_S,"ZERO",tolua_get_Vector2_ZERO,NULL);
  18488. tolua_variable(tolua_S,"LEFT",tolua_get_Vector2_LEFT,NULL);
  18489. tolua_variable(tolua_S,"RIGHT",tolua_get_Vector2_RIGHT,NULL);
  18490. tolua_variable(tolua_S,"UP",tolua_get_Vector2_UP,NULL);
  18491. tolua_variable(tolua_S,"DOWN",tolua_get_Vector2_DOWN,NULL);
  18492. tolua_variable(tolua_S,"ONE",tolua_get_Vector2_ONE,NULL);
  18493. tolua_endmodule(tolua_S);
  18494. #ifdef __cplusplus
  18495. tolua_cclass(tolua_S,"IntVector2","IntVector2","",tolua_collect_IntVector2);
  18496. #else
  18497. tolua_cclass(tolua_S,"IntVector2","IntVector2","",NULL);
  18498. #endif
  18499. tolua_beginmodule(tolua_S,"IntVector2");
  18500. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new00);
  18501. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new00_local);
  18502. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new00_local);
  18503. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new01);
  18504. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new01_local);
  18505. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new01_local);
  18506. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new02);
  18507. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new02_local);
  18508. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new02_local);
  18509. tolua_function(tolua_S,"new",tolua_Math_IntVector2_new03);
  18510. tolua_function(tolua_S,"new_local",tolua_Math_IntVector2_new03_local);
  18511. tolua_function(tolua_S,".call",tolua_Math_IntVector2_new03_local);
  18512. tolua_function(tolua_S,".eq",tolua_Math_IntVector2__eq00);
  18513. tolua_function(tolua_S,".add",tolua_Math_IntVector2__add00);
  18514. tolua_function(tolua_S,".sub",tolua_Math_IntVector2__sub00);
  18515. tolua_function(tolua_S,".sub",tolua_Math_IntVector2__sub01);
  18516. tolua_function(tolua_S,".mul",tolua_Math_IntVector2__mul00);
  18517. tolua_function(tolua_S,".div",tolua_Math_IntVector2__div00);
  18518. tolua_variable(tolua_S,"x",tolua_get_IntVector2_x,tolua_set_IntVector2_x);
  18519. tolua_variable(tolua_S,"y",tolua_get_IntVector2_y,tolua_set_IntVector2_y);
  18520. tolua_variable(tolua_S,"ZERO",tolua_get_IntVector2_ZERO,NULL);
  18521. tolua_endmodule(tolua_S);
  18522. #ifdef __cplusplus
  18523. tolua_cclass(tolua_S,"Vector3","Vector3","",tolua_collect_Vector3);
  18524. #else
  18525. tolua_cclass(tolua_S,"Vector3","Vector3","",NULL);
  18526. #endif
  18527. tolua_beginmodule(tolua_S,"Vector3");
  18528. tolua_function(tolua_S,"new",tolua_Math_Vector3_new00);
  18529. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new00_local);
  18530. tolua_function(tolua_S,".call",tolua_Math_Vector3_new00_local);
  18531. tolua_function(tolua_S,"new",tolua_Math_Vector3_new01);
  18532. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new01_local);
  18533. tolua_function(tolua_S,".call",tolua_Math_Vector3_new01_local);
  18534. tolua_function(tolua_S,"new",tolua_Math_Vector3_new02);
  18535. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new02_local);
  18536. tolua_function(tolua_S,".call",tolua_Math_Vector3_new02_local);
  18537. tolua_function(tolua_S,"new",tolua_Math_Vector3_new03);
  18538. tolua_function(tolua_S,"new_local",tolua_Math_Vector3_new03_local);
  18539. tolua_function(tolua_S,".call",tolua_Math_Vector3_new03_local);
  18540. tolua_function(tolua_S,".eq",tolua_Math_Vector3__eq00);
  18541. tolua_function(tolua_S,".add",tolua_Math_Vector3__add00);
  18542. tolua_function(tolua_S,".sub",tolua_Math_Vector3__sub00);
  18543. tolua_function(tolua_S,".sub",tolua_Math_Vector3__sub01);
  18544. tolua_function(tolua_S,".mul",tolua_Math_Vector3__mul00);
  18545. tolua_function(tolua_S,".mul",tolua_Math_Vector3__mul01);
  18546. tolua_function(tolua_S,".div",tolua_Math_Vector3__div00);
  18547. tolua_function(tolua_S,".div",tolua_Math_Vector3__div01);
  18548. tolua_function(tolua_S,"Normalize",tolua_Math_Vector3_Normalize00);
  18549. tolua_function(tolua_S,"Length",tolua_Math_Vector3_Length00);
  18550. tolua_function(tolua_S,"LengthSquared",tolua_Math_Vector3_LengthSquared00);
  18551. tolua_function(tolua_S,"DotProduct",tolua_Math_Vector3_DotProduct00);
  18552. tolua_function(tolua_S,"AbsDotProduct",tolua_Math_Vector3_AbsDotProduct00);
  18553. tolua_function(tolua_S,"CrossProduct",tolua_Math_Vector3_CrossProduct00);
  18554. tolua_function(tolua_S,"Abs",tolua_Math_Vector3_Abs00);
  18555. tolua_function(tolua_S,"Lerp",tolua_Math_Vector3_Lerp00);
  18556. tolua_function(tolua_S,"Equals",tolua_Math_Vector3_Equals00);
  18557. tolua_function(tolua_S,"Normalized",tolua_Math_Vector3_Normalized00);
  18558. tolua_variable(tolua_S,"x",tolua_get_Vector3_x,tolua_set_Vector3_x);
  18559. tolua_variable(tolua_S,"y",tolua_get_Vector3_y,tolua_set_Vector3_y);
  18560. tolua_variable(tolua_S,"z",tolua_get_Vector3_z,tolua_set_Vector3_z);
  18561. tolua_variable(tolua_S,"ZERO",tolua_get_Vector3_ZERO,NULL);
  18562. tolua_variable(tolua_S,"LEFT",tolua_get_Vector3_LEFT,NULL);
  18563. tolua_variable(tolua_S,"RIGHT",tolua_get_Vector3_RIGHT,NULL);
  18564. tolua_variable(tolua_S,"UP",tolua_get_Vector3_UP,NULL);
  18565. tolua_variable(tolua_S,"DOWN",tolua_get_Vector3_DOWN,NULL);
  18566. tolua_variable(tolua_S,"FORWARD",tolua_get_Vector3_FORWARD,NULL);
  18567. tolua_variable(tolua_S,"BACK",tolua_get_Vector3_BACK,NULL);
  18568. tolua_variable(tolua_S,"ONE",tolua_get_Vector3_ONE,NULL);
  18569. tolua_endmodule(tolua_S);
  18570. #ifdef __cplusplus
  18571. tolua_cclass(tolua_S,"Vector4","Vector4","",tolua_collect_Vector4);
  18572. #else
  18573. tolua_cclass(tolua_S,"Vector4","Vector4","",NULL);
  18574. #endif
  18575. tolua_beginmodule(tolua_S,"Vector4");
  18576. tolua_function(tolua_S,"new",tolua_Math_Vector4_new00);
  18577. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new00_local);
  18578. tolua_function(tolua_S,".call",tolua_Math_Vector4_new00_local);
  18579. tolua_function(tolua_S,"new",tolua_Math_Vector4_new01);
  18580. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new01_local);
  18581. tolua_function(tolua_S,".call",tolua_Math_Vector4_new01_local);
  18582. tolua_function(tolua_S,"new",tolua_Math_Vector4_new02);
  18583. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new02_local);
  18584. tolua_function(tolua_S,".call",tolua_Math_Vector4_new02_local);
  18585. tolua_function(tolua_S,"new",tolua_Math_Vector4_new03);
  18586. tolua_function(tolua_S,"new_local",tolua_Math_Vector4_new03_local);
  18587. tolua_function(tolua_S,".call",tolua_Math_Vector4_new03_local);
  18588. tolua_function(tolua_S,".eq",tolua_Math_Vector4__eq00);
  18589. tolua_function(tolua_S,".add",tolua_Math_Vector4__add00);
  18590. tolua_function(tolua_S,".sub",tolua_Math_Vector4__sub00);
  18591. tolua_function(tolua_S,".sub",tolua_Math_Vector4__sub01);
  18592. tolua_function(tolua_S,".mul",tolua_Math_Vector4__mul00);
  18593. tolua_function(tolua_S,".mul",tolua_Math_Vector4__mul01);
  18594. tolua_function(tolua_S,".div",tolua_Math_Vector4__div00);
  18595. tolua_function(tolua_S,".div",tolua_Math_Vector4__div01);
  18596. tolua_function(tolua_S,"DotProduct",tolua_Math_Vector4_DotProduct00);
  18597. tolua_function(tolua_S,"AbsDotProduct",tolua_Math_Vector4_AbsDotProduct00);
  18598. tolua_function(tolua_S,"Abs",tolua_Math_Vector4_Abs00);
  18599. tolua_function(tolua_S,"Lerp",tolua_Math_Vector4_Lerp00);
  18600. tolua_function(tolua_S,"Equals",tolua_Math_Vector4_Equals00);
  18601. tolua_variable(tolua_S,"x",tolua_get_Vector4_x,tolua_set_Vector4_x);
  18602. tolua_variable(tolua_S,"y",tolua_get_Vector4_y,tolua_set_Vector4_y);
  18603. tolua_variable(tolua_S,"z",tolua_get_Vector4_z,tolua_set_Vector4_z);
  18604. tolua_variable(tolua_S,"w",tolua_get_Vector4_w,tolua_set_Vector4_w);
  18605. tolua_variable(tolua_S,"ZERO",tolua_get_Vector4_ZERO,NULL);
  18606. tolua_variable(tolua_S,"ONE",tolua_get_Vector4_ONE,NULL);
  18607. tolua_endmodule(tolua_S);
  18608. tolua_endmodule(tolua_S);
  18609. return 1;
  18610. }
  18611. #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
  18612. TOLUA_API int luaopen_Math (lua_State* tolua_S) {
  18613. return tolua_Math_open(tolua_S);
  18614. };
  18615. #endif