8auto to_bx(
const glm::vec3& data) -> bx::Vec3
10 return {data.x, data.y, data.z};
29 math::vec3 axis{0, 1, 0};
38 math::vec3 axis{0, 1, 0};
55 auto bbox = mesh_ref->get_bounds();
62 auto aabb = bx::Aabb{
to_bx(bbox.min),
to_bx(bbox.max)};
80 for(
auto&
shape : shapes)
@ sphere
Sphere type reflection probe.
void draw(DebugDrawEncoder &dde, const physics_sphere_shape &sh)
@ convex
Convex mesh collision (can be dynamic, faster)
auto to_bx(const glm::vec3 &data) -> bx::Vec3
void draw(const bx::Aabb &_aabb)
void drawCylinder(const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
void setColor(uint32_t _abgr)
void drawCapsule(const bx::Vec3 &_from, const bx::Vec3 &_to, float _radius)
Represents a box shape for physics calculations.
math::vec3 extends
Extents of the box.
math::vec3 center
Center of the box.
Represents a capsule shape for physics calculations.
float length
Length of the capsule.
math::vec3 center
Center of the capsule.
float radius
Radius of the capsule.
Represents a compound shape that can contain multiple types of shapes.
shape_t shape
The shape contained in the compound shape.
Represents a cylinder shape for physics calculations.
float length
Length of the cylinder.
math::vec3 center
Center of the cylinder.
float radius
Radius of the cylinder.
Represents a mesh shape for physics calculations.
math::vec3 center
Center offset of the mesh.
mesh_collision_type collision_type
Type of collision shape.
asset_handle< mesh > mesh_asset
Reference to the mesh asset.
Represents a sphere shape for physics calculations.
float radius
Radius of the sphere.
math::vec3 center
Center of the sphere.