Skip to content

Mesh Operations Library for Bevy

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

PixelDoted/bevy_mops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy MOps (Mesh Operations)

docs.rs crates.io Following released Bevy versions

Getting started

// We convert from a "Bevy Mesh" to a `GIMesh` (Globally-positioned Index Mesh)
let mut a = GIMesh::from_mesh(mesh_a);
let b = GIMesh::from_mesh(mesh_b);

// slice `a` triangles by `b`
a.slice(&b);

// seperates `a` into `inside` and `outside` of `b`
let output = a.seperate(&b);

// 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?

  1. Mesh Attributes are converted to Vectors (e.g. Vec3)
  2. 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:

at your option.

About

Mesh Operations Library for Bevy

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages