Commit graph

49 commits

Author SHA1 Message Date
derekburch
744fb78662 Fix conversion from Matrix3 to Quaternion 2015-12-22 17:53:06 -08:00
Brendan Zabarauskas
1d886f6197 Add all permutations of matrix ops, and remove operator methods
Completes #247
2015-12-21 21:02:40 +11:00
Brendan Zabarauskas
e76921881f Remove operator methods on angles 2015-12-13 16:18:39 +11:00
Brendan Zabarauskas
43634f0b49 Remove more *_self methods from Vector trait 2015-12-13 12:01:00 +11:00
Brendan Zabarauskas
25f5dfd5fc Remove operator methods from Vector trait 2015-12-13 12:01:00 +11:00
Brendan Zabarauskas
75b6548179 Remove ToComponents and CompositeTransform traits
Fixes #274

# Conflicts:
#	src/transform.rs
2015-12-13 10:20:53 +11:00
Brendan Zabarauskas
2dc0a4a43f Rename SquareMatrix::one to identity
Fixes #260
2015-12-06 19:36:38 +11:00
Brendan Zabarauskas
25ca567060 Move element-wise operations into Array1 trait 2015-11-14 12:17:03 +11:00
Brendan Zabarauskas
178272da3d Make lots of methods take vectors and points by value 2015-11-09 20:18:02 +11:00
Brendan Zabarauskas
669e43ab59 Make scalar type parametrs out of transform and rotation traits 2015-11-03 15:23:22 +11:00
Brendan Zabarauskas
943a92e691 Remove collision types and traits from the library
Closes #244
2015-11-01 13:42:58 +11:00
Brendan Zabarauskas
b168c03174 Rename identity to one
Zero is the additive identity, so this disambiguates it
2015-10-01 18:56:31 +10:00
Brendan Zabarauskas
af38e8a8be Rename comp_{add, mul} to {sum, product} 2015-10-01 18:52:55 +10:00
Brendan Zabarauskas
902215b532 Implement binary operators for matrices
We can't yet remove the operator methods, due to rust-lang/rust#20671
2015-09-30 19:01:30 +10:00
Brendan Zabarauskas
4be95bcb7d Remove {Array1, Array2}::map method
This doesn't seem to be used anywhere - not sure how useful it is. It isn't really a proper `map` anyway, because it mutates `self`.
2015-09-29 09:47:57 +10:00
Pierre Krieger
151c6c6e64 Replace as_matrix* by impl AsRef<Matrix 2015-05-06 16:27:02 +02:00
Pierre Krieger
8ab8d7551d Replace ToMatrix* by Into 2015-05-06 16:27:02 +02:00
Pierre Krieger
e5822e3864 Replace ToDeg/ToRad by From/Into 2015-05-06 16:27:02 +02:00
Dzmitry Malyshau
498df01729 Fixed all the warnings, compile issues, and tests 2015-04-04 22:31:18 -04:00
Dzmitry Malyshau
b36039a6ee Fixed the tests 2015-03-25 22:14:17 -04:00
Jonathan Neuschäfer
2b952a2577 Add tests for inverted rotations 2015-03-18 18:21:39 +01:00
Jonathan Neuschäfer
241441a650 #[should_fail] -> #[should_panic] 2015-03-18 18:21:39 +01:00
Jonathan Neuschäfer
4c527f8334 s/AUTHORS file/Cargo.toml file/ 2015-03-18 17:51:03 +01:00
Colin Sherratt
146a64cc1b fix is->isize in vector 2015-03-15 16:54:38 -04:00
Dzmitry Malyshau
6691dce420 Added Bound::relate_clip_space with default implementation 2015-03-15 22:37:11 +03:00
Dzmitry Malyshau
fa3aacafcf Improved Plane, fixed Frustum computation from Matrix4, implemented Frustum contains() tests. 2015-03-15 22:36:09 +03:00
Dzmitry Malyshau
715f3b7157 Added tests for aabb to_corners(). Fixed test warnings. 2015-03-15 22:36:07 +03:00
Dzmitry Malyshau
4d71e8aad9 Moved the bound tests around. Added one for Aabb3 2015-03-15 22:36:04 +03:00
Dzmitry Malyshau
d3d7241c86 Moved bound implementations into the corresponding modules 2015-03-15 22:36:03 +03:00
Dzmitry Malyshau
f03d4427ee Redesigned ToComponents, removed the implementation for AffineMatrix3 as incorrect. 2015-03-01 23:40:43 -05:00
Dzmitry Malyshau
45c6fd630d Cleaned up public exports. Implemented ToComponents for Matrix3. Added tests. 2015-03-01 01:29:47 -05:00
Dzmitry Malyshau
bf257a3e49 Added ToComponents. Moved from_value into . 2015-03-01 01:05:22 -05:00
Colin Sherratt
33bb8022cb Fixed benchmarks 2015-02-08 13:42:28 -05:00
Colin Sherratt
662c7d7f68 cleanup some warnings around features 2015-02-08 13:36:33 -05:00
Dzmitry Malyshau
6ecbf2dbfd Implemented short vector constructors 2015-02-06 23:03:00 -05:00
Colin Sherratt
bc89f14250 Fix tests 2015-01-09 15:30:19 -07:00
Colin Sherratt
c7270a9077 Update to latest rustc 2015-01-07 15:34:42 -07:00
Connorcpu
43cfdd94ec Fixed macros with missing semicolons 2014-12-19 09:48:59 -08:00
Jameson Ernst
12ec7318d0 Remove deprecated Float use from tests. 2014-11-24 20:24:04 -08:00
Eduard Bopp
4d2fb64482 Type-cast a vector component-wise
This allows one to e.g. cast a vector of f64s to an equivalent vector of f32s.
More generally this is allowed for arbitrary NumCast types.
2014-11-20 16:41:27 +01:00
Brendan Zabarauskas
1371f75165 Update for rustc 0.13.0-nightly
There are still some deprecation errors in the doc tests left
2014-11-16 01:59:43 +11:00
Tomaka17
4fcfde13de fail! -> panic! 2014-10-30 10:11:33 +01:00
Eduard Bopp
666bb56670 Assertion macros for approximate equality
For sake of readability and consistency with the standard library macros
assert! and assert_eq!, the macros assert_approx_eq! and assert_approx_eq_eps!
have been implemented based on the ApproxEq trait.

Upon failure these macros yield readable error messages including the input
values and the tolerance (epsilon) used to determine their approximate
equality.

Resolves #131.
2014-10-23 10:22:34 +02:00
Colin Sherratt
0f0b960211 Added to_euler which allows moving from to and from euler coordinates.
I did not have much luck getting the old from_eular logic work the way I
expected so I updated the implementation to match my sources.

I believe this changed the order of the axis, I am unsure of what they were
before.
2014-10-13 21:05:49 -04:00
Colin Sherratt
aae8747595 Fix ortho projection matrix 2014-10-04 20:12:09 -04:00
Brendan Zabarauskas
379dc499ec Publicly re-export everything from the root crate
Closes #100
2014-08-16 14:53:54 +10:00
Brandon Waskiewicz
4f17d73f23 Add Ray2<>Aabb2 intersection impl 2014-08-13 20:51:51 -04:00
Brandon Waskiewicz
814b845de7 Update line intersection
*Change line<>line intersection to be ray<>line.
*Update tests accordingly
*Clean up and simplify intersection logic
2014-08-13 20:51:44 -04:00
Brendan Zabarauskas
8e5500d581 Switch to cargo 2014-08-11 16:15:14 +10:00