1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
define_api_id!(0x1df7_daa6_26c6_0ecc, "world-v1");
pub use super::world_v0::*; use bytemuck::CheckedBitPattern;
use bytemuck::NoUninit;
use bytemuck::Pod;
use bytemuck::Zeroable;
pub type DataHandle = u64;
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
#[repr(u32)]
#[non_exhaustive]
pub enum ParameterSemantic {
Unspecified = 0,
EntityHandle = 1,
Position = 3,
Scale = 4,
Rotation = 5,
Color = 6,
MeshStyleFlags = 7,
DynamicLockFlags = 8,
CharacterCollisionFlags = 9,
JointType = 10,
JointLimitType = 11,
NormalizedDirection = 12,
Direction = 13,
Bitmask = 15,
CameraProjectionMode = 16,
AngleDegrees = 17,
DataHandle = 18,
Count = 19,
}
#[derive(Debug, Copy, Clone)]
#[repr(C)]
pub struct ParameterMetaDataEntry {
pub parameter_id: u32,
pub name: DataHandle, pub value_type: ValueType,
pub semantic: ParameterSemantic,
pub size_semantic_data_entry: u32,
pub semantic_data: DataHandle,
}
#[derive(Debug, Copy, Clone)]
#[repr(C)]
pub struct ComponentMetaDataEntry {
pub component_type: ComponentType,
pub name: DataHandle, pub size_parameter_entry: u32, pub parameters: DataHandle,
}
#[derive(Debug, Copy, Clone)]
#[repr(C)]
pub struct ComponentsMetaDataEntry {
pub size_component_entry: u32, pub components: DataHandle,
}
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, NoUninit, CheckedBitPattern)]
#[repr(u32)]
#[non_exhaustive]
pub enum WorldEntityQueryType {
AllEntities = 0,
TransformChildren = 1,
TransformDescendants = 2,
AllEntitiesNoLayerFilter = 3,
TransformChildrenNoLayerFilter = 4,
TransformDescendantsNoLayerFilter = 5,
}
#[derive(Debug, Copy, Clone, NoUninit, CheckedBitPattern)]
#[repr(C)]
pub struct WorldEntityQuery {
pub layer_mask: u64,
pub num_include_tags: u8,
pub num_exclude_tags: u8,
pub _pad0: [u8; 6],
pub include_tags: [u64; 16],
pub exclude_tags: [u64; 16],
pub query_type: WorldEntityQueryType,
pub _pad1: u32,
pub root_entity: EntityHandle,
}
#[derive(Debug, Copy, Clone, Pod, Zeroable)]
#[repr(C)]
pub struct PhysicsShapeBox {
pub center: [f32; 3],
pub half_size: [f32; 3],
pub rotation: [f32; 4],
}
#[derive(Debug, Copy, Clone, Pod, Zeroable)]
#[repr(C)]
pub struct PhysicsShapeSphere {
pub center: [f32; 3],
pub radius: f32,
}
#[derive(Debug, Copy, Clone, Pod, Zeroable)]
#[repr(C)]
pub struct PhysicsShapeCapsule {
pub pos0: [f32; 3],
pub pos1: [f32; 3],
pub radius: f32,
}
#[derive(Debug, Copy, Clone, Pod, Zeroable)]
#[repr(C)]
pub struct CompoundPhysicsShape {
pub num_boxes: u32,
pub boxes_ptr: u32,
pub num_spheres: u32,
pub spheres_ptr: u32,
pub num_capsules: u32,
pub capsules_ptr: u32,
}