avila-mesh 0.1.0

3D mesh structures with PBR materials, primitives (cube, sphere, plane) - 100% Rust
Documentation
  • Coverage
  • 41.46%
    34 out of 82 items documented0 out of 37 items with examples
  • Size
  • Source code size: 27.78 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 30s Average build duration of successful builds.
  • all releases: 30s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • avilaops

avila-mesh

3D Mesh Library - 100% Rust

High-performance 3D mesh structures with PBR materials and primitive generators.

Features

  • Vertex structures: Position, normal, UV, tangent, color
  • Mesh operations: Merge, transform, recalculate normals, to_buffers()
  • PBR Materials: Physically-based rendering with IFC material mapping
  • Primitives: Cube, sphere, plane generators
  • Scene management: Multi-mesh scenes with material library

Example

use avila_mesh::{Scene, Mesh, PbrMaterial, primitives};
use avila_vec3d::Vec3;

// Create scene
let mut scene = Scene::new();

// Add cube
let mut cube = primitives::cube(2.0);
cube.material_id = Some("concrete".into());
scene.add_mesh(cube);

// Add material
let material = PbrMaterial::from_ifc_material("concrete", "Concrete");
scene.add_material(material);

// Convert to GPU buffers
let buffers = scene.meshes[0].to_buffers();
println!("Vertices: {}", buffers.vertex_count());

IFC Integration

Seamlessly converts IFC materials to PBR:

let material = PbrMaterial::from_ifc_material("IfcWall", "Concrete Wall");
// Automatically sets base_color, metallic, roughness

License

MIT OR Apache-2.0