Replace Vec references with slices in a few places.
This commit is contained in:
parent
c063ff22a4
commit
1b66995bdd
|
|
@ -14,8 +14,8 @@ mod wavefront_obj {
|
|||
|
||||
fn get_vertex_and_normal<T: Real>(
|
||||
index_tuple: &IndexTuple,
|
||||
vertex_positions: &Vec<[f32; 3]>,
|
||||
normal_positions: &Vec<[f32; 3]>,
|
||||
vertex_positions: &[[f32; 3]],
|
||||
normal_positions: &[[f32; 3]],
|
||||
) -> (Point3<T>, Vector3<T>)
|
||||
where
|
||||
T: SupersetOf<f32>,
|
||||
|
|
@ -31,8 +31,8 @@ mod wavefront_obj {
|
|||
|
||||
fn get_triangles<T: Real>(
|
||||
polygon: &SimplePolygon,
|
||||
vertex_positions: &Vec<[f32; 3]>,
|
||||
normal_positions: &Vec<[f32; 3]>,
|
||||
vertex_positions: &[[f32; 3]],
|
||||
normal_positions: &[[f32; 3]],
|
||||
material: Arc<dyn Material<T>>,
|
||||
) -> Vec<Triangle<T>>
|
||||
where
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ fn signed_edge_function<T: Real>(a: &Vector3<T>, b: &Vector3<T>) -> T {
|
|||
a.x * b.y - b.x * a.y
|
||||
}
|
||||
|
||||
fn signed_edge_functions<T: Real>(vertices: &Vec<Vector3<T>>) -> Vector3<T> {
|
||||
fn signed_edge_functions<T: Real>(vertices: &[Vector3<T>]) -> Vector3<T> {
|
||||
// Iterate over the inputs in such a way that each output element is calculated
|
||||
// from the twoother elements of the input. ( (y,z) -> x, (z,x) -> y, (x,y) -> z )
|
||||
Vector3::from_iterator(
|
||||
|
|
|
|||
Loading…
Reference in New Issue