Skip to content

Commit df7e724

Browse files
committed
Private anything in mikktspace that doesn't need to be public
1 parent 06cc57c commit df7e724

File tree

1 file changed

+35
-35
lines changed
  • crates/bevy_mikktspace/src

1 file changed

+35
-35
lines changed

crates/bevy_mikktspace/src/lib.rs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn generate_tangents<G: Geometry>(geometry: &mut G) -> bool {
4242
generate_tangents_with(geometry, 180.0)
4343
}
4444

45-
pub fn generate_tangents_with<G: Geometry>(geometry: &mut G, angular_threshold: f32) -> bool {
45+
fn generate_tangents_with<G: Geometry>(geometry: &mut G, angular_threshold: f32) -> bool {
4646
// count triangles on supported faces
4747
let mut triangles_count = 0;
4848
for face in 0..geometry.num_faces() {
@@ -185,19 +185,19 @@ pub fn generate_tangents_with<G: Geometry>(geometry: &mut G, angular_threshold:
185185

186186
#[derive(Copy, Clone)]
187187
struct TriangleInfo {
188-
pub face_neighbors: [i32; 3],
189-
pub assigned_group: [usize; 3],
190-
pub os: Vec3,
191-
pub ot: Vec3,
192-
pub mag_s: f32,
193-
pub mag_t: f32,
188+
face_neighbors: [i32; 3],
189+
assigned_group: [usize; 3],
190+
os: Vec3,
191+
ot: Vec3,
192+
mag_s: f32,
193+
mag_t: f32,
194194
/// Index of the face this triangle maps to, in the original faces.
195-
pub original_face_index: i32,
196-
pub flags: TriangleFlags,
195+
original_face_index: i32,
196+
flags: TriangleFlags,
197197
/// Offset of the first vertex of this triangle, in the original vertices.
198-
pub vertex_offset: i32,
198+
vertex_offset: i32,
199199
/// Offsets of the vertices of this triangle, relative to the triangle index, last always 0.
200-
pub vertex_indices: [u8; 4],
200+
vertex_indices: [u8; 4],
201201
}
202202

203203
bitflags! {
@@ -211,7 +211,7 @@ bitflags! {
211211
}
212212

213213
impl TriangleInfo {
214-
pub fn zero() -> Self {
214+
fn zero() -> Self {
215215
Self {
216216
face_neighbors: [0, 0, 0],
217217
assigned_group: [usize::MAX, usize::MAX, usize::MAX],
@@ -360,17 +360,17 @@ fn get_normal<G: Geometry>(geometry: &mut G, index: usize) -> Vec3 {
360360
}
361361

362362
#[derive(Copy, Clone)]
363-
pub struct TSpace {
364-
pub os: Vec3,
365-
pub mag_s: f32,
366-
pub ot: Vec3,
367-
pub mag_t: f32,
368-
pub counter: i32,
369-
pub orient: bool,
363+
struct TSpace {
364+
os: Vec3,
365+
mag_s: f32,
366+
ot: Vec3,
367+
mag_t: f32,
368+
counter: i32,
369+
orient: bool,
370370
}
371371

372372
impl TSpace {
373-
pub fn zero() -> Self {
373+
fn zero() -> Self {
374374
Self {
375375
os: Default::default(),
376376
mag_s: 0.0,
@@ -414,12 +414,12 @@ impl TSpace {
414414
// internal structure
415415

416416
#[derive(Copy, Clone)]
417-
pub struct Group {
418-
pub face_indices_len: usize,
417+
struct Group {
418+
face_indices_len: usize,
419419
/// Index of the first face index in the buffer.
420-
pub face_indices_index: usize,
421-
pub vertex_representative: i32,
422-
pub orient_preservering: bool,
420+
face_indices_index: usize,
421+
vertex_representative: i32,
422+
orient_preservering: bool,
423423
}
424424

425425
impl Group {
@@ -434,9 +434,9 @@ impl Group {
434434
}
435435

436436
#[derive(Clone)]
437-
pub struct SubGroup {
438-
pub faces_count: i32,
439-
pub tri_members: Vec<i32>,
437+
struct SubGroup {
438+
faces_count: i32,
439+
tri_members: Vec<i32>,
440440
}
441441

442442
impl SubGroup {
@@ -449,10 +449,10 @@ impl SubGroup {
449449
}
450450

451451
#[derive(Copy, Clone)]
452-
pub struct Edge {
453-
pub i0: i32,
454-
pub i1: i32,
455-
pub f: i32,
452+
struct Edge {
453+
i0: i32,
454+
i1: i32,
455+
f: i32,
456456
}
457457

458458
impl Edge {
@@ -466,9 +466,9 @@ impl Edge {
466466
}
467467

468468
#[derive(Copy, Clone)]
469-
pub struct TmpVert {
470-
pub vert: [f32; 3],
471-
pub index: i32,
469+
struct TmpVert {
470+
vert: [f32; 3],
471+
index: i32,
472472
}
473473

474474
impl TmpVert {

0 commit comments

Comments
 (0)