Bug 1493268. Update Cargo lockfiles and re-vendor rust dependencies

This commit is contained in:
Jeff Muizelaar 2018-09-22 21:21:17 -04:00
parent 24fdba412e
commit 0ab721dac5
5 changed files with 27 additions and 13 deletions

6
Cargo.lock generated
View File

@ -1662,7 +1662,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "plane-split"
version = "0.13.1"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2651,7 +2651,7 @@ dependencies = [
"lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"plane-split 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
"plane-split 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ron 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2974,7 +2974,7 @@ dependencies = [
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903"
"checksum plane-split 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cd1ab9bf7197c31ac8004a487cd1ddc5cf420029fb53023fdcab0540b5fa1410"
"checksum plane-split 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d252db71f3d2109c4936e87d9f29f3c737e89f9ac239999d78866bdd60b9deda"
"checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0"
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
"checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4"

View File

@ -1 +1 @@
{"files":{".travis.yml":"b76d49f66f842c652d40825c67791352364a6b6bbb7d8d1009f2ac79eb413e66","Cargo.toml":"5eab4dba3f19782995f02da90370806ad27d8bdd76d81332a62794baff7434a4","LICENSE":"b946744aeda89b467929585fe8eeb5461847695220c1b168fb375d8abd4ea3d0","README.md":"a65ed5c817c867fe23bc2029f34baea4a645a07dd5d101a0027e796d2923be58","benches/split.rs":"632a011dfc6d8235dea853785061b7bbfe0362eb85b91b3b01fbf77a7f1c7f26","src/bsp.rs":"25358cd319195ed1f23068be70aab86f057b12a6117d88be3fdf111cc8c6353c","src/clip.rs":"838cee6106d240581d1cfcba5d47b67f99a1360748ce7c56531dc4582121fc34","src/lib.rs":"a9ce93011a0b0702a1df2a342aeeb9982a3c8a819b20fefa284686ee0fa04d08","src/polygon.rs":"3fa806dd1529a23caf86d81a64b812698ee76ab28ebef442b79e7f90f3d99e3e","tests/clip.rs":"3335364fd6849697d3919084be5dce6c49acb31d8c53adc93a4cd05ee2ea93a9","tests/main.rs":"1ac76121187062b5469cfaad385d957e0678edb8b1ab80bbfaa8dc1c6af25e8d","tests/split.rs":"0eb1afb1f26cdecd5fffbf32d57e889f8f69254c0a57eecb8ccbbdf38efcdf27"},"package":"cd1ab9bf7197c31ac8004a487cd1ddc5cf420029fb53023fdcab0540b5fa1410"}
{"files":{".travis.yml":"b76d49f66f842c652d40825c67791352364a6b6bbb7d8d1009f2ac79eb413e66","Cargo.toml":"641e7f59b524470c415901d3db5c19035172b376a6a26afdaafab8ab79362a93","LICENSE":"b946744aeda89b467929585fe8eeb5461847695220c1b168fb375d8abd4ea3d0","README.md":"a65ed5c817c867fe23bc2029f34baea4a645a07dd5d101a0027e796d2923be58","benches/split.rs":"632a011dfc6d8235dea853785061b7bbfe0362eb85b91b3b01fbf77a7f1c7f26","src/bsp.rs":"25358cd319195ed1f23068be70aab86f057b12a6117d88be3fdf111cc8c6353c","src/clip.rs":"838cee6106d240581d1cfcba5d47b67f99a1360748ce7c56531dc4582121fc34","src/lib.rs":"a9ce93011a0b0702a1df2a342aeeb9982a3c8a819b20fefa284686ee0fa04d08","src/polygon.rs":"81f5123058fe0d7b57c45feb5bfaaf8923bd1f75efee884abc94b24b610c3a38","tests/clip.rs":"3335364fd6849697d3919084be5dce6c49acb31d8c53adc93a4cd05ee2ea93a9","tests/main.rs":"05e675a165b1e8a8b6513674591a179a74cdce6b35cd969a5895a8140149c064","tests/split.rs":"0eb1afb1f26cdecd5fffbf32d57e889f8f69254c0a57eecb8ccbbdf38efcdf27"},"package":"d252db71f3d2109c4936e87d9f29f3c737e89f9ac239999d78866bdd60b9deda"}

View File

@ -12,7 +12,7 @@
[package]
name = "plane-split"
version = "0.13.1"
version = "0.13.2"
authors = ["Dzmitry Malyshau <kvark@mozilla.com>"]
description = "Plane splitting"
documentation = "https://docs.rs/plane-split"

View File

@ -215,12 +215,12 @@ impl<T, U> Polygon<T, U> where
// generated from various local rectanges on the same geometry plane.
let normal_raw = TypedVector3D::new(inv_transform.m13, inv_transform.m23, inv_transform.m33);
let normal_sql = normal_raw.square_length();
if normal_sql.approx_eq(&T::zero()) {
if normal_sql.approx_eq(&T::zero()) || transform.m44.approx_eq(&T::zero()) {
None
} else {
let normal = normal_raw / normal_sql.sqrt();
let offset = -TypedVector3D::new(transform.m41, transform.m42, transform.m43)
.dot(normal) * transform.m44;
.dot(normal) / transform.m44;
Some(Polygon {
points,

View File

@ -72,12 +72,7 @@ fn empty() {
assert_eq!(None, poly);
}
#[test]
fn from_transformed_rect() {
let rect: TypedRect<f32, ()> = TypedRect::new(point2(10.0, 10.0), TypedSize2D::new(20.0, 30.0));
let transform: TypedTransform3D<f32, (), ()> =
TypedTransform3D::create_rotation(0.5f32.sqrt(), 0.0, 0.5f32.sqrt(), Angle::radians(5.0))
.pre_translate(vec3(0.0, 0.0, 10.0));
fn test_trasnformed(rect: TypedRect<f32, ()>, transform: TypedTransform3D<f32, (), ()>) {
let poly = Polygon::from_transformed_rect(rect, transform, 0).unwrap();
assert!(poly.is_valid());
@ -88,6 +83,25 @@ fn from_transformed_rect() {
assert!(poly.plane.normal.dot(poly2.plane.normal).approx_eq(&1.0));
}
#[test]
fn from_transformed_rect() {
let rect = TypedRect::new(point2(10.0, 10.0), TypedSize2D::new(20.0, 30.0));
let transform =
TypedTransform3D::create_rotation(0.5f32.sqrt(), 0.0, 0.5f32.sqrt(), Angle::radians(5.0))
.pre_translate(vec3(0.0, 0.0, 10.0));
test_trasnformed(rect, transform);
}
#[test]
fn from_transformed_rect_perspective() {
let rect = TypedRect::new(point2(-10.0, -5.0), TypedSize2D::new(20.0, 30.0));
let mut transform =
TypedTransform3D::create_perspective(400.0)
.pre_translate(vec3(0.0, 0.0, 100.0));
transform.m44 = 0.7; //for fun
test_trasnformed(rect, transform);
}
#[test]
fn untransform_point() {
let poly: Polygon<f32, ()> = Polygon {