1#define_import_path bevy_pbr::mesh_types3struct Mesh {4 // Affine 4x3 matrices transposed to 3x45 // Use bevy_render::maths::affine3_to_square to unpack6 world_from_local: mat3x4<f32>,7 previous_world_from_local: mat3x4<f32>,8 // 3x3 matrix packed in mat2x4 and f32 as:9 // [0].xyz, [1].x,10 // [1].yz, [2].xy11 // [2].z12 // Use bevy_pbr::mesh_functions::mat2x4_f32_to_mat3x3_unpack to unpack13 local_from_world_transpose_a: mat2x4<f32>,14 local_from_world_transpose_b: f32,15 // 'flags' is a bit field indicating various options. u32 is 32 bits so we have up to 32 options.16 flags: u32,17 lightmap_uv_rect: vec2<u32>,18 // The index of the mesh's first vertex in the vertex buffer.19 first_vertex_index: u32,20 pad_a: u32,21 pad_b: u32,22 pad_c: u32,23};25#ifdef SKINNED26struct SkinnedMesh {27 data: array<mat4x4<f32>, 256u>,28};29#endif31#ifdef MORPH_TARGETS32struct MorphWeights {33 weights: array<vec4<f32>, 16u>, // 16 = 64 / 4 (64 = MAX_MORPH_WEIGHTS)34};35#endif37// [2^0, 2^16)38const MESH_FLAGS_VISIBILITY_RANGE_INDEX_BITS: u32 = 65535u;39// 2^2940const MESH_FLAGS_SHADOW_RECEIVER_BIT: u32 = 536870912u;41// 2^3042const MESH_FLAGS_TRANSMITTED_SHADOW_RECEIVER_BIT: u32 = 1073741824u;43// 2^31 - if the flag is set, the sign is positive, else it is negative44const MESH_FLAGS_SIGN_DETERMINANT_MODEL_3X3_BIT: u32 = 2147483648u;