ufbx.vapi 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985
  1. /*
  2. * Copyright (c) 2012-2025 Daniele Bartolini <[email protected]>
  3. * SPDX-License-Identifier: MIT
  4. */
  5. [CCode (cheader_filename = "ufbx.h")]
  6. namespace ufbx
  7. {
  8. public const int ERROR_STACK_MAX_DEPTH;
  9. public const int PANIC_MESSAGE_LENGTH;
  10. public const int ERROR_INFO_LENGTH;
  11. [SimpleType]
  12. [CCode (cname = "ufbx_real", has_type_id = false)]
  13. public struct Real : double
  14. {
  15. }
  16. [SimpleType]
  17. [CCode (cname = "ufbx_string", destroy_function = "", has_type_id = false)]
  18. public struct String
  19. {
  20. [CCode (array_length_cname = "length", array_length_type = "size_t")]
  21. public char[] data;
  22. }
  23. [SimpleType]
  24. [CCode (cname = "ufbx_blob", destroy_function = "", has_type_id = false)]
  25. public struct Blob
  26. {
  27. [CCode (array_length_cname = "size", array_length_type = "size_t")]
  28. public void[] data;
  29. }
  30. [SimpleType]
  31. [CCode (cname = "ufbx_vec2", destroy_function = "", has_type_id = false)]
  32. public struct Vec2
  33. {
  34. public Real x;
  35. public Real y;
  36. [CCode (cname = "v")]
  37. public Real v[2];
  38. }
  39. [SimpleType]
  40. [CCode (cname = "ufbx_vec3", destroy_function = "", has_type_id = false)]
  41. public struct Vec3
  42. {
  43. public Real x;
  44. public Real y;
  45. public Real z;
  46. [CCode (cname = "v")]
  47. public Real v[3];
  48. }
  49. [SimpleType]
  50. [CCode (cname = "ufbx_vec4", destroy_function = "", has_type_id = false)]
  51. public struct Vec4
  52. {
  53. public Real x;
  54. public Real y;
  55. public Real z;
  56. public Real w;
  57. [CCode (cname = "v")]
  58. public Real v[3];
  59. }
  60. [SimpleType]
  61. [CCode (cname = "ufbx_quat", destroy_function = "", has_type_id = false)]
  62. public struct Quat
  63. {
  64. public Real x;
  65. public Real y;
  66. public Real z;
  67. public Real w;
  68. [CCode (cname = "v")]
  69. public Real v[4];
  70. }
  71. [CCode (cname = "ufbx_rotation_order", cprefix = "UFBX_ROTATION_ORDER_", has_type_id = false)]
  72. public enum RotationOrder
  73. {
  74. XYZ,
  75. XZY,
  76. YZX,
  77. YXZ,
  78. ZXY,
  79. ZYX,
  80. SPHERIC,
  81. COUNT
  82. }
  83. [SimpleType]
  84. [CCode (cname = "ufbx_transform", destroy_function = "", has_type_id = false)]
  85. public struct Transform
  86. {
  87. public Vec3 translation;
  88. public Quat rotation;
  89. public Vec3 scale;
  90. }
  91. [CCode (cname = "ufbx_matrix", destroy_function = "", has_type_id = false)]
  92. public struct Matrix
  93. {
  94. public Real m00;
  95. public Real m10;
  96. public Real m20;
  97. public Real m01;
  98. public Real m11;
  99. public Real m21;
  100. public Real m02;
  101. public Real m12;
  102. public Real m22;
  103. public Real m03;
  104. public Real m13;
  105. public Real m23;
  106. [CCode (cname = "cols")]
  107. public Vec3 cols[4];
  108. [CCode (cname = "v")]
  109. public Real v[12];
  110. }
  111. [CCode (cname = "ufbx_void_list", destroy_function = "", has_type_id = false)]
  112. public struct VoidList
  113. {
  114. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  115. public void[] data;
  116. }
  117. [CCode (cname = "ufbx_bool_list", destroy_function = "", has_type_id = false)]
  118. public struct BoolList
  119. {
  120. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  121. public bool[] data;
  122. }
  123. [CCode (cname = "ufbx_uint32_list", destroy_function = "", has_type_id = false)]
  124. public struct Uint32List
  125. {
  126. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  127. public uint32[] data;
  128. }
  129. [CCode (cname = "ufbx_real_list", destroy_function = "", has_type_id = false)]
  130. public struct RealList
  131. {
  132. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  133. public Real[] data;
  134. }
  135. [CCode (cname = "ufbx_vec2_list", destroy_function = "", has_type_id = false)]
  136. public struct Vec2List
  137. {
  138. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  139. public Vec2[] data;
  140. }
  141. [CCode (cname = "ufbx_vec3_list", destroy_function = "", has_type_id = false)]
  142. public struct Vec3List
  143. {
  144. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  145. public Vec3[] data;
  146. }
  147. [CCode (cname = "ufbx_vec4_list", destroy_function = "", has_type_id = false)]
  148. public struct Vec4List
  149. {
  150. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  151. public Vec4[] data;
  152. }
  153. [CCode (cname = "ufbx_string_list", destroy_function = "", has_type_id = false)]
  154. public struct StringList
  155. {
  156. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  157. public String[] data;
  158. }
  159. public const uint32 NO_INDEX;
  160. [CCode (cname = "ufbx_dom_value_type", cprefix = "UFBX_DOM_VALUE_", has_type_id = false)]
  161. public enum DomValueType
  162. {
  163. NUMBER,
  164. STRING,
  165. ARRAY_I8,
  166. ARRAY_I32,
  167. ARRAY_I64,
  168. ARRAY_F32,
  169. ARRAY_F64,
  170. ARRAY_RAW_STRING,
  171. ARRAY_IGNORED,
  172. TYPE_COUNT
  173. }
  174. [CCode (cname = "ufbx_dom_value", destroy_function = "", has_type_id = false)]
  175. public struct DomValue
  176. {
  177. public DomValueType type;
  178. public String value_str;
  179. public Blob value_blob;
  180. public int64 value_int;
  181. public double value_float;
  182. }
  183. [CCode (cname = "ufbx_dom_node_list", destroy_function = "", has_type_id = false)]
  184. public struct DomNodeList
  185. {
  186. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  187. public DomNode[] data;
  188. }
  189. [CCode (cname = "ufbx_dom_value_list", destroy_function = "", has_type_id = false)]
  190. public struct DomValueList
  191. {
  192. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  193. public DomValue[] data;
  194. }
  195. [Compact]
  196. [CCode (cname = "ufbx_dom_node", destroy_function = "", has_type_id = false)]
  197. public class DomNode
  198. {
  199. public String name;
  200. public DomNodeList children;
  201. public DomValueList values;
  202. }
  203. [CCode (cname = "ufbx_prop_type", cprefix = "UFBX_PROP_", has_type_id = false)]
  204. public enum PropType
  205. {
  206. UNKNOWN,
  207. BOOLEAN,
  208. INTEGER,
  209. NUMBER,
  210. VECTOR,
  211. COLOR,
  212. COLOR_WITH_ALPHA,
  213. STRING,
  214. DATE_TIME,
  215. TRANSLATION,
  216. ROTATION,
  217. SCALING,
  218. DISTANCE,
  219. COMPOUND,
  220. BLOB,
  221. REFERENCE,
  222. TYPE_COUNT
  223. }
  224. [CCode (cname = "ufbx_prop_flags", cprefix = "UFBX_PROP_FLAG_", has_type_id = false)]
  225. [Flags]
  226. public enum PropFlags
  227. {
  228. ANIMATABLE,
  229. USER_DEFINED,
  230. HIDDEN,
  231. LOCK_X,
  232. LOCK_Y,
  233. LOCK_Z,
  234. LOCK_W,
  235. MUTE_X,
  236. MUTE_Y,
  237. MUTE_Z,
  238. MUTE_W,
  239. SYNTHETIC,
  240. ANIMATED,
  241. NOT_FOUND,
  242. CONNECTED,
  243. NO_VALUE,
  244. OVERRIDDEN,
  245. VALUE_REAL,
  246. VALUE_VEC2,
  247. VALUE_VEC3,
  248. VALUE_VEC4,
  249. VALUE_INT,
  250. VALUE_STR,
  251. VALUE_BLOB
  252. }
  253. [Compact]
  254. [CCode (cname = "ufbx_prop", destroy_function = "", has_type_id = false)]
  255. public class Prop
  256. {
  257. public String name;
  258. public uint32 _internal_key;
  259. public PropType type;
  260. public PropFlags flags;
  261. public String value_str;
  262. public Blob value_blob;
  263. public int64 value_int;
  264. [CCode (cname = "value_real_arr")]
  265. public Real value_real_arr[4];
  266. [CCode (cname = "value_real")]
  267. public Real value_real;
  268. [CCode (cname = "value_vec2")]
  269. public Vec2 value_vec2;
  270. [CCode (cname = "value_vec3")]
  271. public Vec3 value_vec3;
  272. [CCode (cname = "value_vec4")]
  273. public Vec4 value_vec4;
  274. }
  275. [CCode (cname = "ufbx_prop_list", destroy_function = "", has_type_id = false)]
  276. public struct PropList
  277. {
  278. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  279. public Prop[] data;
  280. }
  281. [CCode (cname = "ufbx_props", destroy_function = "", has_type_id = false)]
  282. public struct Props
  283. {
  284. public PropList props;
  285. public size_t num_animated;
  286. public unowned Props? defaults;
  287. }
  288. [CCode (cname = "ufbx_element_list", destroy_function = "", has_type_id = false)]
  289. public struct ElementList
  290. {
  291. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  292. public Element[] data;
  293. }
  294. [CCode (cname = "ufbx_unknown_list", destroy_function = "", has_type_id = false)]
  295. public struct UnknownList
  296. {
  297. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  298. public Unknown[] data;
  299. }
  300. [CCode (cname = "ufbx_node_list", destroy_function = "", has_type_id = false)]
  301. public struct NodeList
  302. {
  303. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  304. public (unowned Node)[] data;
  305. }
  306. [CCode (cname = "ufbx_mesh_list", destroy_function = "", has_type_id = false)]
  307. public struct MeshList
  308. {
  309. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  310. public Mesh[] data;
  311. }
  312. [CCode (cname = "ufbx_light_list", destroy_function = "", has_type_id = false)]
  313. public struct LightList
  314. {
  315. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  316. public Light[] data;
  317. }
  318. [CCode (cname = "ufbx_camera_list", destroy_function = "", has_type_id = false)]
  319. public struct CameraList
  320. {
  321. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  322. public Camera[] data;
  323. }
  324. [CCode (cname = "ufbx_bone_list", destroy_function = "", has_type_id = false)]
  325. public struct BoneList
  326. {
  327. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  328. public Bone[] data;
  329. }
  330. [CCode (cname = "ufbx_empty_list", destroy_function = "", has_type_id = false)]
  331. public struct EmptyList
  332. {
  333. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  334. public Empty[] data;
  335. }
  336. [CCode (cname = "ufbx_line_curve_list", destroy_function = "", has_type_id = false)]
  337. public struct LineCurveList
  338. {
  339. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  340. public LineCurve[] data;
  341. }
  342. [CCode (cname = "ufbx_nurbs_curve_list", destroy_function = "", has_type_id = false)]
  343. public struct NurbsCurveList
  344. {
  345. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  346. public NurbsCurve[] data;
  347. }
  348. [CCode (cname = "ufbx_nurbs_surface_list", destroy_function = "", has_type_id = false)]
  349. public struct NurbsSurfaceList
  350. {
  351. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  352. public NurbsSurface[] data;
  353. }
  354. [CCode (cname = "ufbx_nurbs_trim_surface_list", destroy_function = "", has_type_id = false)]
  355. public struct NurbsTrimSurfaceList
  356. {
  357. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  358. public NurbsTrimSurface[] data;
  359. }
  360. [CCode (cname = "ufbx_nurbs_trim_boundary_list", destroy_function = "", has_type_id = false)]
  361. public struct NurbsTrimBoundaryList
  362. {
  363. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  364. public NurbsTrimBoundary[] data;
  365. }
  366. [CCode (cname = "ufbx_procedural_geometry_list", destroy_function = "", has_type_id = false)]
  367. public struct ProceduralGeometryList
  368. {
  369. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  370. public ProceduralGeometry[] data;
  371. }
  372. [CCode (cname = "ufbx_stereo_camera_list", destroy_function = "", has_type_id = false)]
  373. public struct StereoCameraList
  374. {
  375. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  376. public StereoCamera[] data;
  377. }
  378. [CCode (cname = "ufbx_camera_switcher_list", destroy_function = "", has_type_id = false)]
  379. public struct CameraSwitcherList
  380. {
  381. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  382. public CameraSwitcher[] data;
  383. }
  384. [CCode (cname = "ufbx_marker_list", destroy_function = "", has_type_id = false)]
  385. public struct MarkerList
  386. {
  387. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  388. public Marker[] data;
  389. }
  390. [CCode (cname = "ufbx_lod_group_list", destroy_function = "", has_type_id = false)]
  391. public struct LogGroupList
  392. {
  393. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  394. public LodGroup[] data;
  395. }
  396. [CCode (cname = "ufbx_skin_deformer_list", destroy_function = "", has_type_id = false)]
  397. public struct SkinDeformerList
  398. {
  399. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  400. public SkinDeformer[] data;
  401. }
  402. [CCode (cname = "ufbx_skin_cluster_list", destroy_function = "", has_type_id = false)]
  403. public struct SkinClusterList
  404. {
  405. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  406. public SkinCluster[] data;
  407. }
  408. [CCode (cname = "ufbx_blend_deformer_list", destroy_function = "", has_type_id = false)]
  409. public struct BlendDeformerList
  410. {
  411. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  412. public BlendDeformer[] data;
  413. }
  414. [CCode (cname = "ufbx_blend_channel_list", destroy_function = "", has_type_id = false)]
  415. public struct BlendChannelList
  416. {
  417. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  418. public BlendChannel[] data;
  419. }
  420. [CCode (cname = "ufbx_blend_shape_list", destroy_function = "", has_type_id = false)]
  421. public struct BlendShapeList
  422. {
  423. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  424. public BlendShape[] data;
  425. }
  426. [CCode (cname = "ufbx_cache_deformer_list", destroy_function = "", has_type_id = false)]
  427. public struct CacheDeformerList
  428. {
  429. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  430. public CacheDeformer[] data;
  431. }
  432. [CCode (cname = "ufbx_cache_file_list", destroy_function = "", has_type_id = false)]
  433. public struct CacheFileList
  434. {
  435. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  436. public CacheFile[] data;
  437. }
  438. [CCode (cname = "ufbx_material_list", destroy_function = "", has_type_id = false)]
  439. public struct MaterialList
  440. {
  441. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  442. public Material[] data;
  443. }
  444. [CCode (cname = "ufbx_texture_list", destroy_function = "", has_type_id = false)]
  445. public struct TextureList
  446. {
  447. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  448. public Texture[] data;
  449. }
  450. [CCode (cname = "ufbx_video_list", destroy_function = "", has_type_id = false)]
  451. public struct VideoList
  452. {
  453. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  454. public Video[] data;
  455. }
  456. [CCode (cname = "ufbx_shader_list", destroy_function = "", has_type_id = false)]
  457. public struct ShaderList
  458. {
  459. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  460. public Shader[] data;
  461. }
  462. [CCode (cname = "ufbx_shader_binding_list", destroy_function = "", has_type_id = false)]
  463. public struct ShaderBindingList
  464. {
  465. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  466. public ShaderBinding[] data;
  467. }
  468. [CCode (cname = "ufbx_anim_stack_list", destroy_function = "", has_type_id = false)]
  469. public struct AnimStackList
  470. {
  471. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  472. public AnimStack[] data;
  473. }
  474. [CCode (cname = "ufbx_anim_layer_list", destroy_function = "", has_type_id = false)]
  475. public struct AnimLayerList
  476. {
  477. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  478. public AnimLayer[] data;
  479. }
  480. [CCode (cname = "ufbx_anim_value_list", destroy_function = "", has_type_id = false)]
  481. public struct AnimValueList
  482. {
  483. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  484. public AnimValue[] data;
  485. }
  486. [CCode (cname = "ufbx_anim_curve_list", destroy_function = "", has_type_id = false)]
  487. public struct AnimCurveList
  488. {
  489. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  490. public AnimCurve[] data;
  491. }
  492. [CCode (cname = "ufbx_display_layer_list", destroy_function = "", has_type_id = false)]
  493. public struct DisplayLayerList
  494. {
  495. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  496. public DisplayLayer[] data;
  497. }
  498. [CCode (cname = "ufbx_selection_set_list", destroy_function = "", has_type_id = false)]
  499. public struct SelectionSetList
  500. {
  501. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  502. public SelectionSet[] data;
  503. }
  504. [CCode (cname = "ufbx_selection_node_list", destroy_function = "", has_type_id = false)]
  505. public struct SelectionNodeList
  506. {
  507. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  508. public SelectionNode[] data;
  509. }
  510. [CCode (cname = "ufbx_character_list", destroy_function = "", has_type_id = false)]
  511. public struct CharacterList
  512. {
  513. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  514. public Character[] data;
  515. }
  516. [CCode (cname = "ufbx_constraint_list", destroy_function = "", has_type_id = false)]
  517. public struct ConstraintList
  518. {
  519. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  520. public Constraint[] data;
  521. }
  522. [CCode (cname = "ufbx_audio_layer_list", destroy_function = "", has_type_id = false)]
  523. public struct AudioLayerList
  524. {
  525. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  526. public AudioLayer[] data;
  527. }
  528. [CCode (cname = "ufbx_audio_clip_list", destroy_function = "", has_type_id = false)]
  529. public struct AudioClipList
  530. {
  531. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  532. public AudioClip[] data;
  533. }
  534. [CCode (cname = "ufbx_pose_list", destroy_function = "", has_type_id = false)]
  535. public struct PoseList
  536. {
  537. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  538. public Pose[] data;
  539. }
  540. [CCode (cname = "ufbx_metadata_object_list", destroy_function = "", has_type_id = false)]
  541. public struct MetadataObjectList
  542. {
  543. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  544. public MetadataObject[] data;
  545. }
  546. [CCode (cname = "ufbx_element_type", cprefix = "UFBX_ELEMENT_", has_type_id = false)]
  547. public enum ElementType
  548. {
  549. UNKNOWN,
  550. NODE,
  551. MESH,
  552. LIGHT,
  553. CAMERA,
  554. BONE,
  555. EMPTY,
  556. LINE_CURVE,
  557. NURBS_CURVE,
  558. NURBS_SURFACE,
  559. NURBS_TRIM_SURFACE,
  560. NURBS_TRIM_BOUNDARY,
  561. PROCEDURAL_GEOMETRY,
  562. STEREO_CAMERA,
  563. CAMERA_SWITCHER,
  564. MARKER,
  565. LOD_GROUP,
  566. SKIN_DEFORMER,
  567. SKIN_CLUSTER,
  568. BLEND_DEFORMER,
  569. BLEND_CHANNEL,
  570. BLEND_SHAPE,
  571. CACHE_DEFORMER,
  572. CACHE_FILE,
  573. MATERIAL,
  574. TEXTURE,
  575. VIDEO,
  576. SHADER,
  577. SHADER_BINDING,
  578. ANIM_STACK,
  579. ANIM_LAYER,
  580. ANIM_VALUE,
  581. ANIM_CURVE,
  582. DISPLAY_LAYER,
  583. SELECTION_SET,
  584. SELECTION_NODE,
  585. CHARACTER,
  586. CONSTRAINT,
  587. AUDIO_LAYER,
  588. AUDIO_CLIP,
  589. POSE,
  590. METADATA_OBJECT,
  591. TYPE_COUNT,
  592. TYPE_FIRST_ATTRIB = MESH,
  593. TYPE_LAST_ATTRIB = LOD_GROUP,
  594. }
  595. [SimpleType]
  596. [CCode (cname = "ufbx_connection", destroy_function = "", has_type_id = false)]
  597. public struct Connection
  598. {
  599. public unowned Element src;
  600. public unowned Element dst;
  601. public String src_prop;
  602. public String dst_prop;
  603. }
  604. [CCode (cname = "ufbx_connection_list", destroy_function = "", has_type_id = false)]
  605. public struct ConnectionList
  606. {
  607. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  608. public Connection[] data;
  609. }
  610. [Compact]
  611. [CCode (cname = "ufbx_element", destroy_function = "", has_type_id = false)]
  612. public class Element
  613. {
  614. public String name;
  615. public Props props;
  616. public uint32 element_id;
  617. public uint32 typed_id;
  618. public NodeList instances;
  619. public ElementType type;
  620. public ConnectionList connections_src;
  621. public ConnectionList connections_dst;
  622. public unowned DomNode? dom_node;
  623. public unowned Scene scene;
  624. }
  625. [Compact]
  626. [CCode (cname = "ufbx_unknown", destroy_function = "", has_type_id = false)]
  627. public class Unknown
  628. {
  629. [CCode (cname = "element")]
  630. public Element element;
  631. [CCode (cname = "name")]
  632. public String name;
  633. [CCode (cname = "props")]
  634. public Props props;
  635. [CCode (cname = "element_id")]
  636. public uint32 element_id;
  637. [CCode (cname = "typed_id")]
  638. public uint32 typed_id;
  639. public String type;
  640. public String super_type;
  641. public String sub_type;
  642. }
  643. [CCode (cname = "ufbx_inherit_mode", cprefix = "UFBX_INHERIT_MODE_", has_type_id = false)]
  644. public enum InheritMode
  645. {
  646. NORMAL,
  647. IGNORE_PARENT_SCALE,
  648. COMPONENTWISE_SCALE,
  649. COUNT
  650. }
  651. [CCode (cname = "ufbx_mirror_axis", cprefix = "UFBX_MIRROR_AXIS_", has_type_id = false)]
  652. public enum MirrorAxis
  653. {
  654. NONE,
  655. X,
  656. Y,
  657. Z,
  658. COUNT
  659. }
  660. [Compact]
  661. [CCode (cname = "ufbx_node", destroy_function = "", has_type_id = false)]
  662. public class Node
  663. {
  664. [CCode (cname = "element")]
  665. public Element element;
  666. [CCode (cname = "name")]
  667. public String name;
  668. [CCode (cname = "props")]
  669. public Props props;
  670. [CCode (cname = "element_id")]
  671. public uint32 element_id;
  672. [CCode (cname = "typed_id")]
  673. public uint32 typed_id;
  674. public unowned Node? parent;
  675. public NodeList children;
  676. public unowned Mesh? mesh;
  677. public unowned Light? light;
  678. public unowned Camera? camera;
  679. public unowned Bone? bone;
  680. public unowned Element? attrib;
  681. public unowned Node? geometry_transform_helper;
  682. public unowned Node? scale_helper;
  683. public ElementType attrib_type;
  684. public ElementList all_attribs;
  685. public InheritMode inherit_mode;
  686. public InheritMode original_inherit_mode;
  687. public Transform local_transform;
  688. public Transform geometry_transform;
  689. public Vec3 inherit_scale;
  690. public unowned Node? inherit_scale_node;
  691. public RotationOrder rotation_order;
  692. public Vec3 euler_rotation;
  693. public Matrix node_to_parent;
  694. public Matrix node_to_world;
  695. public Matrix geometry_to_node;
  696. public Matrix geometry_to_world;
  697. public Matrix unscaled_node_to_world;
  698. public Vec3 adjust_pre_translation;
  699. public Quat adjust_pre_rotation;
  700. public Real adjust_pre_scale;
  701. public Quat adjust_post_rotation;
  702. public Real adjust_post_scale;
  703. public Real adjust_translation_scale;
  704. public MirrorAxis adjust_mirror_axis;
  705. public MaterialList materials;
  706. public unowned Pose? bind_pose;
  707. public bool visible;
  708. public bool is_root;
  709. public bool has_geometry_transform;
  710. public bool has_adjust_transform;
  711. public bool has_root_adjust_transform;
  712. public bool is_geometry_transform_helper;
  713. public bool is_scale_helper;
  714. public bool is_scale_compensate_parent;
  715. public uint32 node_depth;
  716. }
  717. [CCode (cname = "ufbx_vertex_attrib", destroy_function = "", has_type_id = false)]
  718. public struct VertexAttrib
  719. {
  720. public bool exists;
  721. public VoidList values;
  722. public Uint32List indices;
  723. public size_t value_reals;
  724. public bool unique_per_vertex;
  725. public RealList values_w;
  726. }
  727. [CCode (cname = "ufbx_vertex_real", destroy_function = "", has_type_id = false)]
  728. public struct VertexReal
  729. {
  730. public bool exists;
  731. public RealList values;
  732. public Uint32List indices;
  733. public size_t value_reals;
  734. public bool unique_per_vertex;
  735. public RealList values_w;
  736. }
  737. [CCode (cname = "ufbx_vertex_vec2", destroy_function = "", has_type_id = false)]
  738. public struct VertexVec2
  739. {
  740. public bool exists;
  741. public Vec2List values;
  742. public Uint32List indices;
  743. public size_t value_reals;
  744. public bool unique_per_vertex;
  745. public RealList values_w;
  746. }
  747. [CCode (cname = "ufbx_vertex_vec3", destroy_function = "", has_type_id = false)]
  748. public struct VertexVec3
  749. {
  750. public bool exists;
  751. public Vec3List values;
  752. public Uint32List indices;
  753. public size_t value_reals;
  754. public bool unique_per_vertex;
  755. public RealList values_w;
  756. }
  757. [CCode (cname = "ufbx_vertex_vec4", destroy_function = "", has_type_id = false)]
  758. public struct VertexVec4
  759. {
  760. public bool exists;
  761. public Vec4List values;
  762. public Uint32List indices;
  763. public size_t value_reals;
  764. public bool unique_per_vertex;
  765. public RealList values_w;
  766. }
  767. [SimpleType]
  768. [CCode (cname = "ufbx_uv_set", destroy_function = "", has_type_id = false)]
  769. public struct UvSet
  770. {
  771. public String name;
  772. public uint32 index;
  773. public VertexVec2 vertex_uv;
  774. public VertexVec3 vertex_tangent;
  775. public VertexVec3 vertex_bitangent;
  776. }
  777. [SimpleType]
  778. [CCode (cname = "ufbx_color_set", destroy_function = "", has_type_id = false)]
  779. public struct ColorSet
  780. {
  781. public String name;
  782. public uint32 index;
  783. public VertexVec4 vertex_color;
  784. }
  785. [CCode (cname = "ufbx_uv_set_list", destroy_function = "", has_type_id = false)]
  786. public struct UvSetList
  787. {
  788. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  789. public UvSet[] data;
  790. }
  791. [CCode (cname = "ufbx_color_set_list", destroy_function = "", has_type_id = false)]
  792. public struct ColorSetList
  793. {
  794. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  795. public ColorSet[] data;
  796. }
  797. [SimpleType]
  798. [CCode (cname = "ufbx_edge", destroy_function = "", has_type_id = false)]
  799. public struct Edge
  800. {
  801. [CCode (cname = "a")]
  802. public uint32 a;
  803. [CCode (cname = "b")]
  804. public uint32 b;
  805. [CCode (cname = "indices")]
  806. public uint32 indices[2];
  807. }
  808. [CCode (cname = "ufbx_edge_list", destroy_function = "", has_type_id = false)]
  809. public struct EdgeList
  810. {
  811. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  812. public Edge[] data;
  813. }
  814. [SimpleType]
  815. [CCode (cname = "ufbx_face", destroy_function = "", has_type_id = false)]
  816. public struct Face
  817. {
  818. public uint32 index_begin;
  819. public uint32 num_indices;
  820. }
  821. [CCode (cname = "ufbx_face_list", destroy_function = "", has_type_id = false)]
  822. public struct FaceList
  823. {
  824. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  825. public Face[] data;
  826. }
  827. [SimpleType]
  828. [CCode (cname = "ufbx_mesh_part", destroy_function = "", has_type_id = false)]
  829. public struct MeshPart
  830. {
  831. public uint32 index;
  832. public size_t num_faces;
  833. public size_t num_triangles;
  834. public size_t num_empty_faces;
  835. public size_t num_point_faces;
  836. public size_t num_line_faces;
  837. public Uint32List face_indices;
  838. }
  839. [CCode (cname = "ufbx_mesh_part_list", destroy_function = "", has_type_id = false)]
  840. public struct MeshPartList
  841. {
  842. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  843. public MeshPart[] data;
  844. }
  845. [Compact]
  846. [CCode (cname = "ufbx_face_group", destroy_function = "", has_type_id = false)]
  847. public struct FaceGroup
  848. {
  849. public int32 id;
  850. public String name;
  851. }
  852. [CCode (cname = "ufbx_face_group_list", destroy_function = "", has_type_id = false)]
  853. public struct FaceGroupList
  854. {
  855. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  856. public FaceGroup[] data;
  857. }
  858. [SimpleType]
  859. [CCode (cname = "ufbx_subdivision_weight_range", destroy_function = "", has_type_id = false)]
  860. public struct SubdivisionWeightRange
  861. {
  862. public uint32 weight_begin;
  863. public uint32 num_weights;
  864. }
  865. [CCode (cname = "ufbx_subdivision_weight_range_list", destroy_function = "", has_type_id = false)]
  866. public struct SubdivisionWeightRangeList
  867. {
  868. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  869. public SubdivisionWeightRange[] data;
  870. }
  871. [SimpleType]
  872. [CCode (cname = "ufbx_subdivision_weight", destroy_function = "", has_type_id = false)]
  873. public struct SubdivisionWeight
  874. {
  875. public Real weight;
  876. public uint32 index;
  877. }
  878. [CCode (cname = "ufbx_subdivision_weight_list", destroy_function = "", has_type_id = false)]
  879. public struct SubdivisionWeightList
  880. {
  881. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  882. public SubdivisionWeight[] data;
  883. }
  884. [CCode (cname = "ufbx_subdivision_result", destroy_function = "", has_type_id = false)]
  885. public struct SubdivisionResult
  886. {
  887. public size_t result_memory_used;
  888. public size_t temp_memory_used;
  889. public size_t result_allocs;
  890. public size_t temp_allocs;
  891. public SubdivisionWeightRangeList source_vertex_ranges;
  892. public SubdivisionWeightList source_vertex_weights;
  893. public SubdivisionWeightRangeList skin_cluster_ranges;
  894. public SubdivisionWeightList skin_cluster_weights;
  895. }
  896. [CCode (cname = "ufbx_subdivision_display_mode", cprefix = "UFBX_SUBDIVISION_DISPLAY_", has_type_id = false)]
  897. public enum SubdivisionDisplayMode
  898. {
  899. DISABLED,
  900. HULL,
  901. HULL_AND_SMOOTH,
  902. SMOOTH,
  903. MODE_COUNT
  904. }
  905. [CCode (cname = "ufbx_subdivision_boundary", cprefix = "UFBX_SUBDIVISION_BOUNDARY_", has_type_id = false)]
  906. public enum SubdivisionBoundary
  907. {
  908. DEFAULT,
  909. LEGACY,
  910. SHARP_CORNERS,
  911. SHARP_NONE,
  912. SHARP_BOUNDARY,
  913. SHARP_INTERIOR,
  914. COUNT
  915. }
  916. [Compact]
  917. [CCode (cname = "ufbx_mesh", destroy_function = "", has_type_id = false)]
  918. public class Mesh
  919. {
  920. [CCode (cname = "element")]
  921. public Element element;
  922. [CCode (cname = "name")]
  923. public String name;
  924. [CCode (cname = "props")]
  925. public Props props;
  926. [CCode (cname = "element_id")]
  927. public uint32 element_id;
  928. [CCode (cname = "typed_id")]
  929. public uint32 typed_id;
  930. [CCode (cname = "instances")]
  931. public NodeList instances;
  932. public size_t num_vertices;
  933. public size_t num_indices;
  934. public size_t num_faces;
  935. public size_t num_triangles;
  936. public size_t num_edges;
  937. public size_t max_face_triangles;
  938. public size_t num_empty_faces;
  939. public size_t num_point_faces;
  940. public size_t num_line_faces;
  941. public FaceList faces;
  942. public BoolList face_smoothing;
  943. public Uint32List face_material;
  944. public Uint32List face_group;
  945. public BoolList face_hole;
  946. public EdgeList edges;
  947. public BoolList edge_smoothing;
  948. public RealList edge_crease;
  949. public BoolList edge_visibility;
  950. public Uint32List vertex_indices;
  951. public Vec3List vertices;
  952. public Uint32List vertex_first_index;
  953. public VertexVec3 vertex_position;
  954. public VertexVec3 vertex_normal;
  955. public VertexVec2 vertex_uv;
  956. public VertexVec3 vertex_tangent;
  957. public VertexVec3 vertex_bitangent;
  958. public VertexVec4 vertex_color;
  959. public VertexReal vertex_crease;
  960. public UvSetList uv_sets;
  961. public ColorSetList color_sets;
  962. public MaterialList materials;
  963. public FaceGroupList face_groups;
  964. public MeshPartList material_parts;
  965. public MeshPartList face_group_parts;
  966. public Uint32List material_part_usage_order;
  967. public bool skinned_is_local;
  968. public VertexVec3 skinned_position;
  969. public VertexVec3 skinned_normal;
  970. public SkinDeformerList skin_deformers;
  971. public BlendDeformerList blend_deformers;
  972. public CacheDeformerList cache_deformers;
  973. public ElementList all_deformers;
  974. public uint32 subdivision_preview_levels;
  975. public uint32 subdivision_render_levels;
  976. public SubdivisionDisplayMode subdivision_display_mode;
  977. public SubdivisionBoundary subdivision_boundary;
  978. public SubdivisionBoundary subdivision_uv_boundary;
  979. public bool reversed_winding;
  980. public bool generated_normals;
  981. public bool subdivision_evaluated;
  982. public unowned SubdivisionResult? subdivision_result;
  983. public bool from_tessellated_nurbs;
  984. }
  985. [CCode (cname = "ufbx_light_type", cprefix = "UFBX_LIGHT_", has_type_id = false)]
  986. public enum LightType
  987. {
  988. POINT,
  989. DIRECTIONAL,
  990. SPOT,
  991. AREA,
  992. VOLUME,
  993. TYPE_COUNT
  994. }
  995. [CCode (cname = "ufbx_light_decay", cprefix = "UFBX_LIGHT_DECAY_", has_type_id = false)]
  996. public enum LightDecay
  997. {
  998. NONE,
  999. LINEAR,
  1000. QUADRATIC,
  1001. CUBIC,
  1002. COUNT
  1003. }
  1004. [CCode (cname = "ufbx_light_area_shape", cprefix = "UFBX_LIGHT_AREA_SHAPE_", has_type_id = false)]
  1005. public enum LightAreaShape
  1006. {
  1007. RECTANGLE,
  1008. SPHERE,
  1009. COUNT
  1010. }
  1011. [Compact]
  1012. [CCode (cname = "ufbx_light", destroy_function = "", has_type_id = false)]
  1013. public class Light
  1014. {
  1015. [CCode (cname = "element")]
  1016. public Element element;
  1017. [CCode (cname = "name")]
  1018. public String name;
  1019. [CCode (cname = "props")]
  1020. public Props props;
  1021. [CCode (cname = "element_id")]
  1022. public uint32 element_id;
  1023. [CCode (cname = "typed_id")]
  1024. public uint32 typed_id;
  1025. [CCode (cname = "instances")]
  1026. public NodeList instances;
  1027. public Vec3 color;
  1028. public Real intensity;
  1029. public Vec3 local_direction;
  1030. public LightType type;
  1031. public LightDecay decay;
  1032. public LightAreaShape area_shape;
  1033. public Real inner_angle;
  1034. public Real outer_angle;
  1035. public bool cast_light;
  1036. public bool cast_shadows;
  1037. }
  1038. [CCode (cname = "ufbx_projection_mode", cprefix = "UFBX_PROJECTION_MODE_", has_type_id = false)]
  1039. public enum ProjectionMode
  1040. {
  1041. PERSPECTIVE,
  1042. ORTHOGRAPHIC,
  1043. COUNT
  1044. }
  1045. [CCode (cname = "ufbx_aspect_mode", cprefix = "UFBX_ASPECT_MODE_", has_type_id = false)]
  1046. public enum AspectMode
  1047. {
  1048. WINDOW_SIZE,
  1049. FIXED_RATIO,
  1050. FIXED_RESOLUTION,
  1051. FIXED_WIDTH,
  1052. FIXED_HEIGHT,
  1053. COUNT
  1054. }
  1055. [CCode (cname = "ufbx_aperture_mode", cprefix = "UFBX_APERTURE_MODE_", has_type_id = false)]
  1056. public enum ApertureMode
  1057. {
  1058. HORIZONTAL_AND_VERTICAL,
  1059. HORIZONTAL,
  1060. VERTICAL,
  1061. FOCAL_LENGTH,
  1062. COUNT
  1063. }
  1064. [CCode (cname = "ufbx_gate_fit", cprefix = "UFBX_GATE_FIT_", has_type_id = false)]
  1065. public enum GateFit
  1066. {
  1067. NONE,
  1068. VERTICAL,
  1069. HORIZONTAL,
  1070. FILL,
  1071. OVERSCAN,
  1072. STRETCH,
  1073. COUNT
  1074. }
  1075. [CCode (cname = "ufbx_aperture_format", cprefix = "UFBX_APERTURE_FORMAT_", has_type_id = false)]
  1076. public enum ApertureFormat
  1077. {
  1078. CUSTOM,
  1079. 16MM_THEATRICAL,
  1080. SUPER_16MM,
  1081. 35MM_ACADEMY,
  1082. 35MM_TV_PROJECTION,
  1083. 35MM_FULL_APERTURE,
  1084. 35MM_185_PROJECTION,
  1085. 35MM_ANAMORPHIC,
  1086. 70MM_PROJECTION,
  1087. VISTAVISION,
  1088. DYNAVISION,
  1089. IMAX,
  1090. COUNT
  1091. }
  1092. [CCode (cname = "ufbx_coordinate_axis", cprefix = "UFBX_COORDINATE_AXIS_", has_type_id = false)]
  1093. public enum CoordinateAxis
  1094. {
  1095. POSITIVE_X,
  1096. NEGATIVE_X,
  1097. POSITIVE_Y,
  1098. NEGATIVE_Y,
  1099. POSITIVE_Z,
  1100. NEGATIVE_Z,
  1101. UNKNOWN,
  1102. COUNT
  1103. }
  1104. [SimpleType]
  1105. [CCode (cname = "ufbx_coordinate_axes", has_type_id = false)]
  1106. public struct CoordinateAxes
  1107. {
  1108. public CoordinateAxis right;
  1109. public CoordinateAxis up;
  1110. public CoordinateAxis front;
  1111. [CCode (cname = "ufbx_axes_right_handed_y_up")]
  1112. public const CoordinateAxes RIGHT_HANDED_Y_UP;
  1113. [CCode (cname = "ufbx_axes_right_handed_z_up")]
  1114. public const CoordinateAxes RIGHT_HANDED_Z_UP;
  1115. [CCode (cname = "ufbx_axes_left_handed_y_up")]
  1116. public const CoordinateAxes LEFT_HANDED_Y_UP;
  1117. [CCode (cname = "ufbx_axes_left_handed_z_up")]
  1118. public const CoordinateAxes LEFT_HANDED_Z_UP;
  1119. }
  1120. [Compact]
  1121. [CCode (cname = "ufbx_camera", destroy_function = "", has_type_id = false)]
  1122. public class Camera
  1123. {
  1124. [CCode (cname = "element")]
  1125. public Element element;
  1126. [CCode (cname = "name")]
  1127. public String name;
  1128. [CCode (cname = "props")]
  1129. public Props props;
  1130. [CCode (cname = "element_id")]
  1131. public uint32 element_id;
  1132. [CCode (cname = "typed_id")]
  1133. public uint32 typed_id;
  1134. [CCode (cname = "instances")]
  1135. public NodeList instances;
  1136. public ProjectionMode projection_mode;
  1137. public bool resolution_is_pixels;
  1138. public Vec2 resolution;
  1139. public Vec2 field_of_view_deg;
  1140. public Vec2 field_of_view_tan;
  1141. public Real orthographic_extent;
  1142. public Vec2 orthographic_size;
  1143. public Vec2 projection_plane;
  1144. public Real aspect_ratio;
  1145. public Real near_plane;
  1146. public Real far_plane;
  1147. public CoordinateAxes projection_axes;
  1148. public AspectMode aspect_mode;
  1149. public ApertureMode aperture_mode;
  1150. public GateFit gate_fit;
  1151. public ApertureFormat aperture_format;
  1152. public Real focal_length_mm;
  1153. public Vec2 film_size_inch;
  1154. public Vec2 aperture_size_inch;
  1155. public Real squeeze_ratio;
  1156. }
  1157. [Compact]
  1158. [CCode (cname = "ufbx_bone", destroy_function = "", has_type_id = false)]
  1159. public class Bone
  1160. {
  1161. [CCode (cname = "element")]
  1162. public Element element;
  1163. [CCode (cname = "name")]
  1164. public String name;
  1165. [CCode (cname = "props")]
  1166. public Props props;
  1167. [CCode (cname = "element_id")]
  1168. public uint32 element_id;
  1169. [CCode (cname = "typed_id")]
  1170. public uint32 typed_id;
  1171. [CCode (cname = "instances")]
  1172. public NodeList instances;
  1173. public Real radius;
  1174. public Real relative_length;
  1175. public bool is_root;
  1176. }
  1177. [Compact]
  1178. [CCode (cname = "ufbx_empty", destroy_function = "", has_type_id = false)]
  1179. public class Empty
  1180. {
  1181. [CCode (cname = "element")]
  1182. public Element element;
  1183. [CCode (cname = "name")]
  1184. public String name;
  1185. [CCode (cname = "props")]
  1186. public Props props;
  1187. [CCode (cname = "element_id")]
  1188. public uint32 element_id;
  1189. [CCode (cname = "typed_id")]
  1190. public uint32 typed_id;
  1191. [CCode (cname = "instances")]
  1192. public NodeList instances;
  1193. }
  1194. [SimpleType]
  1195. [CCode (cname = "ufbx_line_segment", destroy_function = "", has_type_id = false)]
  1196. public struct LineSegment
  1197. {
  1198. public uint32 index_begin;
  1199. public uint32 num_indices;
  1200. }
  1201. [CCode (cname = "ufbx_line_segment_list", destroy_function = "", has_type_id = false)]
  1202. public struct LineSegmentList
  1203. {
  1204. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1205. public LineSegment[] data;
  1206. }
  1207. [Compact]
  1208. [CCode (cname = "ufbx_line_curve", destroy_function = "", has_type_id = false)]
  1209. public class LineCurve
  1210. {
  1211. [CCode (cname = "element")]
  1212. public Element element;
  1213. [CCode (cname = "name")]
  1214. public String name;
  1215. [CCode (cname = "props")]
  1216. public Props props;
  1217. [CCode (cname = "element_id")]
  1218. public uint32 element_id;
  1219. [CCode (cname = "typed_id")]
  1220. public uint32 typed_id;
  1221. [CCode (cname = "instances")]
  1222. public NodeList instances;
  1223. public Vec3 color;
  1224. public Vec3List control_points;
  1225. public Uint32List point_indices;
  1226. public LineSegmentList segments;
  1227. public bool from_tessellated_nurbs;
  1228. }
  1229. [CCode (cname = "ufbx_nurbs_topology", cprefix = "UFBX_NURBS_TOPOLOGY_", has_type_id = false)]
  1230. public enum NurbsTopology
  1231. {
  1232. OPEN,
  1233. PERIODIC,
  1234. CLOSED,
  1235. COUNT
  1236. }
  1237. [CCode (cname = "ufbx_nurbs_basis", destroy_function = "", has_type_id = false)]
  1238. public struct NurbsBasis
  1239. {
  1240. public uint32 order;
  1241. public NurbsTopology topology;
  1242. public RealList knot_vector;
  1243. public Real t_min;
  1244. public Real t_max;
  1245. public RealList spans;
  1246. public bool is_2d;
  1247. public size_t num_wrap_control_points;
  1248. public bool valid;
  1249. }
  1250. [Compact]
  1251. [CCode (cname = "ufbx_nurbs_curve", destroy_function = "", has_type_id = false)]
  1252. public class NurbsCurve
  1253. {
  1254. [CCode (cname = "element")]
  1255. public Element element;
  1256. [CCode (cname = "name")]
  1257. public String name;
  1258. [CCode (cname = "props")]
  1259. public Props props;
  1260. [CCode (cname = "element_id")]
  1261. public uint32 element_id;
  1262. [CCode (cname = "typed_id")]
  1263. public uint32 typed_id;
  1264. [CCode (cname = "instances")]
  1265. public NodeList instances;
  1266. public NurbsBasis basis;
  1267. public Vec4List control_points;
  1268. }
  1269. [Compact]
  1270. [CCode (cname = "ufbx_nurbs_surface", destroy_function = "", has_type_id = false)]
  1271. public class NurbsSurface
  1272. {
  1273. [CCode (cname = "element")]
  1274. public Element element;
  1275. [CCode (cname = "name")]
  1276. public String name;
  1277. [CCode (cname = "props")]
  1278. public Props props;
  1279. [CCode (cname = "element_id")]
  1280. public uint32 element_id;
  1281. [CCode (cname = "typed_id")]
  1282. public uint32 typed_id;
  1283. [CCode (cname = "instances")]
  1284. public NodeList instances;
  1285. public NurbsBasis basis_u;
  1286. public NurbsBasis basis_v;
  1287. public size_t num_control_points_u;
  1288. public size_t num_control_points_v;
  1289. public Vec4List control_points;
  1290. public uint32 span_subdivision_u;
  1291. public uint32 span_subdivision_v;
  1292. public bool flip_normals;
  1293. public unowned Material? material;
  1294. }
  1295. [Compact]
  1296. [CCode (cname = "ufbx_nurbs_trim_surface", destroy_function = "", has_type_id = false)]
  1297. public class NurbsTrimSurface
  1298. {
  1299. [CCode (cname = "element")]
  1300. public Element element;
  1301. [CCode (cname = "name")]
  1302. public String name;
  1303. [CCode (cname = "props")]
  1304. public Props props;
  1305. [CCode (cname = "element_id")]
  1306. public uint32 element_id;
  1307. [CCode (cname = "typed_id")]
  1308. public uint32 typed_id;
  1309. [CCode (cname = "instances")]
  1310. public NodeList instances;
  1311. }
  1312. [Compact]
  1313. [CCode (cname = "ufbx_nurbs_trim_boundary", destroy_function = "", has_type_id = false)]
  1314. public class NurbsTrimBoundary
  1315. {
  1316. [CCode (cname = "element")]
  1317. public Element element;
  1318. [CCode (cname = "name")]
  1319. public String name;
  1320. [CCode (cname = "props")]
  1321. public Props props;
  1322. [CCode (cname = "element_id")]
  1323. public uint32 element_id;
  1324. [CCode (cname = "typed_id")]
  1325. public uint32 typed_id;
  1326. [CCode (cname = "instances")]
  1327. public NodeList instances;
  1328. }
  1329. [Compact]
  1330. [CCode (cname = "ufbx_procedural_geometry", destroy_function = "", has_type_id = false)]
  1331. public class ProceduralGeometry
  1332. {
  1333. [CCode (cname = "element")]
  1334. public Element element;
  1335. [CCode (cname = "name")]
  1336. public String name;
  1337. [CCode (cname = "props")]
  1338. public Props props;
  1339. [CCode (cname = "element_id")]
  1340. public uint32 element_id;
  1341. [CCode (cname = "typed_id")]
  1342. public uint32 typed_id;
  1343. [CCode (cname = "instances")]
  1344. public NodeList instances;
  1345. }
  1346. [Compact]
  1347. [CCode (cname = "ufbx_stereo_camera", destroy_function = "", has_type_id = false)]
  1348. public class StereoCamera
  1349. {
  1350. [CCode (cname = "element")]
  1351. public Element element;
  1352. [CCode (cname = "name")]
  1353. public String name;
  1354. [CCode (cname = "props")]
  1355. public Props props;
  1356. [CCode (cname = "element_id")]
  1357. public uint32 element_id;
  1358. [CCode (cname = "typed_id")]
  1359. public uint32 typed_id;
  1360. [CCode (cname = "instances")]
  1361. public NodeList instances;
  1362. public unowned Camera? left;
  1363. public unowned Camera? right;
  1364. }
  1365. [Compact]
  1366. [CCode (cname = "ufbx_camera_switcher", destroy_function = "", has_type_id = false)]
  1367. public class CameraSwitcher
  1368. {
  1369. [CCode (cname = "element")]
  1370. public Element element;
  1371. [CCode (cname = "name")]
  1372. public String name;
  1373. [CCode (cname = "props")]
  1374. public Props props;
  1375. [CCode (cname = "element_id")]
  1376. public uint32 element_id;
  1377. [CCode (cname = "typed_id")]
  1378. public uint32 typed_id;
  1379. [CCode (cname = "instances")]
  1380. public NodeList instances;
  1381. }
  1382. [CCode (cname = "ufbx_marker_type", cprefix = "UFBX_MARKER_", has_type_id = false)]
  1383. public enum MarkerType
  1384. {
  1385. UNKNOWN,
  1386. FK_EFFECTOR,
  1387. IK_EFFECTOR,
  1388. TYPE_COUNT
  1389. }
  1390. [Compact]
  1391. [CCode (cname = "ufbx_marker", destroy_function = "", has_type_id = false)]
  1392. public class Marker
  1393. {
  1394. [CCode (cname = "element")]
  1395. public Element element;
  1396. [CCode (cname = "name")]
  1397. public String name;
  1398. [CCode (cname = "props")]
  1399. public Props props;
  1400. [CCode (cname = "element_id")]
  1401. public uint32 element_id;
  1402. [CCode (cname = "typed_id")]
  1403. public uint32 typed_id;
  1404. [CCode (cname = "instances")]
  1405. public NodeList instances;
  1406. public MarkerType type;
  1407. }
  1408. [CCode (cname = "ufbx_lod_display", cprefix = "UFBX_LOD_DISPLAY_", has_type_id = false)]
  1409. public enum LodDisplay
  1410. {
  1411. USE_LOD,
  1412. SHOW,
  1413. HIDE,
  1414. COUNT
  1415. }
  1416. [SimpleType]
  1417. [CCode (cname = "ufbx_lod_level", destroy_function = "", has_type_id = false)]
  1418. public struct LodLevel
  1419. {
  1420. public Real distance;
  1421. public LodDisplay display;
  1422. }
  1423. [CCode (cname = "ufbx_lod_level_list", destroy_function = "", has_type_id = false)]
  1424. public struct LodLevelList
  1425. {
  1426. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1427. public LodLevel[] data;
  1428. }
  1429. [Compact]
  1430. [CCode (cname = "ufbx_lod_group", destroy_function = "", has_type_id = false)]
  1431. public class LodGroup
  1432. {
  1433. [CCode (cname = "element")]
  1434. public Element element;
  1435. [CCode (cname = "name")]
  1436. public String name;
  1437. [CCode (cname = "props")]
  1438. public Props props;
  1439. [CCode (cname = "element_id")]
  1440. public uint32 element_id;
  1441. [CCode (cname = "typed_id")]
  1442. public uint32 typed_id;
  1443. [CCode (cname = "instances")]
  1444. public NodeList instances;
  1445. public bool relative_distances;
  1446. public LodLevelList lod_levels;
  1447. public bool ignore_parent_transform;
  1448. public bool use_distance_limit;
  1449. public Real distance_limit_min;
  1450. public Real distance_limit_max;
  1451. }
  1452. [CCode (cname = "ufbx_skinning_method", cprefix = "UFBX_SKINNING_METHOD_", has_type_id = false)]
  1453. public enum SkinningMethod
  1454. {
  1455. LINEAR,
  1456. RIGID,
  1457. DUAL_QUATERNION,
  1458. BLENDED_DQ_LINEAR,
  1459. COUNT
  1460. }
  1461. [SimpleType]
  1462. [CCode (cname = "ufbx_skin_vertex", destroy_function = "", has_type_id = false)]
  1463. public struct SkinVertex
  1464. {
  1465. public uint32 weight_begin;
  1466. public uint32 num_weights;
  1467. public Real dq_weight;
  1468. }
  1469. [CCode (cname = "ufbx_skin_vertex_list", destroy_function = "", has_type_id = false)]
  1470. public struct SkinVertexList
  1471. {
  1472. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1473. public SkinVertex[] data;
  1474. }
  1475. [SimpleType]
  1476. [CCode (cname = "ufbx_skin_weight", destroy_function = "", has_type_id = false)]
  1477. public struct SkinWeight
  1478. {
  1479. public uint32 cluster_index;
  1480. public Real weight;
  1481. }
  1482. [CCode (cname = "ufbx_skin_weight_list", destroy_function = "", has_type_id = false)]
  1483. public struct SkinWeightList
  1484. {
  1485. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1486. public SkinWeight[] data;
  1487. }
  1488. [Compact]
  1489. [CCode (cname = "ufbx_skin_deformer", destroy_function = "", has_type_id = false)]
  1490. public class SkinDeformer
  1491. {
  1492. [CCode (cname = "element")]
  1493. public Element element;
  1494. [CCode (cname = "name")]
  1495. public String name;
  1496. [CCode (cname = "props")]
  1497. public Props props;
  1498. [CCode (cname = "element_id")]
  1499. public uint32 element_id;
  1500. [CCode (cname = "typed_id")]
  1501. public uint32 typed_id;
  1502. public SkinningMethod skinning_method;
  1503. public SkinClusterList clusters;
  1504. public SkinVertexList vertices;
  1505. public SkinWeightList weights;
  1506. public size_t max_weights_per_vertex;
  1507. public size_t num_dq_weights;
  1508. public Uint32List dq_vertices;
  1509. public RealList dq_weights;
  1510. }
  1511. [Compact]
  1512. [CCode (cname = "ufbx_skin_cluster", destroy_function = "", has_type_id = false)]
  1513. public class SkinCluster
  1514. {
  1515. [CCode (cname = "element")]
  1516. public Element element;
  1517. [CCode (cname = "name")]
  1518. public String name;
  1519. [CCode (cname = "props")]
  1520. public Props props;
  1521. [CCode (cname = "element_id")]
  1522. public uint32 element_id;
  1523. [CCode (cname = "typed_id")]
  1524. public uint32 typed_id;
  1525. public unowned Node? bone_node;
  1526. public Matrix geometry_to_bone;
  1527. public Matrix mesh_node_to_bone;
  1528. public Matrix bind_to_world;
  1529. public Matrix geometry_to_world;
  1530. public Transform geometry_to_world_transform;
  1531. public size_t num_weights;
  1532. public Uint32List vertices;
  1533. public RealList weights;
  1534. }
  1535. [Compact]
  1536. [CCode (cname = "ufbx_blend_deformer", destroy_function = "", has_type_id = false)]
  1537. public class BlendDeformer
  1538. {
  1539. [CCode (cname = "element")]
  1540. public Element element;
  1541. [CCode (cname = "name")]
  1542. public String name;
  1543. [CCode (cname = "props")]
  1544. public Props props;
  1545. [CCode (cname = "element_id")]
  1546. public uint32 element_id;
  1547. [CCode (cname = "typed_id")]
  1548. public uint32 typed_id;
  1549. public BlendChannelList channels;
  1550. }
  1551. [SimpleType]
  1552. [CCode (cname = "ufbx_blend_keyframe", destroy_function = "", has_type_id = false)]
  1553. public struct BlendKeyframe
  1554. {
  1555. public unowned BlendShape shape;
  1556. public Real target_weight;
  1557. public Real effective_weight;
  1558. }
  1559. [CCode (cname = "ufbx_blend_keyframe_list", destroy_function = "", has_type_id = false)]
  1560. public struct BlendKeyframeList
  1561. {
  1562. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1563. public BlendKeyframe[] data;
  1564. }
  1565. [Compact]
  1566. [CCode (cname = "ufbx_blend_channel", destroy_function = "", has_type_id = false)]
  1567. public class BlendChannel
  1568. {
  1569. [CCode (cname = "element")]
  1570. public Element element;
  1571. [CCode (cname = "name")]
  1572. public String name;
  1573. [CCode (cname = "props")]
  1574. public Props props;
  1575. [CCode (cname = "element_id")]
  1576. public uint32 element_id;
  1577. [CCode (cname = "typed_id")]
  1578. public uint32 typed_id;
  1579. public Real weight;
  1580. public BlendKeyframeList keyframes;
  1581. public unowned BlendShape? target_shape;
  1582. }
  1583. [Compact]
  1584. [CCode (cname = "ufbx_blend_shape", destroy_function = "", has_type_id = false)]
  1585. public class BlendShape
  1586. {
  1587. [CCode (cname = "element")]
  1588. public Element element;
  1589. [CCode (cname = "name")]
  1590. public String name;
  1591. [CCode (cname = "props")]
  1592. public Props props;
  1593. [CCode (cname = "element_id")]
  1594. public uint32 element_id;
  1595. [CCode (cname = "typed_id")]
  1596. public uint32 typed_id;
  1597. public size_t num_offsets;
  1598. public Uint32List offset_vertices;
  1599. public Vec3List position_offsets;
  1600. public Vec3List normal_offsets;
  1601. }
  1602. [CCode (cname = "ufbx_cache_file_format", cprefix = "UFBX_CACHE_FILE_FORMAT_", has_type_id = false)]
  1603. public enum CacheFileFormat
  1604. {
  1605. UNKNOWN,
  1606. PC2,
  1607. MC,
  1608. COUNT
  1609. }
  1610. [CCode (cname = "ufbx_cache_data_format", cprefix = "UFBX_CACHE_DATA_FORMAT_", has_type_id = false)]
  1611. public enum CacheDataFormat
  1612. {
  1613. UNKNOWN,
  1614. REAL_FLOAT,
  1615. VEC3_FLOAT,
  1616. REAL_DOUBLE,
  1617. VEC3_DOUBLE,
  1618. COUNT
  1619. }
  1620. [CCode (cname = "ufbx_cache_data_encoding", cprefix = "UFBX_CACHE_DATA_ENCODING_", has_type_id = false)]
  1621. public enum CacheDataEncoding
  1622. {
  1623. UNKNOWN,
  1624. LITTLE_ENDIAN,
  1625. BIG_ENDIAN,
  1626. COUNT
  1627. }
  1628. [CCode (cname = "ufbx_cache_interpretation", cprefix = "UFBX_CACHE_INTERPRETATION_", has_type_id = false)]
  1629. public enum CacheInterpretation
  1630. {
  1631. UNKNOWN,
  1632. POINTS,
  1633. VERTEX_POSITION,
  1634. VERTEX_NORMAL,
  1635. COUNT
  1636. }
  1637. [SimpleType]
  1638. [CCode (cname = "ufbx_cache_frame", destroy_function = "", has_type_id = false)]
  1639. public struct CacheFrame
  1640. {
  1641. public String channel;
  1642. public double time;
  1643. public String filename;
  1644. public CacheFileFormat file_format;
  1645. public MirrorAxis mirror_axis;
  1646. public Real scale_factor;
  1647. public CacheDataFormat data_format;
  1648. public CacheDataEncoding data_encoding;
  1649. public uint64 data_offset;
  1650. public uint32 data_count;
  1651. public uint32 data_element_bytes;
  1652. public uint64 data_total_bytes;
  1653. }
  1654. [CCode (cname = "ufbx_cache_frame", destroy_function = "", has_type_id = false)]
  1655. public struct CacheFrameList
  1656. {
  1657. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1658. public CacheFrame[] data;
  1659. }
  1660. [SimpleType]
  1661. [CCode (cname = "ufbx_cache_channel", destroy_function = "", has_type_id = false)]
  1662. public struct CacheChannel
  1663. {
  1664. public String name;
  1665. public CacheInterpretation interpretation;
  1666. public String interpretation_name;
  1667. public CacheFrameList frames;
  1668. public MirrorAxis mirror_axis;
  1669. public Real scale_factor;
  1670. }
  1671. [CCode (cname = "ufbx_cache_channel_list", destroy_function = "", has_type_id = false)]
  1672. public struct CacheChannelList
  1673. {
  1674. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1675. public CacheChannel[] data;
  1676. }
  1677. [CCode (cname = "ufbx_geometry_cache", destroy_function = "", has_type_id = false)]
  1678. public struct GeometryCache
  1679. {
  1680. public String root_filename;
  1681. public CacheChannelList channels;
  1682. public CacheFrameList frames;
  1683. public StringList extra_info;
  1684. }
  1685. [Compact]
  1686. [CCode (cname = "ufbx_cache_deformer", destroy_function = "", has_type_id = false)]
  1687. public class CacheDeformer
  1688. {
  1689. [CCode (cname = "element")]
  1690. public Element element;
  1691. [CCode (cname = "name")]
  1692. public String name;
  1693. [CCode (cname = "props")]
  1694. public Props props;
  1695. [CCode (cname = "element_id")]
  1696. public uint32 element_id;
  1697. [CCode (cname = "typed_id")]
  1698. public uint32 typed_id;
  1699. public String channel;
  1700. public unowned CacheFile? file;
  1701. public unowned GeometryCache? external_cache;
  1702. public unowned CacheChannel? external_channel;
  1703. }
  1704. [Compact]
  1705. [CCode (cname = "ufbx_cache_file", destroy_function = "", has_type_id = false)]
  1706. public class CacheFile
  1707. {
  1708. [CCode (cname = "element")]
  1709. public Element element;
  1710. [CCode (cname = "name")]
  1711. public String name;
  1712. [CCode (cname = "props")]
  1713. public Props props;
  1714. [CCode (cname = "element_id")]
  1715. public uint32 element_id;
  1716. [CCode (cname = "typed_id")]
  1717. public uint32 typed_id;
  1718. public String filename;
  1719. public String absolute_filename;
  1720. public String relative_filename;
  1721. public Blob raw_filename;
  1722. public Blob raw_absolute_filename;
  1723. public Blob raw_relative_filename;
  1724. public CacheFileFormat format;
  1725. public unowned GeometryCache? external_cache;
  1726. }
  1727. [CCode (cname = "ufbx_material_map", destroy_function = "", has_type_id = false)]
  1728. public struct MaterialMap
  1729. {
  1730. [CCode (cname = "value_real")]
  1731. public Real value_real;
  1732. [CCode (cname = "value_vec2")]
  1733. public Vec2 value_vec2;
  1734. [CCode (cname = "value_vec3")]
  1735. public Vec3 value_vec3;
  1736. [CCode (cname = "value_vec4")]
  1737. public Vec4 value_vec4;
  1738. public int64 value_int;
  1739. public unowned Texture? texture;
  1740. public bool has_value;
  1741. public bool texture_enabled;
  1742. public bool feature_disabled;
  1743. public uint8 value_components;
  1744. }
  1745. [CCode (cname = "ufbx_material_feature_info", destroy_function = "", has_type_id = false)]
  1746. public struct MaterialFeatureInfo
  1747. {
  1748. public bool enabled;
  1749. public bool is_explicit;
  1750. }
  1751. [SimpleType]
  1752. [CCode (cname = "ufbx_material_texture", destroy_function = "", has_type_id = false)]
  1753. public struct MaterialTexture
  1754. {
  1755. public String material_prop;
  1756. public String shader_prop;
  1757. public unowned Texture texture;
  1758. }
  1759. [CCode (cname = "ufbx_material_texture_list", destroy_function = "", has_type_id = false)]
  1760. public struct MaterialTextureList
  1761. {
  1762. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  1763. public MaterialTexture[] data;
  1764. }
  1765. [CCode (cname = "ufbx_shader_type", cprefix = "UFBX_SHADER_", has_type_id = false)]
  1766. public enum ShaderType
  1767. {
  1768. UNKNOWN,
  1769. FBX_LAMBERT,
  1770. FBX_PHONG,
  1771. OSL_STANDARD_SURFACE,
  1772. ARNOLD_STANDARD_SURFACE,
  1773. 3DS_MAX_PHYSICAL_MATERIAL,
  1774. 3DS_MAX_PBR_METAL_ROUGH,
  1775. 3DS_MAX_PBR_SPEC_GLOSS,
  1776. GLTF_MATERIAL,
  1777. SHADERFX_GRAPH,
  1778. BLENDER_PHONG,
  1779. WAVEFRONT_MTL,
  1780. TYPE_COUNT
  1781. }
  1782. [CCode (cname = "ufbx_material_fbx_map", cprefix = "UFBX_MATERIAL_FBX_", has_type_id = false)]
  1783. public enum MaterialFbxMap
  1784. {
  1785. DIFFUSE_FACTOR,
  1786. DIFFUSE_COLOR,
  1787. SPECULAR_FACTOR,
  1788. SPECULAR_COLOR,
  1789. SPECULAR_EXPONENT,
  1790. REFLECTION_FACTOR,
  1791. REFLECTION_COLOR,
  1792. TRANSPARENCY_FACTOR,
  1793. TRANSPARENCY_COLOR,
  1794. EMISSION_FACTOR,
  1795. EMISSION_COLOR,
  1796. AMBIENT_FACTOR,
  1797. AMBIENT_COLOR,
  1798. NORMAL_MAP,
  1799. BUMP,
  1800. BUMP_FACTOR,
  1801. DISPLACEMENT_FACTOR,
  1802. DISPLACEMENT,
  1803. VECTOR_DISPLACEMENT_FACTOR,
  1804. VECTOR_DISPLACEMENT,
  1805. MAP_COUNT
  1806. }
  1807. [CCode (cname = "ufbx_material_pbr_map", cprefix = "UFBX_MATERIAL_PBR_", has_type_id = false)]
  1808. public enum MaterialPbrMap
  1809. {
  1810. BASE_FACTOR,
  1811. BASE_COLOR,
  1812. ROUGHNESS,
  1813. METALNESS,
  1814. DIFFUSE_ROUGHNESS,
  1815. SPECULAR_FACTOR,
  1816. SPECULAR_COLOR,
  1817. SPECULAR_IOR,
  1818. SPECULAR_ANISOTROPY,
  1819. SPECULAR_ROTATION,
  1820. TRANSMISSION_FACTOR,
  1821. TRANSMISSION_COLOR,
  1822. TRANSMISSION_DEPTH,
  1823. TRANSMISSION_SCATTER,
  1824. TRANSMISSION_SCATTER_ANISOTROPY,
  1825. TRANSMISSION_DISPERSION,
  1826. TRANSMISSION_ROUGHNESS,
  1827. TRANSMISSION_EXTRA_ROUGHNESS,
  1828. TRANSMISSION_PRIORITY,
  1829. TRANSMISSION_ENABLE_IN_AOV,
  1830. SUBSURFACE_FACTOR,
  1831. SUBSURFACE_COLOR,
  1832. SUBSURFACE_RADIUS,
  1833. SUBSURFACE_SCALE,
  1834. SUBSURFACE_ANISOTROPY,
  1835. SUBSURFACE_TINT_COLOR,
  1836. SUBSURFACE_TYPE,
  1837. SHEEN_FACTOR,
  1838. SHEEN_COLOR,
  1839. SHEEN_ROUGHNESS,
  1840. COAT_FACTOR,
  1841. COAT_COLOR,
  1842. COAT_ROUGHNESS,
  1843. COAT_IOR,
  1844. COAT_ANISOTROPY,
  1845. COAT_ROTATION,
  1846. COAT_NORMAL,
  1847. COAT_AFFECT_BASE_COLOR,
  1848. COAT_AFFECT_BASE_ROUGHNESS,
  1849. THIN_FILM_THICKNESS,
  1850. THIN_FILM_IOR,
  1851. EMISSION_FACTOR,
  1852. EMISSION_COLOR,
  1853. OPACITY,
  1854. INDIRECT_DIFFUSE,
  1855. INDIRECT_SPECULAR,
  1856. NORMAL_MAP,
  1857. TANGENT_MAP,
  1858. DISPLACEMENT_MAP,
  1859. MATTE_FACTOR,
  1860. MATTE_COLOR,
  1861. AMBIENT_OCCLUSION,
  1862. GLOSSINESS,
  1863. COAT_GLOSSINESS,
  1864. TRANSMISSION_GLOSSINESS,
  1865. MAP_COUNT
  1866. }
  1867. [CCode (cname = "ufbx_material_feature", cprefix = "UFBX_MATERIAL_FEATURE_", has_type_id = false)]
  1868. public enum MaterialFeature
  1869. {
  1870. PBR,
  1871. METALNESS,
  1872. DIFFUSE,
  1873. SPECULAR,
  1874. EMISSION,
  1875. TRANSMISSION,
  1876. COAT,
  1877. SHEEN,
  1878. OPACITY,
  1879. AMBIENT_OCCLUSION,
  1880. MATTE,
  1881. UNLIT,
  1882. IOR,
  1883. DIFFUSE_ROUGHNESS,
  1884. TRANSMISSION_ROUGHNESS,
  1885. THIN_WALLED,
  1886. CAUSTICS,
  1887. EXIT_TO_BACKGROUND,
  1888. INTERNAL_REFLECTIONS,
  1889. DOUBLE_SIDED,
  1890. ROUGHNESS_AS_GLOSSINESS,
  1891. COAT_ROUGHNESS_AS_GLOSSINESS,
  1892. TRANSMISSION_ROUGHNESS_AS_GLOSSINESS,
  1893. COUNT
  1894. }
  1895. [CCode (cname = "ufbx_material_fbx_maps", destroy_function = "", has_type_id = false)]
  1896. public struct MaterialFbxMaps
  1897. {
  1898. [CCode (cname = "maps")]
  1899. public MaterialMap maps[MaterialFbxMap.MAP_COUNT];
  1900. [CCode (cname = "diffuse_factor")]
  1901. public MaterialMap diffuse_factor;
  1902. [CCode (cname = "diffuse_color")]
  1903. public MaterialMap diffuse_color;
  1904. [CCode (cname = "specular_factor")]
  1905. public MaterialMap specular_factor;
  1906. [CCode (cname = "specular_color")]
  1907. public MaterialMap specular_color;
  1908. [CCode (cname = "specular_exponent")]
  1909. public MaterialMap specular_exponent;
  1910. [CCode (cname = "reflection_factor")]
  1911. public MaterialMap reflection_factor;
  1912. [CCode (cname = "reflection_color")]
  1913. public MaterialMap reflection_color;
  1914. [CCode (cname = "transparency_factor")]
  1915. public MaterialMap transparency_factor;
  1916. [CCode (cname = "transparency_color")]
  1917. public MaterialMap transparency_color;
  1918. [CCode (cname = "emission_factor")]
  1919. public MaterialMap emission_factor;
  1920. [CCode (cname = "emission_color")]
  1921. public MaterialMap emission_color;
  1922. [CCode (cname = "ambient_factor")]
  1923. public MaterialMap ambient_factor;
  1924. [CCode (cname = "ambient_color")]
  1925. public MaterialMap ambient_color;
  1926. [CCode (cname = "normal_map")]
  1927. public MaterialMap normal_map;
  1928. [CCode (cname = "bump")]
  1929. public MaterialMap bump;
  1930. [CCode (cname = "bump_factor")]
  1931. public MaterialMap bump_factor;
  1932. [CCode (cname = "displacement_factor")]
  1933. public MaterialMap displacement_factor;
  1934. [CCode (cname = "displacement")]
  1935. public MaterialMap displacement;
  1936. [CCode (cname = "vector_displacement_factor")]
  1937. public MaterialMap vector_displacement_factor;
  1938. [CCode (cname = "vector_displacement")]
  1939. public MaterialMap vector_displacement;
  1940. }
  1941. [CCode (cname = "ufbx_material_pbr_maps", destroy_function = "", has_type_id = false)]
  1942. public struct MaterialPbrMaps
  1943. {
  1944. [CCode (cname = "maps")]
  1945. public MaterialMap maps[MaterialPbrMap.MAP_COUNT];
  1946. [CCode (cname = "base_factor")]
  1947. public MaterialMap base_factor;
  1948. [CCode (cname = "base_color")]
  1949. public MaterialMap base_color;
  1950. [CCode (cname = "roughness")]
  1951. public MaterialMap roughness;
  1952. [CCode (cname = "metalness")]
  1953. public MaterialMap metalness;
  1954. [CCode (cname = "diffuse_roughness")]
  1955. public MaterialMap diffuse_roughness;
  1956. [CCode (cname = "specular_factor")]
  1957. public MaterialMap specular_factor;
  1958. [CCode (cname = "specular_color")]
  1959. public MaterialMap specular_color;
  1960. [CCode (cname = "specular_ior")]
  1961. public MaterialMap specular_ior;
  1962. [CCode (cname = "specular_anisotropy")]
  1963. public MaterialMap specular_anisotropy;
  1964. [CCode (cname = "specular_rotation")]
  1965. public MaterialMap specular_rotation;
  1966. [CCode (cname = "transmission_factor")]
  1967. public MaterialMap transmission_factor;
  1968. [CCode (cname = "transmission_color")]
  1969. public MaterialMap transmission_color;
  1970. [CCode (cname = "transmission_depth")]
  1971. public MaterialMap transmission_depth;
  1972. [CCode (cname = "transmission_scatter")]
  1973. public MaterialMap transmission_scatter;
  1974. [CCode (cname = "transmission_scatter_anisotropy")]
  1975. public MaterialMap transmission_scatter_anisotropy;
  1976. [CCode (cname = "transmission_dispersion")]
  1977. public MaterialMap transmission_dispersion;
  1978. [CCode (cname = "transmission_roughness")]
  1979. public MaterialMap transmission_roughness;
  1980. [CCode (cname = "transmission_extra_roughness")]
  1981. public MaterialMap transmission_extra_roughness;
  1982. [CCode (cname = "transmission_priority")]
  1983. public MaterialMap transmission_priority;
  1984. [CCode (cname = "transmission_enable_in_aov")]
  1985. public MaterialMap transmission_enable_in_aov;
  1986. [CCode (cname = "subsurface_factor")]
  1987. public MaterialMap subsurface_factor;
  1988. [CCode (cname = "subsurface_color")]
  1989. public MaterialMap subsurface_color;
  1990. [CCode (cname = "subsurface_radius")]
  1991. public MaterialMap subsurface_radius;
  1992. [CCode (cname = "subsurface_scale")]
  1993. public MaterialMap subsurface_scale;
  1994. [CCode (cname = "subsurface_anisotropy")]
  1995. public MaterialMap subsurface_anisotropy;
  1996. [CCode (cname = "subsurface_tint_color")]
  1997. public MaterialMap subsurface_tint_color;
  1998. [CCode (cname = "subsurface_type")]
  1999. public MaterialMap subsurface_type;
  2000. [CCode (cname = "sheen_factor")]
  2001. public MaterialMap sheen_factor;
  2002. [CCode (cname = "sheen_color")]
  2003. public MaterialMap sheen_color;
  2004. [CCode (cname = "sheen_roughness")]
  2005. public MaterialMap sheen_roughness;
  2006. [CCode (cname = "coat_factor")]
  2007. public MaterialMap coat_factor;
  2008. [CCode (cname = "coat_color")]
  2009. public MaterialMap coat_color;
  2010. [CCode (cname = "coat_roughness")]
  2011. public MaterialMap coat_roughness;
  2012. [CCode (cname = "coat_ior")]
  2013. public MaterialMap coat_ior;
  2014. [CCode (cname = "coat_anisotropy")]
  2015. public MaterialMap coat_anisotropy;
  2016. [CCode (cname = "coat_rotation")]
  2017. public MaterialMap coat_rotation;
  2018. [CCode (cname = "coat_normal")]
  2019. public MaterialMap coat_normal;
  2020. [CCode (cname = "coat_affect_base_color")]
  2021. public MaterialMap coat_affect_base_color;
  2022. [CCode (cname = "coat_affect_base_roughness")]
  2023. public MaterialMap coat_affect_base_roughness;
  2024. [CCode (cname = "thin_film_thickness")]
  2025. public MaterialMap thin_film_thickness;
  2026. [CCode (cname = "thin_film_ior")]
  2027. public MaterialMap thin_film_ior;
  2028. [CCode (cname = "emission_factor")]
  2029. public MaterialMap emission_factor;
  2030. [CCode (cname = "emission_color")]
  2031. public MaterialMap emission_color;
  2032. [CCode (cname = "opacity")]
  2033. public MaterialMap opacity;
  2034. [CCode (cname = "indirect_diffuse")]
  2035. public MaterialMap indirect_diffuse;
  2036. [CCode (cname = "indirect_specular")]
  2037. public MaterialMap indirect_specular;
  2038. [CCode (cname = "normal_map")]
  2039. public MaterialMap normal_map;
  2040. [CCode (cname = "tangent_map")]
  2041. public MaterialMap tangent_map;
  2042. [CCode (cname = "displacement_map")]
  2043. public MaterialMap displacement_map;
  2044. [CCode (cname = "matte_factor")]
  2045. public MaterialMap matte_factor;
  2046. [CCode (cname = "matte_color")]
  2047. public MaterialMap matte_color;
  2048. [CCode (cname = "ambient_occlusion")]
  2049. public MaterialMap ambient_occlusion;
  2050. [CCode (cname = "glossiness")]
  2051. public MaterialMap glossiness;
  2052. [CCode (cname = "coat_glossiness")]
  2053. public MaterialMap coat_glossiness;
  2054. [CCode (cname = "transmission_glossiness")]
  2055. public MaterialMap transmission_glossiness;
  2056. }
  2057. [CCode (cname = "ufbx_material_features", destroy_function = "", has_type_id = false)]
  2058. public struct MaterialFeatures
  2059. {
  2060. [CCode (cname = "features")]
  2061. public MaterialFeatureInfo features[MaterialFeature.COUNT];
  2062. [CCode (cname = "pbr")]
  2063. public MaterialFeatureInfo pbr;
  2064. [CCode (cname = "metalness")]
  2065. public MaterialFeatureInfo metalness;
  2066. [CCode (cname = "diffuse")]
  2067. public MaterialFeatureInfo diffuse;
  2068. [CCode (cname = "specular")]
  2069. public MaterialFeatureInfo specular;
  2070. [CCode (cname = "emission")]
  2071. public MaterialFeatureInfo emission;
  2072. [CCode (cname = "transmission")]
  2073. public MaterialFeatureInfo transmission;
  2074. [CCode (cname = "coat")]
  2075. public MaterialFeatureInfo coat;
  2076. [CCode (cname = "sheen")]
  2077. public MaterialFeatureInfo sheen;
  2078. [CCode (cname = "opacity")]
  2079. public MaterialFeatureInfo opacity;
  2080. [CCode (cname = "ambient_occlusion")]
  2081. public MaterialFeatureInfo ambient_occlusion;
  2082. [CCode (cname = "matte")]
  2083. public MaterialFeatureInfo matte;
  2084. [CCode (cname = "unlit")]
  2085. public MaterialFeatureInfo unlit;
  2086. [CCode (cname = "ior")]
  2087. public MaterialFeatureInfo ior;
  2088. [CCode (cname = "diffuse_roughness")]
  2089. public MaterialFeatureInfo diffuse_roughness;
  2090. [CCode (cname = "transmission_roughness")]
  2091. public MaterialFeatureInfo transmission_roughness;
  2092. [CCode (cname = "thin_walled")]
  2093. public MaterialFeatureInfo thin_walled;
  2094. [CCode (cname = "caustics")]
  2095. public MaterialFeatureInfo caustics;
  2096. [CCode (cname = "exit_to_background")]
  2097. public MaterialFeatureInfo exit_to_background;
  2098. [CCode (cname = "internal_reflections")]
  2099. public MaterialFeatureInfo internal_reflections;
  2100. [CCode (cname = "double_sided")]
  2101. public MaterialFeatureInfo double_sided;
  2102. [CCode (cname = "roughness_as_glossiness")]
  2103. public MaterialFeatureInfo roughness_as_glossiness;
  2104. [CCode (cname = "coat_roughness_as_glossiness")]
  2105. public MaterialFeatureInfo coat_roughness_as_glossiness;
  2106. [CCode (cname = "transmission_roughness_as_glossiness")]
  2107. public MaterialFeatureInfo transmission_roughness_as_glossiness;
  2108. }
  2109. [Compact]
  2110. [CCode (cname = "ufbx_material", destroy_function = "", has_type_id = false)]
  2111. public class Material
  2112. {
  2113. [CCode (cname = "element")]
  2114. public Element element;
  2115. [CCode (cname = "name")]
  2116. public String name;
  2117. [CCode (cname = "props")]
  2118. public Props props;
  2119. [CCode (cname = "element_id")]
  2120. public uint32 element_id;
  2121. [CCode (cname = "typed_id")]
  2122. public uint32 typed_id;
  2123. public MaterialFbxMaps fbx;
  2124. public MaterialPbrMaps pbr;
  2125. public MaterialFeatures features;
  2126. public ShaderType shader_type;
  2127. public unowned Shader? shader;
  2128. public String shading_model_name;
  2129. public String shader_prop_prefix;
  2130. public MaterialTextureList textures;
  2131. }
  2132. [CCode (cname = "ufbx_texture_type", cprefix = "UFBX_TEXTURE_", has_type_id = false)]
  2133. public enum TextureType
  2134. {
  2135. FILE,
  2136. LAYERED,
  2137. PROCEDURAL,
  2138. SHADER,
  2139. TYPE_COUNT
  2140. }
  2141. [CCode (cname = "ufbx_blend_mode", cprefix = "UFBX_BLEND_", has_type_id = false)]
  2142. public enum BlendMode
  2143. {
  2144. TRANSLUCENT,
  2145. ADDITIVE,
  2146. MULTIPLY,
  2147. MULTIPLY_2X,
  2148. OVER,
  2149. REPLACE,
  2150. DISSOLVE,
  2151. DARKEN,
  2152. COLOR_BURN,
  2153. LINEAR_BURN,
  2154. DARKER_COLOR,
  2155. LIGHTEN,
  2156. SCREEN,
  2157. COLOR_DODGE,
  2158. LINEAR_DODGE,
  2159. LIGHTER_COLOR,
  2160. SOFT_LIGHT,
  2161. HARD_LIGHT,
  2162. VIVID_LIGHT,
  2163. LINEAR_LIGHT,
  2164. PIN_LIGHT,
  2165. HARD_MIX,
  2166. DIFFERENCE,
  2167. EXCLUSION,
  2168. SUBTRACT,
  2169. DIVIDE,
  2170. HUE,
  2171. SATURATION,
  2172. COLOR,
  2173. LUMINOSITY,
  2174. OVERLAY,
  2175. COUNT
  2176. }
  2177. [CCode (cname = "ufbx_wrap_mode", cprefix = "UFBX_WRAP_", has_type_id = false)]
  2178. public enum WrapMode
  2179. {
  2180. REPEAT,
  2181. CLAMP,
  2182. COUNT
  2183. }
  2184. [SimpleType]
  2185. [CCode (cname = "ufbx_texture_layer", destroy_function = "", has_type_id = false)]
  2186. public struct TextureLayer
  2187. {
  2188. public unowned Texture texture;
  2189. public BlendMode blend_mode;
  2190. public Real alpha;
  2191. }
  2192. [CCode (cname = "ufbx_texture_layer", destroy_function = "", has_type_id = false)]
  2193. public struct TextureLayerList
  2194. {
  2195. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2196. public TextureLayer[] data;
  2197. }
  2198. [CCode (cname = "ufbx_shader_texture_type", cprefix = "UFBX_SHADER_TEXTURE_", has_type_id = false)]
  2199. public enum ShaderTextureType
  2200. {
  2201. UNKNOWN,
  2202. SELECT_OUTPUT,
  2203. OSL,
  2204. TYPE_COUNT
  2205. }
  2206. [SimpleType]
  2207. [CCode (cname = "ufbx_shader_texture_input", destroy_function = "", has_type_id = false)]
  2208. public struct ShaderTextureInput
  2209. {
  2210. public String name;
  2211. [CCode (cname = "value_real")]
  2212. public Real value_real;
  2213. [CCode (cname = "value_vec2")]
  2214. public Vec2 value_vec2;
  2215. [CCode (cname = "value_vec3")]
  2216. public Vec3 value_vec3;
  2217. [CCode (cname = "value_vec4")]
  2218. public Vec4 value_vec4;
  2219. public int64 value_int;
  2220. public String value_str;
  2221. public Blob value_blob;
  2222. public unowned Texture? texture;
  2223. public int64 texture_output_index;
  2224. public bool texture_enabled;
  2225. public unowned Prop prop;
  2226. public unowned Prop? texture_prop;
  2227. public unowned Prop? texture_enabled_prop;
  2228. }
  2229. [CCode (cname = "ufbx_shader_texture_input_list", destroy_function = "", has_type_id = false)]
  2230. public struct ShaderTextureInputList
  2231. {
  2232. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2233. public ShaderTextureInput[] data;
  2234. }
  2235. [CCode (cname = "ufbx_shader_texture", destroy_function = "", has_type_id = false)]
  2236. public struct ShaderTexture
  2237. {
  2238. public ShaderTextureType type;
  2239. public String shader_name;
  2240. public uint64 shader_type_id;
  2241. public ShaderTextureInputList inputs;
  2242. public String shader_source;
  2243. public Blob raw_shader_source;
  2244. public unowned Texture main_texture;
  2245. public int64 main_texture_output_index;
  2246. public String prop_prefix;
  2247. }
  2248. [SimpleType]
  2249. [CCode (cname = "ufbx_texture_file", destroy_function = "", has_type_id = false)]
  2250. public struct TextureFile
  2251. {
  2252. public uint32 index;
  2253. public String filename;
  2254. public String absolute_filename;
  2255. public String relative_filename;
  2256. public Blob raw_filename;
  2257. public Blob raw_absolute_filename;
  2258. public Blob raw_relative_filename;
  2259. public Blob content;
  2260. }
  2261. [CCode (cname = "ufbx_texture_file_list", destroy_function = "", has_type_id = false)]
  2262. public struct TextureFileList
  2263. {
  2264. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2265. public TextureFile[] data;
  2266. }
  2267. [Compact]
  2268. [CCode (cname = "ufbx_texture", destroy_function = "", has_type_id = false)]
  2269. public class Texture
  2270. {
  2271. [CCode (cname = "element")]
  2272. public Element element;
  2273. [CCode (cname = "name")]
  2274. public String name;
  2275. [CCode (cname = "props")]
  2276. public Props props;
  2277. [CCode (cname = "element_id")]
  2278. public uint32 element_id;
  2279. [CCode (cname = "typed_id")]
  2280. public uint32 typed_id;
  2281. public TextureType type;
  2282. public String filename;
  2283. public String absolute_filename;
  2284. public String relative_filename;
  2285. public Blob raw_filename;
  2286. public Blob raw_absolute_filename;
  2287. public Blob raw_relative_filename;
  2288. public Blob content;
  2289. public unowned Video? video;
  2290. public uint32 file_index;
  2291. public bool has_file;
  2292. public TextureLayerList layers;
  2293. public unowned ShaderTexture? shader;
  2294. public TextureList file_textures;
  2295. public String uv_set;
  2296. public WrapMode wrap_u;
  2297. public WrapMode wrap_v;
  2298. public bool has_uv_transform;
  2299. public Transform uv_transform;
  2300. public Matrix texture_to_uv;
  2301. public Matrix uv_to_texture;
  2302. }
  2303. [Compact]
  2304. [CCode (cname = "ufbx_video", destroy_function = "", has_type_id = false)]
  2305. public class Video
  2306. {
  2307. [CCode (cname = "element")]
  2308. public Element element;
  2309. [CCode (cname = "name")]
  2310. public String name;
  2311. [CCode (cname = "props")]
  2312. public Props props;
  2313. [CCode (cname = "element_id")]
  2314. public uint32 element_id;
  2315. [CCode (cname = "typed_id")]
  2316. public uint32 typed_id;
  2317. public String filename;
  2318. public String absolute_filename;
  2319. public String relative_filename;
  2320. public Blob raw_filename;
  2321. public Blob raw_absolute_filename;
  2322. public Blob raw_relative_filename;
  2323. public Blob content;
  2324. }
  2325. [Compact]
  2326. [CCode (cname = "ufbx_shader", destroy_function = "", has_type_id = false)]
  2327. public class Shader
  2328. {
  2329. [CCode (cname = "element")]
  2330. public Element element;
  2331. [CCode (cname = "name")]
  2332. public String name;
  2333. [CCode (cname = "props")]
  2334. public Props props;
  2335. [CCode (cname = "element_id")]
  2336. public uint32 element_id;
  2337. [CCode (cname = "typed_id")]
  2338. public uint32 typed_id;
  2339. public ShaderType type;
  2340. public ShaderBindingList bindings;
  2341. }
  2342. [SimpleType]
  2343. [CCode (cname = "ufbx_shader_prop_binding", destroy_function = "", has_type_id = false)]
  2344. public struct ShaderPropBinding
  2345. {
  2346. public String shader_prop;
  2347. public String material_prop;
  2348. }
  2349. [CCode (cname = "ufbx_shader_prop_binding_list", destroy_function = "", has_type_id = false)]
  2350. public struct ShaderPropBindingList
  2351. {
  2352. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2353. public ShaderPropBinding[] data;
  2354. }
  2355. [Compact]
  2356. [CCode (cname = "ufbx_shader_binding", destroy_function = "", has_type_id = false)]
  2357. public class ShaderBinding
  2358. {
  2359. [CCode (cname = "element")]
  2360. public Element element;
  2361. [CCode (cname = "name")]
  2362. public String name;
  2363. [CCode (cname = "props")]
  2364. public Props props;
  2365. [CCode (cname = "element_id")]
  2366. public uint32 element_id;
  2367. [CCode (cname = "typed_id")]
  2368. public uint32 typed_id;
  2369. public ShaderPropBindingList prop_bindings;
  2370. }
  2371. [SimpleType]
  2372. [CCode (cname = "ufbx_prop_override", destroy_function = "", has_type_id = false)]
  2373. public struct PropOverride
  2374. {
  2375. public uint32 element_id;
  2376. public uint32 _internal_key;
  2377. public String prop_name;
  2378. public Vec4 value;
  2379. public String value_str;
  2380. public int64 value_int;
  2381. }
  2382. [CCode (cname = "ufbx_prop_override_list", destroy_function = "", has_type_id = false)]
  2383. public struct PropOverrideList
  2384. {
  2385. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2386. public PropOverride[] data;
  2387. }
  2388. [SimpleType]
  2389. [CCode (cname = "ufbx_transform_override", destroy_function = "", has_type_id = false)]
  2390. public struct TransformOverride
  2391. {
  2392. public uint32 node_id;
  2393. public Transform transform;
  2394. }
  2395. [CCode (cname = "ufbx_transform_override_list", destroy_function = "", has_type_id = false)]
  2396. public struct TransformOverrideList
  2397. {
  2398. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2399. public TransformOverride[] data;
  2400. }
  2401. [Compact]
  2402. [CCode (cname = "ufbx_anim", destroy_function = "", has_type_id = false)]
  2403. public class Anim
  2404. {
  2405. public double time_begin;
  2406. public double time_end;
  2407. public AnimLayerList layers;
  2408. public RealList override_layer_weights;
  2409. public PropOverrideList prop_overrides;
  2410. public TransformOverrideList transform_overrides;
  2411. public bool ignore_connections;
  2412. public bool custom;
  2413. }
  2414. [Compact]
  2415. [CCode (cname = "ufbx_anim_stack", destroy_function = "", has_type_id = false)]
  2416. public class AnimStack
  2417. {
  2418. [CCode (cname = "element")]
  2419. public Element element;
  2420. [CCode (cname = "name")]
  2421. public String name;
  2422. [CCode (cname = "props")]
  2423. public Props props;
  2424. [CCode (cname = "element_id")]
  2425. public uint32 element_id;
  2426. [CCode (cname = "typed_id")]
  2427. public uint32 typed_id;
  2428. public double time_begin;
  2429. public double time_end;
  2430. public AnimLayerList layers;
  2431. public unowned Anim anim;
  2432. }
  2433. [SimpleType]
  2434. [CCode (cname = "ufbx_anim_prop", destroy_function = "", has_type_id = false)]
  2435. public struct AnimProp
  2436. {
  2437. public unowned Element element;
  2438. public uint32 _internal_key;
  2439. public String prop_name;
  2440. public unowned AnimValue anim_value;
  2441. }
  2442. [CCode (cname = "ufbx_anim_list", destroy_function = "", has_type_id = false)]
  2443. public struct AnimPropList
  2444. {
  2445. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2446. public AnimProp[] data;
  2447. }
  2448. [Compact]
  2449. [CCode (cname = "ufbx_anim_layer", destroy_function = "", has_type_id = false)]
  2450. public class AnimLayer
  2451. {
  2452. [CCode (cname = "element")]
  2453. public Element element;
  2454. [CCode (cname = "name")]
  2455. public String name;
  2456. [CCode (cname = "props")]
  2457. public Props props;
  2458. [CCode (cname = "element_id")]
  2459. public uint32 element_id;
  2460. [CCode (cname = "typed_id")]
  2461. public uint32 typed_id;
  2462. public Real weight;
  2463. public bool weight_is_animated;
  2464. public bool blended;
  2465. public bool additive;
  2466. public bool compose_rotation;
  2467. public bool compose_scale;
  2468. public AnimValueList anim_values;
  2469. public AnimPropList anim_props;
  2470. public unowned Anim anim;
  2471. public uint32 _min_element_id;
  2472. public uint32 _max_element_id;
  2473. public uint32 _element_id_bitmask[4];
  2474. }
  2475. [Compact]
  2476. [CCode (cname = "ufbx_anim_value", destroy_function = "", has_type_id = false)]
  2477. public class AnimValue
  2478. {
  2479. [CCode (cname = "element")]
  2480. public Element element;
  2481. [CCode (cname = "name")]
  2482. public String name;
  2483. [CCode (cname = "props")]
  2484. public Props props;
  2485. [CCode (cname = "element_id")]
  2486. public uint32 element_id;
  2487. [CCode (cname = "typed_id")]
  2488. public uint32 typed_id;
  2489. public Vec3 default_value;
  2490. public unowned AnimCurve? curves[3];
  2491. }
  2492. [CCode (cname = "ufbx_interpolation", cprefix = "UFBX_INTERPOLATION_", has_type_id = false)]
  2493. public enum Interpolation
  2494. {
  2495. CONSTANT_PREV,
  2496. CONSTANT_NEXT,
  2497. LINEAR,
  2498. CUBIC,
  2499. COUNT
  2500. }
  2501. [CCode (cname = "ufbx_tangent", destroy_function = "", has_type_id = false)]
  2502. public struct Tangent
  2503. {
  2504. public float dx;
  2505. public float dy;
  2506. }
  2507. [SimpleType]
  2508. [CCode (cname = "ufbx_keyframe", destroy_function = "", has_type_id = false)]
  2509. public struct Keyframe
  2510. {
  2511. public double time;
  2512. public Real value;
  2513. public Interpolation interpolation;
  2514. public Tangent left;
  2515. public Tangent right;
  2516. }
  2517. [CCode (cname = "ufbx_keyframe_list", destroy_function = "", has_type_id = false)]
  2518. public struct KeyframeList
  2519. {
  2520. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2521. public Keyframe[] data;
  2522. }
  2523. [Compact]
  2524. [CCode (cname = "ufbx_anim_curve", destroy_function = "", has_type_id = false)]
  2525. public class AnimCurve
  2526. {
  2527. [CCode (cname = "element")]
  2528. public Element element;
  2529. [CCode (cname = "name")]
  2530. public String name;
  2531. [CCode (cname = "props")]
  2532. public Props props;
  2533. [CCode (cname = "element_id")]
  2534. public uint32 element_id;
  2535. [CCode (cname = "typed_id")]
  2536. public uint32 typed_id;
  2537. public KeyframeList keyframes;
  2538. public Real min_value;
  2539. public Real max_value;
  2540. }
  2541. [Compact]
  2542. [CCode (cname = "ufbx_display_layer", destroy_function = "", has_type_id = false)]
  2543. public class DisplayLayer
  2544. {
  2545. [CCode (cname = "element")]
  2546. public Element element;
  2547. [CCode (cname = "name")]
  2548. public String name;
  2549. [CCode (cname = "props")]
  2550. public Props props;
  2551. [CCode (cname = "element_id")]
  2552. public uint32 element_id;
  2553. [CCode (cname = "typed_id")]
  2554. public uint32 typed_id;
  2555. public NodeList nodes;
  2556. public bool visible;
  2557. public bool frozen;
  2558. public Vec3 ui_color;
  2559. }
  2560. [Compact]
  2561. [CCode (cname = "ufbx_selection_set", destroy_function = "", has_type_id = false)]
  2562. public class SelectionSet
  2563. {
  2564. [CCode (cname = "element")]
  2565. public Element element;
  2566. [CCode (cname = "name")]
  2567. public String name;
  2568. [CCode (cname = "props")]
  2569. public Props props;
  2570. [CCode (cname = "element_id")]
  2571. public uint32 element_id;
  2572. [CCode (cname = "typed_id")]
  2573. public uint32 typed_id;
  2574. public SelectionNodeList nodes;
  2575. }
  2576. [Compact]
  2577. [CCode (cname = "ufbx_selection_node", destroy_function = "", has_type_id = false)]
  2578. public class SelectionNode
  2579. {
  2580. [CCode (cname = "element")]
  2581. public Element element;
  2582. [CCode (cname = "name")]
  2583. public String name;
  2584. [CCode (cname = "props")]
  2585. public Props props;
  2586. [CCode (cname = "element_id")]
  2587. public uint32 element_id;
  2588. [CCode (cname = "typed_id")]
  2589. public uint32 typed_id;
  2590. public unowned Node? target_node;
  2591. public unowned Mesh? target_mesh;
  2592. public bool include_node;
  2593. public Uint32List vertices;
  2594. public Uint32List edges;
  2595. public Uint32List faces;
  2596. }
  2597. [Compact]
  2598. [CCode (cname = "ufbx_character", destroy_function = "", has_type_id = false)]
  2599. public class Character
  2600. {
  2601. [CCode (cname = "element")]
  2602. public Element element;
  2603. [CCode (cname = "name")]
  2604. public String name;
  2605. [CCode (cname = "props")]
  2606. public Props props;
  2607. [CCode (cname = "element_id")]
  2608. public uint32 element_id;
  2609. [CCode (cname = "typed_id")]
  2610. public uint32 typed_id;
  2611. }
  2612. [CCode (cname = "ufbx_constraint_type", cprefix = "UFBX_CONSTRAINT_", has_type_id = false)]
  2613. public enum ConstraintType
  2614. {
  2615. UNKNOWN,
  2616. AIM,
  2617. PARENT,
  2618. POSITION,
  2619. ROTATION,
  2620. SCALE,
  2621. SINGLE_CHAIN_IK,
  2622. TYPE_COUNT
  2623. }
  2624. [SimpleType]
  2625. [CCode (cname = "ufbx_constraint_target", destroy_function = "", has_type_id = false)]
  2626. public struct ConstraintTarget
  2627. {
  2628. public unowned Node node;
  2629. public Real weight;
  2630. public Transform transform;
  2631. }
  2632. [CCode (cname = "ufbx_constraint_target_list", destroy_function = "", has_type_id = false)]
  2633. public struct ConstraintTargetList
  2634. {
  2635. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2636. public ConstraintTarget[] data;
  2637. }
  2638. [CCode (cname = "ufbx_constraint_aim_up_type", cprefix = "UFBX_CONSTRAINT_AIM_UP_", has_type_id = false)]
  2639. public enum ConstraintAimUpType
  2640. {
  2641. SCENE,
  2642. TO_NODE,
  2643. ALIGN_NODE,
  2644. VECTOR,
  2645. NONE,
  2646. TYPE_COUNT
  2647. }
  2648. [CCode (cname = "ufbx_constraint_ik_pole_type", cprefix = "UFBX_CONSTRAINT_IK_POLE_", has_type_id = false)]
  2649. public enum ConstraintIkPoleType
  2650. {
  2651. VECTOR,
  2652. NODE,
  2653. TYPE_COUNT
  2654. }
  2655. [Compact]
  2656. [CCode (cname = "ufbx_constraint", destroy_function = "", has_type_id = false)]
  2657. public class Constraint
  2658. {
  2659. [CCode (cname = "element")]
  2660. public Element element;
  2661. [CCode (cname = "name")]
  2662. public String name;
  2663. [CCode (cname = "props")]
  2664. public Props props;
  2665. [CCode (cname = "element_id")]
  2666. public uint32 element_id;
  2667. [CCode (cname = "typed_id")]
  2668. public uint32 typed_id;
  2669. public ConstraintType type;
  2670. public String type_name;
  2671. public unowned Node? node;
  2672. public ConstraintTargetList targets;
  2673. public Real weight;
  2674. public bool active;
  2675. public bool constrain_translation[3];
  2676. public bool constrain_rotation[3];
  2677. public bool constrain_scale[3];
  2678. public Transform transform_offset;
  2679. public Vec3 aim_vector;
  2680. public ConstraintAimUpType aim_up_type;
  2681. public unowned Node? aim_up_node;
  2682. public Vec3 aim_up_vector;
  2683. public unowned Node? ik_effector;
  2684. public unowned Node? ik_end_node;
  2685. public Vec3 ik_pole_vector;
  2686. }
  2687. [Compact]
  2688. [CCode (cname = "ufbx_audio_layer", destroy_function = "", has_type_id = false)]
  2689. public class AudioLayer
  2690. {
  2691. [CCode (cname = "element")]
  2692. public Element element;
  2693. [CCode (cname = "name")]
  2694. public String name;
  2695. [CCode (cname = "props")]
  2696. public Props props;
  2697. [CCode (cname = "element_id")]
  2698. public uint32 element_id;
  2699. [CCode (cname = "typed_id")]
  2700. public uint32 typed_id;
  2701. public AudioClipList clips;
  2702. }
  2703. [Compact]
  2704. [CCode (cname = "ufbx_audio_clip", destroy_function = "", has_type_id = false)]
  2705. public class AudioClip
  2706. {
  2707. [CCode (cname = "element")]
  2708. public Element element;
  2709. [CCode (cname = "name")]
  2710. public String name;
  2711. [CCode (cname = "props")]
  2712. public Props props;
  2713. [CCode (cname = "element_id")]
  2714. public uint32 element_id;
  2715. [CCode (cname = "typed_id")]
  2716. public uint32 typed_id;
  2717. public String filename;
  2718. public String absolute_filename;
  2719. public String relative_filename;
  2720. public Blob raw_filename;
  2721. public Blob raw_absolute_filename;
  2722. public Blob raw_relative_filename;
  2723. public Blob content;
  2724. }
  2725. [SimpleType]
  2726. [CCode (cname = "ufbx_bone_pose", destroy_function = "", has_type_id = false)]
  2727. public struct BonePose
  2728. {
  2729. public unowned Node bone_node;
  2730. public Matrix bone_to_world;
  2731. public Matrix bone_to_parent;
  2732. }
  2733. [CCode (cname = "ufbx_bone_pose_list", destroy_function = "", has_type_id = false)]
  2734. public struct BonePoseList
  2735. {
  2736. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2737. public BonePose[] data;
  2738. }
  2739. [Compact]
  2740. [CCode (cname = "ufbx_pose", destroy_function = "", has_type_id = false)]
  2741. public class Pose
  2742. {
  2743. [CCode (cname = "element")]
  2744. public Element element;
  2745. [CCode (cname = "name")]
  2746. public String name;
  2747. [CCode (cname = "props")]
  2748. public Props props;
  2749. [CCode (cname = "element_id")]
  2750. public uint32 element_id;
  2751. [CCode (cname = "typed_id")]
  2752. public uint32 typed_id;
  2753. public bool is_bind_pose;
  2754. public BonePoseList bone_poses;
  2755. }
  2756. [Compact]
  2757. [CCode (cname = "ufbx_metadata_object", destroy_function = "", has_type_id = false)]
  2758. public class MetadataObject
  2759. {
  2760. [CCode (cname = "element")]
  2761. public Element element;
  2762. [CCode (cname = "name")]
  2763. public String name;
  2764. [CCode (cname = "props")]
  2765. public Props props;
  2766. [CCode (cname = "element_id")]
  2767. public uint32 element_id;
  2768. [CCode (cname = "typed_id")]
  2769. public uint32 typed_id;
  2770. }
  2771. [SimpleType]
  2772. [CCode (cname = "ufbx_name_element", destroy_function = "", has_type_id = false)]
  2773. public struct NameElement
  2774. {
  2775. public String name;
  2776. public ElementType type;
  2777. public uint32 _internal_key;
  2778. public unowned Element element;
  2779. }
  2780. [CCode (cname = "ufbx_name_element_list", destroy_function = "", has_type_id = false)]
  2781. public struct NameElementList
  2782. {
  2783. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2784. public NameElement[] data;
  2785. }
  2786. [CCode (cname = "ufbx_exporter", cprefix = "UFBX_EXPORTER_", has_type_id = false)]
  2787. public enum Exporter
  2788. {
  2789. UNKNOWN,
  2790. FBX_SDK,
  2791. BLENDER_BINARY,
  2792. BLENDER_ASCII,
  2793. MOTION_BUILDER,
  2794. COUNT
  2795. }
  2796. [CCode (cname = "ufbx_application", destroy_function = "", has_type_id = false)]
  2797. public struct Application
  2798. {
  2799. public String vendor;
  2800. public String name;
  2801. public String version;
  2802. }
  2803. [CCode (cname = "ufbx_file_format", cprefix = "UFBX_FILE_FORMAT_", has_type_id = false)]
  2804. public enum FileFormat
  2805. {
  2806. UNKNOWN,
  2807. FBX,
  2808. OBJ,
  2809. MTL,
  2810. COUNT
  2811. }
  2812. [CCode (cname = "ufbx_warning_type", cprefix = "UFBX_WARNING_", has_type_id = false)]
  2813. public enum WarningType
  2814. {
  2815. MISSING_EXTERNAL_FILE,
  2816. IMPLICIT_MTL,
  2817. TRUNCATED_ARRAY,
  2818. MISSING_GEOMETRY_DATA,
  2819. DUPLICATE_CONNECTION,
  2820. BAD_VERTEX_W_ATTRIBUTE,
  2821. MISSING_POLYGON_MAPPING,
  2822. INDEX_CLAMPED,
  2823. BAD_UNICODE,
  2824. BAD_ELEMENT_CONNECTED_TO_ROOT,
  2825. DUPLICATE_OBJECT_ID,
  2826. EMPTY_FACE_REMOVED,
  2827. UNKNOWN_OBJ_DIRECTIVE,
  2828. TYPE_COUNT,
  2829. TYPE_FIRST_DEDUPLICATED = WarningType.INDEX_CLAMPED
  2830. }
  2831. [SimpleType]
  2832. [CCode (cname = "ufbx_warning", destroy_function = "", has_type_id = false)]
  2833. public struct Warning
  2834. {
  2835. public WarningType type;
  2836. public String description;
  2837. public uint32 element_id;
  2838. public size_t count;
  2839. }
  2840. [CCode (cname = "ufbx_warning_list", destroy_function = "", has_type_id = false)]
  2841. public struct WarningList
  2842. {
  2843. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  2844. public Warning[] data;
  2845. }
  2846. [CCode (cname = "ufbx_thumbnail_format", cprefix = "UFBX_THUMBNAIL_FORMAT_", has_type_id = false)]
  2847. public enum ThumbnailFormat
  2848. {
  2849. UNKNOWN,
  2850. RGB_24,
  2851. RGBA_32,
  2852. COUNT
  2853. }
  2854. [CCode (cname = "ufbx_space_conversion", cprefix = "UFBX_SPACE_CONVERSION_", has_type_id = false)]
  2855. public enum SpaceConversion
  2856. {
  2857. TRANSFORM_ROOT,
  2858. ADJUST_TRANSFORMS,
  2859. MODIFY_GEOMETRY,
  2860. COUNT
  2861. }
  2862. [CCode (cname = "ufbx_thumbnail", destroy_function = "", has_type_id = false)]
  2863. public struct Thumbnail
  2864. {
  2865. public Props props;
  2866. public uint32 width;
  2867. public uint32 height;
  2868. public ThumbnailFormat format;
  2869. public Blob data;
  2870. }
  2871. [CCode (cname = "ufbx_metadata", destroy_function = "", has_type_id = false)]
  2872. public struct Metadata
  2873. {
  2874. public WarningList warnings;
  2875. public bool ascii;
  2876. public uint32 version;
  2877. public FileFormat file_format;
  2878. public bool may_contain_no_index;
  2879. public bool may_contain_missing_vertex_position;
  2880. public bool may_contain_broken_elements;
  2881. public bool is_unsafe;
  2882. public bool has_warning[WarningType.TYPE_COUNT];
  2883. public String creator;
  2884. public bool big_endian;
  2885. public String filename;
  2886. public String relative_root;
  2887. public Blob raw_filename;
  2888. public Blob raw_relative_root;
  2889. public Exporter exporter;
  2890. public uint32 exporter_version;
  2891. public Props scene_props;
  2892. public Application original_application;
  2893. public Application latest_application;
  2894. public Thumbnail thumbnail;
  2895. public bool geometry_ignored;
  2896. public bool animation_ignored;
  2897. public bool embedded_ignored;
  2898. public size_t max_face_triangles;
  2899. public size_t result_memory_used;
  2900. public size_t temp_memory_used;
  2901. public size_t result_allocs;
  2902. public size_t temp_allocs;
  2903. public size_t element_buffer_size;
  2904. public size_t num_shader_textures;
  2905. public Real bone_prop_size_unit;
  2906. public bool bone_prop_limb_length_relative;
  2907. public Real ortho_size_unit;
  2908. public int64 ktime_second;
  2909. public String original_file_path;
  2910. public Blob raw_original_file_path;
  2911. public SpaceConversion space_conversion;
  2912. public Quat root_rotation;
  2913. public Real root_scale;
  2914. public MirrorAxis mirror_axis;
  2915. public Real geometry_scale;
  2916. }
  2917. [CCode (cname = "ufbx_time_mode", cprefix = "UFBX_TIME_MODE_", has_type_id = false)]
  2918. public enum TimeMode
  2919. {
  2920. DEFAULT,
  2921. 120_FPS,
  2922. 100_FPS,
  2923. 60_FPS,
  2924. 50_FPS,
  2925. 48_FPS,
  2926. 30_FPS,
  2927. 30_FPS_DROP,
  2928. NTSC_DROP_FRAME,
  2929. NTSC_FULL_FRAME,
  2930. PAL,
  2931. 24_FPS,
  2932. 1000_FPS,
  2933. FILM_FULL_FRAME,
  2934. CUSTOM,
  2935. 96_FPS,
  2936. 72_FPS,
  2937. 59_94_FPS,
  2938. COUNT
  2939. }
  2940. [CCode (cname = "ufbx_time_protocol", cprefix = "UFBX_TIME_PROTOCOL_", has_type_id = false)]
  2941. public enum TimeProtocol
  2942. {
  2943. SMPTE,
  2944. FRAME_COUNT,
  2945. DEFAULT,
  2946. COUNT
  2947. }
  2948. [CCode (cname = "ufbx_snap_mode", cprefix = "UFBX_SNAP_MODE_", has_type_id = false)]
  2949. public enum SnapMode
  2950. {
  2951. NONE,
  2952. SNAP,
  2953. PLAY,
  2954. SNAP_AND_PLAY,
  2955. COUNT
  2956. }
  2957. [CCode (cname = "ufbx_scene_settings", destroy_function = "", has_type_id = false)]
  2958. public struct SceneSettings
  2959. {
  2960. public Props props;
  2961. public CoordinateAxes axes;
  2962. public Real unit_meters;
  2963. public double frames_per_second;
  2964. public Vec3 ambient_color;
  2965. public String default_camera;
  2966. public TimeMode time_mode;
  2967. public TimeProtocol time_protocol;
  2968. public SnapMode snap_mode;
  2969. public CoordinateAxis original_axis_up;
  2970. public Real original_unit_meters;
  2971. }
  2972. [Compact]
  2973. [CCode (cname = "ufbx_scene", free_function = "ufbx_free_scene", has_type_id = false)]
  2974. public class Scene
  2975. {
  2976. public Metadata metadata;
  2977. public SceneSettings settings;
  2978. public unowned Node root_node;
  2979. public unowned Anim anim;
  2980. [CCode (cname = "unknowns")]
  2981. public UnknownList unknowns;
  2982. [CCode (cname = "nodes")]
  2983. public NodeList nodes;
  2984. [CCode (cname = "meshes")]
  2985. public MeshList meshes;
  2986. [CCode (cname = "lights")]
  2987. public LightList lights;
  2988. [CCode (cname = "cameras")]
  2989. public CameraList cameras;
  2990. [CCode (cname = "bones")]
  2991. public BoneList bones;
  2992. [CCode (cname = "empties")]
  2993. public EmptyList empties;
  2994. [CCode (cname = "line_curves")]
  2995. public LineCurveList line_curves;
  2996. [CCode (cname = "nurbs_curves")]
  2997. public NurbsCurveList nurbs_curves;
  2998. [CCode (cname = "nurbs_surfaces")]
  2999. public NurbsSurfaceList nurbs_surfaces;
  3000. [CCode (cname = "nurbs_trim_surfaces")]
  3001. public NurbsTrimSurfaceList nurbs_trim_surfaces;
  3002. [CCode (cname = "nurbs_trim_boundaries")]
  3003. public NurbsTrimBoundaryList nurbs_trim_boundaries;
  3004. [CCode (cname = "procedural_geometries")]
  3005. public ProceduralGeometryList procedural_geometries;
  3006. [CCode (cname = "stereo_cameras")]
  3007. public StereoCameraList stereo_cameras;
  3008. [CCode (cname = "camera_switchers")]
  3009. public CameraSwitcherList camera_switchers;
  3010. [CCode (cname = "markers")]
  3011. public MarkerList markers;
  3012. [CCode (cname = "lod_groups")]
  3013. public LogGroupList lod_groups;
  3014. [CCode (cname = "skin_deformers")]
  3015. public SkinDeformerList skin_deformers;
  3016. [CCode (cname = "skin_clusters")]
  3017. public SkinClusterList skin_clusters;
  3018. [CCode (cname = "blend_deformers")]
  3019. public BlendDeformerList blend_deformers;
  3020. [CCode (cname = "blend_channels")]
  3021. public BlendChannelList blend_channels;
  3022. [CCode (cname = "blend_shapes")]
  3023. public BlendShapeList blend_shapes;
  3024. [CCode (cname = "cache_deformers")]
  3025. public CacheDeformerList cache_deformers;
  3026. [CCode (cname = "cache_files")]
  3027. public CacheFileList cache_files;
  3028. [CCode (cname = "materials")]
  3029. public MaterialList materials;
  3030. [CCode (cname = "textures")]
  3031. public TextureList textures;
  3032. [CCode (cname = "videos")]
  3033. public VideoList videos;
  3034. [CCode (cname = "shaders")]
  3035. public ShaderList shaders;
  3036. [CCode (cname = "shader_bindings")]
  3037. public ShaderBindingList shader_bindings;
  3038. [CCode (cname = "anim_stacks")]
  3039. public AnimStackList anim_stacks;
  3040. [CCode (cname = "anim_layers")]
  3041. public AnimLayerList anim_layers;
  3042. [CCode (cname = "anim_values")]
  3043. public AnimValueList anim_values;
  3044. [CCode (cname = "anim_curves")]
  3045. public AnimCurveList anim_curves;
  3046. [CCode (cname = "display_layers")]
  3047. public DisplayLayerList display_layers;
  3048. [CCode (cname = "selection_sets")]
  3049. public SelectionSetList selection_sets;
  3050. [CCode (cname = "selection_nodes")]
  3051. public SelectionNodeList selection_nodes;
  3052. [CCode (cname = "characters")]
  3053. public CharacterList characters;
  3054. [CCode (cname = "constraints")]
  3055. public ConstraintList constraints;
  3056. [CCode (cname = "audio_layers")]
  3057. public AudioLayerList audio_layers;
  3058. [CCode (cname = "audio_clips")]
  3059. public AudioClipList audio_clips;
  3060. [CCode (cname = "poses")]
  3061. public PoseList poses;
  3062. [CCode (cname = "metadata_objects")]
  3063. public MetadataObjectList metadata_objects;
  3064. [CCode (cname = "elements_by_type")]
  3065. public ElementList elements_by_type[ElementType.TYPE_COUNT];
  3066. public TextureFileList texture_files;
  3067. public ElementList elements;
  3068. public ConnectionList connections_src;
  3069. public ConnectionList connections_dst;
  3070. public NameElementList elements_by_name;
  3071. public unowned DomNode? dom_root;
  3072. [CCode (cname = "ufbx_load_memory")]
  3073. public static Scene? load_memory(void* data, size_t data_size, LoadOpts opts, ref Error error);
  3074. [CCode (cname = "ufbx_load_file")]
  3075. public static Scene? load_file(string filename, LoadOpts opts, ref Error error);
  3076. [CCode (cname = "ufbx_load_file_len")]
  3077. public static Scene? load_file_len(string filename, size_t filename_len, LoadOpts opts, ref Error error);
  3078. }
  3079. [CCode (cname = "ufbx_curve_point", destroy_function = "", has_type_id = false)]
  3080. public struct CurvePoint
  3081. {
  3082. public bool valid;
  3083. public Vec3 position;
  3084. public Vec3 derivative;
  3085. }
  3086. [CCode (cname = "ufbx_surface_point", destroy_function = "", has_type_id = false)]
  3087. public struct SurfacePoint
  3088. {
  3089. public bool valid;
  3090. public Vec3 position;
  3091. public Vec3 derivative_u;
  3092. public Vec3 derivative_v;
  3093. }
  3094. [CCode (cname = "ufbx_topo_flags", cprefix = "UFBX_TOPO_", has_type_id = false)]
  3095. [Flags]
  3096. public enum TopoFlags
  3097. {
  3098. NON_MANIFOLD
  3099. }
  3100. [CCode (cname = "ufbx_topo_edge", destroy_function = "", has_type_id = false)]
  3101. public struct TopoEdge
  3102. {
  3103. public uint32 index;
  3104. public uint32 next;
  3105. public uint32 prev;
  3106. public uint32 twin;
  3107. public uint32 face;
  3108. public uint32 edge;
  3109. public TopoFlags flags;
  3110. }
  3111. [CCode (cname = "ufbx_vertex_stream", destroy_function = "", has_type_id = false)]
  3112. public struct VertexStream
  3113. {
  3114. [CCode (array_length_cname = "vertex_count", array_length_type = "size_t")]
  3115. public void[] data;
  3116. public size_t vertex_size;
  3117. }
  3118. [CCode (cname = "ufbx_alloc_fn", has_target = true, delegate_target_pos = 0.9)]
  3119. public delegate void* AllocFn(size_t size);
  3120. [CCode (cname = "ufbx_realloc_fn", has_target = true, delegate_target_pos = 0.9)]
  3121. public delegate void* ReallocFn(void* old_ptr, size_t old_size, size_t new_size);
  3122. [CCode (cname = "ufbx_free_fn", has_target = true, delegate_target_pos = 0.9)]
  3123. public delegate void FreeFn(void* ptr, size_t size);
  3124. [CCode (cname = "ufbx_free_allocator_fn", has_target = true, delegate_target_pos = 0.9)]
  3125. public delegate void FreeAllocatorFn();
  3126. [CCode (cname = "ufbx_allocator", destroy_function = "", has_type_id = false)]
  3127. public struct Allocator
  3128. {
  3129. public AllocFn alloc_fn;
  3130. public ReallocFn realloc_fn;
  3131. public FreeFn free_fn;
  3132. public FreeAllocatorFn free_allocator_fn;
  3133. public void* user;
  3134. }
  3135. [CCode (cname = "ufbx_allocator_opts", destroy_function = "", has_type_id = false)]
  3136. public struct AllocatorOpts
  3137. {
  3138. public Allocator allocator;
  3139. public size_t memory_limit;
  3140. public size_t allocation_limit;
  3141. public size_t huge_threshold;
  3142. public size_t max_chunk_size;
  3143. }
  3144. [CCode (cname = "ufbx_read_fn", has_target = true, delegate_target_pos = 0.9)]
  3145. public delegate size_t ReadFn(void* data, size_t size);
  3146. [CCode (cname = "ufbx_skip_fn", has_target = true, delegate_target_pos = 0.9)]
  3147. public delegate bool SkipFn(size_t size);
  3148. [CCode (cname = "ufbx_size_fn", has_target = true, delegate_target_pos = 0.9)]
  3149. public delegate uint64 SizeFn();
  3150. [CCode (cname = "ufbx_close_fn", has_target = true, delegate_target_pos = 0.9)]
  3151. public delegate void CloseFn();
  3152. [CCode (cname = "ufbx_stream", destroy_function = "", has_type_id = false)]
  3153. public struct Stream
  3154. {
  3155. public ReadFn read_fn;
  3156. public SkipFn skip_fn;
  3157. public SizeFn size_fn;
  3158. public CloseFn close_fn;
  3159. public void* user;
  3160. }
  3161. [CCode (cname = "ufbx_open_file_type", cprefix = "UFBX_OPEN_FILE_", has_type_id = false)]
  3162. public enum OpenFileType
  3163. {
  3164. MAIN_MODEL,
  3165. GEOMETRY_CACHE,
  3166. OBJ_MTL,
  3167. TYPE_COUNT
  3168. }
  3169. [SimpleType]
  3170. [CCode (cname = "ufbx_open_file_context", has_type_id = false)]
  3171. public struct OpenFileContext : uintptr
  3172. {
  3173. }
  3174. [CCode (cname = "ufbx_open_file_info", destroy_function = "", has_type_id = false)]
  3175. public struct OpenFileInfo
  3176. {
  3177. public OpenFileContext context;
  3178. public OpenFileType type;
  3179. public Blob original_filename;
  3180. }
  3181. [CCode (cname = "ufbx_open_file_fn", has_target = true, delegate_target_pos = 0.9)]
  3182. public delegate bool OpenFileFn(Stream stream, string path, size_t path_len, OpenFileInfo info);
  3183. [CCode (cname = "ufbx_open_file_cb", destroy_function = "", has_type_id = false)]
  3184. public struct OpenFileCb
  3185. {
  3186. public OpenFileFn fn;
  3187. public void* user;
  3188. }
  3189. [CCode (cname = "ufbx_open_file_opts", destroy_function = "", has_type_id = false)]
  3190. public struct OpenFileOptions
  3191. {
  3192. public uint32 _begin_zero;
  3193. public AllocatorOpts allocator;
  3194. public bool filename_null_terminated;
  3195. public uint32 _end_zero;
  3196. }
  3197. [CCode (cname = "ufbx_close_memory_fn", has_target = true, delegate_target_pos = 0.9)]
  3198. public delegate void CloseMemoryFn(void* data, size_t data_size);
  3199. [CCode (cname = "ufbx_close_memory_cb", destroy_function = "", has_type_id = false)]
  3200. public struct CloseMemoryCb
  3201. {
  3202. public CloseMemoryFn fn;
  3203. public void* user;
  3204. }
  3205. [CCode (cname = "ufbx_open_memory_opts", destroy_function = "", has_type_id = false)]
  3206. public struct OpenMemoryOpts
  3207. {
  3208. public uint32 _begin_zero;
  3209. public AllocatorOpts allocator;
  3210. public bool no_copy;
  3211. public CloseMemoryCb close_cb;
  3212. public uint32 _end_zero;
  3213. }
  3214. [CCode (cname = "ufbx_error_frame", destroy_function = "", has_type_id = false)]
  3215. public struct ErrorFrame
  3216. {
  3217. public uint32 source_line;
  3218. public String function;
  3219. public String description;
  3220. }
  3221. [CCode (cname = "ufbx_error_type", cprefix = "UFBX_ERROR_", has_type_id = false)]
  3222. public enum ErrorType
  3223. {
  3224. NONE,
  3225. UNKNOWN,
  3226. FILE_NOT_FOUND,
  3227. EMPTY_FILE,
  3228. EXTERNAL_FILE_NOT_FOUND,
  3229. OUT_OF_MEMORY,
  3230. MEMORY_LIMIT,
  3231. ALLOCATION_LIMIT,
  3232. TRUNCATED_FILE,
  3233. IO,
  3234. CANCELLED,
  3235. UNRECOGNIZED_FILE_FORMAT,
  3236. UNINITIALIZED_OPTIONS,
  3237. ZERO_VERTEX_SIZE,
  3238. TRUNCATED_VERTEX_STREAM,
  3239. INVALID_UTF8,
  3240. FEATURE_DISABLED,
  3241. BAD_NURBS,
  3242. BAD_INDEX,
  3243. NODE_DEPTH_LIMIT,
  3244. THREADED_ASCII_PARSE,
  3245. UNSAFE_OPTIONS,
  3246. DUPLICATE_OVERRIDE,
  3247. TYPE_COUNT
  3248. }
  3249. [CCode (cname = "ufbx_error", destroy_function = "", has_type_id = false)]
  3250. public struct Error
  3251. {
  3252. public ErrorType type;
  3253. public String description;
  3254. public uint32 stack_size;
  3255. public ErrorFrame stack[ERROR_STACK_MAX_DEPTH];
  3256. public size_t info_length;
  3257. public char info[ERROR_INFO_LENGTH];
  3258. }
  3259. [CCode (cname = "ufbx_progress", destroy_function = "", has_type_id = false)]
  3260. public struct Progress
  3261. {
  3262. public uint64 bytes_read;
  3263. public uint64 bytes_total;
  3264. }
  3265. [CCode (cname = "ufbx_progress_result", cprefix = "UFBX_PROGRESS_", has_type_id = false)]
  3266. [Flags]
  3267. public enum ProgressResult
  3268. {
  3269. CONTINUE,
  3270. CANCEL
  3271. }
  3272. [CCode (cname = "ufbx_progress_fn", destroy_function = "", has_type_id = false)]
  3273. public delegate ProgressResult ProgressFn(Progress progress);
  3274. [CCode (cname = "ufbx_progress_cb", destroy_function = "", has_type_id = false)]
  3275. public struct ProgressCb
  3276. {
  3277. public ProgressFn fn;
  3278. public void* user;
  3279. }
  3280. [CCode (cname = "ufbx_inflate_input", destroy_function = "", has_type_id = false)]
  3281. public struct InflateInput
  3282. {
  3283. public size_t total_size;
  3284. public void* data;
  3285. public size_t data_size;
  3286. public void* buffer;
  3287. public size_t buffer_size;
  3288. public ReadFn read_fn;
  3289. public void* read_user;
  3290. public ProgressCb progress_cb;
  3291. public uint64 progress_interval_hint;
  3292. public uint64 progress_size_before;
  3293. public uint64 progress_size_after;
  3294. public bool no_header;
  3295. public bool no_checksum;
  3296. public size_t internal_fast_bits;
  3297. }
  3298. [CCode (cname = "ufbx_inflate_retain", destroy_function = "", has_type_id = false)]
  3299. struct InflateRetain
  3300. {
  3301. public bool initialized;
  3302. public uint64 data[1024];
  3303. }
  3304. [CCode (cname = "ufbx_index_error_handling", cprefix = "UFBX_INDEX_ERROR_HANDLING_", has_type_id = false)]
  3305. public enum IndexErrorHandling
  3306. {
  3307. CLAMP,
  3308. NO_INDEX,
  3309. ABORT_LOADING,
  3310. UNSAFE_IGNORE,
  3311. COUNT
  3312. }
  3313. [CCode (cname = "ufbx_unicode_error_handling", cprefix = "UFBX_UNICODE_ERROR_HANDLING_", has_type_id = false)]
  3314. public enum UnicodeErrorHandling
  3315. {
  3316. REPLACEMENT_CHARACTER,
  3317. UNDERSCORE,
  3318. QUESTION_MARK,
  3319. REMOVE,
  3320. ABORT_LOADING,
  3321. UNSAFE_IGNORE,
  3322. COUNT
  3323. }
  3324. [CCode (cname = "ufbx_geometry_transform_handling", cprefix = "UFBX_GEOMETRY_TRANSFORM_HANDLING_", has_type_id = false)]
  3325. public enum GeometryTransformHandling
  3326. {
  3327. PRESERVE,
  3328. HELPER_NODES,
  3329. MODIFY_GEOMETRY,
  3330. MODIFY_GEOMETRY_NO_FALLBACK,
  3331. COUNT
  3332. }
  3333. [CCode (cname = "ufbx_inherit_mode_handling", cprefix = "UFBX_INHERIT_MODE_HANDLING_", has_type_id = false)]
  3334. public enum InheritModeHandling
  3335. {
  3336. PRESERVE,
  3337. HELPER_NODES,
  3338. COMPENSATE,
  3339. COMPENSATE_NO_FALLBACK,
  3340. IGNORE,
  3341. COUNT
  3342. }
  3343. [CCode (cname = "ufbx_pivot_handling", cprefix = "UFBX_PIVOT_HANDLING_", has_type_id = false)]
  3344. public enum PivotHandling
  3345. {
  3346. RETAIN,
  3347. ADJUST_TO_PIVOT,
  3348. COUNT
  3349. }
  3350. [CCode (cname = "ufbx_baked_key_flags", cprefix = "UFBX_BAKED_KEY_", has_type_id = false)]
  3351. [Flags]
  3352. public enum BakedKeyFlags
  3353. {
  3354. STEP_LEFT,
  3355. STEP_RIGHT,
  3356. STEP_KEY,
  3357. KEYFRAME,
  3358. REDUCED
  3359. }
  3360. [SimpleType]
  3361. [CCode (cname = "ufbx_baked_vec3", destroy_function = "", has_type_id = false)]
  3362. public struct BakedVec3
  3363. {
  3364. public double time;
  3365. public Vec3 value;
  3366. public BakedKeyFlags flags;
  3367. }
  3368. [CCode (cname = "ufbx_baked_vec3_list", destroy_function = "", has_type_id = false)]
  3369. public struct BakedVec3List
  3370. {
  3371. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3372. public BakedVec3[] data;
  3373. }
  3374. [SimpleType]
  3375. [CCode (cname = "ufbx_baked_quat", destroy_function = "", has_type_id = false)]
  3376. public struct BakedQuat
  3377. {
  3378. public double time;
  3379. public Quat value;
  3380. public BakedKeyFlags flags;
  3381. }
  3382. [CCode (cname = "ufbx_baked_quat_list", destroy_function = "", has_type_id = false)]
  3383. public struct BakedQuatList
  3384. {
  3385. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3386. public BakedQuat[] data;
  3387. }
  3388. [SimpleType]
  3389. [CCode (cname = "ufbx_baked_node", destroy_function = "", has_type_id = false)]
  3390. public struct BakedNode
  3391. {
  3392. public uint32 typed_id;
  3393. public uint32 element_id;
  3394. public bool constant_translation;
  3395. public bool constant_rotation;
  3396. public bool constant_scale;
  3397. public BakedVec3List translation_keys;
  3398. public BakedQuatList rotation_keys;
  3399. public BakedVec3List scale_keys;
  3400. }
  3401. [CCode (cname = "ufbx_baked_node_list", destroy_function = "", has_type_id = false)]
  3402. public struct BakedNodeList
  3403. {
  3404. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3405. public BakedNode[] data;
  3406. }
  3407. [SimpleType]
  3408. [CCode (cname = "ufbx_baked_prop", destroy_function = "", has_type_id = false)]
  3409. public struct BakedProp
  3410. {
  3411. public String name;
  3412. public bool constant_value;
  3413. public BakedVec3List keys;
  3414. }
  3415. [CCode (cname = "ufbx_baked_prop_list", destroy_function = "", has_type_id = false)]
  3416. public struct BakedPropList
  3417. {
  3418. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3419. public BakedProp[] data;
  3420. }
  3421. [SimpleType]
  3422. [CCode (cname = "ufbx_baked_element", destroy_function = "", has_type_id = false)]
  3423. public struct BakedElement
  3424. {
  3425. public uint32 element_id;
  3426. public BakedPropList props;
  3427. }
  3428. [CCode (cname = "ufbx_baked_element_list", destroy_function = "", has_type_id = false)]
  3429. public struct BakedElementList
  3430. {
  3431. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3432. public BakedElement[] data;
  3433. }
  3434. [CCode (cname = "ufbx_baked_anim_metadata", destroy_function = "", has_type_id = false)]
  3435. public struct BakedAnimMetadata
  3436. {
  3437. public size_t result_memory_used;
  3438. public size_t temp_memory_used;
  3439. public size_t result_allocs;
  3440. public size_t temp_allocs;
  3441. }
  3442. [CCode (cname = "ufbx_baked_anim", destroy_function = "", has_type_id = false)]
  3443. public struct BakedAnim
  3444. {
  3445. public BakedNodeList nodes;
  3446. public BakedElementList elements;
  3447. public double playback_time_begin;
  3448. public double playback_time_end;
  3449. public double playback_duration;
  3450. public double key_time_min;
  3451. public double key_time_max;
  3452. public BakedAnimMetadata metadata;
  3453. }
  3454. //
  3455. [CCode (cname = "ufbx_thread_pool_context", has_type_id = false)]
  3456. [SimpleType]
  3457. public struct ThreadPoolContext : uintptr
  3458. {
  3459. }
  3460. [CCode (cname = "ufbx_thread_pool_info", destroy_function = "", has_type_id = false)]
  3461. public struct ThreadPoolInfo
  3462. {
  3463. public uint32 max_concurrent_tasks;
  3464. }
  3465. [CCode (cname = "ufbx_thread_pool_init_fn", has_target = true, delegate_target_pos = 0.9)]
  3466. public delegate bool ThreadPoolInitFn(ThreadPoolContext ctx, ThreadPoolInfo info);
  3467. [CCode (cname = "ufbx_thread_pool_run_fn", has_target = true, delegate_target_pos = 0.9)]
  3468. public delegate bool ThreadPoolRunFn(ThreadPoolContext ctx, uint32 group, uint32 start_index, uint32 count);
  3469. [CCode (cname = "ufbx_thread_pool_wait_fn", has_target = true, delegate_target_pos = 0.9)]
  3470. public delegate bool ThreadPoolWaitFn(ThreadPoolContext ctx, uint32 group, uint32 max_index);
  3471. [CCode (cname = "ufbx_thread_pool_free_fn", has_target = true, delegate_target_pos = 0.9)]
  3472. public delegate void ThreadPoolFreeFn(ThreadPoolContext ctx);
  3473. [CCode (cname = "ufbx_thread_pool", destroy_function = "", has_type_id = false)]
  3474. public struct ThreadPool
  3475. {
  3476. public ThreadPoolInitFn init_fn;
  3477. public ThreadPoolRunFn run_fn;
  3478. public ThreadPoolWaitFn wait_fn;
  3479. public ThreadPoolFreeFn free_fn;
  3480. public void* user;
  3481. }
  3482. [CCode (cname = "ufbx_thread_opts", destroy_function = "", has_type_id = false)]
  3483. public struct ThreadOpts
  3484. {
  3485. public ThreadPool pool;
  3486. public size_t num_tasks;
  3487. public size_t memory_limit;
  3488. }
  3489. [CCode (cname = "ufbx_load_opts", destroy_function = "", has_type_id = false)]
  3490. public struct LoadOpts
  3491. {
  3492. public uint32 _begin_zero;
  3493. public AllocatorOpts temp_allocator;
  3494. public AllocatorOpts result_allocator;
  3495. public ThreadOpts thread_opts;
  3496. public bool ignore_geometry;
  3497. public bool ignore_animation;
  3498. public bool ignore_embedded;
  3499. public bool ignore_all_content;
  3500. public bool evaluate_skinning;
  3501. public bool evaluate_caches;
  3502. public bool load_external_files;
  3503. public bool ignore_missing_external_files;
  3504. public bool skip_skin_vertices;
  3505. public bool skip_mesh_parts;
  3506. public bool clean_skin_weights;
  3507. public bool use_blender_pbr_material;
  3508. public bool disable_quirks;
  3509. public bool strict;
  3510. public bool force_single_thread_ascii_parsing;
  3511. public bool allow_unsafe;
  3512. public IndexErrorHandling index_error_handling;
  3513. public bool connect_broken_elements;
  3514. public bool allow_nodes_out_of_root;
  3515. public bool allow_missing_vertex_position;
  3516. public bool allow_empty_faces;
  3517. public bool generate_missing_normals;
  3518. public bool open_main_file_with_default;
  3519. public char path_separator;
  3520. public uint32 node_depth_limit;
  3521. public uint64 file_size_estimate;
  3522. public size_t read_buffer_size;
  3523. public String filename;
  3524. public Blob raw_filename;
  3525. public ProgressCb progress_cb;
  3526. public uint64 progress_interval_hint;
  3527. public OpenFileCb open_file_cb;
  3528. public GeometryTransformHandling geometry_transform_handling;
  3529. public InheritModeHandling inherit_mode_handling;
  3530. public PivotHandling pivot_handling;
  3531. public SpaceConversion space_conversion;
  3532. public MirrorAxis handedness_conversion_axis;
  3533. public bool handedness_conversion_retain_winding;
  3534. public bool reverse_winding;
  3535. public CoordinateAxes target_axes;
  3536. public Real target_unit_meters;
  3537. public CoordinateAxes target_camera_axes;
  3538. public CoordinateAxes target_light_axes;
  3539. public String geometry_transform_helper_name;
  3540. public String scale_helper_name;
  3541. public bool normalize_normals;
  3542. public bool normalize_tangents;
  3543. public bool use_root_transform;
  3544. public Transform root_transform;
  3545. public double key_clamp_threshold;
  3546. public UnicodeErrorHandling unicode_error_handling;
  3547. public bool retain_vertex_attrib_w;
  3548. public bool retain_dom;
  3549. public FileFormat file_format;
  3550. public size_t file_format_lookahead;
  3551. public bool no_format_from_content;
  3552. public bool no_format_from_extension;
  3553. public bool obj_search_mtl_by_filename;
  3554. public bool obj_merge_objects;
  3555. public bool obj_merge_groups;
  3556. public bool obj_split_groups;
  3557. public String obj_mtl_path;
  3558. public Blob obj_mtl_data;
  3559. public Real obj_unit_meters;
  3560. public CoordinateAxes obj_axes;
  3561. public uint32 _end_zero;
  3562. }
  3563. [CCode (cname = "ufbx_evaluate_opts", destroy_function = "", has_type_id = false)]
  3564. public struct EvaluateOpts
  3565. {
  3566. public uint32 _begin_zero;
  3567. public Allocator temp_allocator;
  3568. public AllocatorOpts result_allocator;
  3569. public bool evaluate_skinning;
  3570. public bool evaluate_caches;
  3571. public bool load_external_files;
  3572. public OpenFileCb open_file_cb;
  3573. public uint32 _end_zero;
  3574. }
  3575. [CCode (cname = "ufbx_const_uint32_list", destroy_function = "", has_type_id = false)]
  3576. public struct ConstUint32List
  3577. {
  3578. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3579. public uint32[] data;
  3580. }
  3581. [CCode (cname = "ufbx_const_real_list", destroy_function = "", has_type_id = false)]
  3582. public struct ConstRealList
  3583. {
  3584. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3585. public Real[] data;
  3586. }
  3587. [SimpleType]
  3588. [CCode (cname = "ufbx_prop_override_desc", destroy_function = "", has_type_id = false)]
  3589. public struct PropOverrideDesc
  3590. {
  3591. public uint32 element_id;
  3592. public String prop_name;
  3593. public Vec4 value;
  3594. public String value_str;
  3595. public int64 value_int;
  3596. }
  3597. [CCode (cname = "ufbx_const_prop_override_desc_list", destroy_function = "", has_type_id = false)]
  3598. public struct ConstPropOverrideDescList
  3599. {
  3600. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3601. public PropOverrideDesc[] data;
  3602. }
  3603. [CCode (cname = "ufbx_const_transform_override_list", destroy_function = "", has_type_id = false)]
  3604. public struct ConstTransformOverrideList
  3605. {
  3606. [CCode (array_length_cname = "count", array_length_type = "size_t")]
  3607. public TransformOverride[] data;
  3608. }
  3609. [CCode (cname = "ufbx_anim_opts", destroy_function = "", has_type_id = false)]
  3610. public struct AnimOpts
  3611. {
  3612. public uint32 _begin_zero;
  3613. public ConstUint32List layer_ids;
  3614. public ConstRealList override_layer_weights;
  3615. public ConstPropOverrideDescList prop_overrides;
  3616. public ConstTransformOverrideList transform_overrides;
  3617. public bool ignore_connections;
  3618. public AllocatorOpts result_allocator;
  3619. public uint32 _end_zero;
  3620. }
  3621. [CCode (cname = "ufbx_bake_step_handling", cprefix = "UFBX_BAKE_STEP_HANDLING_", has_type_id = false)]
  3622. public enum BakeStepHandling
  3623. {
  3624. DEFAULT,
  3625. CUSTOM_DURATION,
  3626. IDENTICAL_TIME,
  3627. ADJACENT_DOUBLE,
  3628. IGNORE,
  3629. COUNT
  3630. }
  3631. [CCode (cname = "ufbx_bake_opts", destroy_function = "", has_type_id = false)]
  3632. public struct BakeOpts
  3633. {
  3634. public uint32 _begin_zero;
  3635. public AllocatorOpts temp_allocator;
  3636. public AllocatorOpts result_allocator;
  3637. public bool trim_start_time;
  3638. public double resample_rate;
  3639. public double minimum_sample_rate;
  3640. public double maximum_sample_rate;
  3641. public bool bake_transform_props;
  3642. public bool skip_node_transforms;
  3643. public bool no_resample_rotation;
  3644. public bool ignore_layer_weight_animation;
  3645. public size_t max_keyframe_segments;
  3646. public BakeStepHandling step_handling;
  3647. public double step_custom_duration;
  3648. public double step_custom_epsilon;
  3649. public bool key_reduction_enabled;
  3650. public bool key_reduction_rotation;
  3651. public double key_reduction_threshold;
  3652. public size_t key_reduction_passes;
  3653. public uint32 _end_zero;
  3654. }
  3655. [CCode (cname = "ufbx_tessellate_curve_opts", destroy_function = "", has_type_id = false)]
  3656. public struct TessellateCurveOpts
  3657. {
  3658. public uint32 _begin_zero;
  3659. public AllocatorOpts temp_allocator;
  3660. public AllocatorOpts result_allocator;
  3661. public size_t span_subdivision;
  3662. public uint32 _end_zero;
  3663. }
  3664. [CCode (cname = "ufbx_tessellate_surface_opts", destroy_function = "", has_type_id = false)]
  3665. public struct TessellateSurfaceOpts
  3666. {
  3667. public uint32 _begin_zero;
  3668. public AllocatorOpts temp_allocator;
  3669. public AllocatorOpts result_allocator;
  3670. public size_t span_subdivision_u;
  3671. public size_t span_subdivision_v;
  3672. public bool skip_mesh_parts;
  3673. public uint32 _end_zero;
  3674. }
  3675. [CCode (cname = "ufbx_subdivide_opts", destroy_function = "", has_type_id = false)]
  3676. public struct SubdivideOpts
  3677. {
  3678. public uint32 _begin_zero;
  3679. public AllocatorOpts temp_allocator;
  3680. public AllocatorOpts result_allocator;
  3681. public SubdivisionBoundary boundary;
  3682. public SubdivisionBoundary uv_boundary;
  3683. public bool ignore_normals;
  3684. public bool interpolate_normals;
  3685. public bool interpolate_tangents;
  3686. public bool evaluate_source_vertices;
  3687. public size_t max_source_vertices;
  3688. public bool evaluate_skin_weights;
  3689. public size_t max_skin_weights;
  3690. public size_t skin_deformer_index;
  3691. public uint32 _end_zero;
  3692. }
  3693. [CCode (cname = "ufbx_geometry_cache_opts", destroy_function = "", has_type_id = false)]
  3694. public struct GeometryCacheOpts
  3695. {
  3696. public uint32 _begin_zero;
  3697. public AllocatorOpts temp_allocator;
  3698. public AllocatorOpts result_allocator;
  3699. public OpenFileCb open_file_cb;
  3700. public double frames_per_second;
  3701. public MirrorAxis mirror_axis;
  3702. public bool use_scale_factor;
  3703. public Real scale_factor;
  3704. public uint32 _end_zero;
  3705. }
  3706. [CCode (cname = "ufbx_geometry_cache_data_opts", destroy_function = "", has_type_id = false)]
  3707. public struct GeometryCacheDataOpts
  3708. {
  3709. public uint32 _begin_zero;
  3710. public OpenFileCb open_file_cb;
  3711. public bool additive;
  3712. public bool use_weight;
  3713. public Real weight;
  3714. public bool ignore_transform;
  3715. public uint32 _end_zero;
  3716. }
  3717. [CCode (cname = "ufbx_panic", destroy_function = "", has_type_id = false)]
  3718. public struct Panic
  3719. {
  3720. public bool did_panic;
  3721. public size_t message_length;
  3722. public char message[PANIC_MESSAGE_LENGTH];
  3723. }
  3724. public bool is_thread_safe();
  3725. } /* namespace ufbx */