Skip to content

Commit

Permalink
Add a TriangleMap
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Jun 12, 2022
1 parent 6ca7dc1 commit f1cdacf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion crates/bevy_mikktspace/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ use crate::{

#[derive(Copy, Clone)]
pub struct STSpace {
// Normalised f
pub vOs: Vec3,
pub fMagS: f32,
pub vOt: Vec3,
Expand Down Expand Up @@ -223,6 +222,16 @@ impl STmpVert {
}
}

/// Stores a map of 'internal' triangle vertices to real 'faces' and vertices
/// This is used to deduplicate vertices with identical faces
struct TriangleMap {
/// Packed face/vertex index of each triangle
/// Note that this is an index to the first vertex
/// with the given properties, rather than necessarily
/// (Not impressed with this data layout)
triangles: Vec<[u32; 3]>,
}

pub unsafe fn genTangSpace(geometry: &mut impl Geometry, fAngularThreshold: f32) -> bool {
let iNrFaces = geometry.num_faces();
// TODO: Accept in radians by default here?
Expand Down

0 comments on commit f1cdacf

Please sign in to comment.