Skip to content

Commit a7eb803

Browse files
author
Jon Drobny
committed
Working with cube example.
1 parent ea95e56 commit a7eb803

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/tests.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,10 @@ use super::*;
33
#[cfg(test)]
44
use float_cmp::*;
55

6-
use parry2d_f64::shape::Polyline;
7-
use parry2d_f64::math::Isometry;
8-
use parry2d_f64::math::Point as Point2d;
9-
10-
/*
11-
let number_boundary_points = boundary_points_converted.clone().len() as u32;
12-
let boundary = Polygon::new(LineString::from(boundary_points_converted), vec![]);
13-
let mut linked_points = (0..number_boundary_points).zip(1..number_boundary_points).map(|(x, y)| [x, y]).collect::<Vec<[u32; 2]>>();
14-
let boundary2 = Polyline::new(boundary_points_converted2, Some(linked_points));
15-
*/
16-
17-
#[test]
6+
#[cfg(test)]
187
fn test_parry2d() {
198
let points: Vec<Point2d<f64>> = vec![Point2d::new(-1.0, -1.0), Point2d::new(-1.0, 1.0), Point2d::new(1.0, 1.0), Point2d::new(1.0, -1.0)];
20-
//let mut indices: Vec<[u32; 2]> = vec![];
21-
//let mut indices: Vec<[u32; 2]> = vec![[0, 1], [1, 2], [2, 3], [3, 0]];
9+
2210
let indices: Vec<[u32; 2]> = vec![[0, 3], [3, 2], [2, 1], [1, 0]];
2311
//indices.reverse();
2412

@@ -32,9 +20,7 @@ fn test_parry2d() {
3220
);
3321

3422
assert!(point_projection.is_inside);
35-
3623
assert!(polyline.aabb(&Isometry::identity()).contains_local_point(&query_point));
37-
//assert!(point_projection.is_inside);
3824

3925
let test_geometry = vec![(0.25, 0.2), (0.75, 0.2), (0.8, 0.8), (0.5, 0.5), (0.2, 0.8)];
4026
let num_segments = 5;

0 commit comments

Comments
 (0)