Skip to content

Commit a1d386b

Browse files
committed
Update example
1 parent 2bb4d5a commit a1d386b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/icosphere.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ fn main() {
77

88
println!("Indices: {:?}", indices);
99

10-
println!("Vertices:");
10+
println!("\nVertices:");
1111
for (i, vertex) in vertices.iter().enumerate() {
1212
println!("{} [{}, {}, {}]", i, vertex.x, vertex.y, vertex.z);
1313
}
1414

15-
println!("Faces by index:");
15+
println!("\nFaces by index:");
1616
for (i, triangle) in indices.chunks(3).enumerate() {
1717
println!("{} [{}, {}, {}]", i, triangle[0], triangle[1], triangle[2],);
1818
}
19-
hexasphere::AdjacencyBuilder::new(1).add_indices(&indices);
20-
// .build()
21-
// .unwrap()
22-
// .print();
19+
let mut ab = hexasphere::AdjacencyBuilder::new(vertices.len());
20+
ab.add_indices(&indices);
21+
let adjency = ab.finish();
22+
println!("\nVertex neighborlist:\n(The result preserves winding: the resulting array is wound around the center vertex in the same way that the source triangles were wound.):\n {:?}", adjency);
2323
}

0 commit comments

Comments
 (0)