Skip to main content

Crate bevy_rapier_collider_gen

Crate bevy_rapier_collider_gen 

Source
Expand description

Crates.io Crates.io MIT/Apache 2.0

§bevy_rapier_collider_gen

§🚚 THIS CRATE HAS MOVED 🚚

https://github.com/shnewto/bevy_collider_gen

Functions§

image_to_edges
Takes a Bevy Image type and an boolean to indicate whether to translate the points you get back to either side of (0, 0) instead of everything in positive x and y
march_edges
Marching squares adjacent, walks all the pixels in the provided data and keeps track of any that have at least one transparent / zero value neighbor then, while sorting into drawing order, groups them into sets of connected pixels
multi_convex_hull_collider_raw
Generate as many bevy_rapier2d convex_hull colliders as it can find in the image, coordinates left alone and all in positive x and y
multi_convex_hull_collider_translated
Generate as many bevy_rapier2d convex_hull colliders as it can find in the image, coordinates translated to either side of (0, 0)
multi_convex_polyline_collider_raw
Generate as many bevy_rapier2d convex_polyline colliders as it can find in the image, coordinates left alone and all in positive x and y
multi_convex_polyline_collider_translated
Generate as many bevy_rapier2d convex_polyline colliders as it can find in the image, coordinates translated to either side of (0, 0)
multi_heightfield_collider_raw
Generate as many bevy_rapier2d heightfield colliders as it can find in the image, coordinates left alone and all in positive x and y
multi_heightfield_collider_translated
Generate as many bevy_rapier2d heightfield colliders as it can find in the image, coordinates translated to either side of (0, 0)
multi_image_edge_translated
If there’s more than one sprite / object in the image, this returns all it finds, with coordinates translated to either side of (0, 0)
multi_image_edges_raw
If there’s more than one sprite / object in the image, this returns all it finds, with coordinates left alone and all in positive x and y
multi_polyline_collider_raw
Generate as many bevy_rapier2d polyline colliders as it can find in the image, coordinates left alone and all in positive x and y
multi_polyline_collider_translated
Generate as many bevy_rapier2d polyline colliders as it can find in the image, coordinates translated to either side of (0, 0)
single_convex_hull_collider_raw
Generate a single bevy_rapier2d convex_hull collider from the image, coordinates left alone and all in positive x and y
single_convex_hull_collider_translated
Generate a single bevy_rapier2d convex_hull collider from the image, coordinates translated to either side of (0, 0)
single_convex_polyline_collider_raw
Generate a single bevy_rapier2d convex_polyline collider from the image, coordinates left alone and all in positive x and y
single_convex_polyline_collider_translated
Generate a single bevy_rapier2d convex_polyline collider from the image, coordinates translated to either side of (0, 0)
single_heightfield_collider_raw
Generate a single bevy_rapier2d heightfield collider from the image, coordinates left alone and all in positive x and y
single_heightfield_collider_translated
Generate a single bevy_rapier2d heightfield collider from the image, coordinates translated to either side of (0, 0)
single_image_edge_raw
If there’s only one sprite / object in the image, this returns just one, with coordinates left alone and all in positive x and y
single_image_edge_translated
If there’s only one sprite / object in the image, this returns just one, with coordinates translated to either side of (0, 0)
single_polyline_collider_raw
Generate a single bevy_rapier2d polyline collider from the image, coordinates left alone and all in positive x and y
single_polyline_collider_translated
Generate a single bevy_rapier2d polyline collider from the image, coordinates translated to either side of (0, 0)
translate_vec
Translate vector of points in positive x,y to either side of (0,0)