define_api_id!(0x1df7_daa6_26c6_0ecc, "world-v1");
pub use crate::world_v0::ComponentType;
pub use crate::world_v0::EntityHandle;
pub use crate::world_v0::ValueType;
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,
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,
}