Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build for Rust 1.0 #80

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ncollide_procedural/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ncollide_procedural"
version = "0.2.0"
version = "0.2.1"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]

description = "2 and 3-dimensional collision detection library in Rust: module for procedural generation of discrete geometric objects."
Expand Down
4 changes: 2 additions & 2 deletions ncollide_procedural/bezier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn bezier_curve_at<P>(control_points: &[P], t: <P::Vect as Vect>::Scalar, ca
where P: Point {
if control_points.len() > cache.len() {
let diff = control_points.len() - cache.len();
cache.extend(iter::repeat(na::orig()).take(diff))
cache.extend(iter::repeat(na::orig::<P>()).take(diff))
}

let cache = &mut cache[..];
Expand Down Expand Up @@ -47,7 +47,7 @@ pub fn bezier_surface_at<P>(
where P: Point {
if vcache.len() < nvpoints {
let diff = nvpoints - vcache.len();
vcache.extend(iter::repeat(na::orig()).take(diff));
vcache.extend(iter::repeat(na::orig::<P>()).take(diff));
}

// FIXME: start with u or v, depending on which dimension has more control points.
Expand Down
2 changes: 1 addition & 1 deletion ncollide_procedural/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pub fn compute_normals<P>(coordinates: &[P], faces: &[Pnt3<u32>], normals: &mut

// Reinit all normals to zero.
normals.clear();
normals.extend(iter::repeat(na::zero()).take(coordinates.len()));
normals.extend(iter::repeat(na::zero::<P::Vect>()).take(coordinates.len()));

// Accumulate normals ...
for f in faces.iter() {
Expand Down