Bevy MOps (Mesh Operations)
Getting started
// We convert from a "Bevy Mesh" to a `GIMesh` (Globally-positioned Index Mesh)
let mut a = from_mesh;
let b = from_mesh;
// slice `a` triangles by `b`
slice;
// seperates `a` into `inside` and `outside` of `b`
let output = seperate;
// Convert the `output` back to a "Bevy Mesh"
let output_mesh = output.inside.to_mesh.unwrap;
// ... Create a handle and apply it to an entity
Why convert to GIMesh?
- Mesh Attributes are converted to Vectors (e.g.
Vec3) - The Positions and Normals are converted from Local-space to World-space (and back), allowing position, rotation and scaling to effect the operations
Versions
| bevy | bevy_mops |
|---|---|
| 0.13 | 0.1 |
LICENSE
all code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)
at your option.