PhysicsLuaAPI.cpp 206 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456
  1. /*
  2. ** Lua binding: Physics
  3. ** Generated automatically by tolua++-1.0.92 on 06/30/13 11:31:51.
  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_Physics_open (lua_State* tolua_S);
  30. #define TOLUA_RELEASE
  31. #include "PhysicsLuaAPI.h"
  32. #include "CollisionShape.h"
  33. #include "Constraint.h"
  34. #include "PhysicsWorld.h"
  35. #include "RigidBody.h"
  36. using namespace Urho3D;
  37. #pragma warning(disable:4800)
  38. /* function to release collected object via destructor */
  39. #ifdef __cplusplus
  40. static int tolua_collect_Quaternion (lua_State* tolua_S)
  41. {
  42. Quaternion* self = (Quaternion*) tolua_tousertype(tolua_S,1,0);
  43. Mtolua_delete(self);
  44. return 0;
  45. }
  46. static int tolua_collect_PhysicsRaycastResult (lua_State* tolua_S)
  47. {
  48. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  49. Mtolua_delete(self);
  50. return 0;
  51. }
  52. static int tolua_collect_ResourceRef (lua_State* tolua_S)
  53. {
  54. ResourceRef* self = (ResourceRef*) tolua_tousertype(tolua_S,1,0);
  55. Mtolua_delete(self);
  56. return 0;
  57. }
  58. static int tolua_collect_Vector3 (lua_State* tolua_S)
  59. {
  60. Vector3* self = (Vector3*) tolua_tousertype(tolua_S,1,0);
  61. Mtolua_delete(self);
  62. return 0;
  63. }
  64. static int tolua_collect_BoundingBox (lua_State* tolua_S)
  65. {
  66. BoundingBox* self = (BoundingBox*) tolua_tousertype(tolua_S,1,0);
  67. Mtolua_delete(self);
  68. return 0;
  69. }
  70. #endif
  71. /* function to register type */
  72. static void tolua_reg_types (lua_State* tolua_S)
  73. {
  74. tolua_usertype(tolua_S,"Quaternion");
  75. tolua_usertype(tolua_S,"RigidBody");
  76. tolua_usertype(tolua_S,"ResourceRef");
  77. tolua_usertype(tolua_S,"Ray");
  78. tolua_usertype(tolua_S,"PhysicsWorld");
  79. tolua_usertype(tolua_S,"BoundingBox");
  80. tolua_usertype(tolua_S,"Vector2");
  81. tolua_usertype(tolua_S,"Component");
  82. tolua_usertype(tolua_S,"CollisionShape");
  83. tolua_usertype(tolua_S,"PhysicsRaycastResult");
  84. tolua_usertype(tolua_S,"Model");
  85. tolua_usertype(tolua_S,"DebugRenderer");
  86. tolua_usertype(tolua_S,"DelayedWorldTransform");
  87. tolua_usertype(tolua_S,"Constraint");
  88. tolua_usertype(tolua_S,"Vector3");
  89. }
  90. /* method: SetBox of class CollisionShape */
  91. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetBox00
  92. static int tolua_Physics_CollisionShape_SetBox00(lua_State* tolua_S)
  93. {
  94. #ifndef TOLUA_RELEASE
  95. tolua_Error tolua_err;
  96. if (
  97. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  98. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  99. !tolua_isnoobj(tolua_S,3,&tolua_err)
  100. )
  101. goto tolua_lerror;
  102. else
  103. #endif
  104. {
  105. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  106. const Vector3* size = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  107. #ifndef TOLUA_RELEASE
  108. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBox'", NULL);
  109. #endif
  110. {
  111. self->SetBox(*size);
  112. }
  113. }
  114. return 0;
  115. #ifndef TOLUA_RELEASE
  116. tolua_lerror:
  117. tolua_error(tolua_S,"#ferror in function 'SetBox'.",&tolua_err);
  118. return 0;
  119. #endif
  120. }
  121. #endif //#ifndef TOLUA_DISABLE
  122. /* method: SetBox of class CollisionShape */
  123. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetBox01
  124. static int tolua_Physics_CollisionShape_SetBox01(lua_State* tolua_S)
  125. {
  126. tolua_Error tolua_err;
  127. if (
  128. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  129. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  130. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  131. !tolua_isnoobj(tolua_S,4,&tolua_err)
  132. )
  133. goto tolua_lerror;
  134. else
  135. {
  136. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  137. const Vector3* size = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  138. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  139. #ifndef TOLUA_RELEASE
  140. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBox'", NULL);
  141. #endif
  142. {
  143. self->SetBox(*size,*position);
  144. }
  145. }
  146. return 0;
  147. tolua_lerror:
  148. return tolua_Physics_CollisionShape_SetBox00(tolua_S);
  149. }
  150. #endif //#ifndef TOLUA_DISABLE
  151. /* method: SetBox of class CollisionShape */
  152. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetBox02
  153. static int tolua_Physics_CollisionShape_SetBox02(lua_State* tolua_S)
  154. {
  155. tolua_Error tolua_err;
  156. if (
  157. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  158. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  159. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  160. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Quaternion",0,&tolua_err)) ||
  161. !tolua_isnoobj(tolua_S,5,&tolua_err)
  162. )
  163. goto tolua_lerror;
  164. else
  165. {
  166. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  167. const Vector3* size = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  168. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  169. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,4,0));
  170. #ifndef TOLUA_RELEASE
  171. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBox'", NULL);
  172. #endif
  173. {
  174. self->SetBox(*size,*position,*rotation);
  175. }
  176. }
  177. return 0;
  178. tolua_lerror:
  179. return tolua_Physics_CollisionShape_SetBox01(tolua_S);
  180. }
  181. #endif //#ifndef TOLUA_DISABLE
  182. /* method: SetSphere of class CollisionShape */
  183. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetSphere00
  184. static int tolua_Physics_CollisionShape_SetSphere00(lua_State* tolua_S)
  185. {
  186. #ifndef TOLUA_RELEASE
  187. tolua_Error tolua_err;
  188. if (
  189. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  190. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  191. !tolua_isnoobj(tolua_S,3,&tolua_err)
  192. )
  193. goto tolua_lerror;
  194. else
  195. #endif
  196. {
  197. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  198. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  199. #ifndef TOLUA_RELEASE
  200. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSphere'", NULL);
  201. #endif
  202. {
  203. self->SetSphere(diameter);
  204. }
  205. }
  206. return 0;
  207. #ifndef TOLUA_RELEASE
  208. tolua_lerror:
  209. tolua_error(tolua_S,"#ferror in function 'SetSphere'.",&tolua_err);
  210. return 0;
  211. #endif
  212. }
  213. #endif //#ifndef TOLUA_DISABLE
  214. /* method: SetSphere of class CollisionShape */
  215. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetSphere01
  216. static int tolua_Physics_CollisionShape_SetSphere01(lua_State* tolua_S)
  217. {
  218. tolua_Error tolua_err;
  219. if (
  220. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  221. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  222. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  223. !tolua_isnoobj(tolua_S,4,&tolua_err)
  224. )
  225. goto tolua_lerror;
  226. else
  227. {
  228. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  229. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  230. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  231. #ifndef TOLUA_RELEASE
  232. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSphere'", NULL);
  233. #endif
  234. {
  235. self->SetSphere(diameter,*position);
  236. }
  237. }
  238. return 0;
  239. tolua_lerror:
  240. return tolua_Physics_CollisionShape_SetSphere00(tolua_S);
  241. }
  242. #endif //#ifndef TOLUA_DISABLE
  243. /* method: SetSphere of class CollisionShape */
  244. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetSphere02
  245. static int tolua_Physics_CollisionShape_SetSphere02(lua_State* tolua_S)
  246. {
  247. tolua_Error tolua_err;
  248. if (
  249. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  250. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  251. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  252. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Quaternion",0,&tolua_err)) ||
  253. !tolua_isnoobj(tolua_S,5,&tolua_err)
  254. )
  255. goto tolua_lerror;
  256. else
  257. {
  258. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  259. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  260. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  261. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,4,0));
  262. #ifndef TOLUA_RELEASE
  263. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSphere'", NULL);
  264. #endif
  265. {
  266. self->SetSphere(diameter,*position,*rotation);
  267. }
  268. }
  269. return 0;
  270. tolua_lerror:
  271. return tolua_Physics_CollisionShape_SetSphere01(tolua_S);
  272. }
  273. #endif //#ifndef TOLUA_DISABLE
  274. /* method: SetStaticPlane of class CollisionShape */
  275. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetStaticPlane00
  276. static int tolua_Physics_CollisionShape_SetStaticPlane00(lua_State* tolua_S)
  277. {
  278. #ifndef TOLUA_RELEASE
  279. tolua_Error tolua_err;
  280. if (
  281. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  282. !tolua_isnoobj(tolua_S,2,&tolua_err)
  283. )
  284. goto tolua_lerror;
  285. else
  286. #endif
  287. {
  288. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  289. #ifndef TOLUA_RELEASE
  290. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetStaticPlane'", NULL);
  291. #endif
  292. {
  293. self->SetStaticPlane();
  294. }
  295. }
  296. return 0;
  297. #ifndef TOLUA_RELEASE
  298. tolua_lerror:
  299. tolua_error(tolua_S,"#ferror in function 'SetStaticPlane'.",&tolua_err);
  300. return 0;
  301. #endif
  302. }
  303. #endif //#ifndef TOLUA_DISABLE
  304. /* method: SetStaticPlane of class CollisionShape */
  305. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetStaticPlane01
  306. static int tolua_Physics_CollisionShape_SetStaticPlane01(lua_State* tolua_S)
  307. {
  308. tolua_Error tolua_err;
  309. if (
  310. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  311. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  312. !tolua_isnoobj(tolua_S,3,&tolua_err)
  313. )
  314. goto tolua_lerror;
  315. else
  316. {
  317. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  318. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  319. #ifndef TOLUA_RELEASE
  320. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetStaticPlane'", NULL);
  321. #endif
  322. {
  323. self->SetStaticPlane(*position);
  324. }
  325. }
  326. return 0;
  327. tolua_lerror:
  328. return tolua_Physics_CollisionShape_SetStaticPlane00(tolua_S);
  329. }
  330. #endif //#ifndef TOLUA_DISABLE
  331. /* method: SetStaticPlane of class CollisionShape */
  332. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetStaticPlane02
  333. static int tolua_Physics_CollisionShape_SetStaticPlane02(lua_State* tolua_S)
  334. {
  335. tolua_Error tolua_err;
  336. if (
  337. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  338. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  339. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  340. !tolua_isnoobj(tolua_S,4,&tolua_err)
  341. )
  342. goto tolua_lerror;
  343. else
  344. {
  345. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  346. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  347. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  348. #ifndef TOLUA_RELEASE
  349. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetStaticPlane'", NULL);
  350. #endif
  351. {
  352. self->SetStaticPlane(*position,*rotation);
  353. }
  354. }
  355. return 0;
  356. tolua_lerror:
  357. return tolua_Physics_CollisionShape_SetStaticPlane01(tolua_S);
  358. }
  359. #endif //#ifndef TOLUA_DISABLE
  360. /* method: SetCylinder of class CollisionShape */
  361. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCylinder00
  362. static int tolua_Physics_CollisionShape_SetCylinder00(lua_State* tolua_S)
  363. {
  364. #ifndef TOLUA_RELEASE
  365. tolua_Error tolua_err;
  366. if (
  367. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  368. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  369. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  370. !tolua_isnoobj(tolua_S,4,&tolua_err)
  371. )
  372. goto tolua_lerror;
  373. else
  374. #endif
  375. {
  376. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  377. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  378. float height = ((float) tolua_tonumber(tolua_S,3,0));
  379. #ifndef TOLUA_RELEASE
  380. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCylinder'", NULL);
  381. #endif
  382. {
  383. self->SetCylinder(diameter,height);
  384. }
  385. }
  386. return 0;
  387. #ifndef TOLUA_RELEASE
  388. tolua_lerror:
  389. tolua_error(tolua_S,"#ferror in function 'SetCylinder'.",&tolua_err);
  390. return 0;
  391. #endif
  392. }
  393. #endif //#ifndef TOLUA_DISABLE
  394. /* method: SetCylinder of class CollisionShape */
  395. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCylinder01
  396. static int tolua_Physics_CollisionShape_SetCylinder01(lua_State* tolua_S)
  397. {
  398. tolua_Error tolua_err;
  399. if (
  400. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  401. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  402. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  403. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  404. !tolua_isnoobj(tolua_S,5,&tolua_err)
  405. )
  406. goto tolua_lerror;
  407. else
  408. {
  409. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  410. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  411. float height = ((float) tolua_tonumber(tolua_S,3,0));
  412. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  413. #ifndef TOLUA_RELEASE
  414. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCylinder'", NULL);
  415. #endif
  416. {
  417. self->SetCylinder(diameter,height,*position);
  418. }
  419. }
  420. return 0;
  421. tolua_lerror:
  422. return tolua_Physics_CollisionShape_SetCylinder00(tolua_S);
  423. }
  424. #endif //#ifndef TOLUA_DISABLE
  425. /* method: SetCylinder of class CollisionShape */
  426. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCylinder02
  427. static int tolua_Physics_CollisionShape_SetCylinder02(lua_State* tolua_S)
  428. {
  429. tolua_Error tolua_err;
  430. if (
  431. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  432. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  433. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  434. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  435. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Quaternion",0,&tolua_err)) ||
  436. !tolua_isnoobj(tolua_S,6,&tolua_err)
  437. )
  438. goto tolua_lerror;
  439. else
  440. {
  441. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  442. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  443. float height = ((float) tolua_tonumber(tolua_S,3,0));
  444. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  445. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,5,0));
  446. #ifndef TOLUA_RELEASE
  447. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCylinder'", NULL);
  448. #endif
  449. {
  450. self->SetCylinder(diameter,height,*position,*rotation);
  451. }
  452. }
  453. return 0;
  454. tolua_lerror:
  455. return tolua_Physics_CollisionShape_SetCylinder01(tolua_S);
  456. }
  457. #endif //#ifndef TOLUA_DISABLE
  458. /* method: SetCapsule of class CollisionShape */
  459. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCapsule00
  460. static int tolua_Physics_CollisionShape_SetCapsule00(lua_State* tolua_S)
  461. {
  462. #ifndef TOLUA_RELEASE
  463. tolua_Error tolua_err;
  464. if (
  465. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  466. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  467. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  468. !tolua_isnoobj(tolua_S,4,&tolua_err)
  469. )
  470. goto tolua_lerror;
  471. else
  472. #endif
  473. {
  474. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  475. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  476. float height = ((float) tolua_tonumber(tolua_S,3,0));
  477. #ifndef TOLUA_RELEASE
  478. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCapsule'", NULL);
  479. #endif
  480. {
  481. self->SetCapsule(diameter,height);
  482. }
  483. }
  484. return 0;
  485. #ifndef TOLUA_RELEASE
  486. tolua_lerror:
  487. tolua_error(tolua_S,"#ferror in function 'SetCapsule'.",&tolua_err);
  488. return 0;
  489. #endif
  490. }
  491. #endif //#ifndef TOLUA_DISABLE
  492. /* method: SetCapsule of class CollisionShape */
  493. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCapsule01
  494. static int tolua_Physics_CollisionShape_SetCapsule01(lua_State* tolua_S)
  495. {
  496. tolua_Error tolua_err;
  497. if (
  498. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  499. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  500. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  501. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  502. !tolua_isnoobj(tolua_S,5,&tolua_err)
  503. )
  504. goto tolua_lerror;
  505. else
  506. {
  507. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  508. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  509. float height = ((float) tolua_tonumber(tolua_S,3,0));
  510. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  511. #ifndef TOLUA_RELEASE
  512. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCapsule'", NULL);
  513. #endif
  514. {
  515. self->SetCapsule(diameter,height,*position);
  516. }
  517. }
  518. return 0;
  519. tolua_lerror:
  520. return tolua_Physics_CollisionShape_SetCapsule00(tolua_S);
  521. }
  522. #endif //#ifndef TOLUA_DISABLE
  523. /* method: SetCapsule of class CollisionShape */
  524. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCapsule02
  525. static int tolua_Physics_CollisionShape_SetCapsule02(lua_State* tolua_S)
  526. {
  527. tolua_Error tolua_err;
  528. if (
  529. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  530. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  531. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  532. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  533. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Quaternion",0,&tolua_err)) ||
  534. !tolua_isnoobj(tolua_S,6,&tolua_err)
  535. )
  536. goto tolua_lerror;
  537. else
  538. {
  539. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  540. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  541. float height = ((float) tolua_tonumber(tolua_S,3,0));
  542. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  543. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,5,0));
  544. #ifndef TOLUA_RELEASE
  545. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCapsule'", NULL);
  546. #endif
  547. {
  548. self->SetCapsule(diameter,height,*position,*rotation);
  549. }
  550. }
  551. return 0;
  552. tolua_lerror:
  553. return tolua_Physics_CollisionShape_SetCapsule01(tolua_S);
  554. }
  555. #endif //#ifndef TOLUA_DISABLE
  556. /* method: SetCone of class CollisionShape */
  557. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCone00
  558. static int tolua_Physics_CollisionShape_SetCone00(lua_State* tolua_S)
  559. {
  560. #ifndef TOLUA_RELEASE
  561. tolua_Error tolua_err;
  562. if (
  563. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  564. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  565. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  566. !tolua_isnoobj(tolua_S,4,&tolua_err)
  567. )
  568. goto tolua_lerror;
  569. else
  570. #endif
  571. {
  572. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  573. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  574. float height = ((float) tolua_tonumber(tolua_S,3,0));
  575. #ifndef TOLUA_RELEASE
  576. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCone'", NULL);
  577. #endif
  578. {
  579. self->SetCone(diameter,height);
  580. }
  581. }
  582. return 0;
  583. #ifndef TOLUA_RELEASE
  584. tolua_lerror:
  585. tolua_error(tolua_S,"#ferror in function 'SetCone'.",&tolua_err);
  586. return 0;
  587. #endif
  588. }
  589. #endif //#ifndef TOLUA_DISABLE
  590. /* method: SetCone of class CollisionShape */
  591. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCone01
  592. static int tolua_Physics_CollisionShape_SetCone01(lua_State* tolua_S)
  593. {
  594. tolua_Error tolua_err;
  595. if (
  596. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  597. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  598. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  599. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  600. !tolua_isnoobj(tolua_S,5,&tolua_err)
  601. )
  602. goto tolua_lerror;
  603. else
  604. {
  605. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  606. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  607. float height = ((float) tolua_tonumber(tolua_S,3,0));
  608. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  609. #ifndef TOLUA_RELEASE
  610. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCone'", NULL);
  611. #endif
  612. {
  613. self->SetCone(diameter,height,*position);
  614. }
  615. }
  616. return 0;
  617. tolua_lerror:
  618. return tolua_Physics_CollisionShape_SetCone00(tolua_S);
  619. }
  620. #endif //#ifndef TOLUA_DISABLE
  621. /* method: SetCone of class CollisionShape */
  622. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetCone02
  623. static int tolua_Physics_CollisionShape_SetCone02(lua_State* tolua_S)
  624. {
  625. tolua_Error tolua_err;
  626. if (
  627. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  628. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  629. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  630. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  631. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Quaternion",0,&tolua_err)) ||
  632. !tolua_isnoobj(tolua_S,6,&tolua_err)
  633. )
  634. goto tolua_lerror;
  635. else
  636. {
  637. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  638. float diameter = ((float) tolua_tonumber(tolua_S,2,0));
  639. float height = ((float) tolua_tonumber(tolua_S,3,0));
  640. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  641. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,5,0));
  642. #ifndef TOLUA_RELEASE
  643. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCone'", NULL);
  644. #endif
  645. {
  646. self->SetCone(diameter,height,*position,*rotation);
  647. }
  648. }
  649. return 0;
  650. tolua_lerror:
  651. return tolua_Physics_CollisionShape_SetCone01(tolua_S);
  652. }
  653. #endif //#ifndef TOLUA_DISABLE
  654. /* method: SetTriangleMesh of class CollisionShape */
  655. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetTriangleMesh00
  656. static int tolua_Physics_CollisionShape_SetTriangleMesh00(lua_State* tolua_S)
  657. {
  658. #ifndef TOLUA_RELEASE
  659. tolua_Error tolua_err;
  660. if (
  661. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  662. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  663. !tolua_isnumber(tolua_S,3,1,&tolua_err) ||
  664. !tolua_isnoobj(tolua_S,4,&tolua_err)
  665. )
  666. goto tolua_lerror;
  667. else
  668. #endif
  669. {
  670. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  671. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  672. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  673. #ifndef TOLUA_RELEASE
  674. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTriangleMesh'", NULL);
  675. #endif
  676. {
  677. self->SetTriangleMesh(model,lodLevel);
  678. }
  679. }
  680. return 0;
  681. #ifndef TOLUA_RELEASE
  682. tolua_lerror:
  683. tolua_error(tolua_S,"#ferror in function 'SetTriangleMesh'.",&tolua_err);
  684. return 0;
  685. #endif
  686. }
  687. #endif //#ifndef TOLUA_DISABLE
  688. /* method: SetTriangleMesh of class CollisionShape */
  689. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetTriangleMesh01
  690. static int tolua_Physics_CollisionShape_SetTriangleMesh01(lua_State* tolua_S)
  691. {
  692. tolua_Error tolua_err;
  693. if (
  694. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  695. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  696. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  697. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  698. !tolua_isnoobj(tolua_S,5,&tolua_err)
  699. )
  700. goto tolua_lerror;
  701. else
  702. {
  703. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  704. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  705. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  706. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  707. #ifndef TOLUA_RELEASE
  708. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTriangleMesh'", NULL);
  709. #endif
  710. {
  711. self->SetTriangleMesh(model,lodLevel,*scale);
  712. }
  713. }
  714. return 0;
  715. tolua_lerror:
  716. return tolua_Physics_CollisionShape_SetTriangleMesh00(tolua_S);
  717. }
  718. #endif //#ifndef TOLUA_DISABLE
  719. /* method: SetTriangleMesh of class CollisionShape */
  720. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetTriangleMesh02
  721. static int tolua_Physics_CollisionShape_SetTriangleMesh02(lua_State* tolua_S)
  722. {
  723. tolua_Error tolua_err;
  724. if (
  725. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  726. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  727. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  728. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  729. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) ||
  730. !tolua_isnoobj(tolua_S,6,&tolua_err)
  731. )
  732. goto tolua_lerror;
  733. else
  734. {
  735. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  736. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  737. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  738. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  739. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,5,0));
  740. #ifndef TOLUA_RELEASE
  741. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTriangleMesh'", NULL);
  742. #endif
  743. {
  744. self->SetTriangleMesh(model,lodLevel,*scale,*position);
  745. }
  746. }
  747. return 0;
  748. tolua_lerror:
  749. return tolua_Physics_CollisionShape_SetTriangleMesh01(tolua_S);
  750. }
  751. #endif //#ifndef TOLUA_DISABLE
  752. /* method: SetTriangleMesh of class CollisionShape */
  753. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetTriangleMesh03
  754. static int tolua_Physics_CollisionShape_SetTriangleMesh03(lua_State* tolua_S)
  755. {
  756. tolua_Error tolua_err;
  757. if (
  758. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  759. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  760. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  761. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  762. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) ||
  763. (tolua_isvaluenil(tolua_S,6,&tolua_err) || !tolua_isusertype(tolua_S,6,"const Quaternion",0,&tolua_err)) ||
  764. !tolua_isnoobj(tolua_S,7,&tolua_err)
  765. )
  766. goto tolua_lerror;
  767. else
  768. {
  769. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  770. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  771. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  772. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  773. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,5,0));
  774. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,6,0));
  775. #ifndef TOLUA_RELEASE
  776. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTriangleMesh'", NULL);
  777. #endif
  778. {
  779. self->SetTriangleMesh(model,lodLevel,*scale,*position,*rotation);
  780. }
  781. }
  782. return 0;
  783. tolua_lerror:
  784. return tolua_Physics_CollisionShape_SetTriangleMesh02(tolua_S);
  785. }
  786. #endif //#ifndef TOLUA_DISABLE
  787. /* method: SetConvexHull of class CollisionShape */
  788. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetConvexHull00
  789. static int tolua_Physics_CollisionShape_SetConvexHull00(lua_State* tolua_S)
  790. {
  791. #ifndef TOLUA_RELEASE
  792. tolua_Error tolua_err;
  793. if (
  794. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  795. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  796. !tolua_isnumber(tolua_S,3,1,&tolua_err) ||
  797. !tolua_isnoobj(tolua_S,4,&tolua_err)
  798. )
  799. goto tolua_lerror;
  800. else
  801. #endif
  802. {
  803. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  804. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  805. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  806. #ifndef TOLUA_RELEASE
  807. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetConvexHull'", NULL);
  808. #endif
  809. {
  810. self->SetConvexHull(model,lodLevel);
  811. }
  812. }
  813. return 0;
  814. #ifndef TOLUA_RELEASE
  815. tolua_lerror:
  816. tolua_error(tolua_S,"#ferror in function 'SetConvexHull'.",&tolua_err);
  817. return 0;
  818. #endif
  819. }
  820. #endif //#ifndef TOLUA_DISABLE
  821. /* method: SetConvexHull of class CollisionShape */
  822. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetConvexHull01
  823. static int tolua_Physics_CollisionShape_SetConvexHull01(lua_State* tolua_S)
  824. {
  825. tolua_Error tolua_err;
  826. if (
  827. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  828. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  829. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  830. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  831. !tolua_isnoobj(tolua_S,5,&tolua_err)
  832. )
  833. goto tolua_lerror;
  834. else
  835. {
  836. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  837. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  838. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  839. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  840. #ifndef TOLUA_RELEASE
  841. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetConvexHull'", NULL);
  842. #endif
  843. {
  844. self->SetConvexHull(model,lodLevel,*scale);
  845. }
  846. }
  847. return 0;
  848. tolua_lerror:
  849. return tolua_Physics_CollisionShape_SetConvexHull00(tolua_S);
  850. }
  851. #endif //#ifndef TOLUA_DISABLE
  852. /* method: SetConvexHull of class CollisionShape */
  853. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetConvexHull02
  854. static int tolua_Physics_CollisionShape_SetConvexHull02(lua_State* tolua_S)
  855. {
  856. tolua_Error tolua_err;
  857. if (
  858. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  859. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  860. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  861. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  862. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) ||
  863. !tolua_isnoobj(tolua_S,6,&tolua_err)
  864. )
  865. goto tolua_lerror;
  866. else
  867. {
  868. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  869. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  870. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  871. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  872. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,5,0));
  873. #ifndef TOLUA_RELEASE
  874. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetConvexHull'", NULL);
  875. #endif
  876. {
  877. self->SetConvexHull(model,lodLevel,*scale,*position);
  878. }
  879. }
  880. return 0;
  881. tolua_lerror:
  882. return tolua_Physics_CollisionShape_SetConvexHull01(tolua_S);
  883. }
  884. #endif //#ifndef TOLUA_DISABLE
  885. /* method: SetConvexHull of class CollisionShape */
  886. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetConvexHull03
  887. static int tolua_Physics_CollisionShape_SetConvexHull03(lua_State* tolua_S)
  888. {
  889. tolua_Error tolua_err;
  890. if (
  891. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  892. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  893. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  894. (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const Vector3",0,&tolua_err)) ||
  895. (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const Vector3",0,&tolua_err)) ||
  896. (tolua_isvaluenil(tolua_S,6,&tolua_err) || !tolua_isusertype(tolua_S,6,"const Quaternion",0,&tolua_err)) ||
  897. !tolua_isnoobj(tolua_S,7,&tolua_err)
  898. )
  899. goto tolua_lerror;
  900. else
  901. {
  902. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  903. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  904. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,3,0));
  905. const Vector3* scale = ((const Vector3*) tolua_tousertype(tolua_S,4,0));
  906. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,5,0));
  907. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,6,0));
  908. #ifndef TOLUA_RELEASE
  909. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetConvexHull'", NULL);
  910. #endif
  911. {
  912. self->SetConvexHull(model,lodLevel,*scale,*position,*rotation);
  913. }
  914. }
  915. return 0;
  916. tolua_lerror:
  917. return tolua_Physics_CollisionShape_SetConvexHull02(tolua_S);
  918. }
  919. #endif //#ifndef TOLUA_DISABLE
  920. /* method: SetTerrain of class CollisionShape */
  921. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetTerrain00
  922. static int tolua_Physics_CollisionShape_SetTerrain00(lua_State* tolua_S)
  923. {
  924. #ifndef TOLUA_RELEASE
  925. tolua_Error tolua_err;
  926. if (
  927. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  928. !tolua_isnoobj(tolua_S,2,&tolua_err)
  929. )
  930. goto tolua_lerror;
  931. else
  932. #endif
  933. {
  934. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  935. #ifndef TOLUA_RELEASE
  936. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTerrain'", NULL);
  937. #endif
  938. {
  939. self->SetTerrain();
  940. }
  941. }
  942. return 0;
  943. #ifndef TOLUA_RELEASE
  944. tolua_lerror:
  945. tolua_error(tolua_S,"#ferror in function 'SetTerrain'.",&tolua_err);
  946. return 0;
  947. #endif
  948. }
  949. #endif //#ifndef TOLUA_DISABLE
  950. /* method: SetShapeType of class CollisionShape */
  951. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetShapeType00
  952. static int tolua_Physics_CollisionShape_SetShapeType00(lua_State* tolua_S)
  953. {
  954. #ifndef TOLUA_RELEASE
  955. tolua_Error tolua_err;
  956. if (
  957. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  958. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  959. !tolua_isnoobj(tolua_S,3,&tolua_err)
  960. )
  961. goto tolua_lerror;
  962. else
  963. #endif
  964. {
  965. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  966. ShapeType type = ((ShapeType) (int) tolua_tonumber(tolua_S,2,0));
  967. #ifndef TOLUA_RELEASE
  968. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetShapeType'", NULL);
  969. #endif
  970. {
  971. self->SetShapeType(type);
  972. }
  973. }
  974. return 0;
  975. #ifndef TOLUA_RELEASE
  976. tolua_lerror:
  977. tolua_error(tolua_S,"#ferror in function 'SetShapeType'.",&tolua_err);
  978. return 0;
  979. #endif
  980. }
  981. #endif //#ifndef TOLUA_DISABLE
  982. /* method: SetSize of class CollisionShape */
  983. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetSize00
  984. static int tolua_Physics_CollisionShape_SetSize00(lua_State* tolua_S)
  985. {
  986. #ifndef TOLUA_RELEASE
  987. tolua_Error tolua_err;
  988. if (
  989. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  990. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  991. !tolua_isnoobj(tolua_S,3,&tolua_err)
  992. )
  993. goto tolua_lerror;
  994. else
  995. #endif
  996. {
  997. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  998. const Vector3* size = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  999. #ifndef TOLUA_RELEASE
  1000. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSize'", NULL);
  1001. #endif
  1002. {
  1003. self->SetSize(*size);
  1004. }
  1005. }
  1006. return 0;
  1007. #ifndef TOLUA_RELEASE
  1008. tolua_lerror:
  1009. tolua_error(tolua_S,"#ferror in function 'SetSize'.",&tolua_err);
  1010. return 0;
  1011. #endif
  1012. }
  1013. #endif //#ifndef TOLUA_DISABLE
  1014. /* method: SetPosition of class CollisionShape */
  1015. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetPosition00
  1016. static int tolua_Physics_CollisionShape_SetPosition00(lua_State* tolua_S)
  1017. {
  1018. #ifndef TOLUA_RELEASE
  1019. tolua_Error tolua_err;
  1020. if (
  1021. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1022. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1023. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1024. )
  1025. goto tolua_lerror;
  1026. else
  1027. #endif
  1028. {
  1029. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1030. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1031. #ifndef TOLUA_RELEASE
  1032. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPosition'", NULL);
  1033. #endif
  1034. {
  1035. self->SetPosition(*position);
  1036. }
  1037. }
  1038. return 0;
  1039. #ifndef TOLUA_RELEASE
  1040. tolua_lerror:
  1041. tolua_error(tolua_S,"#ferror in function 'SetPosition'.",&tolua_err);
  1042. return 0;
  1043. #endif
  1044. }
  1045. #endif //#ifndef TOLUA_DISABLE
  1046. /* method: SetRotation of class CollisionShape */
  1047. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetRotation00
  1048. static int tolua_Physics_CollisionShape_SetRotation00(lua_State* tolua_S)
  1049. {
  1050. #ifndef TOLUA_RELEASE
  1051. tolua_Error tolua_err;
  1052. if (
  1053. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1054. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  1055. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1056. )
  1057. goto tolua_lerror;
  1058. else
  1059. #endif
  1060. {
  1061. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1062. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  1063. #ifndef TOLUA_RELEASE
  1064. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  1065. #endif
  1066. {
  1067. self->SetRotation(*rotation);
  1068. }
  1069. }
  1070. return 0;
  1071. #ifndef TOLUA_RELEASE
  1072. tolua_lerror:
  1073. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  1074. return 0;
  1075. #endif
  1076. }
  1077. #endif //#ifndef TOLUA_DISABLE
  1078. /* method: SetTransform of class CollisionShape */
  1079. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetTransform00
  1080. static int tolua_Physics_CollisionShape_SetTransform00(lua_State* tolua_S)
  1081. {
  1082. #ifndef TOLUA_RELEASE
  1083. tolua_Error tolua_err;
  1084. if (
  1085. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1086. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1087. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  1088. !tolua_isnoobj(tolua_S,4,&tolua_err)
  1089. )
  1090. goto tolua_lerror;
  1091. else
  1092. #endif
  1093. {
  1094. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1095. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1096. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  1097. #ifndef TOLUA_RELEASE
  1098. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTransform'", NULL);
  1099. #endif
  1100. {
  1101. self->SetTransform(*position,*rotation);
  1102. }
  1103. }
  1104. return 0;
  1105. #ifndef TOLUA_RELEASE
  1106. tolua_lerror:
  1107. tolua_error(tolua_S,"#ferror in function 'SetTransform'.",&tolua_err);
  1108. return 0;
  1109. #endif
  1110. }
  1111. #endif //#ifndef TOLUA_DISABLE
  1112. /* method: SetMargin of class CollisionShape */
  1113. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetMargin00
  1114. static int tolua_Physics_CollisionShape_SetMargin00(lua_State* tolua_S)
  1115. {
  1116. #ifndef TOLUA_RELEASE
  1117. tolua_Error tolua_err;
  1118. if (
  1119. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1120. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1121. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1122. )
  1123. goto tolua_lerror;
  1124. else
  1125. #endif
  1126. {
  1127. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1128. float margin = ((float) tolua_tonumber(tolua_S,2,0));
  1129. #ifndef TOLUA_RELEASE
  1130. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMargin'", NULL);
  1131. #endif
  1132. {
  1133. self->SetMargin(margin);
  1134. }
  1135. }
  1136. return 0;
  1137. #ifndef TOLUA_RELEASE
  1138. tolua_lerror:
  1139. tolua_error(tolua_S,"#ferror in function 'SetMargin'.",&tolua_err);
  1140. return 0;
  1141. #endif
  1142. }
  1143. #endif //#ifndef TOLUA_DISABLE
  1144. /* method: SetModel of class CollisionShape */
  1145. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetModel00
  1146. static int tolua_Physics_CollisionShape_SetModel00(lua_State* tolua_S)
  1147. {
  1148. #ifndef TOLUA_RELEASE
  1149. tolua_Error tolua_err;
  1150. if (
  1151. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1152. !tolua_isusertype(tolua_S,2,"Model",0,&tolua_err) ||
  1153. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1154. )
  1155. goto tolua_lerror;
  1156. else
  1157. #endif
  1158. {
  1159. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1160. Model* model = ((Model*) tolua_tousertype(tolua_S,2,0));
  1161. #ifndef TOLUA_RELEASE
  1162. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetModel'", NULL);
  1163. #endif
  1164. {
  1165. self->SetModel(model);
  1166. }
  1167. }
  1168. return 0;
  1169. #ifndef TOLUA_RELEASE
  1170. tolua_lerror:
  1171. tolua_error(tolua_S,"#ferror in function 'SetModel'.",&tolua_err);
  1172. return 0;
  1173. #endif
  1174. }
  1175. #endif //#ifndef TOLUA_DISABLE
  1176. /* method: SetLodLevel of class CollisionShape */
  1177. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetLodLevel00
  1178. static int tolua_Physics_CollisionShape_SetLodLevel00(lua_State* tolua_S)
  1179. {
  1180. #ifndef TOLUA_RELEASE
  1181. tolua_Error tolua_err;
  1182. if (
  1183. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1184. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1185. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1186. )
  1187. goto tolua_lerror;
  1188. else
  1189. #endif
  1190. {
  1191. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1192. unsigned lodLevel = ((unsigned) tolua_tonumber(tolua_S,2,0));
  1193. #ifndef TOLUA_RELEASE
  1194. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLodLevel'", NULL);
  1195. #endif
  1196. {
  1197. self->SetLodLevel(lodLevel);
  1198. }
  1199. }
  1200. return 0;
  1201. #ifndef TOLUA_RELEASE
  1202. tolua_lerror:
  1203. tolua_error(tolua_S,"#ferror in function 'SetLodLevel'.",&tolua_err);
  1204. return 0;
  1205. #endif
  1206. }
  1207. #endif //#ifndef TOLUA_DISABLE
  1208. /* method: GetPhysicsWorld of class CollisionShape */
  1209. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetPhysicsWorld00
  1210. static int tolua_Physics_CollisionShape_GetPhysicsWorld00(lua_State* tolua_S)
  1211. {
  1212. #ifndef TOLUA_RELEASE
  1213. tolua_Error tolua_err;
  1214. if (
  1215. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1216. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1217. )
  1218. goto tolua_lerror;
  1219. else
  1220. #endif
  1221. {
  1222. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1223. #ifndef TOLUA_RELEASE
  1224. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPhysicsWorld'", NULL);
  1225. #endif
  1226. {
  1227. PhysicsWorld* tolua_ret = (PhysicsWorld*) self->GetPhysicsWorld();
  1228. tolua_pushusertype(tolua_S,(void*)tolua_ret,"PhysicsWorld");
  1229. }
  1230. }
  1231. return 1;
  1232. #ifndef TOLUA_RELEASE
  1233. tolua_lerror:
  1234. tolua_error(tolua_S,"#ferror in function 'GetPhysicsWorld'.",&tolua_err);
  1235. return 0;
  1236. #endif
  1237. }
  1238. #endif //#ifndef TOLUA_DISABLE
  1239. /* method: GetShapeType of class CollisionShape */
  1240. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetShapeType00
  1241. static int tolua_Physics_CollisionShape_GetShapeType00(lua_State* tolua_S)
  1242. {
  1243. #ifndef TOLUA_RELEASE
  1244. tolua_Error tolua_err;
  1245. if (
  1246. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1247. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1248. )
  1249. goto tolua_lerror;
  1250. else
  1251. #endif
  1252. {
  1253. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1254. #ifndef TOLUA_RELEASE
  1255. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetShapeType'", NULL);
  1256. #endif
  1257. {
  1258. ShapeType tolua_ret = (ShapeType) self->GetShapeType();
  1259. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1260. }
  1261. }
  1262. return 1;
  1263. #ifndef TOLUA_RELEASE
  1264. tolua_lerror:
  1265. tolua_error(tolua_S,"#ferror in function 'GetShapeType'.",&tolua_err);
  1266. return 0;
  1267. #endif
  1268. }
  1269. #endif //#ifndef TOLUA_DISABLE
  1270. /* method: GetSize of class CollisionShape */
  1271. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetSize00
  1272. static int tolua_Physics_CollisionShape_GetSize00(lua_State* tolua_S)
  1273. {
  1274. #ifndef TOLUA_RELEASE
  1275. tolua_Error tolua_err;
  1276. if (
  1277. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1278. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1279. )
  1280. goto tolua_lerror;
  1281. else
  1282. #endif
  1283. {
  1284. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1285. #ifndef TOLUA_RELEASE
  1286. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSize'", NULL);
  1287. #endif
  1288. {
  1289. const Vector3& tolua_ret = (const Vector3&) self->GetSize();
  1290. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector3");
  1291. }
  1292. }
  1293. return 1;
  1294. #ifndef TOLUA_RELEASE
  1295. tolua_lerror:
  1296. tolua_error(tolua_S,"#ferror in function 'GetSize'.",&tolua_err);
  1297. return 0;
  1298. #endif
  1299. }
  1300. #endif //#ifndef TOLUA_DISABLE
  1301. /* method: GetPosition of class CollisionShape */
  1302. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetPosition00
  1303. static int tolua_Physics_CollisionShape_GetPosition00(lua_State* tolua_S)
  1304. {
  1305. #ifndef TOLUA_RELEASE
  1306. tolua_Error tolua_err;
  1307. if (
  1308. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1309. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1310. )
  1311. goto tolua_lerror;
  1312. else
  1313. #endif
  1314. {
  1315. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1316. #ifndef TOLUA_RELEASE
  1317. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosition'", NULL);
  1318. #endif
  1319. {
  1320. const Vector3& tolua_ret = (const Vector3&) self->GetPosition();
  1321. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector3");
  1322. }
  1323. }
  1324. return 1;
  1325. #ifndef TOLUA_RELEASE
  1326. tolua_lerror:
  1327. tolua_error(tolua_S,"#ferror in function 'GetPosition'.",&tolua_err);
  1328. return 0;
  1329. #endif
  1330. }
  1331. #endif //#ifndef TOLUA_DISABLE
  1332. /* method: GetRotation of class CollisionShape */
  1333. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetRotation00
  1334. static int tolua_Physics_CollisionShape_GetRotation00(lua_State* tolua_S)
  1335. {
  1336. #ifndef TOLUA_RELEASE
  1337. tolua_Error tolua_err;
  1338. if (
  1339. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1340. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1341. )
  1342. goto tolua_lerror;
  1343. else
  1344. #endif
  1345. {
  1346. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1347. #ifndef TOLUA_RELEASE
  1348. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRotation'", NULL);
  1349. #endif
  1350. {
  1351. const Quaternion& tolua_ret = (const Quaternion&) self->GetRotation();
  1352. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Quaternion");
  1353. }
  1354. }
  1355. return 1;
  1356. #ifndef TOLUA_RELEASE
  1357. tolua_lerror:
  1358. tolua_error(tolua_S,"#ferror in function 'GetRotation'.",&tolua_err);
  1359. return 0;
  1360. #endif
  1361. }
  1362. #endif //#ifndef TOLUA_DISABLE
  1363. /* method: GetMargin of class CollisionShape */
  1364. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetMargin00
  1365. static int tolua_Physics_CollisionShape_GetMargin00(lua_State* tolua_S)
  1366. {
  1367. #ifndef TOLUA_RELEASE
  1368. tolua_Error tolua_err;
  1369. if (
  1370. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1371. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1372. )
  1373. goto tolua_lerror;
  1374. else
  1375. #endif
  1376. {
  1377. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1378. #ifndef TOLUA_RELEASE
  1379. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMargin'", NULL);
  1380. #endif
  1381. {
  1382. float tolua_ret = (float) self->GetMargin();
  1383. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1384. }
  1385. }
  1386. return 1;
  1387. #ifndef TOLUA_RELEASE
  1388. tolua_lerror:
  1389. tolua_error(tolua_S,"#ferror in function 'GetMargin'.",&tolua_err);
  1390. return 0;
  1391. #endif
  1392. }
  1393. #endif //#ifndef TOLUA_DISABLE
  1394. /* method: GetModel of class CollisionShape */
  1395. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetModel00
  1396. static int tolua_Physics_CollisionShape_GetModel00(lua_State* tolua_S)
  1397. {
  1398. #ifndef TOLUA_RELEASE
  1399. tolua_Error tolua_err;
  1400. if (
  1401. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1402. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1403. )
  1404. goto tolua_lerror;
  1405. else
  1406. #endif
  1407. {
  1408. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1409. #ifndef TOLUA_RELEASE
  1410. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetModel'", NULL);
  1411. #endif
  1412. {
  1413. Model* tolua_ret = (Model*) self->GetModel();
  1414. tolua_pushusertype(tolua_S,(void*)tolua_ret,"Model");
  1415. }
  1416. }
  1417. return 1;
  1418. #ifndef TOLUA_RELEASE
  1419. tolua_lerror:
  1420. tolua_error(tolua_S,"#ferror in function 'GetModel'.",&tolua_err);
  1421. return 0;
  1422. #endif
  1423. }
  1424. #endif //#ifndef TOLUA_DISABLE
  1425. /* method: GetLodLevel of class CollisionShape */
  1426. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetLodLevel00
  1427. static int tolua_Physics_CollisionShape_GetLodLevel00(lua_State* tolua_S)
  1428. {
  1429. #ifndef TOLUA_RELEASE
  1430. tolua_Error tolua_err;
  1431. if (
  1432. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1433. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1434. )
  1435. goto tolua_lerror;
  1436. else
  1437. #endif
  1438. {
  1439. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1440. #ifndef TOLUA_RELEASE
  1441. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLodLevel'", NULL);
  1442. #endif
  1443. {
  1444. unsigned tolua_ret = (unsigned) self->GetLodLevel();
  1445. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  1446. }
  1447. }
  1448. return 1;
  1449. #ifndef TOLUA_RELEASE
  1450. tolua_lerror:
  1451. tolua_error(tolua_S,"#ferror in function 'GetLodLevel'.",&tolua_err);
  1452. return 0;
  1453. #endif
  1454. }
  1455. #endif //#ifndef TOLUA_DISABLE
  1456. /* method: GetWorldBoundingBox of class CollisionShape */
  1457. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetWorldBoundingBox00
  1458. static int tolua_Physics_CollisionShape_GetWorldBoundingBox00(lua_State* tolua_S)
  1459. {
  1460. #ifndef TOLUA_RELEASE
  1461. tolua_Error tolua_err;
  1462. if (
  1463. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1464. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1465. )
  1466. goto tolua_lerror;
  1467. else
  1468. #endif
  1469. {
  1470. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1471. #ifndef TOLUA_RELEASE
  1472. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorldBoundingBox'", NULL);
  1473. #endif
  1474. {
  1475. BoundingBox tolua_ret = (BoundingBox) self->GetWorldBoundingBox();
  1476. {
  1477. #ifdef __cplusplus
  1478. void* tolua_obj = Mtolua_new((BoundingBox)(tolua_ret));
  1479. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1480. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1481. #else
  1482. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(BoundingBox));
  1483. tolua_pushusertype(tolua_S,tolua_obj,"BoundingBox");
  1484. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1485. #endif
  1486. }
  1487. }
  1488. }
  1489. return 1;
  1490. #ifndef TOLUA_RELEASE
  1491. tolua_lerror:
  1492. tolua_error(tolua_S,"#ferror in function 'GetWorldBoundingBox'.",&tolua_err);
  1493. return 0;
  1494. #endif
  1495. }
  1496. #endif //#ifndef TOLUA_DISABLE
  1497. /* method: NotifyRigidBody of class CollisionShape */
  1498. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_NotifyRigidBody00
  1499. static int tolua_Physics_CollisionShape_NotifyRigidBody00(lua_State* tolua_S)
  1500. {
  1501. #ifndef TOLUA_RELEASE
  1502. tolua_Error tolua_err;
  1503. if (
  1504. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1505. !tolua_isboolean(tolua_S,2,1,&tolua_err) ||
  1506. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1507. )
  1508. goto tolua_lerror;
  1509. else
  1510. #endif
  1511. {
  1512. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1513. bool updateMass = ((bool) tolua_toboolean(tolua_S,2,true));
  1514. #ifndef TOLUA_RELEASE
  1515. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'NotifyRigidBody'", NULL);
  1516. #endif
  1517. {
  1518. self->NotifyRigidBody(updateMass);
  1519. }
  1520. }
  1521. return 0;
  1522. #ifndef TOLUA_RELEASE
  1523. tolua_lerror:
  1524. tolua_error(tolua_S,"#ferror in function 'NotifyRigidBody'.",&tolua_err);
  1525. return 0;
  1526. #endif
  1527. }
  1528. #endif //#ifndef TOLUA_DISABLE
  1529. /* method: SetModelAttr of class CollisionShape */
  1530. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_SetModelAttr00
  1531. static int tolua_Physics_CollisionShape_SetModelAttr00(lua_State* tolua_S)
  1532. {
  1533. #ifndef TOLUA_RELEASE
  1534. tolua_Error tolua_err;
  1535. if (
  1536. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1537. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"ResourceRef",0,&tolua_err)) ||
  1538. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1539. )
  1540. goto tolua_lerror;
  1541. else
  1542. #endif
  1543. {
  1544. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1545. ResourceRef value = *((ResourceRef*) tolua_tousertype(tolua_S,2,0));
  1546. #ifndef TOLUA_RELEASE
  1547. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetModelAttr'", NULL);
  1548. #endif
  1549. {
  1550. self->SetModelAttr(value);
  1551. }
  1552. }
  1553. return 0;
  1554. #ifndef TOLUA_RELEASE
  1555. tolua_lerror:
  1556. tolua_error(tolua_S,"#ferror in function 'SetModelAttr'.",&tolua_err);
  1557. return 0;
  1558. #endif
  1559. }
  1560. #endif //#ifndef TOLUA_DISABLE
  1561. /* method: GetModelAttr of class CollisionShape */
  1562. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_GetModelAttr00
  1563. static int tolua_Physics_CollisionShape_GetModelAttr00(lua_State* tolua_S)
  1564. {
  1565. #ifndef TOLUA_RELEASE
  1566. tolua_Error tolua_err;
  1567. if (
  1568. !tolua_isusertype(tolua_S,1,"const CollisionShape",0,&tolua_err) ||
  1569. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1570. )
  1571. goto tolua_lerror;
  1572. else
  1573. #endif
  1574. {
  1575. const CollisionShape* self = (const CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1576. #ifndef TOLUA_RELEASE
  1577. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetModelAttr'", NULL);
  1578. #endif
  1579. {
  1580. ResourceRef tolua_ret = (ResourceRef) self->GetModelAttr();
  1581. {
  1582. #ifdef __cplusplus
  1583. void* tolua_obj = Mtolua_new((ResourceRef)(tolua_ret));
  1584. tolua_pushusertype(tolua_S,tolua_obj,"ResourceRef");
  1585. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1586. #else
  1587. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(ResourceRef));
  1588. tolua_pushusertype(tolua_S,tolua_obj,"ResourceRef");
  1589. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  1590. #endif
  1591. }
  1592. }
  1593. }
  1594. return 1;
  1595. #ifndef TOLUA_RELEASE
  1596. tolua_lerror:
  1597. tolua_error(tolua_S,"#ferror in function 'GetModelAttr'.",&tolua_err);
  1598. return 0;
  1599. #endif
  1600. }
  1601. #endif //#ifndef TOLUA_DISABLE
  1602. /* method: ReleaseShape of class CollisionShape */
  1603. #ifndef TOLUA_DISABLE_tolua_Physics_CollisionShape_ReleaseShape00
  1604. static int tolua_Physics_CollisionShape_ReleaseShape00(lua_State* tolua_S)
  1605. {
  1606. #ifndef TOLUA_RELEASE
  1607. tolua_Error tolua_err;
  1608. if (
  1609. !tolua_isusertype(tolua_S,1,"CollisionShape",0,&tolua_err) ||
  1610. !tolua_isnoobj(tolua_S,2,&tolua_err)
  1611. )
  1612. goto tolua_lerror;
  1613. else
  1614. #endif
  1615. {
  1616. CollisionShape* self = (CollisionShape*) tolua_tousertype(tolua_S,1,0);
  1617. #ifndef TOLUA_RELEASE
  1618. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReleaseShape'", NULL);
  1619. #endif
  1620. {
  1621. self->ReleaseShape();
  1622. }
  1623. }
  1624. return 0;
  1625. #ifndef TOLUA_RELEASE
  1626. tolua_lerror:
  1627. tolua_error(tolua_S,"#ferror in function 'ReleaseShape'.",&tolua_err);
  1628. return 0;
  1629. #endif
  1630. }
  1631. #endif //#ifndef TOLUA_DISABLE
  1632. /* method: SetConstraintType of class Constraint */
  1633. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetConstraintType00
  1634. static int tolua_Physics_Constraint_SetConstraintType00(lua_State* tolua_S)
  1635. {
  1636. #ifndef TOLUA_RELEASE
  1637. tolua_Error tolua_err;
  1638. if (
  1639. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1640. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1641. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1642. )
  1643. goto tolua_lerror;
  1644. else
  1645. #endif
  1646. {
  1647. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1648. ConstraintType type = ((ConstraintType) (int) tolua_tonumber(tolua_S,2,0));
  1649. #ifndef TOLUA_RELEASE
  1650. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetConstraintType'", NULL);
  1651. #endif
  1652. {
  1653. self->SetConstraintType(type);
  1654. }
  1655. }
  1656. return 0;
  1657. #ifndef TOLUA_RELEASE
  1658. tolua_lerror:
  1659. tolua_error(tolua_S,"#ferror in function 'SetConstraintType'.",&tolua_err);
  1660. return 0;
  1661. #endif
  1662. }
  1663. #endif //#ifndef TOLUA_DISABLE
  1664. /* method: SetOtherBody of class Constraint */
  1665. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetOtherBody00
  1666. static int tolua_Physics_Constraint_SetOtherBody00(lua_State* tolua_S)
  1667. {
  1668. #ifndef TOLUA_RELEASE
  1669. tolua_Error tolua_err;
  1670. if (
  1671. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1672. !tolua_isusertype(tolua_S,2,"RigidBody",0,&tolua_err) ||
  1673. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1674. )
  1675. goto tolua_lerror;
  1676. else
  1677. #endif
  1678. {
  1679. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1680. RigidBody* body = ((RigidBody*) tolua_tousertype(tolua_S,2,0));
  1681. #ifndef TOLUA_RELEASE
  1682. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetOtherBody'", NULL);
  1683. #endif
  1684. {
  1685. self->SetOtherBody(body);
  1686. }
  1687. }
  1688. return 0;
  1689. #ifndef TOLUA_RELEASE
  1690. tolua_lerror:
  1691. tolua_error(tolua_S,"#ferror in function 'SetOtherBody'.",&tolua_err);
  1692. return 0;
  1693. #endif
  1694. }
  1695. #endif //#ifndef TOLUA_DISABLE
  1696. /* method: SetPosition of class Constraint */
  1697. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetPosition00
  1698. static int tolua_Physics_Constraint_SetPosition00(lua_State* tolua_S)
  1699. {
  1700. #ifndef TOLUA_RELEASE
  1701. tolua_Error tolua_err;
  1702. if (
  1703. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1704. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1705. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1706. )
  1707. goto tolua_lerror;
  1708. else
  1709. #endif
  1710. {
  1711. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1712. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1713. #ifndef TOLUA_RELEASE
  1714. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPosition'", NULL);
  1715. #endif
  1716. {
  1717. self->SetPosition(*position);
  1718. }
  1719. }
  1720. return 0;
  1721. #ifndef TOLUA_RELEASE
  1722. tolua_lerror:
  1723. tolua_error(tolua_S,"#ferror in function 'SetPosition'.",&tolua_err);
  1724. return 0;
  1725. #endif
  1726. }
  1727. #endif //#ifndef TOLUA_DISABLE
  1728. /* method: SetRotation of class Constraint */
  1729. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetRotation00
  1730. static int tolua_Physics_Constraint_SetRotation00(lua_State* tolua_S)
  1731. {
  1732. #ifndef TOLUA_RELEASE
  1733. tolua_Error tolua_err;
  1734. if (
  1735. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1736. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  1737. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1738. )
  1739. goto tolua_lerror;
  1740. else
  1741. #endif
  1742. {
  1743. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1744. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  1745. #ifndef TOLUA_RELEASE
  1746. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  1747. #endif
  1748. {
  1749. self->SetRotation(*rotation);
  1750. }
  1751. }
  1752. return 0;
  1753. #ifndef TOLUA_RELEASE
  1754. tolua_lerror:
  1755. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  1756. return 0;
  1757. #endif
  1758. }
  1759. #endif //#ifndef TOLUA_DISABLE
  1760. /* method: SetAxis of class Constraint */
  1761. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetAxis00
  1762. static int tolua_Physics_Constraint_SetAxis00(lua_State* tolua_S)
  1763. {
  1764. #ifndef TOLUA_RELEASE
  1765. tolua_Error tolua_err;
  1766. if (
  1767. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1768. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1769. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1770. )
  1771. goto tolua_lerror;
  1772. else
  1773. #endif
  1774. {
  1775. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1776. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1777. #ifndef TOLUA_RELEASE
  1778. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAxis'", NULL);
  1779. #endif
  1780. {
  1781. self->SetAxis(*axis);
  1782. }
  1783. }
  1784. return 0;
  1785. #ifndef TOLUA_RELEASE
  1786. tolua_lerror:
  1787. tolua_error(tolua_S,"#ferror in function 'SetAxis'.",&tolua_err);
  1788. return 0;
  1789. #endif
  1790. }
  1791. #endif //#ifndef TOLUA_DISABLE
  1792. /* method: SetOtherPosition of class Constraint */
  1793. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetOtherPosition00
  1794. static int tolua_Physics_Constraint_SetOtherPosition00(lua_State* tolua_S)
  1795. {
  1796. #ifndef TOLUA_RELEASE
  1797. tolua_Error tolua_err;
  1798. if (
  1799. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1800. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1801. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1802. )
  1803. goto tolua_lerror;
  1804. else
  1805. #endif
  1806. {
  1807. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1808. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1809. #ifndef TOLUA_RELEASE
  1810. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetOtherPosition'", NULL);
  1811. #endif
  1812. {
  1813. self->SetOtherPosition(*position);
  1814. }
  1815. }
  1816. return 0;
  1817. #ifndef TOLUA_RELEASE
  1818. tolua_lerror:
  1819. tolua_error(tolua_S,"#ferror in function 'SetOtherPosition'.",&tolua_err);
  1820. return 0;
  1821. #endif
  1822. }
  1823. #endif //#ifndef TOLUA_DISABLE
  1824. /* method: SetOtherRotation of class Constraint */
  1825. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetOtherRotation00
  1826. static int tolua_Physics_Constraint_SetOtherRotation00(lua_State* tolua_S)
  1827. {
  1828. #ifndef TOLUA_RELEASE
  1829. tolua_Error tolua_err;
  1830. if (
  1831. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1832. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Quaternion",0,&tolua_err)) ||
  1833. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1834. )
  1835. goto tolua_lerror;
  1836. else
  1837. #endif
  1838. {
  1839. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1840. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,2,0));
  1841. #ifndef TOLUA_RELEASE
  1842. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetOtherRotation'", NULL);
  1843. #endif
  1844. {
  1845. self->SetOtherRotation(*rotation);
  1846. }
  1847. }
  1848. return 0;
  1849. #ifndef TOLUA_RELEASE
  1850. tolua_lerror:
  1851. tolua_error(tolua_S,"#ferror in function 'SetOtherRotation'.",&tolua_err);
  1852. return 0;
  1853. #endif
  1854. }
  1855. #endif //#ifndef TOLUA_DISABLE
  1856. /* method: SetOtherAxis of class Constraint */
  1857. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetOtherAxis00
  1858. static int tolua_Physics_Constraint_SetOtherAxis00(lua_State* tolua_S)
  1859. {
  1860. #ifndef TOLUA_RELEASE
  1861. tolua_Error tolua_err;
  1862. if (
  1863. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1864. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1865. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1866. )
  1867. goto tolua_lerror;
  1868. else
  1869. #endif
  1870. {
  1871. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1872. const Vector3* axis = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1873. #ifndef TOLUA_RELEASE
  1874. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetOtherAxis'", NULL);
  1875. #endif
  1876. {
  1877. self->SetOtherAxis(*axis);
  1878. }
  1879. }
  1880. return 0;
  1881. #ifndef TOLUA_RELEASE
  1882. tolua_lerror:
  1883. tolua_error(tolua_S,"#ferror in function 'SetOtherAxis'.",&tolua_err);
  1884. return 0;
  1885. #endif
  1886. }
  1887. #endif //#ifndef TOLUA_DISABLE
  1888. /* method: SetWorldPosition of class Constraint */
  1889. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetWorldPosition00
  1890. static int tolua_Physics_Constraint_SetWorldPosition00(lua_State* tolua_S)
  1891. {
  1892. #ifndef TOLUA_RELEASE
  1893. tolua_Error tolua_err;
  1894. if (
  1895. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1896. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  1897. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1898. )
  1899. goto tolua_lerror;
  1900. else
  1901. #endif
  1902. {
  1903. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1904. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  1905. #ifndef TOLUA_RELEASE
  1906. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetWorldPosition'", NULL);
  1907. #endif
  1908. {
  1909. self->SetWorldPosition(*position);
  1910. }
  1911. }
  1912. return 0;
  1913. #ifndef TOLUA_RELEASE
  1914. tolua_lerror:
  1915. tolua_error(tolua_S,"#ferror in function 'SetWorldPosition'.",&tolua_err);
  1916. return 0;
  1917. #endif
  1918. }
  1919. #endif //#ifndef TOLUA_DISABLE
  1920. /* method: SetHighLimit of class Constraint */
  1921. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetHighLimit00
  1922. static int tolua_Physics_Constraint_SetHighLimit00(lua_State* tolua_S)
  1923. {
  1924. #ifndef TOLUA_RELEASE
  1925. tolua_Error tolua_err;
  1926. if (
  1927. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1928. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  1929. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1930. )
  1931. goto tolua_lerror;
  1932. else
  1933. #endif
  1934. {
  1935. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1936. const Vector2* limit = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  1937. #ifndef TOLUA_RELEASE
  1938. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetHighLimit'", NULL);
  1939. #endif
  1940. {
  1941. self->SetHighLimit(*limit);
  1942. }
  1943. }
  1944. return 0;
  1945. #ifndef TOLUA_RELEASE
  1946. tolua_lerror:
  1947. tolua_error(tolua_S,"#ferror in function 'SetHighLimit'.",&tolua_err);
  1948. return 0;
  1949. #endif
  1950. }
  1951. #endif //#ifndef TOLUA_DISABLE
  1952. /* method: SetLowLimit of class Constraint */
  1953. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetLowLimit00
  1954. static int tolua_Physics_Constraint_SetLowLimit00(lua_State* tolua_S)
  1955. {
  1956. #ifndef TOLUA_RELEASE
  1957. tolua_Error tolua_err;
  1958. if (
  1959. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1960. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector2",0,&tolua_err)) ||
  1961. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1962. )
  1963. goto tolua_lerror;
  1964. else
  1965. #endif
  1966. {
  1967. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  1968. const Vector2* limit = ((const Vector2*) tolua_tousertype(tolua_S,2,0));
  1969. #ifndef TOLUA_RELEASE
  1970. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLowLimit'", NULL);
  1971. #endif
  1972. {
  1973. self->SetLowLimit(*limit);
  1974. }
  1975. }
  1976. return 0;
  1977. #ifndef TOLUA_RELEASE
  1978. tolua_lerror:
  1979. tolua_error(tolua_S,"#ferror in function 'SetLowLimit'.",&tolua_err);
  1980. return 0;
  1981. #endif
  1982. }
  1983. #endif //#ifndef TOLUA_DISABLE
  1984. /* method: SetERP of class Constraint */
  1985. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetERP00
  1986. static int tolua_Physics_Constraint_SetERP00(lua_State* tolua_S)
  1987. {
  1988. #ifndef TOLUA_RELEASE
  1989. tolua_Error tolua_err;
  1990. if (
  1991. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  1992. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  1993. !tolua_isnoobj(tolua_S,3,&tolua_err)
  1994. )
  1995. goto tolua_lerror;
  1996. else
  1997. #endif
  1998. {
  1999. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  2000. float erp = ((float) tolua_tonumber(tolua_S,2,0));
  2001. #ifndef TOLUA_RELEASE
  2002. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetERP'", NULL);
  2003. #endif
  2004. {
  2005. self->SetERP(erp);
  2006. }
  2007. }
  2008. return 0;
  2009. #ifndef TOLUA_RELEASE
  2010. tolua_lerror:
  2011. tolua_error(tolua_S,"#ferror in function 'SetERP'.",&tolua_err);
  2012. return 0;
  2013. #endif
  2014. }
  2015. #endif //#ifndef TOLUA_DISABLE
  2016. /* method: SetCFM of class Constraint */
  2017. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetCFM00
  2018. static int tolua_Physics_Constraint_SetCFM00(lua_State* tolua_S)
  2019. {
  2020. #ifndef TOLUA_RELEASE
  2021. tolua_Error tolua_err;
  2022. if (
  2023. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  2024. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2025. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2026. )
  2027. goto tolua_lerror;
  2028. else
  2029. #endif
  2030. {
  2031. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  2032. float cfm = ((float) tolua_tonumber(tolua_S,2,0));
  2033. #ifndef TOLUA_RELEASE
  2034. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCFM'", NULL);
  2035. #endif
  2036. {
  2037. self->SetCFM(cfm);
  2038. }
  2039. }
  2040. return 0;
  2041. #ifndef TOLUA_RELEASE
  2042. tolua_lerror:
  2043. tolua_error(tolua_S,"#ferror in function 'SetCFM'.",&tolua_err);
  2044. return 0;
  2045. #endif
  2046. }
  2047. #endif //#ifndef TOLUA_DISABLE
  2048. /* method: SetDisableCollision of class Constraint */
  2049. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_SetDisableCollision00
  2050. static int tolua_Physics_Constraint_SetDisableCollision00(lua_State* tolua_S)
  2051. {
  2052. #ifndef TOLUA_RELEASE
  2053. tolua_Error tolua_err;
  2054. if (
  2055. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  2056. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  2057. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2058. )
  2059. goto tolua_lerror;
  2060. else
  2061. #endif
  2062. {
  2063. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  2064. bool disable = ((bool) tolua_toboolean(tolua_S,2,0));
  2065. #ifndef TOLUA_RELEASE
  2066. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDisableCollision'", NULL);
  2067. #endif
  2068. {
  2069. self->SetDisableCollision(disable);
  2070. }
  2071. }
  2072. return 0;
  2073. #ifndef TOLUA_RELEASE
  2074. tolua_lerror:
  2075. tolua_error(tolua_S,"#ferror in function 'SetDisableCollision'.",&tolua_err);
  2076. return 0;
  2077. #endif
  2078. }
  2079. #endif //#ifndef TOLUA_DISABLE
  2080. /* method: GetPhysicsWorld of class Constraint */
  2081. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetPhysicsWorld00
  2082. static int tolua_Physics_Constraint_GetPhysicsWorld00(lua_State* tolua_S)
  2083. {
  2084. #ifndef TOLUA_RELEASE
  2085. tolua_Error tolua_err;
  2086. if (
  2087. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2088. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2089. )
  2090. goto tolua_lerror;
  2091. else
  2092. #endif
  2093. {
  2094. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2095. #ifndef TOLUA_RELEASE
  2096. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPhysicsWorld'", NULL);
  2097. #endif
  2098. {
  2099. PhysicsWorld* tolua_ret = (PhysicsWorld*) self->GetPhysicsWorld();
  2100. tolua_pushusertype(tolua_S,(void*)tolua_ret,"PhysicsWorld");
  2101. }
  2102. }
  2103. return 1;
  2104. #ifndef TOLUA_RELEASE
  2105. tolua_lerror:
  2106. tolua_error(tolua_S,"#ferror in function 'GetPhysicsWorld'.",&tolua_err);
  2107. return 0;
  2108. #endif
  2109. }
  2110. #endif //#ifndef TOLUA_DISABLE
  2111. /* method: GetConstraintType of class Constraint */
  2112. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetConstraintType00
  2113. static int tolua_Physics_Constraint_GetConstraintType00(lua_State* tolua_S)
  2114. {
  2115. #ifndef TOLUA_RELEASE
  2116. tolua_Error tolua_err;
  2117. if (
  2118. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2119. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2120. )
  2121. goto tolua_lerror;
  2122. else
  2123. #endif
  2124. {
  2125. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2126. #ifndef TOLUA_RELEASE
  2127. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetConstraintType'", NULL);
  2128. #endif
  2129. {
  2130. ConstraintType tolua_ret = (ConstraintType) self->GetConstraintType();
  2131. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2132. }
  2133. }
  2134. return 1;
  2135. #ifndef TOLUA_RELEASE
  2136. tolua_lerror:
  2137. tolua_error(tolua_S,"#ferror in function 'GetConstraintType'.",&tolua_err);
  2138. return 0;
  2139. #endif
  2140. }
  2141. #endif //#ifndef TOLUA_DISABLE
  2142. /* method: GetOwnBody of class Constraint */
  2143. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetOwnBody00
  2144. static int tolua_Physics_Constraint_GetOwnBody00(lua_State* tolua_S)
  2145. {
  2146. #ifndef TOLUA_RELEASE
  2147. tolua_Error tolua_err;
  2148. if (
  2149. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2150. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2151. )
  2152. goto tolua_lerror;
  2153. else
  2154. #endif
  2155. {
  2156. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2157. #ifndef TOLUA_RELEASE
  2158. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOwnBody'", NULL);
  2159. #endif
  2160. {
  2161. RigidBody* tolua_ret = (RigidBody*) self->GetOwnBody();
  2162. tolua_pushusertype(tolua_S,(void*)tolua_ret,"RigidBody");
  2163. }
  2164. }
  2165. return 1;
  2166. #ifndef TOLUA_RELEASE
  2167. tolua_lerror:
  2168. tolua_error(tolua_S,"#ferror in function 'GetOwnBody'.",&tolua_err);
  2169. return 0;
  2170. #endif
  2171. }
  2172. #endif //#ifndef TOLUA_DISABLE
  2173. /* method: GetOtherBody of class Constraint */
  2174. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetOtherBody00
  2175. static int tolua_Physics_Constraint_GetOtherBody00(lua_State* tolua_S)
  2176. {
  2177. #ifndef TOLUA_RELEASE
  2178. tolua_Error tolua_err;
  2179. if (
  2180. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2181. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2182. )
  2183. goto tolua_lerror;
  2184. else
  2185. #endif
  2186. {
  2187. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2188. #ifndef TOLUA_RELEASE
  2189. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOtherBody'", NULL);
  2190. #endif
  2191. {
  2192. RigidBody* tolua_ret = (RigidBody*) self->GetOtherBody();
  2193. tolua_pushusertype(tolua_S,(void*)tolua_ret,"RigidBody");
  2194. }
  2195. }
  2196. return 1;
  2197. #ifndef TOLUA_RELEASE
  2198. tolua_lerror:
  2199. tolua_error(tolua_S,"#ferror in function 'GetOtherBody'.",&tolua_err);
  2200. return 0;
  2201. #endif
  2202. }
  2203. #endif //#ifndef TOLUA_DISABLE
  2204. /* method: GetPosition of class Constraint */
  2205. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetPosition00
  2206. static int tolua_Physics_Constraint_GetPosition00(lua_State* tolua_S)
  2207. {
  2208. #ifndef TOLUA_RELEASE
  2209. tolua_Error tolua_err;
  2210. if (
  2211. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2212. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2213. )
  2214. goto tolua_lerror;
  2215. else
  2216. #endif
  2217. {
  2218. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2219. #ifndef TOLUA_RELEASE
  2220. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosition'", NULL);
  2221. #endif
  2222. {
  2223. const Vector3& tolua_ret = (const Vector3&) self->GetPosition();
  2224. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector3");
  2225. }
  2226. }
  2227. return 1;
  2228. #ifndef TOLUA_RELEASE
  2229. tolua_lerror:
  2230. tolua_error(tolua_S,"#ferror in function 'GetPosition'.",&tolua_err);
  2231. return 0;
  2232. #endif
  2233. }
  2234. #endif //#ifndef TOLUA_DISABLE
  2235. /* method: GetRotation of class Constraint */
  2236. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetRotation00
  2237. static int tolua_Physics_Constraint_GetRotation00(lua_State* tolua_S)
  2238. {
  2239. #ifndef TOLUA_RELEASE
  2240. tolua_Error tolua_err;
  2241. if (
  2242. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2243. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2244. )
  2245. goto tolua_lerror;
  2246. else
  2247. #endif
  2248. {
  2249. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2250. #ifndef TOLUA_RELEASE
  2251. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRotation'", NULL);
  2252. #endif
  2253. {
  2254. const Quaternion& tolua_ret = (const Quaternion&) self->GetRotation();
  2255. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Quaternion");
  2256. }
  2257. }
  2258. return 1;
  2259. #ifndef TOLUA_RELEASE
  2260. tolua_lerror:
  2261. tolua_error(tolua_S,"#ferror in function 'GetRotation'.",&tolua_err);
  2262. return 0;
  2263. #endif
  2264. }
  2265. #endif //#ifndef TOLUA_DISABLE
  2266. /* method: GetOtherPosition of class Constraint */
  2267. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetOtherPosition00
  2268. static int tolua_Physics_Constraint_GetOtherPosition00(lua_State* tolua_S)
  2269. {
  2270. #ifndef TOLUA_RELEASE
  2271. tolua_Error tolua_err;
  2272. if (
  2273. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2274. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2275. )
  2276. goto tolua_lerror;
  2277. else
  2278. #endif
  2279. {
  2280. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2281. #ifndef TOLUA_RELEASE
  2282. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOtherPosition'", NULL);
  2283. #endif
  2284. {
  2285. const Vector3& tolua_ret = (const Vector3&) self->GetOtherPosition();
  2286. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector3");
  2287. }
  2288. }
  2289. return 1;
  2290. #ifndef TOLUA_RELEASE
  2291. tolua_lerror:
  2292. tolua_error(tolua_S,"#ferror in function 'GetOtherPosition'.",&tolua_err);
  2293. return 0;
  2294. #endif
  2295. }
  2296. #endif //#ifndef TOLUA_DISABLE
  2297. /* method: GetOtherRotation of class Constraint */
  2298. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetOtherRotation00
  2299. static int tolua_Physics_Constraint_GetOtherRotation00(lua_State* tolua_S)
  2300. {
  2301. #ifndef TOLUA_RELEASE
  2302. tolua_Error tolua_err;
  2303. if (
  2304. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2305. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2306. )
  2307. goto tolua_lerror;
  2308. else
  2309. #endif
  2310. {
  2311. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2312. #ifndef TOLUA_RELEASE
  2313. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetOtherRotation'", NULL);
  2314. #endif
  2315. {
  2316. const Quaternion& tolua_ret = (const Quaternion&) self->GetOtherRotation();
  2317. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Quaternion");
  2318. }
  2319. }
  2320. return 1;
  2321. #ifndef TOLUA_RELEASE
  2322. tolua_lerror:
  2323. tolua_error(tolua_S,"#ferror in function 'GetOtherRotation'.",&tolua_err);
  2324. return 0;
  2325. #endif
  2326. }
  2327. #endif //#ifndef TOLUA_DISABLE
  2328. /* method: GetWorldPosition of class Constraint */
  2329. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetWorldPosition00
  2330. static int tolua_Physics_Constraint_GetWorldPosition00(lua_State* tolua_S)
  2331. {
  2332. #ifndef TOLUA_RELEASE
  2333. tolua_Error tolua_err;
  2334. if (
  2335. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2336. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2337. )
  2338. goto tolua_lerror;
  2339. else
  2340. #endif
  2341. {
  2342. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2343. #ifndef TOLUA_RELEASE
  2344. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorldPosition'", NULL);
  2345. #endif
  2346. {
  2347. Vector3 tolua_ret = (Vector3) self->GetWorldPosition();
  2348. {
  2349. #ifdef __cplusplus
  2350. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  2351. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2352. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2353. #else
  2354. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  2355. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  2356. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2357. #endif
  2358. }
  2359. }
  2360. }
  2361. return 1;
  2362. #ifndef TOLUA_RELEASE
  2363. tolua_lerror:
  2364. tolua_error(tolua_S,"#ferror in function 'GetWorldPosition'.",&tolua_err);
  2365. return 0;
  2366. #endif
  2367. }
  2368. #endif //#ifndef TOLUA_DISABLE
  2369. /* method: GetHighLimit of class Constraint */
  2370. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetHighLimit00
  2371. static int tolua_Physics_Constraint_GetHighLimit00(lua_State* tolua_S)
  2372. {
  2373. #ifndef TOLUA_RELEASE
  2374. tolua_Error tolua_err;
  2375. if (
  2376. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2377. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2378. )
  2379. goto tolua_lerror;
  2380. else
  2381. #endif
  2382. {
  2383. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2384. #ifndef TOLUA_RELEASE
  2385. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetHighLimit'", NULL);
  2386. #endif
  2387. {
  2388. const Vector2& tolua_ret = (const Vector2&) self->GetHighLimit();
  2389. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector2");
  2390. }
  2391. }
  2392. return 1;
  2393. #ifndef TOLUA_RELEASE
  2394. tolua_lerror:
  2395. tolua_error(tolua_S,"#ferror in function 'GetHighLimit'.",&tolua_err);
  2396. return 0;
  2397. #endif
  2398. }
  2399. #endif //#ifndef TOLUA_DISABLE
  2400. /* method: GetLowLimit of class Constraint */
  2401. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetLowLimit00
  2402. static int tolua_Physics_Constraint_GetLowLimit00(lua_State* tolua_S)
  2403. {
  2404. #ifndef TOLUA_RELEASE
  2405. tolua_Error tolua_err;
  2406. if (
  2407. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2408. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2409. )
  2410. goto tolua_lerror;
  2411. else
  2412. #endif
  2413. {
  2414. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2415. #ifndef TOLUA_RELEASE
  2416. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLowLimit'", NULL);
  2417. #endif
  2418. {
  2419. const Vector2& tolua_ret = (const Vector2&) self->GetLowLimit();
  2420. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector2");
  2421. }
  2422. }
  2423. return 1;
  2424. #ifndef TOLUA_RELEASE
  2425. tolua_lerror:
  2426. tolua_error(tolua_S,"#ferror in function 'GetLowLimit'.",&tolua_err);
  2427. return 0;
  2428. #endif
  2429. }
  2430. #endif //#ifndef TOLUA_DISABLE
  2431. /* method: GetERP of class Constraint */
  2432. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetERP00
  2433. static int tolua_Physics_Constraint_GetERP00(lua_State* tolua_S)
  2434. {
  2435. #ifndef TOLUA_RELEASE
  2436. tolua_Error tolua_err;
  2437. if (
  2438. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2439. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2440. )
  2441. goto tolua_lerror;
  2442. else
  2443. #endif
  2444. {
  2445. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2446. #ifndef TOLUA_RELEASE
  2447. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetERP'", NULL);
  2448. #endif
  2449. {
  2450. float tolua_ret = (float) self->GetERP();
  2451. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  2452. }
  2453. }
  2454. return 1;
  2455. #ifndef TOLUA_RELEASE
  2456. tolua_lerror:
  2457. tolua_error(tolua_S,"#ferror in function 'GetERP'.",&tolua_err);
  2458. return 0;
  2459. #endif
  2460. }
  2461. #endif //#ifndef TOLUA_DISABLE
  2462. /* method: GetCFM of class Constraint */
  2463. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetCFM00
  2464. static int tolua_Physics_Constraint_GetCFM00(lua_State* tolua_S)
  2465. {
  2466. #ifndef TOLUA_RELEASE
  2467. tolua_Error tolua_err;
  2468. if (
  2469. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2470. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2471. )
  2472. goto tolua_lerror;
  2473. else
  2474. #endif
  2475. {
  2476. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2477. #ifndef TOLUA_RELEASE
  2478. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCFM'", NULL);
  2479. #endif
  2480. {
  2481. float tolua_ret = (float) self->GetCFM();
  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 'GetCFM'.",&tolua_err);
  2489. return 0;
  2490. #endif
  2491. }
  2492. #endif //#ifndef TOLUA_DISABLE
  2493. /* method: GetDisableCollision of class Constraint */
  2494. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_GetDisableCollision00
  2495. static int tolua_Physics_Constraint_GetDisableCollision00(lua_State* tolua_S)
  2496. {
  2497. #ifndef TOLUA_RELEASE
  2498. tolua_Error tolua_err;
  2499. if (
  2500. !tolua_isusertype(tolua_S,1,"const Constraint",0,&tolua_err) ||
  2501. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2502. )
  2503. goto tolua_lerror;
  2504. else
  2505. #endif
  2506. {
  2507. const Constraint* self = (const Constraint*) tolua_tousertype(tolua_S,1,0);
  2508. #ifndef TOLUA_RELEASE
  2509. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDisableCollision'", NULL);
  2510. #endif
  2511. {
  2512. bool tolua_ret = (bool) self->GetDisableCollision();
  2513. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  2514. }
  2515. }
  2516. return 1;
  2517. #ifndef TOLUA_RELEASE
  2518. tolua_lerror:
  2519. tolua_error(tolua_S,"#ferror in function 'GetDisableCollision'.",&tolua_err);
  2520. return 0;
  2521. #endif
  2522. }
  2523. #endif //#ifndef TOLUA_DISABLE
  2524. /* method: ReleaseConstraint of class Constraint */
  2525. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_ReleaseConstraint00
  2526. static int tolua_Physics_Constraint_ReleaseConstraint00(lua_State* tolua_S)
  2527. {
  2528. #ifndef TOLUA_RELEASE
  2529. tolua_Error tolua_err;
  2530. if (
  2531. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  2532. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2533. )
  2534. goto tolua_lerror;
  2535. else
  2536. #endif
  2537. {
  2538. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  2539. #ifndef TOLUA_RELEASE
  2540. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReleaseConstraint'", NULL);
  2541. #endif
  2542. {
  2543. self->ReleaseConstraint();
  2544. }
  2545. }
  2546. return 0;
  2547. #ifndef TOLUA_RELEASE
  2548. tolua_lerror:
  2549. tolua_error(tolua_S,"#ferror in function 'ReleaseConstraint'.",&tolua_err);
  2550. return 0;
  2551. #endif
  2552. }
  2553. #endif //#ifndef TOLUA_DISABLE
  2554. /* method: ApplyFrames of class Constraint */
  2555. #ifndef TOLUA_DISABLE_tolua_Physics_Constraint_ApplyFrames00
  2556. static int tolua_Physics_Constraint_ApplyFrames00(lua_State* tolua_S)
  2557. {
  2558. #ifndef TOLUA_RELEASE
  2559. tolua_Error tolua_err;
  2560. if (
  2561. !tolua_isusertype(tolua_S,1,"Constraint",0,&tolua_err) ||
  2562. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2563. )
  2564. goto tolua_lerror;
  2565. else
  2566. #endif
  2567. {
  2568. Constraint* self = (Constraint*) tolua_tousertype(tolua_S,1,0);
  2569. #ifndef TOLUA_RELEASE
  2570. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyFrames'", NULL);
  2571. #endif
  2572. {
  2573. self->ApplyFrames();
  2574. }
  2575. }
  2576. return 0;
  2577. #ifndef TOLUA_RELEASE
  2578. tolua_lerror:
  2579. tolua_error(tolua_S,"#ferror in function 'ApplyFrames'.",&tolua_err);
  2580. return 0;
  2581. #endif
  2582. }
  2583. #endif //#ifndef TOLUA_DISABLE
  2584. /* method: new of class PhysicsRaycastResult */
  2585. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsRaycastResult_new00
  2586. static int tolua_Physics_PhysicsRaycastResult_new00(lua_State* tolua_S)
  2587. {
  2588. #ifndef TOLUA_RELEASE
  2589. tolua_Error tolua_err;
  2590. if (
  2591. !tolua_isusertable(tolua_S,1,"PhysicsRaycastResult",0,&tolua_err) ||
  2592. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2593. )
  2594. goto tolua_lerror;
  2595. else
  2596. #endif
  2597. {
  2598. {
  2599. PhysicsRaycastResult* tolua_ret = (PhysicsRaycastResult*) Mtolua_new((PhysicsRaycastResult)());
  2600. tolua_pushusertype(tolua_S,(void*)tolua_ret,"PhysicsRaycastResult");
  2601. }
  2602. }
  2603. return 1;
  2604. #ifndef TOLUA_RELEASE
  2605. tolua_lerror:
  2606. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2607. return 0;
  2608. #endif
  2609. }
  2610. #endif //#ifndef TOLUA_DISABLE
  2611. /* method: new_local of class PhysicsRaycastResult */
  2612. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsRaycastResult_new00_local
  2613. static int tolua_Physics_PhysicsRaycastResult_new00_local(lua_State* tolua_S)
  2614. {
  2615. #ifndef TOLUA_RELEASE
  2616. tolua_Error tolua_err;
  2617. if (
  2618. !tolua_isusertable(tolua_S,1,"PhysicsRaycastResult",0,&tolua_err) ||
  2619. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2620. )
  2621. goto tolua_lerror;
  2622. else
  2623. #endif
  2624. {
  2625. {
  2626. PhysicsRaycastResult* tolua_ret = (PhysicsRaycastResult*) Mtolua_new((PhysicsRaycastResult)());
  2627. tolua_pushusertype(tolua_S,(void*)tolua_ret,"PhysicsRaycastResult");
  2628. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  2629. }
  2630. }
  2631. return 1;
  2632. #ifndef TOLUA_RELEASE
  2633. tolua_lerror:
  2634. tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
  2635. return 0;
  2636. #endif
  2637. }
  2638. #endif //#ifndef TOLUA_DISABLE
  2639. /* get function: position_ of class PhysicsRaycastResult */
  2640. #ifndef TOLUA_DISABLE_tolua_get_PhysicsRaycastResult_position
  2641. static int tolua_get_PhysicsRaycastResult_position(lua_State* tolua_S)
  2642. {
  2643. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2644. #ifndef TOLUA_RELEASE
  2645. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'position_'",NULL);
  2646. #endif
  2647. tolua_pushusertype(tolua_S,(void*)&self->position_,"Vector3");
  2648. return 1;
  2649. }
  2650. #endif //#ifndef TOLUA_DISABLE
  2651. /* set function: position_ of class PhysicsRaycastResult */
  2652. #ifndef TOLUA_DISABLE_tolua_set_PhysicsRaycastResult_position
  2653. static int tolua_set_PhysicsRaycastResult_position(lua_State* tolua_S)
  2654. {
  2655. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2656. #ifndef TOLUA_RELEASE
  2657. tolua_Error tolua_err;
  2658. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'position_'",NULL);
  2659. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  2660. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2661. #endif
  2662. self->position_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  2663. ;
  2664. return 0;
  2665. }
  2666. #endif //#ifndef TOLUA_DISABLE
  2667. /* get function: normal_ of class PhysicsRaycastResult */
  2668. #ifndef TOLUA_DISABLE_tolua_get_PhysicsRaycastResult_normal
  2669. static int tolua_get_PhysicsRaycastResult_normal(lua_State* tolua_S)
  2670. {
  2671. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2672. #ifndef TOLUA_RELEASE
  2673. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal_'",NULL);
  2674. #endif
  2675. tolua_pushusertype(tolua_S,(void*)&self->normal_,"Vector3");
  2676. return 1;
  2677. }
  2678. #endif //#ifndef TOLUA_DISABLE
  2679. /* set function: normal_ of class PhysicsRaycastResult */
  2680. #ifndef TOLUA_DISABLE_tolua_set_PhysicsRaycastResult_normal
  2681. static int tolua_set_PhysicsRaycastResult_normal(lua_State* tolua_S)
  2682. {
  2683. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2684. #ifndef TOLUA_RELEASE
  2685. tolua_Error tolua_err;
  2686. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'normal_'",NULL);
  2687. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  2688. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2689. #endif
  2690. self->normal_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  2691. ;
  2692. return 0;
  2693. }
  2694. #endif //#ifndef TOLUA_DISABLE
  2695. /* get function: distance_ of class PhysicsRaycastResult */
  2696. #ifndef TOLUA_DISABLE_tolua_get_PhysicsRaycastResult_distance
  2697. static int tolua_get_PhysicsRaycastResult_distance(lua_State* tolua_S)
  2698. {
  2699. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2700. #ifndef TOLUA_RELEASE
  2701. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'distance_'",NULL);
  2702. #endif
  2703. tolua_pushnumber(tolua_S,(lua_Number)self->distance_);
  2704. return 1;
  2705. }
  2706. #endif //#ifndef TOLUA_DISABLE
  2707. /* set function: distance_ of class PhysicsRaycastResult */
  2708. #ifndef TOLUA_DISABLE_tolua_set_PhysicsRaycastResult_distance
  2709. static int tolua_set_PhysicsRaycastResult_distance(lua_State* tolua_S)
  2710. {
  2711. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2712. #ifndef TOLUA_RELEASE
  2713. tolua_Error tolua_err;
  2714. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'distance_'",NULL);
  2715. if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
  2716. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2717. #endif
  2718. self->distance_ = ((float) tolua_tonumber(tolua_S,2,0))
  2719. ;
  2720. return 0;
  2721. }
  2722. #endif //#ifndef TOLUA_DISABLE
  2723. /* get function: body_ of class PhysicsRaycastResult */
  2724. #ifndef TOLUA_DISABLE_tolua_get_PhysicsRaycastResult_body_ptr
  2725. static int tolua_get_PhysicsRaycastResult_body_ptr(lua_State* tolua_S)
  2726. {
  2727. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2728. #ifndef TOLUA_RELEASE
  2729. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'body_'",NULL);
  2730. #endif
  2731. tolua_pushusertype(tolua_S,(void*)self->body_,"RigidBody");
  2732. return 1;
  2733. }
  2734. #endif //#ifndef TOLUA_DISABLE
  2735. /* set function: body_ of class PhysicsRaycastResult */
  2736. #ifndef TOLUA_DISABLE_tolua_set_PhysicsRaycastResult_body_ptr
  2737. static int tolua_set_PhysicsRaycastResult_body_ptr(lua_State* tolua_S)
  2738. {
  2739. PhysicsRaycastResult* self = (PhysicsRaycastResult*) tolua_tousertype(tolua_S,1,0);
  2740. #ifndef TOLUA_RELEASE
  2741. tolua_Error tolua_err;
  2742. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'body_'",NULL);
  2743. if (!tolua_isusertype(tolua_S,2,"RigidBody",0,&tolua_err))
  2744. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2745. #endif
  2746. self->body_ = ((RigidBody*) tolua_tousertype(tolua_S,2,0))
  2747. ;
  2748. return 0;
  2749. }
  2750. #endif //#ifndef TOLUA_DISABLE
  2751. /* get function: rigidBody_ of class DelayedWorldTransform */
  2752. #ifndef TOLUA_DISABLE_tolua_get_DelayedWorldTransform_rigidBody_ptr
  2753. static int tolua_get_DelayedWorldTransform_rigidBody_ptr(lua_State* tolua_S)
  2754. {
  2755. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2756. #ifndef TOLUA_RELEASE
  2757. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidBody_'",NULL);
  2758. #endif
  2759. tolua_pushusertype(tolua_S,(void*)self->rigidBody_,"RigidBody");
  2760. return 1;
  2761. }
  2762. #endif //#ifndef TOLUA_DISABLE
  2763. /* set function: rigidBody_ of class DelayedWorldTransform */
  2764. #ifndef TOLUA_DISABLE_tolua_set_DelayedWorldTransform_rigidBody_ptr
  2765. static int tolua_set_DelayedWorldTransform_rigidBody_ptr(lua_State* tolua_S)
  2766. {
  2767. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2768. #ifndef TOLUA_RELEASE
  2769. tolua_Error tolua_err;
  2770. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rigidBody_'",NULL);
  2771. if (!tolua_isusertype(tolua_S,2,"RigidBody",0,&tolua_err))
  2772. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2773. #endif
  2774. self->rigidBody_ = ((RigidBody*) tolua_tousertype(tolua_S,2,0))
  2775. ;
  2776. return 0;
  2777. }
  2778. #endif //#ifndef TOLUA_DISABLE
  2779. /* get function: parentRigidBody_ of class DelayedWorldTransform */
  2780. #ifndef TOLUA_DISABLE_tolua_get_DelayedWorldTransform_parentRigidBody_ptr
  2781. static int tolua_get_DelayedWorldTransform_parentRigidBody_ptr(lua_State* tolua_S)
  2782. {
  2783. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2784. #ifndef TOLUA_RELEASE
  2785. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'parentRigidBody_'",NULL);
  2786. #endif
  2787. tolua_pushusertype(tolua_S,(void*)self->parentRigidBody_,"RigidBody");
  2788. return 1;
  2789. }
  2790. #endif //#ifndef TOLUA_DISABLE
  2791. /* set function: parentRigidBody_ of class DelayedWorldTransform */
  2792. #ifndef TOLUA_DISABLE_tolua_set_DelayedWorldTransform_parentRigidBody_ptr
  2793. static int tolua_set_DelayedWorldTransform_parentRigidBody_ptr(lua_State* tolua_S)
  2794. {
  2795. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2796. #ifndef TOLUA_RELEASE
  2797. tolua_Error tolua_err;
  2798. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'parentRigidBody_'",NULL);
  2799. if (!tolua_isusertype(tolua_S,2,"RigidBody",0,&tolua_err))
  2800. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2801. #endif
  2802. self->parentRigidBody_ = ((RigidBody*) tolua_tousertype(tolua_S,2,0))
  2803. ;
  2804. return 0;
  2805. }
  2806. #endif //#ifndef TOLUA_DISABLE
  2807. /* get function: worldPosition_ of class DelayedWorldTransform */
  2808. #ifndef TOLUA_DISABLE_tolua_get_DelayedWorldTransform_worldPosition
  2809. static int tolua_get_DelayedWorldTransform_worldPosition(lua_State* tolua_S)
  2810. {
  2811. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2812. #ifndef TOLUA_RELEASE
  2813. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'worldPosition_'",NULL);
  2814. #endif
  2815. tolua_pushusertype(tolua_S,(void*)&self->worldPosition_,"Vector3");
  2816. return 1;
  2817. }
  2818. #endif //#ifndef TOLUA_DISABLE
  2819. /* set function: worldPosition_ of class DelayedWorldTransform */
  2820. #ifndef TOLUA_DISABLE_tolua_set_DelayedWorldTransform_worldPosition
  2821. static int tolua_set_DelayedWorldTransform_worldPosition(lua_State* tolua_S)
  2822. {
  2823. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2824. #ifndef TOLUA_RELEASE
  2825. tolua_Error tolua_err;
  2826. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'worldPosition_'",NULL);
  2827. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)))
  2828. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2829. #endif
  2830. self->worldPosition_ = *((Vector3*) tolua_tousertype(tolua_S,2,0))
  2831. ;
  2832. return 0;
  2833. }
  2834. #endif //#ifndef TOLUA_DISABLE
  2835. /* get function: worldRotation_ of class DelayedWorldTransform */
  2836. #ifndef TOLUA_DISABLE_tolua_get_DelayedWorldTransform_worldRotation
  2837. static int tolua_get_DelayedWorldTransform_worldRotation(lua_State* tolua_S)
  2838. {
  2839. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2840. #ifndef TOLUA_RELEASE
  2841. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'worldRotation_'",NULL);
  2842. #endif
  2843. tolua_pushusertype(tolua_S,(void*)&self->worldRotation_,"Quaternion");
  2844. return 1;
  2845. }
  2846. #endif //#ifndef TOLUA_DISABLE
  2847. /* set function: worldRotation_ of class DelayedWorldTransform */
  2848. #ifndef TOLUA_DISABLE_tolua_set_DelayedWorldTransform_worldRotation
  2849. static int tolua_set_DelayedWorldTransform_worldRotation(lua_State* tolua_S)
  2850. {
  2851. DelayedWorldTransform* self = (DelayedWorldTransform*) tolua_tousertype(tolua_S,1,0);
  2852. #ifndef TOLUA_RELEASE
  2853. tolua_Error tolua_err;
  2854. if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'worldRotation_'",NULL);
  2855. if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Quaternion",0,&tolua_err)))
  2856. tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
  2857. #endif
  2858. self->worldRotation_ = *((Quaternion*) tolua_tousertype(tolua_S,2,0))
  2859. ;
  2860. return 0;
  2861. }
  2862. #endif //#ifndef TOLUA_DISABLE
  2863. /* method: Update of class PhysicsWorld */
  2864. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_Update00
  2865. static int tolua_Physics_PhysicsWorld_Update00(lua_State* tolua_S)
  2866. {
  2867. #ifndef TOLUA_RELEASE
  2868. tolua_Error tolua_err;
  2869. if (
  2870. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  2871. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2872. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2873. )
  2874. goto tolua_lerror;
  2875. else
  2876. #endif
  2877. {
  2878. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  2879. float timeStep = ((float) tolua_tonumber(tolua_S,2,0));
  2880. #ifndef TOLUA_RELEASE
  2881. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Update'", NULL);
  2882. #endif
  2883. {
  2884. self->Update(timeStep);
  2885. }
  2886. }
  2887. return 0;
  2888. #ifndef TOLUA_RELEASE
  2889. tolua_lerror:
  2890. tolua_error(tolua_S,"#ferror in function 'Update'.",&tolua_err);
  2891. return 0;
  2892. #endif
  2893. }
  2894. #endif //#ifndef TOLUA_DISABLE
  2895. /* method: UpdateCollisions of class PhysicsWorld */
  2896. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_UpdateCollisions00
  2897. static int tolua_Physics_PhysicsWorld_UpdateCollisions00(lua_State* tolua_S)
  2898. {
  2899. #ifndef TOLUA_RELEASE
  2900. tolua_Error tolua_err;
  2901. if (
  2902. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  2903. !tolua_isnoobj(tolua_S,2,&tolua_err)
  2904. )
  2905. goto tolua_lerror;
  2906. else
  2907. #endif
  2908. {
  2909. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  2910. #ifndef TOLUA_RELEASE
  2911. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdateCollisions'", NULL);
  2912. #endif
  2913. {
  2914. self->UpdateCollisions();
  2915. }
  2916. }
  2917. return 0;
  2918. #ifndef TOLUA_RELEASE
  2919. tolua_lerror:
  2920. tolua_error(tolua_S,"#ferror in function 'UpdateCollisions'.",&tolua_err);
  2921. return 0;
  2922. #endif
  2923. }
  2924. #endif //#ifndef TOLUA_DISABLE
  2925. /* method: SetFps of class PhysicsWorld */
  2926. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetFps00
  2927. static int tolua_Physics_PhysicsWorld_SetFps00(lua_State* tolua_S)
  2928. {
  2929. #ifndef TOLUA_RELEASE
  2930. tolua_Error tolua_err;
  2931. if (
  2932. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  2933. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2934. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2935. )
  2936. goto tolua_lerror;
  2937. else
  2938. #endif
  2939. {
  2940. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  2941. int fps = ((int) tolua_tonumber(tolua_S,2,0));
  2942. #ifndef TOLUA_RELEASE
  2943. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFps'", NULL);
  2944. #endif
  2945. {
  2946. self->SetFps(fps);
  2947. }
  2948. }
  2949. return 0;
  2950. #ifndef TOLUA_RELEASE
  2951. tolua_lerror:
  2952. tolua_error(tolua_S,"#ferror in function 'SetFps'.",&tolua_err);
  2953. return 0;
  2954. #endif
  2955. }
  2956. #endif //#ifndef TOLUA_DISABLE
  2957. /* method: SetGravity of class PhysicsWorld */
  2958. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetGravity00
  2959. static int tolua_Physics_PhysicsWorld_SetGravity00(lua_State* tolua_S)
  2960. {
  2961. #ifndef TOLUA_RELEASE
  2962. tolua_Error tolua_err;
  2963. if (
  2964. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  2965. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  2966. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2967. )
  2968. goto tolua_lerror;
  2969. else
  2970. #endif
  2971. {
  2972. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  2973. Vector3 gravity = *((Vector3*) tolua_tousertype(tolua_S,2,0));
  2974. #ifndef TOLUA_RELEASE
  2975. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGravity'", NULL);
  2976. #endif
  2977. {
  2978. self->SetGravity(gravity);
  2979. }
  2980. }
  2981. return 0;
  2982. #ifndef TOLUA_RELEASE
  2983. tolua_lerror:
  2984. tolua_error(tolua_S,"#ferror in function 'SetGravity'.",&tolua_err);
  2985. return 0;
  2986. #endif
  2987. }
  2988. #endif //#ifndef TOLUA_DISABLE
  2989. /* method: SetNumIterations of class PhysicsWorld */
  2990. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetNumIterations00
  2991. static int tolua_Physics_PhysicsWorld_SetNumIterations00(lua_State* tolua_S)
  2992. {
  2993. #ifndef TOLUA_RELEASE
  2994. tolua_Error tolua_err;
  2995. if (
  2996. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  2997. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  2998. !tolua_isnoobj(tolua_S,3,&tolua_err)
  2999. )
  3000. goto tolua_lerror;
  3001. else
  3002. #endif
  3003. {
  3004. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3005. int num = ((int) tolua_tonumber(tolua_S,2,0));
  3006. #ifndef TOLUA_RELEASE
  3007. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetNumIterations'", NULL);
  3008. #endif
  3009. {
  3010. self->SetNumIterations(num);
  3011. }
  3012. }
  3013. return 0;
  3014. #ifndef TOLUA_RELEASE
  3015. tolua_lerror:
  3016. tolua_error(tolua_S,"#ferror in function 'SetNumIterations'.",&tolua_err);
  3017. return 0;
  3018. #endif
  3019. }
  3020. #endif //#ifndef TOLUA_DISABLE
  3021. /* method: SetInterpolation of class PhysicsWorld */
  3022. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetInterpolation00
  3023. static int tolua_Physics_PhysicsWorld_SetInterpolation00(lua_State* tolua_S)
  3024. {
  3025. #ifndef TOLUA_RELEASE
  3026. tolua_Error tolua_err;
  3027. if (
  3028. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3029. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  3030. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3031. )
  3032. goto tolua_lerror;
  3033. else
  3034. #endif
  3035. {
  3036. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3037. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  3038. #ifndef TOLUA_RELEASE
  3039. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetInterpolation'", NULL);
  3040. #endif
  3041. {
  3042. self->SetInterpolation(enable);
  3043. }
  3044. }
  3045. return 0;
  3046. #ifndef TOLUA_RELEASE
  3047. tolua_lerror:
  3048. tolua_error(tolua_S,"#ferror in function 'SetInterpolation'.",&tolua_err);
  3049. return 0;
  3050. #endif
  3051. }
  3052. #endif //#ifndef TOLUA_DISABLE
  3053. /* method: SetInternalEdge of class PhysicsWorld */
  3054. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetInternalEdge00
  3055. static int tolua_Physics_PhysicsWorld_SetInternalEdge00(lua_State* tolua_S)
  3056. {
  3057. #ifndef TOLUA_RELEASE
  3058. tolua_Error tolua_err;
  3059. if (
  3060. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3061. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  3062. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3063. )
  3064. goto tolua_lerror;
  3065. else
  3066. #endif
  3067. {
  3068. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3069. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  3070. #ifndef TOLUA_RELEASE
  3071. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetInternalEdge'", NULL);
  3072. #endif
  3073. {
  3074. self->SetInternalEdge(enable);
  3075. }
  3076. }
  3077. return 0;
  3078. #ifndef TOLUA_RELEASE
  3079. tolua_lerror:
  3080. tolua_error(tolua_S,"#ferror in function 'SetInternalEdge'.",&tolua_err);
  3081. return 0;
  3082. #endif
  3083. }
  3084. #endif //#ifndef TOLUA_DISABLE
  3085. /* method: SetSplitImpulse of class PhysicsWorld */
  3086. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetSplitImpulse00
  3087. static int tolua_Physics_PhysicsWorld_SetSplitImpulse00(lua_State* tolua_S)
  3088. {
  3089. #ifndef TOLUA_RELEASE
  3090. tolua_Error tolua_err;
  3091. if (
  3092. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3093. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  3094. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3095. )
  3096. goto tolua_lerror;
  3097. else
  3098. #endif
  3099. {
  3100. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3101. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  3102. #ifndef TOLUA_RELEASE
  3103. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSplitImpulse'", NULL);
  3104. #endif
  3105. {
  3106. self->SetSplitImpulse(enable);
  3107. }
  3108. }
  3109. return 0;
  3110. #ifndef TOLUA_RELEASE
  3111. tolua_lerror:
  3112. tolua_error(tolua_S,"#ferror in function 'SetSplitImpulse'.",&tolua_err);
  3113. return 0;
  3114. #endif
  3115. }
  3116. #endif //#ifndef TOLUA_DISABLE
  3117. /* method: SetMaxNetworkAngularVelocity of class PhysicsWorld */
  3118. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetMaxNetworkAngularVelocity00
  3119. static int tolua_Physics_PhysicsWorld_SetMaxNetworkAngularVelocity00(lua_State* tolua_S)
  3120. {
  3121. #ifndef TOLUA_RELEASE
  3122. tolua_Error tolua_err;
  3123. if (
  3124. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3125. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3126. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3127. )
  3128. goto tolua_lerror;
  3129. else
  3130. #endif
  3131. {
  3132. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3133. float velocity = ((float) tolua_tonumber(tolua_S,2,0));
  3134. #ifndef TOLUA_RELEASE
  3135. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMaxNetworkAngularVelocity'", NULL);
  3136. #endif
  3137. {
  3138. self->SetMaxNetworkAngularVelocity(velocity);
  3139. }
  3140. }
  3141. return 0;
  3142. #ifndef TOLUA_RELEASE
  3143. tolua_lerror:
  3144. tolua_error(tolua_S,"#ferror in function 'SetMaxNetworkAngularVelocity'.",&tolua_err);
  3145. return 0;
  3146. #endif
  3147. }
  3148. #endif //#ifndef TOLUA_DISABLE
  3149. /* method: RaycastSingle of class PhysicsWorld */
  3150. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_RaycastSingle00
  3151. static int tolua_Physics_PhysicsWorld_RaycastSingle00(lua_State* tolua_S)
  3152. {
  3153. #ifndef TOLUA_RELEASE
  3154. tolua_Error tolua_err;
  3155. if (
  3156. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3157. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"PhysicsRaycastResult",0,&tolua_err)) ||
  3158. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Ray",0,&tolua_err)) ||
  3159. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  3160. !tolua_isnumber(tolua_S,5,1,&tolua_err) ||
  3161. !tolua_isnoobj(tolua_S,6,&tolua_err)
  3162. )
  3163. goto tolua_lerror;
  3164. else
  3165. #endif
  3166. {
  3167. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3168. PhysicsRaycastResult* result = ((PhysicsRaycastResult*) tolua_tousertype(tolua_S,2,0));
  3169. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,3,0));
  3170. float maxDistance = ((float) tolua_tonumber(tolua_S,4,0));
  3171. unsigned collisionMask = ((unsigned) tolua_tonumber(tolua_S,5,M_MAX_UNSIGNED));
  3172. #ifndef TOLUA_RELEASE
  3173. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RaycastSingle'", NULL);
  3174. #endif
  3175. {
  3176. self->RaycastSingle(*result,*ray,maxDistance,collisionMask);
  3177. }
  3178. }
  3179. return 0;
  3180. #ifndef TOLUA_RELEASE
  3181. tolua_lerror:
  3182. tolua_error(tolua_S,"#ferror in function 'RaycastSingle'.",&tolua_err);
  3183. return 0;
  3184. #endif
  3185. }
  3186. #endif //#ifndef TOLUA_DISABLE
  3187. /* method: SphereCast of class PhysicsWorld */
  3188. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SphereCast00
  3189. static int tolua_Physics_PhysicsWorld_SphereCast00(lua_State* tolua_S)
  3190. {
  3191. #ifndef TOLUA_RELEASE
  3192. tolua_Error tolua_err;
  3193. if (
  3194. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3195. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"PhysicsRaycastResult",0,&tolua_err)) ||
  3196. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Ray",0,&tolua_err)) ||
  3197. !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
  3198. !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
  3199. !tolua_isnumber(tolua_S,6,1,&tolua_err) ||
  3200. !tolua_isnoobj(tolua_S,7,&tolua_err)
  3201. )
  3202. goto tolua_lerror;
  3203. else
  3204. #endif
  3205. {
  3206. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3207. PhysicsRaycastResult* result = ((PhysicsRaycastResult*) tolua_tousertype(tolua_S,2,0));
  3208. const Ray* ray = ((const Ray*) tolua_tousertype(tolua_S,3,0));
  3209. float radius = ((float) tolua_tonumber(tolua_S,4,0));
  3210. float maxDistance = ((float) tolua_tonumber(tolua_S,5,0));
  3211. unsigned collisionMask = ((unsigned) tolua_tonumber(tolua_S,6,M_MAX_UNSIGNED));
  3212. #ifndef TOLUA_RELEASE
  3213. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SphereCast'", NULL);
  3214. #endif
  3215. {
  3216. self->SphereCast(*result,*ray,radius,maxDistance,collisionMask);
  3217. }
  3218. }
  3219. return 0;
  3220. #ifndef TOLUA_RELEASE
  3221. tolua_lerror:
  3222. tolua_error(tolua_S,"#ferror in function 'SphereCast'.",&tolua_err);
  3223. return 0;
  3224. #endif
  3225. }
  3226. #endif //#ifndef TOLUA_DISABLE
  3227. /* method: GetGravity of class PhysicsWorld */
  3228. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetGravity00
  3229. static int tolua_Physics_PhysicsWorld_GetGravity00(lua_State* tolua_S)
  3230. {
  3231. #ifndef TOLUA_RELEASE
  3232. tolua_Error tolua_err;
  3233. if (
  3234. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3235. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3236. )
  3237. goto tolua_lerror;
  3238. else
  3239. #endif
  3240. {
  3241. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3242. #ifndef TOLUA_RELEASE
  3243. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGravity'", NULL);
  3244. #endif
  3245. {
  3246. Vector3 tolua_ret = (Vector3) self->GetGravity();
  3247. {
  3248. #ifdef __cplusplus
  3249. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  3250. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  3251. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3252. #else
  3253. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  3254. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  3255. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  3256. #endif
  3257. }
  3258. }
  3259. }
  3260. return 1;
  3261. #ifndef TOLUA_RELEASE
  3262. tolua_lerror:
  3263. tolua_error(tolua_S,"#ferror in function 'GetGravity'.",&tolua_err);
  3264. return 0;
  3265. #endif
  3266. }
  3267. #endif //#ifndef TOLUA_DISABLE
  3268. /* method: GetNumIterations of class PhysicsWorld */
  3269. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetNumIterations00
  3270. static int tolua_Physics_PhysicsWorld_GetNumIterations00(lua_State* tolua_S)
  3271. {
  3272. #ifndef TOLUA_RELEASE
  3273. tolua_Error tolua_err;
  3274. if (
  3275. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3276. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3277. )
  3278. goto tolua_lerror;
  3279. else
  3280. #endif
  3281. {
  3282. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3283. #ifndef TOLUA_RELEASE
  3284. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNumIterations'", NULL);
  3285. #endif
  3286. {
  3287. int tolua_ret = (int) self->GetNumIterations();
  3288. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3289. }
  3290. }
  3291. return 1;
  3292. #ifndef TOLUA_RELEASE
  3293. tolua_lerror:
  3294. tolua_error(tolua_S,"#ferror in function 'GetNumIterations'.",&tolua_err);
  3295. return 0;
  3296. #endif
  3297. }
  3298. #endif //#ifndef TOLUA_DISABLE
  3299. /* method: GetInterpolation of class PhysicsWorld */
  3300. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetInterpolation00
  3301. static int tolua_Physics_PhysicsWorld_GetInterpolation00(lua_State* tolua_S)
  3302. {
  3303. #ifndef TOLUA_RELEASE
  3304. tolua_Error tolua_err;
  3305. if (
  3306. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3307. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3308. )
  3309. goto tolua_lerror;
  3310. else
  3311. #endif
  3312. {
  3313. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3314. #ifndef TOLUA_RELEASE
  3315. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInterpolation'", NULL);
  3316. #endif
  3317. {
  3318. bool tolua_ret = (bool) self->GetInterpolation();
  3319. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3320. }
  3321. }
  3322. return 1;
  3323. #ifndef TOLUA_RELEASE
  3324. tolua_lerror:
  3325. tolua_error(tolua_S,"#ferror in function 'GetInterpolation'.",&tolua_err);
  3326. return 0;
  3327. #endif
  3328. }
  3329. #endif //#ifndef TOLUA_DISABLE
  3330. /* method: GetInternalEdge of class PhysicsWorld */
  3331. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetInternalEdge00
  3332. static int tolua_Physics_PhysicsWorld_GetInternalEdge00(lua_State* tolua_S)
  3333. {
  3334. #ifndef TOLUA_RELEASE
  3335. tolua_Error tolua_err;
  3336. if (
  3337. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3338. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3339. )
  3340. goto tolua_lerror;
  3341. else
  3342. #endif
  3343. {
  3344. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3345. #ifndef TOLUA_RELEASE
  3346. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInternalEdge'", NULL);
  3347. #endif
  3348. {
  3349. bool tolua_ret = (bool) self->GetInternalEdge();
  3350. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3351. }
  3352. }
  3353. return 1;
  3354. #ifndef TOLUA_RELEASE
  3355. tolua_lerror:
  3356. tolua_error(tolua_S,"#ferror in function 'GetInternalEdge'.",&tolua_err);
  3357. return 0;
  3358. #endif
  3359. }
  3360. #endif //#ifndef TOLUA_DISABLE
  3361. /* method: GetSplitImpulse of class PhysicsWorld */
  3362. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetSplitImpulse00
  3363. static int tolua_Physics_PhysicsWorld_GetSplitImpulse00(lua_State* tolua_S)
  3364. {
  3365. #ifndef TOLUA_RELEASE
  3366. tolua_Error tolua_err;
  3367. if (
  3368. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3369. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3370. )
  3371. goto tolua_lerror;
  3372. else
  3373. #endif
  3374. {
  3375. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3376. #ifndef TOLUA_RELEASE
  3377. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSplitImpulse'", NULL);
  3378. #endif
  3379. {
  3380. bool tolua_ret = (bool) self->GetSplitImpulse();
  3381. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3382. }
  3383. }
  3384. return 1;
  3385. #ifndef TOLUA_RELEASE
  3386. tolua_lerror:
  3387. tolua_error(tolua_S,"#ferror in function 'GetSplitImpulse'.",&tolua_err);
  3388. return 0;
  3389. #endif
  3390. }
  3391. #endif //#ifndef TOLUA_DISABLE
  3392. /* method: GetFps of class PhysicsWorld */
  3393. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetFps00
  3394. static int tolua_Physics_PhysicsWorld_GetFps00(lua_State* tolua_S)
  3395. {
  3396. #ifndef TOLUA_RELEASE
  3397. tolua_Error tolua_err;
  3398. if (
  3399. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3400. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3401. )
  3402. goto tolua_lerror;
  3403. else
  3404. #endif
  3405. {
  3406. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3407. #ifndef TOLUA_RELEASE
  3408. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFps'", NULL);
  3409. #endif
  3410. {
  3411. int tolua_ret = (int) self->GetFps();
  3412. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3413. }
  3414. }
  3415. return 1;
  3416. #ifndef TOLUA_RELEASE
  3417. tolua_lerror:
  3418. tolua_error(tolua_S,"#ferror in function 'GetFps'.",&tolua_err);
  3419. return 0;
  3420. #endif
  3421. }
  3422. #endif //#ifndef TOLUA_DISABLE
  3423. /* method: GetMaxNetworkAngularVelocity of class PhysicsWorld */
  3424. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_GetMaxNetworkAngularVelocity00
  3425. static int tolua_Physics_PhysicsWorld_GetMaxNetworkAngularVelocity00(lua_State* tolua_S)
  3426. {
  3427. #ifndef TOLUA_RELEASE
  3428. tolua_Error tolua_err;
  3429. if (
  3430. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3431. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3432. )
  3433. goto tolua_lerror;
  3434. else
  3435. #endif
  3436. {
  3437. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3438. #ifndef TOLUA_RELEASE
  3439. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMaxNetworkAngularVelocity'", NULL);
  3440. #endif
  3441. {
  3442. float tolua_ret = (float) self->GetMaxNetworkAngularVelocity();
  3443. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  3444. }
  3445. }
  3446. return 1;
  3447. #ifndef TOLUA_RELEASE
  3448. tolua_lerror:
  3449. tolua_error(tolua_S,"#ferror in function 'GetMaxNetworkAngularVelocity'.",&tolua_err);
  3450. return 0;
  3451. #endif
  3452. }
  3453. #endif //#ifndef TOLUA_DISABLE
  3454. /* method: AddRigidBody of class PhysicsWorld */
  3455. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_AddRigidBody00
  3456. static int tolua_Physics_PhysicsWorld_AddRigidBody00(lua_State* tolua_S)
  3457. {
  3458. #ifndef TOLUA_RELEASE
  3459. tolua_Error tolua_err;
  3460. if (
  3461. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3462. !tolua_isusertype(tolua_S,2,"RigidBody",0,&tolua_err) ||
  3463. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3464. )
  3465. goto tolua_lerror;
  3466. else
  3467. #endif
  3468. {
  3469. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3470. RigidBody* body = ((RigidBody*) tolua_tousertype(tolua_S,2,0));
  3471. #ifndef TOLUA_RELEASE
  3472. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddRigidBody'", NULL);
  3473. #endif
  3474. {
  3475. self->AddRigidBody(body);
  3476. }
  3477. }
  3478. return 0;
  3479. #ifndef TOLUA_RELEASE
  3480. tolua_lerror:
  3481. tolua_error(tolua_S,"#ferror in function 'AddRigidBody'.",&tolua_err);
  3482. return 0;
  3483. #endif
  3484. }
  3485. #endif //#ifndef TOLUA_DISABLE
  3486. /* method: RemoveRigidBody of class PhysicsWorld */
  3487. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_RemoveRigidBody00
  3488. static int tolua_Physics_PhysicsWorld_RemoveRigidBody00(lua_State* tolua_S)
  3489. {
  3490. #ifndef TOLUA_RELEASE
  3491. tolua_Error tolua_err;
  3492. if (
  3493. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3494. !tolua_isusertype(tolua_S,2,"RigidBody",0,&tolua_err) ||
  3495. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3496. )
  3497. goto tolua_lerror;
  3498. else
  3499. #endif
  3500. {
  3501. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3502. RigidBody* body = ((RigidBody*) tolua_tousertype(tolua_S,2,0));
  3503. #ifndef TOLUA_RELEASE
  3504. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveRigidBody'", NULL);
  3505. #endif
  3506. {
  3507. self->RemoveRigidBody(body);
  3508. }
  3509. }
  3510. return 0;
  3511. #ifndef TOLUA_RELEASE
  3512. tolua_lerror:
  3513. tolua_error(tolua_S,"#ferror in function 'RemoveRigidBody'.",&tolua_err);
  3514. return 0;
  3515. #endif
  3516. }
  3517. #endif //#ifndef TOLUA_DISABLE
  3518. /* method: AddCollisionShape of class PhysicsWorld */
  3519. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_AddCollisionShape00
  3520. static int tolua_Physics_PhysicsWorld_AddCollisionShape00(lua_State* tolua_S)
  3521. {
  3522. #ifndef TOLUA_RELEASE
  3523. tolua_Error tolua_err;
  3524. if (
  3525. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3526. !tolua_isusertype(tolua_S,2,"CollisionShape",0,&tolua_err) ||
  3527. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3528. )
  3529. goto tolua_lerror;
  3530. else
  3531. #endif
  3532. {
  3533. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3534. CollisionShape* shape = ((CollisionShape*) tolua_tousertype(tolua_S,2,0));
  3535. #ifndef TOLUA_RELEASE
  3536. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddCollisionShape'", NULL);
  3537. #endif
  3538. {
  3539. self->AddCollisionShape(shape);
  3540. }
  3541. }
  3542. return 0;
  3543. #ifndef TOLUA_RELEASE
  3544. tolua_lerror:
  3545. tolua_error(tolua_S,"#ferror in function 'AddCollisionShape'.",&tolua_err);
  3546. return 0;
  3547. #endif
  3548. }
  3549. #endif //#ifndef TOLUA_DISABLE
  3550. /* method: RemoveCollisionShape of class PhysicsWorld */
  3551. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_RemoveCollisionShape00
  3552. static int tolua_Physics_PhysicsWorld_RemoveCollisionShape00(lua_State* tolua_S)
  3553. {
  3554. #ifndef TOLUA_RELEASE
  3555. tolua_Error tolua_err;
  3556. if (
  3557. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3558. !tolua_isusertype(tolua_S,2,"CollisionShape",0,&tolua_err) ||
  3559. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3560. )
  3561. goto tolua_lerror;
  3562. else
  3563. #endif
  3564. {
  3565. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3566. CollisionShape* shape = ((CollisionShape*) tolua_tousertype(tolua_S,2,0));
  3567. #ifndef TOLUA_RELEASE
  3568. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveCollisionShape'", NULL);
  3569. #endif
  3570. {
  3571. self->RemoveCollisionShape(shape);
  3572. }
  3573. }
  3574. return 0;
  3575. #ifndef TOLUA_RELEASE
  3576. tolua_lerror:
  3577. tolua_error(tolua_S,"#ferror in function 'RemoveCollisionShape'.",&tolua_err);
  3578. return 0;
  3579. #endif
  3580. }
  3581. #endif //#ifndef TOLUA_DISABLE
  3582. /* method: AddConstraint of class PhysicsWorld */
  3583. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_AddConstraint00
  3584. static int tolua_Physics_PhysicsWorld_AddConstraint00(lua_State* tolua_S)
  3585. {
  3586. #ifndef TOLUA_RELEASE
  3587. tolua_Error tolua_err;
  3588. if (
  3589. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3590. !tolua_isusertype(tolua_S,2,"Constraint",0,&tolua_err) ||
  3591. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3592. )
  3593. goto tolua_lerror;
  3594. else
  3595. #endif
  3596. {
  3597. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3598. Constraint* joint = ((Constraint*) tolua_tousertype(tolua_S,2,0));
  3599. #ifndef TOLUA_RELEASE
  3600. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddConstraint'", NULL);
  3601. #endif
  3602. {
  3603. self->AddConstraint(joint);
  3604. }
  3605. }
  3606. return 0;
  3607. #ifndef TOLUA_RELEASE
  3608. tolua_lerror:
  3609. tolua_error(tolua_S,"#ferror in function 'AddConstraint'.",&tolua_err);
  3610. return 0;
  3611. #endif
  3612. }
  3613. #endif //#ifndef TOLUA_DISABLE
  3614. /* method: RemoveConstraint of class PhysicsWorld */
  3615. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_RemoveConstraint00
  3616. static int tolua_Physics_PhysicsWorld_RemoveConstraint00(lua_State* tolua_S)
  3617. {
  3618. #ifndef TOLUA_RELEASE
  3619. tolua_Error tolua_err;
  3620. if (
  3621. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3622. !tolua_isusertype(tolua_S,2,"Constraint",0,&tolua_err) ||
  3623. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3624. )
  3625. goto tolua_lerror;
  3626. else
  3627. #endif
  3628. {
  3629. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3630. Constraint* joint = ((Constraint*) tolua_tousertype(tolua_S,2,0));
  3631. #ifndef TOLUA_RELEASE
  3632. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveConstraint'", NULL);
  3633. #endif
  3634. {
  3635. self->RemoveConstraint(joint);
  3636. }
  3637. }
  3638. return 0;
  3639. #ifndef TOLUA_RELEASE
  3640. tolua_lerror:
  3641. tolua_error(tolua_S,"#ferror in function 'RemoveConstraint'.",&tolua_err);
  3642. return 0;
  3643. #endif
  3644. }
  3645. #endif //#ifndef TOLUA_DISABLE
  3646. /* method: AddDelayedWorldTransform of class PhysicsWorld */
  3647. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_AddDelayedWorldTransform00
  3648. static int tolua_Physics_PhysicsWorld_AddDelayedWorldTransform00(lua_State* tolua_S)
  3649. {
  3650. #ifndef TOLUA_RELEASE
  3651. tolua_Error tolua_err;
  3652. if (
  3653. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3654. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const DelayedWorldTransform",0,&tolua_err)) ||
  3655. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3656. )
  3657. goto tolua_lerror;
  3658. else
  3659. #endif
  3660. {
  3661. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3662. const DelayedWorldTransform* transform = ((const DelayedWorldTransform*) tolua_tousertype(tolua_S,2,0));
  3663. #ifndef TOLUA_RELEASE
  3664. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddDelayedWorldTransform'", NULL);
  3665. #endif
  3666. {
  3667. self->AddDelayedWorldTransform(*transform);
  3668. }
  3669. }
  3670. return 0;
  3671. #ifndef TOLUA_RELEASE
  3672. tolua_lerror:
  3673. tolua_error(tolua_S,"#ferror in function 'AddDelayedWorldTransform'.",&tolua_err);
  3674. return 0;
  3675. #endif
  3676. }
  3677. #endif //#ifndef TOLUA_DISABLE
  3678. /* method: DrawDebugGeometry of class PhysicsWorld */
  3679. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_DrawDebugGeometry00
  3680. static int tolua_Physics_PhysicsWorld_DrawDebugGeometry00(lua_State* tolua_S)
  3681. {
  3682. #ifndef TOLUA_RELEASE
  3683. tolua_Error tolua_err;
  3684. if (
  3685. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3686. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  3687. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3688. )
  3689. goto tolua_lerror;
  3690. else
  3691. #endif
  3692. {
  3693. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3694. bool depthTest = ((bool) tolua_toboolean(tolua_S,2,0));
  3695. #ifndef TOLUA_RELEASE
  3696. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DrawDebugGeometry'", NULL);
  3697. #endif
  3698. {
  3699. self->DrawDebugGeometry(depthTest);
  3700. }
  3701. }
  3702. return 0;
  3703. #ifndef TOLUA_RELEASE
  3704. tolua_lerror:
  3705. tolua_error(tolua_S,"#ferror in function 'DrawDebugGeometry'.",&tolua_err);
  3706. return 0;
  3707. #endif
  3708. }
  3709. #endif //#ifndef TOLUA_DISABLE
  3710. /* method: SetDebugRenderer of class PhysicsWorld */
  3711. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetDebugRenderer00
  3712. static int tolua_Physics_PhysicsWorld_SetDebugRenderer00(lua_State* tolua_S)
  3713. {
  3714. #ifndef TOLUA_RELEASE
  3715. tolua_Error tolua_err;
  3716. if (
  3717. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3718. !tolua_isusertype(tolua_S,2,"DebugRenderer",0,&tolua_err) ||
  3719. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3720. )
  3721. goto tolua_lerror;
  3722. else
  3723. #endif
  3724. {
  3725. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3726. DebugRenderer* debug = ((DebugRenderer*) tolua_tousertype(tolua_S,2,0));
  3727. #ifndef TOLUA_RELEASE
  3728. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDebugRenderer'", NULL);
  3729. #endif
  3730. {
  3731. self->SetDebugRenderer(debug);
  3732. }
  3733. }
  3734. return 0;
  3735. #ifndef TOLUA_RELEASE
  3736. tolua_lerror:
  3737. tolua_error(tolua_S,"#ferror in function 'SetDebugRenderer'.",&tolua_err);
  3738. return 0;
  3739. #endif
  3740. }
  3741. #endif //#ifndef TOLUA_DISABLE
  3742. /* method: SetDebugDepthTest of class PhysicsWorld */
  3743. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetDebugDepthTest00
  3744. static int tolua_Physics_PhysicsWorld_SetDebugDepthTest00(lua_State* tolua_S)
  3745. {
  3746. #ifndef TOLUA_RELEASE
  3747. tolua_Error tolua_err;
  3748. if (
  3749. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3750. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  3751. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3752. )
  3753. goto tolua_lerror;
  3754. else
  3755. #endif
  3756. {
  3757. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3758. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  3759. #ifndef TOLUA_RELEASE
  3760. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDebugDepthTest'", NULL);
  3761. #endif
  3762. {
  3763. self->SetDebugDepthTest(enable);
  3764. }
  3765. }
  3766. return 0;
  3767. #ifndef TOLUA_RELEASE
  3768. tolua_lerror:
  3769. tolua_error(tolua_S,"#ferror in function 'SetDebugDepthTest'.",&tolua_err);
  3770. return 0;
  3771. #endif
  3772. }
  3773. #endif //#ifndef TOLUA_DISABLE
  3774. /* method: CleanupGeometryCache of class PhysicsWorld */
  3775. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_CleanupGeometryCache00
  3776. static int tolua_Physics_PhysicsWorld_CleanupGeometryCache00(lua_State* tolua_S)
  3777. {
  3778. #ifndef TOLUA_RELEASE
  3779. tolua_Error tolua_err;
  3780. if (
  3781. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3782. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3783. )
  3784. goto tolua_lerror;
  3785. else
  3786. #endif
  3787. {
  3788. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3789. #ifndef TOLUA_RELEASE
  3790. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CleanupGeometryCache'", NULL);
  3791. #endif
  3792. {
  3793. self->CleanupGeometryCache();
  3794. }
  3795. }
  3796. return 0;
  3797. #ifndef TOLUA_RELEASE
  3798. tolua_lerror:
  3799. tolua_error(tolua_S,"#ferror in function 'CleanupGeometryCache'.",&tolua_err);
  3800. return 0;
  3801. #endif
  3802. }
  3803. #endif //#ifndef TOLUA_DISABLE
  3804. /* method: SetApplyingTransforms of class PhysicsWorld */
  3805. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_SetApplyingTransforms00
  3806. static int tolua_Physics_PhysicsWorld_SetApplyingTransforms00(lua_State* tolua_S)
  3807. {
  3808. #ifndef TOLUA_RELEASE
  3809. tolua_Error tolua_err;
  3810. if (
  3811. !tolua_isusertype(tolua_S,1,"PhysicsWorld",0,&tolua_err) ||
  3812. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  3813. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3814. )
  3815. goto tolua_lerror;
  3816. else
  3817. #endif
  3818. {
  3819. PhysicsWorld* self = (PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3820. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  3821. #ifndef TOLUA_RELEASE
  3822. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetApplyingTransforms'", NULL);
  3823. #endif
  3824. {
  3825. self->SetApplyingTransforms(enable);
  3826. }
  3827. }
  3828. return 0;
  3829. #ifndef TOLUA_RELEASE
  3830. tolua_lerror:
  3831. tolua_error(tolua_S,"#ferror in function 'SetApplyingTransforms'.",&tolua_err);
  3832. return 0;
  3833. #endif
  3834. }
  3835. #endif //#ifndef TOLUA_DISABLE
  3836. /* method: IsApplyingTransforms of class PhysicsWorld */
  3837. #ifndef TOLUA_DISABLE_tolua_Physics_PhysicsWorld_IsApplyingTransforms00
  3838. static int tolua_Physics_PhysicsWorld_IsApplyingTransforms00(lua_State* tolua_S)
  3839. {
  3840. #ifndef TOLUA_RELEASE
  3841. tolua_Error tolua_err;
  3842. if (
  3843. !tolua_isusertype(tolua_S,1,"const PhysicsWorld",0,&tolua_err) ||
  3844. !tolua_isnoobj(tolua_S,2,&tolua_err)
  3845. )
  3846. goto tolua_lerror;
  3847. else
  3848. #endif
  3849. {
  3850. const PhysicsWorld* self = (const PhysicsWorld*) tolua_tousertype(tolua_S,1,0);
  3851. #ifndef TOLUA_RELEASE
  3852. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsApplyingTransforms'", NULL);
  3853. #endif
  3854. {
  3855. bool tolua_ret = (bool) self->IsApplyingTransforms();
  3856. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  3857. }
  3858. }
  3859. return 1;
  3860. #ifndef TOLUA_RELEASE
  3861. tolua_lerror:
  3862. tolua_error(tolua_S,"#ferror in function 'IsApplyingTransforms'.",&tolua_err);
  3863. return 0;
  3864. #endif
  3865. }
  3866. #endif //#ifndef TOLUA_DISABLE
  3867. /* function: GetPhysicsWorld */
  3868. #ifndef TOLUA_DISABLE_tolua_Physics_GetPhysicsWorld00
  3869. static int tolua_Physics_GetPhysicsWorld00(lua_State* tolua_S)
  3870. {
  3871. #ifndef TOLUA_RELEASE
  3872. tolua_Error tolua_err;
  3873. if (
  3874. !tolua_isnoobj(tolua_S,1,&tolua_err)
  3875. )
  3876. goto tolua_lerror;
  3877. else
  3878. #endif
  3879. {
  3880. {
  3881. PhysicsWorld* tolua_ret = (PhysicsWorld*) GetPhysicsWorld();
  3882. tolua_pushusertype(tolua_S,(void*)tolua_ret,"PhysicsWorld");
  3883. }
  3884. }
  3885. return 1;
  3886. #ifndef TOLUA_RELEASE
  3887. tolua_lerror:
  3888. tolua_error(tolua_S,"#ferror in function 'GetPhysicsWorld'.",&tolua_err);
  3889. return 0;
  3890. #endif
  3891. }
  3892. #endif //#ifndef TOLUA_DISABLE
  3893. /* method: SetMass of class RigidBody */
  3894. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetMass00
  3895. static int tolua_Physics_RigidBody_SetMass00(lua_State* tolua_S)
  3896. {
  3897. #ifndef TOLUA_RELEASE
  3898. tolua_Error tolua_err;
  3899. if (
  3900. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  3901. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  3902. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3903. )
  3904. goto tolua_lerror;
  3905. else
  3906. #endif
  3907. {
  3908. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  3909. float mass = ((float) tolua_tonumber(tolua_S,2,0));
  3910. #ifndef TOLUA_RELEASE
  3911. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMass'", NULL);
  3912. #endif
  3913. {
  3914. self->SetMass(mass);
  3915. }
  3916. }
  3917. return 0;
  3918. #ifndef TOLUA_RELEASE
  3919. tolua_lerror:
  3920. tolua_error(tolua_S,"#ferror in function 'SetMass'.",&tolua_err);
  3921. return 0;
  3922. #endif
  3923. }
  3924. #endif //#ifndef TOLUA_DISABLE
  3925. /* method: SetPosition of class RigidBody */
  3926. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetPosition00
  3927. static int tolua_Physics_RigidBody_SetPosition00(lua_State* tolua_S)
  3928. {
  3929. #ifndef TOLUA_RELEASE
  3930. tolua_Error tolua_err;
  3931. if (
  3932. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  3933. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  3934. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3935. )
  3936. goto tolua_lerror;
  3937. else
  3938. #endif
  3939. {
  3940. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  3941. Vector3 position = *((Vector3*) tolua_tousertype(tolua_S,2,0));
  3942. #ifndef TOLUA_RELEASE
  3943. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPosition'", NULL);
  3944. #endif
  3945. {
  3946. self->SetPosition(position);
  3947. }
  3948. }
  3949. return 0;
  3950. #ifndef TOLUA_RELEASE
  3951. tolua_lerror:
  3952. tolua_error(tolua_S,"#ferror in function 'SetPosition'.",&tolua_err);
  3953. return 0;
  3954. #endif
  3955. }
  3956. #endif //#ifndef TOLUA_DISABLE
  3957. /* method: SetRotation of class RigidBody */
  3958. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetRotation00
  3959. static int tolua_Physics_RigidBody_SetRotation00(lua_State* tolua_S)
  3960. {
  3961. #ifndef TOLUA_RELEASE
  3962. tolua_Error tolua_err;
  3963. if (
  3964. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  3965. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Quaternion",0,&tolua_err)) ||
  3966. !tolua_isnoobj(tolua_S,3,&tolua_err)
  3967. )
  3968. goto tolua_lerror;
  3969. else
  3970. #endif
  3971. {
  3972. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  3973. Quaternion rotation = *((Quaternion*) tolua_tousertype(tolua_S,2,0));
  3974. #ifndef TOLUA_RELEASE
  3975. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRotation'", NULL);
  3976. #endif
  3977. {
  3978. self->SetRotation(rotation);
  3979. }
  3980. }
  3981. return 0;
  3982. #ifndef TOLUA_RELEASE
  3983. tolua_lerror:
  3984. tolua_error(tolua_S,"#ferror in function 'SetRotation'.",&tolua_err);
  3985. return 0;
  3986. #endif
  3987. }
  3988. #endif //#ifndef TOLUA_DISABLE
  3989. /* method: SetTransform of class RigidBody */
  3990. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetTransform00
  3991. static int tolua_Physics_RigidBody_SetTransform00(lua_State* tolua_S)
  3992. {
  3993. #ifndef TOLUA_RELEASE
  3994. tolua_Error tolua_err;
  3995. if (
  3996. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  3997. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  3998. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  3999. !tolua_isnoobj(tolua_S,4,&tolua_err)
  4000. )
  4001. goto tolua_lerror;
  4002. else
  4003. #endif
  4004. {
  4005. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4006. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4007. const Quaternion* rotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  4008. #ifndef TOLUA_RELEASE
  4009. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTransform'", NULL);
  4010. #endif
  4011. {
  4012. self->SetTransform(*position,*rotation);
  4013. }
  4014. }
  4015. return 0;
  4016. #ifndef TOLUA_RELEASE
  4017. tolua_lerror:
  4018. tolua_error(tolua_S,"#ferror in function 'SetTransform'.",&tolua_err);
  4019. return 0;
  4020. #endif
  4021. }
  4022. #endif //#ifndef TOLUA_DISABLE
  4023. /* method: SetLinearVelocity of class RigidBody */
  4024. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetLinearVelocity00
  4025. static int tolua_Physics_RigidBody_SetLinearVelocity00(lua_State* tolua_S)
  4026. {
  4027. #ifndef TOLUA_RELEASE
  4028. tolua_Error tolua_err;
  4029. if (
  4030. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4031. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  4032. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4033. )
  4034. goto tolua_lerror;
  4035. else
  4036. #endif
  4037. {
  4038. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4039. Vector3 velocity = *((Vector3*) tolua_tousertype(tolua_S,2,0));
  4040. #ifndef TOLUA_RELEASE
  4041. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLinearVelocity'", NULL);
  4042. #endif
  4043. {
  4044. self->SetLinearVelocity(velocity);
  4045. }
  4046. }
  4047. return 0;
  4048. #ifndef TOLUA_RELEASE
  4049. tolua_lerror:
  4050. tolua_error(tolua_S,"#ferror in function 'SetLinearVelocity'.",&tolua_err);
  4051. return 0;
  4052. #endif
  4053. }
  4054. #endif //#ifndef TOLUA_DISABLE
  4055. /* method: SetLinearFactor of class RigidBody */
  4056. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetLinearFactor00
  4057. static int tolua_Physics_RigidBody_SetLinearFactor00(lua_State* tolua_S)
  4058. {
  4059. #ifndef TOLUA_RELEASE
  4060. tolua_Error tolua_err;
  4061. if (
  4062. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4063. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  4064. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4065. )
  4066. goto tolua_lerror;
  4067. else
  4068. #endif
  4069. {
  4070. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4071. Vector3 factor = *((Vector3*) tolua_tousertype(tolua_S,2,0));
  4072. #ifndef TOLUA_RELEASE
  4073. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLinearFactor'", NULL);
  4074. #endif
  4075. {
  4076. self->SetLinearFactor(factor);
  4077. }
  4078. }
  4079. return 0;
  4080. #ifndef TOLUA_RELEASE
  4081. tolua_lerror:
  4082. tolua_error(tolua_S,"#ferror in function 'SetLinearFactor'.",&tolua_err);
  4083. return 0;
  4084. #endif
  4085. }
  4086. #endif //#ifndef TOLUA_DISABLE
  4087. /* method: SetLinearRestThreshold of class RigidBody */
  4088. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetLinearRestThreshold00
  4089. static int tolua_Physics_RigidBody_SetLinearRestThreshold00(lua_State* tolua_S)
  4090. {
  4091. #ifndef TOLUA_RELEASE
  4092. tolua_Error tolua_err;
  4093. if (
  4094. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4095. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4096. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4097. )
  4098. goto tolua_lerror;
  4099. else
  4100. #endif
  4101. {
  4102. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4103. float threshold = ((float) tolua_tonumber(tolua_S,2,0));
  4104. #ifndef TOLUA_RELEASE
  4105. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLinearRestThreshold'", NULL);
  4106. #endif
  4107. {
  4108. self->SetLinearRestThreshold(threshold);
  4109. }
  4110. }
  4111. return 0;
  4112. #ifndef TOLUA_RELEASE
  4113. tolua_lerror:
  4114. tolua_error(tolua_S,"#ferror in function 'SetLinearRestThreshold'.",&tolua_err);
  4115. return 0;
  4116. #endif
  4117. }
  4118. #endif //#ifndef TOLUA_DISABLE
  4119. /* method: SetLinearDamping of class RigidBody */
  4120. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetLinearDamping00
  4121. static int tolua_Physics_RigidBody_SetLinearDamping00(lua_State* tolua_S)
  4122. {
  4123. #ifndef TOLUA_RELEASE
  4124. tolua_Error tolua_err;
  4125. if (
  4126. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4127. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4128. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4129. )
  4130. goto tolua_lerror;
  4131. else
  4132. #endif
  4133. {
  4134. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4135. float damping = ((float) tolua_tonumber(tolua_S,2,0));
  4136. #ifndef TOLUA_RELEASE
  4137. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLinearDamping'", NULL);
  4138. #endif
  4139. {
  4140. self->SetLinearDamping(damping);
  4141. }
  4142. }
  4143. return 0;
  4144. #ifndef TOLUA_RELEASE
  4145. tolua_lerror:
  4146. tolua_error(tolua_S,"#ferror in function 'SetLinearDamping'.",&tolua_err);
  4147. return 0;
  4148. #endif
  4149. }
  4150. #endif //#ifndef TOLUA_DISABLE
  4151. /* method: SetAngularVelocity of class RigidBody */
  4152. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetAngularVelocity00
  4153. static int tolua_Physics_RigidBody_SetAngularVelocity00(lua_State* tolua_S)
  4154. {
  4155. #ifndef TOLUA_RELEASE
  4156. tolua_Error tolua_err;
  4157. if (
  4158. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4159. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  4160. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4161. )
  4162. goto tolua_lerror;
  4163. else
  4164. #endif
  4165. {
  4166. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4167. Vector3 angularVelocity = *((Vector3*) tolua_tousertype(tolua_S,2,0));
  4168. #ifndef TOLUA_RELEASE
  4169. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngularVelocity'", NULL);
  4170. #endif
  4171. {
  4172. self->SetAngularVelocity(angularVelocity);
  4173. }
  4174. }
  4175. return 0;
  4176. #ifndef TOLUA_RELEASE
  4177. tolua_lerror:
  4178. tolua_error(tolua_S,"#ferror in function 'SetAngularVelocity'.",&tolua_err);
  4179. return 0;
  4180. #endif
  4181. }
  4182. #endif //#ifndef TOLUA_DISABLE
  4183. /* method: SetAngularFactor of class RigidBody */
  4184. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetAngularFactor00
  4185. static int tolua_Physics_RigidBody_SetAngularFactor00(lua_State* tolua_S)
  4186. {
  4187. #ifndef TOLUA_RELEASE
  4188. tolua_Error tolua_err;
  4189. if (
  4190. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4191. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Vector3",0,&tolua_err)) ||
  4192. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4193. )
  4194. goto tolua_lerror;
  4195. else
  4196. #endif
  4197. {
  4198. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4199. Vector3 factor = *((Vector3*) tolua_tousertype(tolua_S,2,0));
  4200. #ifndef TOLUA_RELEASE
  4201. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngularFactor'", NULL);
  4202. #endif
  4203. {
  4204. self->SetAngularFactor(factor);
  4205. }
  4206. }
  4207. return 0;
  4208. #ifndef TOLUA_RELEASE
  4209. tolua_lerror:
  4210. tolua_error(tolua_S,"#ferror in function 'SetAngularFactor'.",&tolua_err);
  4211. return 0;
  4212. #endif
  4213. }
  4214. #endif //#ifndef TOLUA_DISABLE
  4215. /* method: SetAngularRestThreshold of class RigidBody */
  4216. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetAngularRestThreshold00
  4217. static int tolua_Physics_RigidBody_SetAngularRestThreshold00(lua_State* tolua_S)
  4218. {
  4219. #ifndef TOLUA_RELEASE
  4220. tolua_Error tolua_err;
  4221. if (
  4222. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4223. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4224. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4225. )
  4226. goto tolua_lerror;
  4227. else
  4228. #endif
  4229. {
  4230. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4231. float threshold = ((float) tolua_tonumber(tolua_S,2,0));
  4232. #ifndef TOLUA_RELEASE
  4233. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngularRestThreshold'", NULL);
  4234. #endif
  4235. {
  4236. self->SetAngularRestThreshold(threshold);
  4237. }
  4238. }
  4239. return 0;
  4240. #ifndef TOLUA_RELEASE
  4241. tolua_lerror:
  4242. tolua_error(tolua_S,"#ferror in function 'SetAngularRestThreshold'.",&tolua_err);
  4243. return 0;
  4244. #endif
  4245. }
  4246. #endif //#ifndef TOLUA_DISABLE
  4247. /* method: SetAngularDamping of class RigidBody */
  4248. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetAngularDamping00
  4249. static int tolua_Physics_RigidBody_SetAngularDamping00(lua_State* tolua_S)
  4250. {
  4251. #ifndef TOLUA_RELEASE
  4252. tolua_Error tolua_err;
  4253. if (
  4254. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4255. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4256. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4257. )
  4258. goto tolua_lerror;
  4259. else
  4260. #endif
  4261. {
  4262. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4263. float factor = ((float) tolua_tonumber(tolua_S,2,0));
  4264. #ifndef TOLUA_RELEASE
  4265. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngularDamping'", NULL);
  4266. #endif
  4267. {
  4268. self->SetAngularDamping(factor);
  4269. }
  4270. }
  4271. return 0;
  4272. #ifndef TOLUA_RELEASE
  4273. tolua_lerror:
  4274. tolua_error(tolua_S,"#ferror in function 'SetAngularDamping'.",&tolua_err);
  4275. return 0;
  4276. #endif
  4277. }
  4278. #endif //#ifndef TOLUA_DISABLE
  4279. /* method: SetFriction of class RigidBody */
  4280. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetFriction00
  4281. static int tolua_Physics_RigidBody_SetFriction00(lua_State* tolua_S)
  4282. {
  4283. #ifndef TOLUA_RELEASE
  4284. tolua_Error tolua_err;
  4285. if (
  4286. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4287. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4288. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4289. )
  4290. goto tolua_lerror;
  4291. else
  4292. #endif
  4293. {
  4294. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4295. float friction = ((float) tolua_tonumber(tolua_S,2,0));
  4296. #ifndef TOLUA_RELEASE
  4297. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFriction'", NULL);
  4298. #endif
  4299. {
  4300. self->SetFriction(friction);
  4301. }
  4302. }
  4303. return 0;
  4304. #ifndef TOLUA_RELEASE
  4305. tolua_lerror:
  4306. tolua_error(tolua_S,"#ferror in function 'SetFriction'.",&tolua_err);
  4307. return 0;
  4308. #endif
  4309. }
  4310. #endif //#ifndef TOLUA_DISABLE
  4311. /* method: SetRestitution of class RigidBody */
  4312. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetRestitution00
  4313. static int tolua_Physics_RigidBody_SetRestitution00(lua_State* tolua_S)
  4314. {
  4315. #ifndef TOLUA_RELEASE
  4316. tolua_Error tolua_err;
  4317. if (
  4318. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4319. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4320. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4321. )
  4322. goto tolua_lerror;
  4323. else
  4324. #endif
  4325. {
  4326. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4327. float restitution = ((float) tolua_tonumber(tolua_S,2,0));
  4328. #ifndef TOLUA_RELEASE
  4329. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRestitution'", NULL);
  4330. #endif
  4331. {
  4332. self->SetRestitution(restitution);
  4333. }
  4334. }
  4335. return 0;
  4336. #ifndef TOLUA_RELEASE
  4337. tolua_lerror:
  4338. tolua_error(tolua_S,"#ferror in function 'SetRestitution'.",&tolua_err);
  4339. return 0;
  4340. #endif
  4341. }
  4342. #endif //#ifndef TOLUA_DISABLE
  4343. /* method: SetContactProcessingThreshold of class RigidBody */
  4344. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetContactProcessingThreshold00
  4345. static int tolua_Physics_RigidBody_SetContactProcessingThreshold00(lua_State* tolua_S)
  4346. {
  4347. #ifndef TOLUA_RELEASE
  4348. tolua_Error tolua_err;
  4349. if (
  4350. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4351. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4352. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4353. )
  4354. goto tolua_lerror;
  4355. else
  4356. #endif
  4357. {
  4358. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4359. float threshold = ((float) tolua_tonumber(tolua_S,2,0));
  4360. #ifndef TOLUA_RELEASE
  4361. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetContactProcessingThreshold'", NULL);
  4362. #endif
  4363. {
  4364. self->SetContactProcessingThreshold(threshold);
  4365. }
  4366. }
  4367. return 0;
  4368. #ifndef TOLUA_RELEASE
  4369. tolua_lerror:
  4370. tolua_error(tolua_S,"#ferror in function 'SetContactProcessingThreshold'.",&tolua_err);
  4371. return 0;
  4372. #endif
  4373. }
  4374. #endif //#ifndef TOLUA_DISABLE
  4375. /* method: SetCcdRadius of class RigidBody */
  4376. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetCcdRadius00
  4377. static int tolua_Physics_RigidBody_SetCcdRadius00(lua_State* tolua_S)
  4378. {
  4379. #ifndef TOLUA_RELEASE
  4380. tolua_Error tolua_err;
  4381. if (
  4382. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4383. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4384. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4385. )
  4386. goto tolua_lerror;
  4387. else
  4388. #endif
  4389. {
  4390. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4391. float radius = ((float) tolua_tonumber(tolua_S,2,0));
  4392. #ifndef TOLUA_RELEASE
  4393. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCcdRadius'", NULL);
  4394. #endif
  4395. {
  4396. self->SetCcdRadius(radius);
  4397. }
  4398. }
  4399. return 0;
  4400. #ifndef TOLUA_RELEASE
  4401. tolua_lerror:
  4402. tolua_error(tolua_S,"#ferror in function 'SetCcdRadius'.",&tolua_err);
  4403. return 0;
  4404. #endif
  4405. }
  4406. #endif //#ifndef TOLUA_DISABLE
  4407. /* method: SetCcdMotionThreshold of class RigidBody */
  4408. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetCcdMotionThreshold00
  4409. static int tolua_Physics_RigidBody_SetCcdMotionThreshold00(lua_State* tolua_S)
  4410. {
  4411. #ifndef TOLUA_RELEASE
  4412. tolua_Error tolua_err;
  4413. if (
  4414. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4415. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4416. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4417. )
  4418. goto tolua_lerror;
  4419. else
  4420. #endif
  4421. {
  4422. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4423. float threshold = ((float) tolua_tonumber(tolua_S,2,0));
  4424. #ifndef TOLUA_RELEASE
  4425. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCcdMotionThreshold'", NULL);
  4426. #endif
  4427. {
  4428. self->SetCcdMotionThreshold(threshold);
  4429. }
  4430. }
  4431. return 0;
  4432. #ifndef TOLUA_RELEASE
  4433. tolua_lerror:
  4434. tolua_error(tolua_S,"#ferror in function 'SetCcdMotionThreshold'.",&tolua_err);
  4435. return 0;
  4436. #endif
  4437. }
  4438. #endif //#ifndef TOLUA_DISABLE
  4439. /* method: SetUseGravity of class RigidBody */
  4440. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetUseGravity00
  4441. static int tolua_Physics_RigidBody_SetUseGravity00(lua_State* tolua_S)
  4442. {
  4443. #ifndef TOLUA_RELEASE
  4444. tolua_Error tolua_err;
  4445. if (
  4446. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4447. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  4448. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4449. )
  4450. goto tolua_lerror;
  4451. else
  4452. #endif
  4453. {
  4454. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4455. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  4456. #ifndef TOLUA_RELEASE
  4457. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUseGravity'", NULL);
  4458. #endif
  4459. {
  4460. self->SetUseGravity(enable);
  4461. }
  4462. }
  4463. return 0;
  4464. #ifndef TOLUA_RELEASE
  4465. tolua_lerror:
  4466. tolua_error(tolua_S,"#ferror in function 'SetUseGravity'.",&tolua_err);
  4467. return 0;
  4468. #endif
  4469. }
  4470. #endif //#ifndef TOLUA_DISABLE
  4471. /* method: SetGravityOverride of class RigidBody */
  4472. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetGravityOverride00
  4473. static int tolua_Physics_RigidBody_SetGravityOverride00(lua_State* tolua_S)
  4474. {
  4475. #ifndef TOLUA_RELEASE
  4476. tolua_Error tolua_err;
  4477. if (
  4478. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4479. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4480. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4481. )
  4482. goto tolua_lerror;
  4483. else
  4484. #endif
  4485. {
  4486. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4487. const Vector3* gravity = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4488. #ifndef TOLUA_RELEASE
  4489. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGravityOverride'", NULL);
  4490. #endif
  4491. {
  4492. self->SetGravityOverride(*gravity);
  4493. }
  4494. }
  4495. return 0;
  4496. #ifndef TOLUA_RELEASE
  4497. tolua_lerror:
  4498. tolua_error(tolua_S,"#ferror in function 'SetGravityOverride'.",&tolua_err);
  4499. return 0;
  4500. #endif
  4501. }
  4502. #endif //#ifndef TOLUA_DISABLE
  4503. /* method: SetKinematic of class RigidBody */
  4504. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetKinematic00
  4505. static int tolua_Physics_RigidBody_SetKinematic00(lua_State* tolua_S)
  4506. {
  4507. #ifndef TOLUA_RELEASE
  4508. tolua_Error tolua_err;
  4509. if (
  4510. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4511. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  4512. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4513. )
  4514. goto tolua_lerror;
  4515. else
  4516. #endif
  4517. {
  4518. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4519. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  4520. #ifndef TOLUA_RELEASE
  4521. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetKinematic'", NULL);
  4522. #endif
  4523. {
  4524. self->SetKinematic(enable);
  4525. }
  4526. }
  4527. return 0;
  4528. #ifndef TOLUA_RELEASE
  4529. tolua_lerror:
  4530. tolua_error(tolua_S,"#ferror in function 'SetKinematic'.",&tolua_err);
  4531. return 0;
  4532. #endif
  4533. }
  4534. #endif //#ifndef TOLUA_DISABLE
  4535. /* method: SetPhantom of class RigidBody */
  4536. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetPhantom00
  4537. static int tolua_Physics_RigidBody_SetPhantom00(lua_State* tolua_S)
  4538. {
  4539. #ifndef TOLUA_RELEASE
  4540. tolua_Error tolua_err;
  4541. if (
  4542. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4543. !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
  4544. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4545. )
  4546. goto tolua_lerror;
  4547. else
  4548. #endif
  4549. {
  4550. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4551. bool enable = ((bool) tolua_toboolean(tolua_S,2,0));
  4552. #ifndef TOLUA_RELEASE
  4553. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetPhantom'", NULL);
  4554. #endif
  4555. {
  4556. self->SetPhantom(enable);
  4557. }
  4558. }
  4559. return 0;
  4560. #ifndef TOLUA_RELEASE
  4561. tolua_lerror:
  4562. tolua_error(tolua_S,"#ferror in function 'SetPhantom'.",&tolua_err);
  4563. return 0;
  4564. #endif
  4565. }
  4566. #endif //#ifndef TOLUA_DISABLE
  4567. /* method: SetCollisionLayer of class RigidBody */
  4568. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetCollisionLayer00
  4569. static int tolua_Physics_RigidBody_SetCollisionLayer00(lua_State* tolua_S)
  4570. {
  4571. #ifndef TOLUA_RELEASE
  4572. tolua_Error tolua_err;
  4573. if (
  4574. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4575. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4576. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4577. )
  4578. goto tolua_lerror;
  4579. else
  4580. #endif
  4581. {
  4582. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4583. unsigned layer = ((unsigned) tolua_tonumber(tolua_S,2,0));
  4584. #ifndef TOLUA_RELEASE
  4585. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCollisionLayer'", NULL);
  4586. #endif
  4587. {
  4588. self->SetCollisionLayer(layer);
  4589. }
  4590. }
  4591. return 0;
  4592. #ifndef TOLUA_RELEASE
  4593. tolua_lerror:
  4594. tolua_error(tolua_S,"#ferror in function 'SetCollisionLayer'.",&tolua_err);
  4595. return 0;
  4596. #endif
  4597. }
  4598. #endif //#ifndef TOLUA_DISABLE
  4599. /* method: SetCollisionMask of class RigidBody */
  4600. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetCollisionMask00
  4601. static int tolua_Physics_RigidBody_SetCollisionMask00(lua_State* tolua_S)
  4602. {
  4603. #ifndef TOLUA_RELEASE
  4604. tolua_Error tolua_err;
  4605. if (
  4606. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4607. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4608. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4609. )
  4610. goto tolua_lerror;
  4611. else
  4612. #endif
  4613. {
  4614. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4615. unsigned mask = ((unsigned) tolua_tonumber(tolua_S,2,0));
  4616. #ifndef TOLUA_RELEASE
  4617. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCollisionMask'", NULL);
  4618. #endif
  4619. {
  4620. self->SetCollisionMask(mask);
  4621. }
  4622. }
  4623. return 0;
  4624. #ifndef TOLUA_RELEASE
  4625. tolua_lerror:
  4626. tolua_error(tolua_S,"#ferror in function 'SetCollisionMask'.",&tolua_err);
  4627. return 0;
  4628. #endif
  4629. }
  4630. #endif //#ifndef TOLUA_DISABLE
  4631. /* method: SetCollisionLayerAndMask of class RigidBody */
  4632. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetCollisionLayerAndMask00
  4633. static int tolua_Physics_RigidBody_SetCollisionLayerAndMask00(lua_State* tolua_S)
  4634. {
  4635. #ifndef TOLUA_RELEASE
  4636. tolua_Error tolua_err;
  4637. if (
  4638. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4639. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4640. !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
  4641. !tolua_isnoobj(tolua_S,4,&tolua_err)
  4642. )
  4643. goto tolua_lerror;
  4644. else
  4645. #endif
  4646. {
  4647. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4648. unsigned layer = ((unsigned) tolua_tonumber(tolua_S,2,0));
  4649. unsigned mask = ((unsigned) tolua_tonumber(tolua_S,3,0));
  4650. #ifndef TOLUA_RELEASE
  4651. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCollisionLayerAndMask'", NULL);
  4652. #endif
  4653. {
  4654. self->SetCollisionLayerAndMask(layer,mask);
  4655. }
  4656. }
  4657. return 0;
  4658. #ifndef TOLUA_RELEASE
  4659. tolua_lerror:
  4660. tolua_error(tolua_S,"#ferror in function 'SetCollisionLayerAndMask'.",&tolua_err);
  4661. return 0;
  4662. #endif
  4663. }
  4664. #endif //#ifndef TOLUA_DISABLE
  4665. /* method: SetCollisionEventMode of class RigidBody */
  4666. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_SetCollisionEventMode00
  4667. static int tolua_Physics_RigidBody_SetCollisionEventMode00(lua_State* tolua_S)
  4668. {
  4669. #ifndef TOLUA_RELEASE
  4670. tolua_Error tolua_err;
  4671. if (
  4672. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4673. !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
  4674. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4675. )
  4676. goto tolua_lerror;
  4677. else
  4678. #endif
  4679. {
  4680. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4681. CollisionEventMode mode = ((CollisionEventMode) (int) tolua_tonumber(tolua_S,2,0));
  4682. #ifndef TOLUA_RELEASE
  4683. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetCollisionEventMode'", NULL);
  4684. #endif
  4685. {
  4686. self->SetCollisionEventMode(mode);
  4687. }
  4688. }
  4689. return 0;
  4690. #ifndef TOLUA_RELEASE
  4691. tolua_lerror:
  4692. tolua_error(tolua_S,"#ferror in function 'SetCollisionEventMode'.",&tolua_err);
  4693. return 0;
  4694. #endif
  4695. }
  4696. #endif //#ifndef TOLUA_DISABLE
  4697. /* method: ApplyForce of class RigidBody */
  4698. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyForce00
  4699. static int tolua_Physics_RigidBody_ApplyForce00(lua_State* tolua_S)
  4700. {
  4701. #ifndef TOLUA_RELEASE
  4702. tolua_Error tolua_err;
  4703. if (
  4704. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4705. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4706. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4707. )
  4708. goto tolua_lerror;
  4709. else
  4710. #endif
  4711. {
  4712. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4713. const Vector3* force = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4714. #ifndef TOLUA_RELEASE
  4715. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyForce'", NULL);
  4716. #endif
  4717. {
  4718. self->ApplyForce(*force);
  4719. }
  4720. }
  4721. return 0;
  4722. #ifndef TOLUA_RELEASE
  4723. tolua_lerror:
  4724. tolua_error(tolua_S,"#ferror in function 'ApplyForce'.",&tolua_err);
  4725. return 0;
  4726. #endif
  4727. }
  4728. #endif //#ifndef TOLUA_DISABLE
  4729. /* method: ApplyForce of class RigidBody */
  4730. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyForce01
  4731. static int tolua_Physics_RigidBody_ApplyForce01(lua_State* tolua_S)
  4732. {
  4733. tolua_Error tolua_err;
  4734. if (
  4735. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4736. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4737. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  4738. !tolua_isnoobj(tolua_S,4,&tolua_err)
  4739. )
  4740. goto tolua_lerror;
  4741. else
  4742. {
  4743. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4744. const Vector3* force = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4745. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  4746. #ifndef TOLUA_RELEASE
  4747. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyForce'", NULL);
  4748. #endif
  4749. {
  4750. self->ApplyForce(*force,*position);
  4751. }
  4752. }
  4753. return 0;
  4754. tolua_lerror:
  4755. return tolua_Physics_RigidBody_ApplyForce00(tolua_S);
  4756. }
  4757. #endif //#ifndef TOLUA_DISABLE
  4758. /* method: ApplyTorque of class RigidBody */
  4759. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyTorque00
  4760. static int tolua_Physics_RigidBody_ApplyTorque00(lua_State* tolua_S)
  4761. {
  4762. #ifndef TOLUA_RELEASE
  4763. tolua_Error tolua_err;
  4764. if (
  4765. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4766. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4767. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4768. )
  4769. goto tolua_lerror;
  4770. else
  4771. #endif
  4772. {
  4773. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4774. const Vector3* torque = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4775. #ifndef TOLUA_RELEASE
  4776. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyTorque'", NULL);
  4777. #endif
  4778. {
  4779. self->ApplyTorque(*torque);
  4780. }
  4781. }
  4782. return 0;
  4783. #ifndef TOLUA_RELEASE
  4784. tolua_lerror:
  4785. tolua_error(tolua_S,"#ferror in function 'ApplyTorque'.",&tolua_err);
  4786. return 0;
  4787. #endif
  4788. }
  4789. #endif //#ifndef TOLUA_DISABLE
  4790. /* method: ApplyImpulse of class RigidBody */
  4791. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyImpulse00
  4792. static int tolua_Physics_RigidBody_ApplyImpulse00(lua_State* tolua_S)
  4793. {
  4794. #ifndef TOLUA_RELEASE
  4795. tolua_Error tolua_err;
  4796. if (
  4797. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4798. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4799. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4800. )
  4801. goto tolua_lerror;
  4802. else
  4803. #endif
  4804. {
  4805. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4806. const Vector3* impulse = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4807. #ifndef TOLUA_RELEASE
  4808. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyImpulse'", NULL);
  4809. #endif
  4810. {
  4811. self->ApplyImpulse(*impulse);
  4812. }
  4813. }
  4814. return 0;
  4815. #ifndef TOLUA_RELEASE
  4816. tolua_lerror:
  4817. tolua_error(tolua_S,"#ferror in function 'ApplyImpulse'.",&tolua_err);
  4818. return 0;
  4819. #endif
  4820. }
  4821. #endif //#ifndef TOLUA_DISABLE
  4822. /* method: ApplyImpulse of class RigidBody */
  4823. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyImpulse01
  4824. static int tolua_Physics_RigidBody_ApplyImpulse01(lua_State* tolua_S)
  4825. {
  4826. tolua_Error tolua_err;
  4827. if (
  4828. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4829. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4830. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Vector3",0,&tolua_err)) ||
  4831. !tolua_isnoobj(tolua_S,4,&tolua_err)
  4832. )
  4833. goto tolua_lerror;
  4834. else
  4835. {
  4836. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4837. const Vector3* impulse = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4838. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,3,0));
  4839. #ifndef TOLUA_RELEASE
  4840. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyImpulse'", NULL);
  4841. #endif
  4842. {
  4843. self->ApplyImpulse(*impulse,*position);
  4844. }
  4845. }
  4846. return 0;
  4847. tolua_lerror:
  4848. return tolua_Physics_RigidBody_ApplyImpulse00(tolua_S);
  4849. }
  4850. #endif //#ifndef TOLUA_DISABLE
  4851. /* method: ApplyTorqueImpulse of class RigidBody */
  4852. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyTorqueImpulse00
  4853. static int tolua_Physics_RigidBody_ApplyTorqueImpulse00(lua_State* tolua_S)
  4854. {
  4855. #ifndef TOLUA_RELEASE
  4856. tolua_Error tolua_err;
  4857. if (
  4858. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4859. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  4860. !tolua_isnoobj(tolua_S,3,&tolua_err)
  4861. )
  4862. goto tolua_lerror;
  4863. else
  4864. #endif
  4865. {
  4866. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4867. const Vector3* torque = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  4868. #ifndef TOLUA_RELEASE
  4869. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyTorqueImpulse'", NULL);
  4870. #endif
  4871. {
  4872. self->ApplyTorqueImpulse(*torque);
  4873. }
  4874. }
  4875. return 0;
  4876. #ifndef TOLUA_RELEASE
  4877. tolua_lerror:
  4878. tolua_error(tolua_S,"#ferror in function 'ApplyTorqueImpulse'.",&tolua_err);
  4879. return 0;
  4880. #endif
  4881. }
  4882. #endif //#ifndef TOLUA_DISABLE
  4883. /* method: ResetForces of class RigidBody */
  4884. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ResetForces00
  4885. static int tolua_Physics_RigidBody_ResetForces00(lua_State* tolua_S)
  4886. {
  4887. #ifndef TOLUA_RELEASE
  4888. tolua_Error tolua_err;
  4889. if (
  4890. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4891. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4892. )
  4893. goto tolua_lerror;
  4894. else
  4895. #endif
  4896. {
  4897. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4898. #ifndef TOLUA_RELEASE
  4899. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResetForces'", NULL);
  4900. #endif
  4901. {
  4902. self->ResetForces();
  4903. }
  4904. }
  4905. return 0;
  4906. #ifndef TOLUA_RELEASE
  4907. tolua_lerror:
  4908. tolua_error(tolua_S,"#ferror in function 'ResetForces'.",&tolua_err);
  4909. return 0;
  4910. #endif
  4911. }
  4912. #endif //#ifndef TOLUA_DISABLE
  4913. /* method: Activate of class RigidBody */
  4914. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_Activate00
  4915. static int tolua_Physics_RigidBody_Activate00(lua_State* tolua_S)
  4916. {
  4917. #ifndef TOLUA_RELEASE
  4918. tolua_Error tolua_err;
  4919. if (
  4920. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4921. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4922. )
  4923. goto tolua_lerror;
  4924. else
  4925. #endif
  4926. {
  4927. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4928. #ifndef TOLUA_RELEASE
  4929. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Activate'", NULL);
  4930. #endif
  4931. {
  4932. self->Activate();
  4933. }
  4934. }
  4935. return 0;
  4936. #ifndef TOLUA_RELEASE
  4937. tolua_lerror:
  4938. tolua_error(tolua_S,"#ferror in function 'Activate'.",&tolua_err);
  4939. return 0;
  4940. #endif
  4941. }
  4942. #endif //#ifndef TOLUA_DISABLE
  4943. /* method: ReAddBodyToWorld of class RigidBody */
  4944. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ReAddBodyToWorld00
  4945. static int tolua_Physics_RigidBody_ReAddBodyToWorld00(lua_State* tolua_S)
  4946. {
  4947. #ifndef TOLUA_RELEASE
  4948. tolua_Error tolua_err;
  4949. if (
  4950. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  4951. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4952. )
  4953. goto tolua_lerror;
  4954. else
  4955. #endif
  4956. {
  4957. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  4958. #ifndef TOLUA_RELEASE
  4959. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReAddBodyToWorld'", NULL);
  4960. #endif
  4961. {
  4962. self->ReAddBodyToWorld();
  4963. }
  4964. }
  4965. return 0;
  4966. #ifndef TOLUA_RELEASE
  4967. tolua_lerror:
  4968. tolua_error(tolua_S,"#ferror in function 'ReAddBodyToWorld'.",&tolua_err);
  4969. return 0;
  4970. #endif
  4971. }
  4972. #endif //#ifndef TOLUA_DISABLE
  4973. /* method: GetPhysicsWorld of class RigidBody */
  4974. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetPhysicsWorld00
  4975. static int tolua_Physics_RigidBody_GetPhysicsWorld00(lua_State* tolua_S)
  4976. {
  4977. #ifndef TOLUA_RELEASE
  4978. tolua_Error tolua_err;
  4979. if (
  4980. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  4981. !tolua_isnoobj(tolua_S,2,&tolua_err)
  4982. )
  4983. goto tolua_lerror;
  4984. else
  4985. #endif
  4986. {
  4987. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  4988. #ifndef TOLUA_RELEASE
  4989. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPhysicsWorld'", NULL);
  4990. #endif
  4991. {
  4992. PhysicsWorld* tolua_ret = (PhysicsWorld*) self->GetPhysicsWorld();
  4993. tolua_pushusertype(tolua_S,(void*)tolua_ret,"PhysicsWorld");
  4994. }
  4995. }
  4996. return 1;
  4997. #ifndef TOLUA_RELEASE
  4998. tolua_lerror:
  4999. tolua_error(tolua_S,"#ferror in function 'GetPhysicsWorld'.",&tolua_err);
  5000. return 0;
  5001. #endif
  5002. }
  5003. #endif //#ifndef TOLUA_DISABLE
  5004. /* method: GetMass of class RigidBody */
  5005. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetMass00
  5006. static int tolua_Physics_RigidBody_GetMass00(lua_State* tolua_S)
  5007. {
  5008. #ifndef TOLUA_RELEASE
  5009. tolua_Error tolua_err;
  5010. if (
  5011. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5012. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5013. )
  5014. goto tolua_lerror;
  5015. else
  5016. #endif
  5017. {
  5018. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5019. #ifndef TOLUA_RELEASE
  5020. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMass'", NULL);
  5021. #endif
  5022. {
  5023. float tolua_ret = (float) self->GetMass();
  5024. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5025. }
  5026. }
  5027. return 1;
  5028. #ifndef TOLUA_RELEASE
  5029. tolua_lerror:
  5030. tolua_error(tolua_S,"#ferror in function 'GetMass'.",&tolua_err);
  5031. return 0;
  5032. #endif
  5033. }
  5034. #endif //#ifndef TOLUA_DISABLE
  5035. /* method: GetPosition of class RigidBody */
  5036. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetPosition00
  5037. static int tolua_Physics_RigidBody_GetPosition00(lua_State* tolua_S)
  5038. {
  5039. #ifndef TOLUA_RELEASE
  5040. tolua_Error tolua_err;
  5041. if (
  5042. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5043. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5044. )
  5045. goto tolua_lerror;
  5046. else
  5047. #endif
  5048. {
  5049. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5050. #ifndef TOLUA_RELEASE
  5051. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosition'", NULL);
  5052. #endif
  5053. {
  5054. Vector3 tolua_ret = (Vector3) self->GetPosition();
  5055. {
  5056. #ifdef __cplusplus
  5057. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5058. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5059. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5060. #else
  5061. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5062. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5063. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5064. #endif
  5065. }
  5066. }
  5067. }
  5068. return 1;
  5069. #ifndef TOLUA_RELEASE
  5070. tolua_lerror:
  5071. tolua_error(tolua_S,"#ferror in function 'GetPosition'.",&tolua_err);
  5072. return 0;
  5073. #endif
  5074. }
  5075. #endif //#ifndef TOLUA_DISABLE
  5076. /* method: GetRotation of class RigidBody */
  5077. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetRotation00
  5078. static int tolua_Physics_RigidBody_GetRotation00(lua_State* tolua_S)
  5079. {
  5080. #ifndef TOLUA_RELEASE
  5081. tolua_Error tolua_err;
  5082. if (
  5083. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5084. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5085. )
  5086. goto tolua_lerror;
  5087. else
  5088. #endif
  5089. {
  5090. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5091. #ifndef TOLUA_RELEASE
  5092. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRotation'", NULL);
  5093. #endif
  5094. {
  5095. Quaternion tolua_ret = (Quaternion) self->GetRotation();
  5096. {
  5097. #ifdef __cplusplus
  5098. void* tolua_obj = Mtolua_new((Quaternion)(tolua_ret));
  5099. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  5100. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5101. #else
  5102. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Quaternion));
  5103. tolua_pushusertype(tolua_S,tolua_obj,"Quaternion");
  5104. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5105. #endif
  5106. }
  5107. }
  5108. }
  5109. return 1;
  5110. #ifndef TOLUA_RELEASE
  5111. tolua_lerror:
  5112. tolua_error(tolua_S,"#ferror in function 'GetRotation'.",&tolua_err);
  5113. return 0;
  5114. #endif
  5115. }
  5116. #endif //#ifndef TOLUA_DISABLE
  5117. /* method: GetLinearVelocity of class RigidBody */
  5118. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetLinearVelocity00
  5119. static int tolua_Physics_RigidBody_GetLinearVelocity00(lua_State* tolua_S)
  5120. {
  5121. #ifndef TOLUA_RELEASE
  5122. tolua_Error tolua_err;
  5123. if (
  5124. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5125. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5126. )
  5127. goto tolua_lerror;
  5128. else
  5129. #endif
  5130. {
  5131. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5132. #ifndef TOLUA_RELEASE
  5133. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearVelocity'", NULL);
  5134. #endif
  5135. {
  5136. Vector3 tolua_ret = (Vector3) self->GetLinearVelocity();
  5137. {
  5138. #ifdef __cplusplus
  5139. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5140. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5141. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5142. #else
  5143. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5144. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5145. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5146. #endif
  5147. }
  5148. }
  5149. }
  5150. return 1;
  5151. #ifndef TOLUA_RELEASE
  5152. tolua_lerror:
  5153. tolua_error(tolua_S,"#ferror in function 'GetLinearVelocity'.",&tolua_err);
  5154. return 0;
  5155. #endif
  5156. }
  5157. #endif //#ifndef TOLUA_DISABLE
  5158. /* method: GetLinearFactor of class RigidBody */
  5159. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetLinearFactor00
  5160. static int tolua_Physics_RigidBody_GetLinearFactor00(lua_State* tolua_S)
  5161. {
  5162. #ifndef TOLUA_RELEASE
  5163. tolua_Error tolua_err;
  5164. if (
  5165. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5166. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5167. )
  5168. goto tolua_lerror;
  5169. else
  5170. #endif
  5171. {
  5172. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5173. #ifndef TOLUA_RELEASE
  5174. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearFactor'", NULL);
  5175. #endif
  5176. {
  5177. Vector3 tolua_ret = (Vector3) self->GetLinearFactor();
  5178. {
  5179. #ifdef __cplusplus
  5180. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5181. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5182. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5183. #else
  5184. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5185. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5186. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5187. #endif
  5188. }
  5189. }
  5190. }
  5191. return 1;
  5192. #ifndef TOLUA_RELEASE
  5193. tolua_lerror:
  5194. tolua_error(tolua_S,"#ferror in function 'GetLinearFactor'.",&tolua_err);
  5195. return 0;
  5196. #endif
  5197. }
  5198. #endif //#ifndef TOLUA_DISABLE
  5199. /* method: GetVelocityAtPoint of class RigidBody */
  5200. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetVelocityAtPoint00
  5201. static int tolua_Physics_RigidBody_GetVelocityAtPoint00(lua_State* tolua_S)
  5202. {
  5203. #ifndef TOLUA_RELEASE
  5204. tolua_Error tolua_err;
  5205. if (
  5206. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5207. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5208. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5209. )
  5210. goto tolua_lerror;
  5211. else
  5212. #endif
  5213. {
  5214. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5215. const Vector3* position = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5216. #ifndef TOLUA_RELEASE
  5217. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetVelocityAtPoint'", NULL);
  5218. #endif
  5219. {
  5220. Vector3 tolua_ret = (Vector3) self->GetVelocityAtPoint(*position);
  5221. {
  5222. #ifdef __cplusplus
  5223. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5224. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5225. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5226. #else
  5227. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5228. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5229. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5230. #endif
  5231. }
  5232. }
  5233. }
  5234. return 1;
  5235. #ifndef TOLUA_RELEASE
  5236. tolua_lerror:
  5237. tolua_error(tolua_S,"#ferror in function 'GetVelocityAtPoint'.",&tolua_err);
  5238. return 0;
  5239. #endif
  5240. }
  5241. #endif //#ifndef TOLUA_DISABLE
  5242. /* method: GetLinearRestThreshold of class RigidBody */
  5243. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetLinearRestThreshold00
  5244. static int tolua_Physics_RigidBody_GetLinearRestThreshold00(lua_State* tolua_S)
  5245. {
  5246. #ifndef TOLUA_RELEASE
  5247. tolua_Error tolua_err;
  5248. if (
  5249. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5250. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5251. )
  5252. goto tolua_lerror;
  5253. else
  5254. #endif
  5255. {
  5256. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5257. #ifndef TOLUA_RELEASE
  5258. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearRestThreshold'", NULL);
  5259. #endif
  5260. {
  5261. float tolua_ret = (float) self->GetLinearRestThreshold();
  5262. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5263. }
  5264. }
  5265. return 1;
  5266. #ifndef TOLUA_RELEASE
  5267. tolua_lerror:
  5268. tolua_error(tolua_S,"#ferror in function 'GetLinearRestThreshold'.",&tolua_err);
  5269. return 0;
  5270. #endif
  5271. }
  5272. #endif //#ifndef TOLUA_DISABLE
  5273. /* method: GetAngularVelocity of class RigidBody */
  5274. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetAngularVelocity00
  5275. static int tolua_Physics_RigidBody_GetAngularVelocity00(lua_State* tolua_S)
  5276. {
  5277. #ifndef TOLUA_RELEASE
  5278. tolua_Error tolua_err;
  5279. if (
  5280. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5281. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5282. )
  5283. goto tolua_lerror;
  5284. else
  5285. #endif
  5286. {
  5287. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5288. #ifndef TOLUA_RELEASE
  5289. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngularVelocity'", NULL);
  5290. #endif
  5291. {
  5292. Vector3 tolua_ret = (Vector3) self->GetAngularVelocity();
  5293. {
  5294. #ifdef __cplusplus
  5295. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5296. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5297. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5298. #else
  5299. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5300. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5301. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5302. #endif
  5303. }
  5304. }
  5305. }
  5306. return 1;
  5307. #ifndef TOLUA_RELEASE
  5308. tolua_lerror:
  5309. tolua_error(tolua_S,"#ferror in function 'GetAngularVelocity'.",&tolua_err);
  5310. return 0;
  5311. #endif
  5312. }
  5313. #endif //#ifndef TOLUA_DISABLE
  5314. /* method: GetAngularFactor of class RigidBody */
  5315. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetAngularFactor00
  5316. static int tolua_Physics_RigidBody_GetAngularFactor00(lua_State* tolua_S)
  5317. {
  5318. #ifndef TOLUA_RELEASE
  5319. tolua_Error tolua_err;
  5320. if (
  5321. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5322. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5323. )
  5324. goto tolua_lerror;
  5325. else
  5326. #endif
  5327. {
  5328. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5329. #ifndef TOLUA_RELEASE
  5330. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngularFactor'", NULL);
  5331. #endif
  5332. {
  5333. Vector3 tolua_ret = (Vector3) self->GetAngularFactor();
  5334. {
  5335. #ifdef __cplusplus
  5336. void* tolua_obj = Mtolua_new((Vector3)(tolua_ret));
  5337. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5338. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5339. #else
  5340. void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Vector3));
  5341. tolua_pushusertype(tolua_S,tolua_obj,"Vector3");
  5342. tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  5343. #endif
  5344. }
  5345. }
  5346. }
  5347. return 1;
  5348. #ifndef TOLUA_RELEASE
  5349. tolua_lerror:
  5350. tolua_error(tolua_S,"#ferror in function 'GetAngularFactor'.",&tolua_err);
  5351. return 0;
  5352. #endif
  5353. }
  5354. #endif //#ifndef TOLUA_DISABLE
  5355. /* method: GetAngularRestThreshold of class RigidBody */
  5356. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetAngularRestThreshold00
  5357. static int tolua_Physics_RigidBody_GetAngularRestThreshold00(lua_State* tolua_S)
  5358. {
  5359. #ifndef TOLUA_RELEASE
  5360. tolua_Error tolua_err;
  5361. if (
  5362. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5363. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5364. )
  5365. goto tolua_lerror;
  5366. else
  5367. #endif
  5368. {
  5369. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5370. #ifndef TOLUA_RELEASE
  5371. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngularRestThreshold'", NULL);
  5372. #endif
  5373. {
  5374. float tolua_ret = (float) self->GetAngularRestThreshold();
  5375. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5376. }
  5377. }
  5378. return 1;
  5379. #ifndef TOLUA_RELEASE
  5380. tolua_lerror:
  5381. tolua_error(tolua_S,"#ferror in function 'GetAngularRestThreshold'.",&tolua_err);
  5382. return 0;
  5383. #endif
  5384. }
  5385. #endif //#ifndef TOLUA_DISABLE
  5386. /* method: GetFriction of class RigidBody */
  5387. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetFriction00
  5388. static int tolua_Physics_RigidBody_GetFriction00(lua_State* tolua_S)
  5389. {
  5390. #ifndef TOLUA_RELEASE
  5391. tolua_Error tolua_err;
  5392. if (
  5393. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5394. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5395. )
  5396. goto tolua_lerror;
  5397. else
  5398. #endif
  5399. {
  5400. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5401. #ifndef TOLUA_RELEASE
  5402. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFriction'", NULL);
  5403. #endif
  5404. {
  5405. float tolua_ret = (float) self->GetFriction();
  5406. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5407. }
  5408. }
  5409. return 1;
  5410. #ifndef TOLUA_RELEASE
  5411. tolua_lerror:
  5412. tolua_error(tolua_S,"#ferror in function 'GetFriction'.",&tolua_err);
  5413. return 0;
  5414. #endif
  5415. }
  5416. #endif //#ifndef TOLUA_DISABLE
  5417. /* method: GetRestitution of class RigidBody */
  5418. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetRestitution00
  5419. static int tolua_Physics_RigidBody_GetRestitution00(lua_State* tolua_S)
  5420. {
  5421. #ifndef TOLUA_RELEASE
  5422. tolua_Error tolua_err;
  5423. if (
  5424. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5425. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5426. )
  5427. goto tolua_lerror;
  5428. else
  5429. #endif
  5430. {
  5431. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5432. #ifndef TOLUA_RELEASE
  5433. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRestitution'", NULL);
  5434. #endif
  5435. {
  5436. float tolua_ret = (float) self->GetRestitution();
  5437. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5438. }
  5439. }
  5440. return 1;
  5441. #ifndef TOLUA_RELEASE
  5442. tolua_lerror:
  5443. tolua_error(tolua_S,"#ferror in function 'GetRestitution'.",&tolua_err);
  5444. return 0;
  5445. #endif
  5446. }
  5447. #endif //#ifndef TOLUA_DISABLE
  5448. /* method: GetContactProcessingThreshold of class RigidBody */
  5449. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetContactProcessingThreshold00
  5450. static int tolua_Physics_RigidBody_GetContactProcessingThreshold00(lua_State* tolua_S)
  5451. {
  5452. #ifndef TOLUA_RELEASE
  5453. tolua_Error tolua_err;
  5454. if (
  5455. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5456. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5457. )
  5458. goto tolua_lerror;
  5459. else
  5460. #endif
  5461. {
  5462. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5463. #ifndef TOLUA_RELEASE
  5464. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactProcessingThreshold'", NULL);
  5465. #endif
  5466. {
  5467. float tolua_ret = (float) self->GetContactProcessingThreshold();
  5468. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5469. }
  5470. }
  5471. return 1;
  5472. #ifndef TOLUA_RELEASE
  5473. tolua_lerror:
  5474. tolua_error(tolua_S,"#ferror in function 'GetContactProcessingThreshold'.",&tolua_err);
  5475. return 0;
  5476. #endif
  5477. }
  5478. #endif //#ifndef TOLUA_DISABLE
  5479. /* method: GetCcdRadius of class RigidBody */
  5480. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetCcdRadius00
  5481. static int tolua_Physics_RigidBody_GetCcdRadius00(lua_State* tolua_S)
  5482. {
  5483. #ifndef TOLUA_RELEASE
  5484. tolua_Error tolua_err;
  5485. if (
  5486. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5487. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5488. )
  5489. goto tolua_lerror;
  5490. else
  5491. #endif
  5492. {
  5493. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5494. #ifndef TOLUA_RELEASE
  5495. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCcdRadius'", NULL);
  5496. #endif
  5497. {
  5498. float tolua_ret = (float) self->GetCcdRadius();
  5499. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5500. }
  5501. }
  5502. return 1;
  5503. #ifndef TOLUA_RELEASE
  5504. tolua_lerror:
  5505. tolua_error(tolua_S,"#ferror in function 'GetCcdRadius'.",&tolua_err);
  5506. return 0;
  5507. #endif
  5508. }
  5509. #endif //#ifndef TOLUA_DISABLE
  5510. /* method: GetCcdMotionThreshold of class RigidBody */
  5511. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetCcdMotionThreshold00
  5512. static int tolua_Physics_RigidBody_GetCcdMotionThreshold00(lua_State* tolua_S)
  5513. {
  5514. #ifndef TOLUA_RELEASE
  5515. tolua_Error tolua_err;
  5516. if (
  5517. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5518. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5519. )
  5520. goto tolua_lerror;
  5521. else
  5522. #endif
  5523. {
  5524. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5525. #ifndef TOLUA_RELEASE
  5526. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCcdMotionThreshold'", NULL);
  5527. #endif
  5528. {
  5529. float tolua_ret = (float) self->GetCcdMotionThreshold();
  5530. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5531. }
  5532. }
  5533. return 1;
  5534. #ifndef TOLUA_RELEASE
  5535. tolua_lerror:
  5536. tolua_error(tolua_S,"#ferror in function 'GetCcdMotionThreshold'.",&tolua_err);
  5537. return 0;
  5538. #endif
  5539. }
  5540. #endif //#ifndef TOLUA_DISABLE
  5541. /* method: GetUseGravity of class RigidBody */
  5542. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetUseGravity00
  5543. static int tolua_Physics_RigidBody_GetUseGravity00(lua_State* tolua_S)
  5544. {
  5545. #ifndef TOLUA_RELEASE
  5546. tolua_Error tolua_err;
  5547. if (
  5548. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5549. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5550. )
  5551. goto tolua_lerror;
  5552. else
  5553. #endif
  5554. {
  5555. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5556. #ifndef TOLUA_RELEASE
  5557. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetUseGravity'", NULL);
  5558. #endif
  5559. {
  5560. bool tolua_ret = (bool) self->GetUseGravity();
  5561. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  5562. }
  5563. }
  5564. return 1;
  5565. #ifndef TOLUA_RELEASE
  5566. tolua_lerror:
  5567. tolua_error(tolua_S,"#ferror in function 'GetUseGravity'.",&tolua_err);
  5568. return 0;
  5569. #endif
  5570. }
  5571. #endif //#ifndef TOLUA_DISABLE
  5572. /* method: GetGravityOverride of class RigidBody */
  5573. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetGravityOverride00
  5574. static int tolua_Physics_RigidBody_GetGravityOverride00(lua_State* tolua_S)
  5575. {
  5576. #ifndef TOLUA_RELEASE
  5577. tolua_Error tolua_err;
  5578. if (
  5579. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5580. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5581. )
  5582. goto tolua_lerror;
  5583. else
  5584. #endif
  5585. {
  5586. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5587. #ifndef TOLUA_RELEASE
  5588. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGravityOverride'", NULL);
  5589. #endif
  5590. {
  5591. const Vector3& tolua_ret = (const Vector3&) self->GetGravityOverride();
  5592. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector3");
  5593. }
  5594. }
  5595. return 1;
  5596. #ifndef TOLUA_RELEASE
  5597. tolua_lerror:
  5598. tolua_error(tolua_S,"#ferror in function 'GetGravityOverride'.",&tolua_err);
  5599. return 0;
  5600. #endif
  5601. }
  5602. #endif //#ifndef TOLUA_DISABLE
  5603. /* method: GetCenterOfMass of class RigidBody */
  5604. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetCenterOfMass00
  5605. static int tolua_Physics_RigidBody_GetCenterOfMass00(lua_State* tolua_S)
  5606. {
  5607. #ifndef TOLUA_RELEASE
  5608. tolua_Error tolua_err;
  5609. if (
  5610. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5611. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5612. )
  5613. goto tolua_lerror;
  5614. else
  5615. #endif
  5616. {
  5617. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5618. #ifndef TOLUA_RELEASE
  5619. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCenterOfMass'", NULL);
  5620. #endif
  5621. {
  5622. const Vector3& tolua_ret = (const Vector3&) self->GetCenterOfMass();
  5623. tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Vector3");
  5624. }
  5625. }
  5626. return 1;
  5627. #ifndef TOLUA_RELEASE
  5628. tolua_lerror:
  5629. tolua_error(tolua_S,"#ferror in function 'GetCenterOfMass'.",&tolua_err);
  5630. return 0;
  5631. #endif
  5632. }
  5633. #endif //#ifndef TOLUA_DISABLE
  5634. /* method: IsKinematic of class RigidBody */
  5635. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_IsKinematic00
  5636. static int tolua_Physics_RigidBody_IsKinematic00(lua_State* tolua_S)
  5637. {
  5638. #ifndef TOLUA_RELEASE
  5639. tolua_Error tolua_err;
  5640. if (
  5641. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5642. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5643. )
  5644. goto tolua_lerror;
  5645. else
  5646. #endif
  5647. {
  5648. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5649. #ifndef TOLUA_RELEASE
  5650. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsKinematic'", NULL);
  5651. #endif
  5652. {
  5653. bool tolua_ret = (bool) self->IsKinematic();
  5654. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  5655. }
  5656. }
  5657. return 1;
  5658. #ifndef TOLUA_RELEASE
  5659. tolua_lerror:
  5660. tolua_error(tolua_S,"#ferror in function 'IsKinematic'.",&tolua_err);
  5661. return 0;
  5662. #endif
  5663. }
  5664. #endif //#ifndef TOLUA_DISABLE
  5665. /* method: IsPhantom of class RigidBody */
  5666. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_IsPhantom00
  5667. static int tolua_Physics_RigidBody_IsPhantom00(lua_State* tolua_S)
  5668. {
  5669. #ifndef TOLUA_RELEASE
  5670. tolua_Error tolua_err;
  5671. if (
  5672. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5673. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5674. )
  5675. goto tolua_lerror;
  5676. else
  5677. #endif
  5678. {
  5679. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5680. #ifndef TOLUA_RELEASE
  5681. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsPhantom'", NULL);
  5682. #endif
  5683. {
  5684. bool tolua_ret = (bool) self->IsPhantom();
  5685. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  5686. }
  5687. }
  5688. return 1;
  5689. #ifndef TOLUA_RELEASE
  5690. tolua_lerror:
  5691. tolua_error(tolua_S,"#ferror in function 'IsPhantom'.",&tolua_err);
  5692. return 0;
  5693. #endif
  5694. }
  5695. #endif //#ifndef TOLUA_DISABLE
  5696. /* method: IsActive of class RigidBody */
  5697. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_IsActive00
  5698. static int tolua_Physics_RigidBody_IsActive00(lua_State* tolua_S)
  5699. {
  5700. #ifndef TOLUA_RELEASE
  5701. tolua_Error tolua_err;
  5702. if (
  5703. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5704. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5705. )
  5706. goto tolua_lerror;
  5707. else
  5708. #endif
  5709. {
  5710. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5711. #ifndef TOLUA_RELEASE
  5712. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsActive'", NULL);
  5713. #endif
  5714. {
  5715. bool tolua_ret = (bool) self->IsActive();
  5716. tolua_pushboolean(tolua_S,(bool)tolua_ret);
  5717. }
  5718. }
  5719. return 1;
  5720. #ifndef TOLUA_RELEASE
  5721. tolua_lerror:
  5722. tolua_error(tolua_S,"#ferror in function 'IsActive'.",&tolua_err);
  5723. return 0;
  5724. #endif
  5725. }
  5726. #endif //#ifndef TOLUA_DISABLE
  5727. /* method: GetCollisionLayer of class RigidBody */
  5728. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetCollisionLayer00
  5729. static int tolua_Physics_RigidBody_GetCollisionLayer00(lua_State* tolua_S)
  5730. {
  5731. #ifndef TOLUA_RELEASE
  5732. tolua_Error tolua_err;
  5733. if (
  5734. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5735. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5736. )
  5737. goto tolua_lerror;
  5738. else
  5739. #endif
  5740. {
  5741. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5742. #ifndef TOLUA_RELEASE
  5743. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCollisionLayer'", NULL);
  5744. #endif
  5745. {
  5746. unsigned tolua_ret = (unsigned) self->GetCollisionLayer();
  5747. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5748. }
  5749. }
  5750. return 1;
  5751. #ifndef TOLUA_RELEASE
  5752. tolua_lerror:
  5753. tolua_error(tolua_S,"#ferror in function 'GetCollisionLayer'.",&tolua_err);
  5754. return 0;
  5755. #endif
  5756. }
  5757. #endif //#ifndef TOLUA_DISABLE
  5758. /* method: GetCollisionMask of class RigidBody */
  5759. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetCollisionMask00
  5760. static int tolua_Physics_RigidBody_GetCollisionMask00(lua_State* tolua_S)
  5761. {
  5762. #ifndef TOLUA_RELEASE
  5763. tolua_Error tolua_err;
  5764. if (
  5765. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5766. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5767. )
  5768. goto tolua_lerror;
  5769. else
  5770. #endif
  5771. {
  5772. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5773. #ifndef TOLUA_RELEASE
  5774. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCollisionMask'", NULL);
  5775. #endif
  5776. {
  5777. unsigned tolua_ret = (unsigned) self->GetCollisionMask();
  5778. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5779. }
  5780. }
  5781. return 1;
  5782. #ifndef TOLUA_RELEASE
  5783. tolua_lerror:
  5784. tolua_error(tolua_S,"#ferror in function 'GetCollisionMask'.",&tolua_err);
  5785. return 0;
  5786. #endif
  5787. }
  5788. #endif //#ifndef TOLUA_DISABLE
  5789. /* method: GetCollisionEventMode of class RigidBody */
  5790. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_GetCollisionEventMode00
  5791. static int tolua_Physics_RigidBody_GetCollisionEventMode00(lua_State* tolua_S)
  5792. {
  5793. #ifndef TOLUA_RELEASE
  5794. tolua_Error tolua_err;
  5795. if (
  5796. !tolua_isusertype(tolua_S,1,"const RigidBody",0,&tolua_err) ||
  5797. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5798. )
  5799. goto tolua_lerror;
  5800. else
  5801. #endif
  5802. {
  5803. const RigidBody* self = (const RigidBody*) tolua_tousertype(tolua_S,1,0);
  5804. #ifndef TOLUA_RELEASE
  5805. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCollisionEventMode'", NULL);
  5806. #endif
  5807. {
  5808. CollisionEventMode tolua_ret = (CollisionEventMode) self->GetCollisionEventMode();
  5809. tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  5810. }
  5811. }
  5812. return 1;
  5813. #ifndef TOLUA_RELEASE
  5814. tolua_lerror:
  5815. tolua_error(tolua_S,"#ferror in function 'GetCollisionEventMode'.",&tolua_err);
  5816. return 0;
  5817. #endif
  5818. }
  5819. #endif //#ifndef TOLUA_DISABLE
  5820. /* method: ApplyWorldTransform of class RigidBody */
  5821. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ApplyWorldTransform00
  5822. static int tolua_Physics_RigidBody_ApplyWorldTransform00(lua_State* tolua_S)
  5823. {
  5824. #ifndef TOLUA_RELEASE
  5825. tolua_Error tolua_err;
  5826. if (
  5827. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  5828. (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const Vector3",0,&tolua_err)) ||
  5829. (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const Quaternion",0,&tolua_err)) ||
  5830. !tolua_isnoobj(tolua_S,4,&tolua_err)
  5831. )
  5832. goto tolua_lerror;
  5833. else
  5834. #endif
  5835. {
  5836. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  5837. const Vector3* newWorldPosition = ((const Vector3*) tolua_tousertype(tolua_S,2,0));
  5838. const Quaternion* newWorldRotation = ((const Quaternion*) tolua_tousertype(tolua_S,3,0));
  5839. #ifndef TOLUA_RELEASE
  5840. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyWorldTransform'", NULL);
  5841. #endif
  5842. {
  5843. self->ApplyWorldTransform(*newWorldPosition,*newWorldRotation);
  5844. }
  5845. }
  5846. return 0;
  5847. #ifndef TOLUA_RELEASE
  5848. tolua_lerror:
  5849. tolua_error(tolua_S,"#ferror in function 'ApplyWorldTransform'.",&tolua_err);
  5850. return 0;
  5851. #endif
  5852. }
  5853. #endif //#ifndef TOLUA_DISABLE
  5854. /* method: UpdateMass of class RigidBody */
  5855. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_UpdateMass00
  5856. static int tolua_Physics_RigidBody_UpdateMass00(lua_State* tolua_S)
  5857. {
  5858. #ifndef TOLUA_RELEASE
  5859. tolua_Error tolua_err;
  5860. if (
  5861. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  5862. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5863. )
  5864. goto tolua_lerror;
  5865. else
  5866. #endif
  5867. {
  5868. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  5869. #ifndef TOLUA_RELEASE
  5870. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdateMass'", NULL);
  5871. #endif
  5872. {
  5873. self->UpdateMass();
  5874. }
  5875. }
  5876. return 0;
  5877. #ifndef TOLUA_RELEASE
  5878. tolua_lerror:
  5879. tolua_error(tolua_S,"#ferror in function 'UpdateMass'.",&tolua_err);
  5880. return 0;
  5881. #endif
  5882. }
  5883. #endif //#ifndef TOLUA_DISABLE
  5884. /* method: UpdateGravity of class RigidBody */
  5885. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_UpdateGravity00
  5886. static int tolua_Physics_RigidBody_UpdateGravity00(lua_State* tolua_S)
  5887. {
  5888. #ifndef TOLUA_RELEASE
  5889. tolua_Error tolua_err;
  5890. if (
  5891. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  5892. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5893. )
  5894. goto tolua_lerror;
  5895. else
  5896. #endif
  5897. {
  5898. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  5899. #ifndef TOLUA_RELEASE
  5900. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'UpdateGravity'", NULL);
  5901. #endif
  5902. {
  5903. self->UpdateGravity();
  5904. }
  5905. }
  5906. return 0;
  5907. #ifndef TOLUA_RELEASE
  5908. tolua_lerror:
  5909. tolua_error(tolua_S,"#ferror in function 'UpdateGravity'.",&tolua_err);
  5910. return 0;
  5911. #endif
  5912. }
  5913. #endif //#ifndef TOLUA_DISABLE
  5914. /* method: AddConstraint of class RigidBody */
  5915. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_AddConstraint00
  5916. static int tolua_Physics_RigidBody_AddConstraint00(lua_State* tolua_S)
  5917. {
  5918. #ifndef TOLUA_RELEASE
  5919. tolua_Error tolua_err;
  5920. if (
  5921. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  5922. !tolua_isusertype(tolua_S,2,"Constraint",0,&tolua_err) ||
  5923. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5924. )
  5925. goto tolua_lerror;
  5926. else
  5927. #endif
  5928. {
  5929. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  5930. Constraint* constraint = ((Constraint*) tolua_tousertype(tolua_S,2,0));
  5931. #ifndef TOLUA_RELEASE
  5932. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddConstraint'", NULL);
  5933. #endif
  5934. {
  5935. self->AddConstraint(constraint);
  5936. }
  5937. }
  5938. return 0;
  5939. #ifndef TOLUA_RELEASE
  5940. tolua_lerror:
  5941. tolua_error(tolua_S,"#ferror in function 'AddConstraint'.",&tolua_err);
  5942. return 0;
  5943. #endif
  5944. }
  5945. #endif //#ifndef TOLUA_DISABLE
  5946. /* method: RemoveConstraint of class RigidBody */
  5947. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_RemoveConstraint00
  5948. static int tolua_Physics_RigidBody_RemoveConstraint00(lua_State* tolua_S)
  5949. {
  5950. #ifndef TOLUA_RELEASE
  5951. tolua_Error tolua_err;
  5952. if (
  5953. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  5954. !tolua_isusertype(tolua_S,2,"Constraint",0,&tolua_err) ||
  5955. !tolua_isnoobj(tolua_S,3,&tolua_err)
  5956. )
  5957. goto tolua_lerror;
  5958. else
  5959. #endif
  5960. {
  5961. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  5962. Constraint* constraint = ((Constraint*) tolua_tousertype(tolua_S,2,0));
  5963. #ifndef TOLUA_RELEASE
  5964. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RemoveConstraint'", NULL);
  5965. #endif
  5966. {
  5967. self->RemoveConstraint(constraint);
  5968. }
  5969. }
  5970. return 0;
  5971. #ifndef TOLUA_RELEASE
  5972. tolua_lerror:
  5973. tolua_error(tolua_S,"#ferror in function 'RemoveConstraint'.",&tolua_err);
  5974. return 0;
  5975. #endif
  5976. }
  5977. #endif //#ifndef TOLUA_DISABLE
  5978. /* method: ReleaseBody of class RigidBody */
  5979. #ifndef TOLUA_DISABLE_tolua_Physics_RigidBody_ReleaseBody00
  5980. static int tolua_Physics_RigidBody_ReleaseBody00(lua_State* tolua_S)
  5981. {
  5982. #ifndef TOLUA_RELEASE
  5983. tolua_Error tolua_err;
  5984. if (
  5985. !tolua_isusertype(tolua_S,1,"RigidBody",0,&tolua_err) ||
  5986. !tolua_isnoobj(tolua_S,2,&tolua_err)
  5987. )
  5988. goto tolua_lerror;
  5989. else
  5990. #endif
  5991. {
  5992. RigidBody* self = (RigidBody*) tolua_tousertype(tolua_S,1,0);
  5993. #ifndef TOLUA_RELEASE
  5994. if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReleaseBody'", NULL);
  5995. #endif
  5996. {
  5997. self->ReleaseBody();
  5998. }
  5999. }
  6000. return 0;
  6001. #ifndef TOLUA_RELEASE
  6002. tolua_lerror:
  6003. tolua_error(tolua_S,"#ferror in function 'ReleaseBody'.",&tolua_err);
  6004. return 0;
  6005. #endif
  6006. }
  6007. #endif //#ifndef TOLUA_DISABLE
  6008. /* Open function */
  6009. TOLUA_API int tolua_Physics_open (lua_State* tolua_S)
  6010. {
  6011. tolua_open(tolua_S);
  6012. tolua_reg_types(tolua_S);
  6013. tolua_module(tolua_S,NULL,0);
  6014. tolua_beginmodule(tolua_S,NULL);
  6015. tolua_constant(tolua_S,"SHAPE_BOX",SHAPE_BOX);
  6016. tolua_constant(tolua_S,"SHAPE_SPHERE",SHAPE_SPHERE);
  6017. tolua_constant(tolua_S,"SHAPE_STATICPLANE",SHAPE_STATICPLANE);
  6018. tolua_constant(tolua_S,"SHAPE_CYLINDER",SHAPE_CYLINDER);
  6019. tolua_constant(tolua_S,"SHAPE_CAPSULE",SHAPE_CAPSULE);
  6020. tolua_constant(tolua_S,"SHAPE_CONE",SHAPE_CONE);
  6021. tolua_constant(tolua_S,"SHAPE_TRIANGLEMESH",SHAPE_TRIANGLEMESH);
  6022. tolua_constant(tolua_S,"SHAPE_CONVEXHULL",SHAPE_CONVEXHULL);
  6023. tolua_constant(tolua_S,"SHAPE_TERRAIN",SHAPE_TERRAIN);
  6024. tolua_cclass(tolua_S,"CollisionShape","CollisionShape","Component",NULL);
  6025. tolua_beginmodule(tolua_S,"CollisionShape");
  6026. tolua_function(tolua_S,"SetBox",tolua_Physics_CollisionShape_SetBox00);
  6027. tolua_function(tolua_S,"SetBox",tolua_Physics_CollisionShape_SetBox01);
  6028. tolua_function(tolua_S,"SetBox",tolua_Physics_CollisionShape_SetBox02);
  6029. tolua_function(tolua_S,"SetSphere",tolua_Physics_CollisionShape_SetSphere00);
  6030. tolua_function(tolua_S,"SetSphere",tolua_Physics_CollisionShape_SetSphere01);
  6031. tolua_function(tolua_S,"SetSphere",tolua_Physics_CollisionShape_SetSphere02);
  6032. tolua_function(tolua_S,"SetStaticPlane",tolua_Physics_CollisionShape_SetStaticPlane00);
  6033. tolua_function(tolua_S,"SetStaticPlane",tolua_Physics_CollisionShape_SetStaticPlane01);
  6034. tolua_function(tolua_S,"SetStaticPlane",tolua_Physics_CollisionShape_SetStaticPlane02);
  6035. tolua_function(tolua_S,"SetCylinder",tolua_Physics_CollisionShape_SetCylinder00);
  6036. tolua_function(tolua_S,"SetCylinder",tolua_Physics_CollisionShape_SetCylinder01);
  6037. tolua_function(tolua_S,"SetCylinder",tolua_Physics_CollisionShape_SetCylinder02);
  6038. tolua_function(tolua_S,"SetCapsule",tolua_Physics_CollisionShape_SetCapsule00);
  6039. tolua_function(tolua_S,"SetCapsule",tolua_Physics_CollisionShape_SetCapsule01);
  6040. tolua_function(tolua_S,"SetCapsule",tolua_Physics_CollisionShape_SetCapsule02);
  6041. tolua_function(tolua_S,"SetCone",tolua_Physics_CollisionShape_SetCone00);
  6042. tolua_function(tolua_S,"SetCone",tolua_Physics_CollisionShape_SetCone01);
  6043. tolua_function(tolua_S,"SetCone",tolua_Physics_CollisionShape_SetCone02);
  6044. tolua_function(tolua_S,"SetTriangleMesh",tolua_Physics_CollisionShape_SetTriangleMesh00);
  6045. tolua_function(tolua_S,"SetTriangleMesh",tolua_Physics_CollisionShape_SetTriangleMesh01);
  6046. tolua_function(tolua_S,"SetTriangleMesh",tolua_Physics_CollisionShape_SetTriangleMesh02);
  6047. tolua_function(tolua_S,"SetTriangleMesh",tolua_Physics_CollisionShape_SetTriangleMesh03);
  6048. tolua_function(tolua_S,"SetConvexHull",tolua_Physics_CollisionShape_SetConvexHull00);
  6049. tolua_function(tolua_S,"SetConvexHull",tolua_Physics_CollisionShape_SetConvexHull01);
  6050. tolua_function(tolua_S,"SetConvexHull",tolua_Physics_CollisionShape_SetConvexHull02);
  6051. tolua_function(tolua_S,"SetConvexHull",tolua_Physics_CollisionShape_SetConvexHull03);
  6052. tolua_function(tolua_S,"SetTerrain",tolua_Physics_CollisionShape_SetTerrain00);
  6053. tolua_function(tolua_S,"SetShapeType",tolua_Physics_CollisionShape_SetShapeType00);
  6054. tolua_function(tolua_S,"SetSize",tolua_Physics_CollisionShape_SetSize00);
  6055. tolua_function(tolua_S,"SetPosition",tolua_Physics_CollisionShape_SetPosition00);
  6056. tolua_function(tolua_S,"SetRotation",tolua_Physics_CollisionShape_SetRotation00);
  6057. tolua_function(tolua_S,"SetTransform",tolua_Physics_CollisionShape_SetTransform00);
  6058. tolua_function(tolua_S,"SetMargin",tolua_Physics_CollisionShape_SetMargin00);
  6059. tolua_function(tolua_S,"SetModel",tolua_Physics_CollisionShape_SetModel00);
  6060. tolua_function(tolua_S,"SetLodLevel",tolua_Physics_CollisionShape_SetLodLevel00);
  6061. tolua_function(tolua_S,"GetPhysicsWorld",tolua_Physics_CollisionShape_GetPhysicsWorld00);
  6062. tolua_function(tolua_S,"GetShapeType",tolua_Physics_CollisionShape_GetShapeType00);
  6063. tolua_function(tolua_S,"GetSize",tolua_Physics_CollisionShape_GetSize00);
  6064. tolua_function(tolua_S,"GetPosition",tolua_Physics_CollisionShape_GetPosition00);
  6065. tolua_function(tolua_S,"GetRotation",tolua_Physics_CollisionShape_GetRotation00);
  6066. tolua_function(tolua_S,"GetMargin",tolua_Physics_CollisionShape_GetMargin00);
  6067. tolua_function(tolua_S,"GetModel",tolua_Physics_CollisionShape_GetModel00);
  6068. tolua_function(tolua_S,"GetLodLevel",tolua_Physics_CollisionShape_GetLodLevel00);
  6069. tolua_function(tolua_S,"GetWorldBoundingBox",tolua_Physics_CollisionShape_GetWorldBoundingBox00);
  6070. tolua_function(tolua_S,"NotifyRigidBody",tolua_Physics_CollisionShape_NotifyRigidBody00);
  6071. tolua_function(tolua_S,"SetModelAttr",tolua_Physics_CollisionShape_SetModelAttr00);
  6072. tolua_function(tolua_S,"GetModelAttr",tolua_Physics_CollisionShape_GetModelAttr00);
  6073. tolua_function(tolua_S,"ReleaseShape",tolua_Physics_CollisionShape_ReleaseShape00);
  6074. tolua_endmodule(tolua_S);
  6075. tolua_constant(tolua_S,"CONSTRAINT_POINT",CONSTRAINT_POINT);
  6076. tolua_constant(tolua_S,"CONSTRAINT_HINGE",CONSTRAINT_HINGE);
  6077. tolua_constant(tolua_S,"CONSTRAINT_SLIDER",CONSTRAINT_SLIDER);
  6078. tolua_constant(tolua_S,"CONSTRAINT_CONETWIST",CONSTRAINT_CONETWIST);
  6079. tolua_cclass(tolua_S,"Constraint","Constraint","Component",NULL);
  6080. tolua_beginmodule(tolua_S,"Constraint");
  6081. tolua_function(tolua_S,"SetConstraintType",tolua_Physics_Constraint_SetConstraintType00);
  6082. tolua_function(tolua_S,"SetOtherBody",tolua_Physics_Constraint_SetOtherBody00);
  6083. tolua_function(tolua_S,"SetPosition",tolua_Physics_Constraint_SetPosition00);
  6084. tolua_function(tolua_S,"SetRotation",tolua_Physics_Constraint_SetRotation00);
  6085. tolua_function(tolua_S,"SetAxis",tolua_Physics_Constraint_SetAxis00);
  6086. tolua_function(tolua_S,"SetOtherPosition",tolua_Physics_Constraint_SetOtherPosition00);
  6087. tolua_function(tolua_S,"SetOtherRotation",tolua_Physics_Constraint_SetOtherRotation00);
  6088. tolua_function(tolua_S,"SetOtherAxis",tolua_Physics_Constraint_SetOtherAxis00);
  6089. tolua_function(tolua_S,"SetWorldPosition",tolua_Physics_Constraint_SetWorldPosition00);
  6090. tolua_function(tolua_S,"SetHighLimit",tolua_Physics_Constraint_SetHighLimit00);
  6091. tolua_function(tolua_S,"SetLowLimit",tolua_Physics_Constraint_SetLowLimit00);
  6092. tolua_function(tolua_S,"SetERP",tolua_Physics_Constraint_SetERP00);
  6093. tolua_function(tolua_S,"SetCFM",tolua_Physics_Constraint_SetCFM00);
  6094. tolua_function(tolua_S,"SetDisableCollision",tolua_Physics_Constraint_SetDisableCollision00);
  6095. tolua_function(tolua_S,"GetPhysicsWorld",tolua_Physics_Constraint_GetPhysicsWorld00);
  6096. tolua_function(tolua_S,"GetConstraintType",tolua_Physics_Constraint_GetConstraintType00);
  6097. tolua_function(tolua_S,"GetOwnBody",tolua_Physics_Constraint_GetOwnBody00);
  6098. tolua_function(tolua_S,"GetOtherBody",tolua_Physics_Constraint_GetOtherBody00);
  6099. tolua_function(tolua_S,"GetPosition",tolua_Physics_Constraint_GetPosition00);
  6100. tolua_function(tolua_S,"GetRotation",tolua_Physics_Constraint_GetRotation00);
  6101. tolua_function(tolua_S,"GetOtherPosition",tolua_Physics_Constraint_GetOtherPosition00);
  6102. tolua_function(tolua_S,"GetOtherRotation",tolua_Physics_Constraint_GetOtherRotation00);
  6103. tolua_function(tolua_S,"GetWorldPosition",tolua_Physics_Constraint_GetWorldPosition00);
  6104. tolua_function(tolua_S,"GetHighLimit",tolua_Physics_Constraint_GetHighLimit00);
  6105. tolua_function(tolua_S,"GetLowLimit",tolua_Physics_Constraint_GetLowLimit00);
  6106. tolua_function(tolua_S,"GetERP",tolua_Physics_Constraint_GetERP00);
  6107. tolua_function(tolua_S,"GetCFM",tolua_Physics_Constraint_GetCFM00);
  6108. tolua_function(tolua_S,"GetDisableCollision",tolua_Physics_Constraint_GetDisableCollision00);
  6109. tolua_function(tolua_S,"ReleaseConstraint",tolua_Physics_Constraint_ReleaseConstraint00);
  6110. tolua_function(tolua_S,"ApplyFrames",tolua_Physics_Constraint_ApplyFrames00);
  6111. tolua_endmodule(tolua_S);
  6112. #ifdef __cplusplus
  6113. tolua_cclass(tolua_S,"PhysicsRaycastResult","PhysicsRaycastResult","",tolua_collect_PhysicsRaycastResult);
  6114. #else
  6115. tolua_cclass(tolua_S,"PhysicsRaycastResult","PhysicsRaycastResult","",NULL);
  6116. #endif
  6117. tolua_beginmodule(tolua_S,"PhysicsRaycastResult");
  6118. tolua_function(tolua_S,"new",tolua_Physics_PhysicsRaycastResult_new00);
  6119. tolua_function(tolua_S,"new_local",tolua_Physics_PhysicsRaycastResult_new00_local);
  6120. tolua_function(tolua_S,".call",tolua_Physics_PhysicsRaycastResult_new00_local);
  6121. tolua_variable(tolua_S,"position",tolua_get_PhysicsRaycastResult_position,tolua_set_PhysicsRaycastResult_position);
  6122. tolua_variable(tolua_S,"normal",tolua_get_PhysicsRaycastResult_normal,tolua_set_PhysicsRaycastResult_normal);
  6123. tolua_variable(tolua_S,"distance",tolua_get_PhysicsRaycastResult_distance,tolua_set_PhysicsRaycastResult_distance);
  6124. tolua_variable(tolua_S,"body",tolua_get_PhysicsRaycastResult_body_ptr,tolua_set_PhysicsRaycastResult_body_ptr);
  6125. tolua_endmodule(tolua_S);
  6126. tolua_cclass(tolua_S,"DelayedWorldTransform","DelayedWorldTransform","",NULL);
  6127. tolua_beginmodule(tolua_S,"DelayedWorldTransform");
  6128. tolua_variable(tolua_S,"rigidBody",tolua_get_DelayedWorldTransform_rigidBody_ptr,tolua_set_DelayedWorldTransform_rigidBody_ptr);
  6129. tolua_variable(tolua_S,"parentRigidBody",tolua_get_DelayedWorldTransform_parentRigidBody_ptr,tolua_set_DelayedWorldTransform_parentRigidBody_ptr);
  6130. tolua_variable(tolua_S,"worldPosition",tolua_get_DelayedWorldTransform_worldPosition,tolua_set_DelayedWorldTransform_worldPosition);
  6131. tolua_variable(tolua_S,"worldRotation",tolua_get_DelayedWorldTransform_worldRotation,tolua_set_DelayedWorldTransform_worldRotation);
  6132. tolua_endmodule(tolua_S);
  6133. tolua_cclass(tolua_S,"PhysicsWorld","PhysicsWorld","Component",NULL);
  6134. tolua_beginmodule(tolua_S,"PhysicsWorld");
  6135. tolua_function(tolua_S,"Update",tolua_Physics_PhysicsWorld_Update00);
  6136. tolua_function(tolua_S,"UpdateCollisions",tolua_Physics_PhysicsWorld_UpdateCollisions00);
  6137. tolua_function(tolua_S,"SetFps",tolua_Physics_PhysicsWorld_SetFps00);
  6138. tolua_function(tolua_S,"SetGravity",tolua_Physics_PhysicsWorld_SetGravity00);
  6139. tolua_function(tolua_S,"SetNumIterations",tolua_Physics_PhysicsWorld_SetNumIterations00);
  6140. tolua_function(tolua_S,"SetInterpolation",tolua_Physics_PhysicsWorld_SetInterpolation00);
  6141. tolua_function(tolua_S,"SetInternalEdge",tolua_Physics_PhysicsWorld_SetInternalEdge00);
  6142. tolua_function(tolua_S,"SetSplitImpulse",tolua_Physics_PhysicsWorld_SetSplitImpulse00);
  6143. tolua_function(tolua_S,"SetMaxNetworkAngularVelocity",tolua_Physics_PhysicsWorld_SetMaxNetworkAngularVelocity00);
  6144. tolua_function(tolua_S,"RaycastSingle",tolua_Physics_PhysicsWorld_RaycastSingle00);
  6145. tolua_function(tolua_S,"SphereCast",tolua_Physics_PhysicsWorld_SphereCast00);
  6146. tolua_function(tolua_S,"GetGravity",tolua_Physics_PhysicsWorld_GetGravity00);
  6147. tolua_function(tolua_S,"GetNumIterations",tolua_Physics_PhysicsWorld_GetNumIterations00);
  6148. tolua_function(tolua_S,"GetInterpolation",tolua_Physics_PhysicsWorld_GetInterpolation00);
  6149. tolua_function(tolua_S,"GetInternalEdge",tolua_Physics_PhysicsWorld_GetInternalEdge00);
  6150. tolua_function(tolua_S,"GetSplitImpulse",tolua_Physics_PhysicsWorld_GetSplitImpulse00);
  6151. tolua_function(tolua_S,"GetFps",tolua_Physics_PhysicsWorld_GetFps00);
  6152. tolua_function(tolua_S,"GetMaxNetworkAngularVelocity",tolua_Physics_PhysicsWorld_GetMaxNetworkAngularVelocity00);
  6153. tolua_function(tolua_S,"AddRigidBody",tolua_Physics_PhysicsWorld_AddRigidBody00);
  6154. tolua_function(tolua_S,"RemoveRigidBody",tolua_Physics_PhysicsWorld_RemoveRigidBody00);
  6155. tolua_function(tolua_S,"AddCollisionShape",tolua_Physics_PhysicsWorld_AddCollisionShape00);
  6156. tolua_function(tolua_S,"RemoveCollisionShape",tolua_Physics_PhysicsWorld_RemoveCollisionShape00);
  6157. tolua_function(tolua_S,"AddConstraint",tolua_Physics_PhysicsWorld_AddConstraint00);
  6158. tolua_function(tolua_S,"RemoveConstraint",tolua_Physics_PhysicsWorld_RemoveConstraint00);
  6159. tolua_function(tolua_S,"AddDelayedWorldTransform",tolua_Physics_PhysicsWorld_AddDelayedWorldTransform00);
  6160. tolua_function(tolua_S,"DrawDebugGeometry",tolua_Physics_PhysicsWorld_DrawDebugGeometry00);
  6161. tolua_function(tolua_S,"SetDebugRenderer",tolua_Physics_PhysicsWorld_SetDebugRenderer00);
  6162. tolua_function(tolua_S,"SetDebugDepthTest",tolua_Physics_PhysicsWorld_SetDebugDepthTest00);
  6163. tolua_function(tolua_S,"CleanupGeometryCache",tolua_Physics_PhysicsWorld_CleanupGeometryCache00);
  6164. tolua_function(tolua_S,"SetApplyingTransforms",tolua_Physics_PhysicsWorld_SetApplyingTransforms00);
  6165. tolua_function(tolua_S,"IsApplyingTransforms",tolua_Physics_PhysicsWorld_IsApplyingTransforms00);
  6166. tolua_endmodule(tolua_S);
  6167. tolua_function(tolua_S,"GetPhysicsWorld",tolua_Physics_GetPhysicsWorld00);
  6168. tolua_constant(tolua_S,"COLLISION_NEVER",COLLISION_NEVER);
  6169. tolua_constant(tolua_S,"COLLISION_ACTIVE",COLLISION_ACTIVE);
  6170. tolua_constant(tolua_S,"COLLISION_ALWAYS",COLLISION_ALWAYS);
  6171. tolua_cclass(tolua_S,"RigidBody","RigidBody","Component",NULL);
  6172. tolua_beginmodule(tolua_S,"RigidBody");
  6173. tolua_function(tolua_S,"SetMass",tolua_Physics_RigidBody_SetMass00);
  6174. tolua_function(tolua_S,"SetPosition",tolua_Physics_RigidBody_SetPosition00);
  6175. tolua_function(tolua_S,"SetRotation",tolua_Physics_RigidBody_SetRotation00);
  6176. tolua_function(tolua_S,"SetTransform",tolua_Physics_RigidBody_SetTransform00);
  6177. tolua_function(tolua_S,"SetLinearVelocity",tolua_Physics_RigidBody_SetLinearVelocity00);
  6178. tolua_function(tolua_S,"SetLinearFactor",tolua_Physics_RigidBody_SetLinearFactor00);
  6179. tolua_function(tolua_S,"SetLinearRestThreshold",tolua_Physics_RigidBody_SetLinearRestThreshold00);
  6180. tolua_function(tolua_S,"SetLinearDamping",tolua_Physics_RigidBody_SetLinearDamping00);
  6181. tolua_function(tolua_S,"SetAngularVelocity",tolua_Physics_RigidBody_SetAngularVelocity00);
  6182. tolua_function(tolua_S,"SetAngularFactor",tolua_Physics_RigidBody_SetAngularFactor00);
  6183. tolua_function(tolua_S,"SetAngularRestThreshold",tolua_Physics_RigidBody_SetAngularRestThreshold00);
  6184. tolua_function(tolua_S,"SetAngularDamping",tolua_Physics_RigidBody_SetAngularDamping00);
  6185. tolua_function(tolua_S,"SetFriction",tolua_Physics_RigidBody_SetFriction00);
  6186. tolua_function(tolua_S,"SetRestitution",tolua_Physics_RigidBody_SetRestitution00);
  6187. tolua_function(tolua_S,"SetContactProcessingThreshold",tolua_Physics_RigidBody_SetContactProcessingThreshold00);
  6188. tolua_function(tolua_S,"SetCcdRadius",tolua_Physics_RigidBody_SetCcdRadius00);
  6189. tolua_function(tolua_S,"SetCcdMotionThreshold",tolua_Physics_RigidBody_SetCcdMotionThreshold00);
  6190. tolua_function(tolua_S,"SetUseGravity",tolua_Physics_RigidBody_SetUseGravity00);
  6191. tolua_function(tolua_S,"SetGravityOverride",tolua_Physics_RigidBody_SetGravityOverride00);
  6192. tolua_function(tolua_S,"SetKinematic",tolua_Physics_RigidBody_SetKinematic00);
  6193. tolua_function(tolua_S,"SetPhantom",tolua_Physics_RigidBody_SetPhantom00);
  6194. tolua_function(tolua_S,"SetCollisionLayer",tolua_Physics_RigidBody_SetCollisionLayer00);
  6195. tolua_function(tolua_S,"SetCollisionMask",tolua_Physics_RigidBody_SetCollisionMask00);
  6196. tolua_function(tolua_S,"SetCollisionLayerAndMask",tolua_Physics_RigidBody_SetCollisionLayerAndMask00);
  6197. tolua_function(tolua_S,"SetCollisionEventMode",tolua_Physics_RigidBody_SetCollisionEventMode00);
  6198. tolua_function(tolua_S,"ApplyForce",tolua_Physics_RigidBody_ApplyForce00);
  6199. tolua_function(tolua_S,"ApplyForce",tolua_Physics_RigidBody_ApplyForce01);
  6200. tolua_function(tolua_S,"ApplyTorque",tolua_Physics_RigidBody_ApplyTorque00);
  6201. tolua_function(tolua_S,"ApplyImpulse",tolua_Physics_RigidBody_ApplyImpulse00);
  6202. tolua_function(tolua_S,"ApplyImpulse",tolua_Physics_RigidBody_ApplyImpulse01);
  6203. tolua_function(tolua_S,"ApplyTorqueImpulse",tolua_Physics_RigidBody_ApplyTorqueImpulse00);
  6204. tolua_function(tolua_S,"ResetForces",tolua_Physics_RigidBody_ResetForces00);
  6205. tolua_function(tolua_S,"Activate",tolua_Physics_RigidBody_Activate00);
  6206. tolua_function(tolua_S,"ReAddBodyToWorld",tolua_Physics_RigidBody_ReAddBodyToWorld00);
  6207. tolua_function(tolua_S,"GetPhysicsWorld",tolua_Physics_RigidBody_GetPhysicsWorld00);
  6208. tolua_function(tolua_S,"GetMass",tolua_Physics_RigidBody_GetMass00);
  6209. tolua_function(tolua_S,"GetPosition",tolua_Physics_RigidBody_GetPosition00);
  6210. tolua_function(tolua_S,"GetRotation",tolua_Physics_RigidBody_GetRotation00);
  6211. tolua_function(tolua_S,"GetLinearVelocity",tolua_Physics_RigidBody_GetLinearVelocity00);
  6212. tolua_function(tolua_S,"GetLinearFactor",tolua_Physics_RigidBody_GetLinearFactor00);
  6213. tolua_function(tolua_S,"GetVelocityAtPoint",tolua_Physics_RigidBody_GetVelocityAtPoint00);
  6214. tolua_function(tolua_S,"GetLinearRestThreshold",tolua_Physics_RigidBody_GetLinearRestThreshold00);
  6215. tolua_function(tolua_S,"GetAngularVelocity",tolua_Physics_RigidBody_GetAngularVelocity00);
  6216. tolua_function(tolua_S,"GetAngularFactor",tolua_Physics_RigidBody_GetAngularFactor00);
  6217. tolua_function(tolua_S,"GetAngularRestThreshold",tolua_Physics_RigidBody_GetAngularRestThreshold00);
  6218. tolua_function(tolua_S,"GetFriction",tolua_Physics_RigidBody_GetFriction00);
  6219. tolua_function(tolua_S,"GetRestitution",tolua_Physics_RigidBody_GetRestitution00);
  6220. tolua_function(tolua_S,"GetContactProcessingThreshold",tolua_Physics_RigidBody_GetContactProcessingThreshold00);
  6221. tolua_function(tolua_S,"GetCcdRadius",tolua_Physics_RigidBody_GetCcdRadius00);
  6222. tolua_function(tolua_S,"GetCcdMotionThreshold",tolua_Physics_RigidBody_GetCcdMotionThreshold00);
  6223. tolua_function(tolua_S,"GetUseGravity",tolua_Physics_RigidBody_GetUseGravity00);
  6224. tolua_function(tolua_S,"GetGravityOverride",tolua_Physics_RigidBody_GetGravityOverride00);
  6225. tolua_function(tolua_S,"GetCenterOfMass",tolua_Physics_RigidBody_GetCenterOfMass00);
  6226. tolua_function(tolua_S,"IsKinematic",tolua_Physics_RigidBody_IsKinematic00);
  6227. tolua_function(tolua_S,"IsPhantom",tolua_Physics_RigidBody_IsPhantom00);
  6228. tolua_function(tolua_S,"IsActive",tolua_Physics_RigidBody_IsActive00);
  6229. tolua_function(tolua_S,"GetCollisionLayer",tolua_Physics_RigidBody_GetCollisionLayer00);
  6230. tolua_function(tolua_S,"GetCollisionMask",tolua_Physics_RigidBody_GetCollisionMask00);
  6231. tolua_function(tolua_S,"GetCollisionEventMode",tolua_Physics_RigidBody_GetCollisionEventMode00);
  6232. tolua_function(tolua_S,"ApplyWorldTransform",tolua_Physics_RigidBody_ApplyWorldTransform00);
  6233. tolua_function(tolua_S,"UpdateMass",tolua_Physics_RigidBody_UpdateMass00);
  6234. tolua_function(tolua_S,"UpdateGravity",tolua_Physics_RigidBody_UpdateGravity00);
  6235. tolua_function(tolua_S,"AddConstraint",tolua_Physics_RigidBody_AddConstraint00);
  6236. tolua_function(tolua_S,"RemoveConstraint",tolua_Physics_RigidBody_RemoveConstraint00);
  6237. tolua_function(tolua_S,"ReleaseBody",tolua_Physics_RigidBody_ReleaseBody00);
  6238. tolua_endmodule(tolua_S);
  6239. tolua_endmodule(tolua_S);
  6240. return 1;
  6241. }
  6242. #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
  6243. TOLUA_API int luaopen_Physics (lua_State* tolua_S) {
  6244. return tolua_Physics_open(tolua_S);
  6245. };
  6246. #endif