Commit Graph

64 Commits

Author SHA1 Message Date
Sébastien Crozet 2f273d655a Rename: VecExt -> AnyVecExt, PntExt -> AnyPntExt. 2014-10-30 08:38:05 +01:00
Sébastien Crozet 276bf3f999 Update to the last rust-nightly.
Version of rustc: 0.13.0-nightly (222ae8b9b 2014-10-18 00:47:22 +0000).
2014-10-18 20:52:35 +02:00
Sébastien Crozet 8288ebdfab Add quaternions to the feature list. 2014-10-14 22:24:10 +02:00
Sébastien Crozet 5ba9f27530 Add quaternions.
Fix #24.
2014-10-14 22:20:49 +02:00
Sébastien Crozet 162346ab47 Fix typos. 2014-10-13 08:46:39 +02:00
Sébastien Crozet 0cf725f5f2 Add 3D orthogonal and perspective projection structures.
Fix #26.
2014-10-12 20:40:46 +02:00
Sébastien Crozet 03eda09084 Some documentation fixes.
Fix #25.
2014-10-12 10:35:56 +02:00
Sébastien Crozet b6090042ac Add a `Axpy` that implements y <- y + ax.
This is very useful for accumulations to compute, e.g. centers.
2014-10-12 09:24:16 +02:00
Sébastien Crozet bf67f079e7 Add a function `nalgebra::center(a, b)` that computes the center of two points. 2014-10-10 21:24:18 +02:00
Sébastien Crozet b3e7540b3c Delete the deprecated `na::` module. 2014-10-10 20:57:20 +02:00
Sébastien Crozet 6fb6d35980 Documentation fixes. 2014-10-10 20:56:40 +02:00
Sébastien Crozet 924d8269d8 Add points.
This adds the Pnt{1,2,3,4,5,6} structures.
This adds the traits:
  − AnyPnt
  − FloatPnt
  − PntExt
  − FloatPntExt
  − Orig (to return the zero point)
  − PntAsVec
  − VecAsPnt
This adds operator overloading:
  − Pnt + Vec
  − Pnt - Vec
  − Pnt * Scalar
  − Pnt / Scalar
  − Pnt + Scalar
  − Pnt - Scalar
  − Iso * Pnt
  − Rot * Pnt
  − Pnt * Iso
  − Pnt * Rot
This changes some behavior:
  − Iso multiplication with a Vec does not translate the vector any more.
  − ToHomogeneous adds a 0.0 at the end of a Vec and a 1.0 at the end of a Pnt.
  − FromHomogeneous performs w-normalization on a Pnt, but not on a Vec.
  − The Translate<Vec> trait is never implemented (i-e. a Vec is not to be translated).

cc #25
2014-10-10 11:45:20 +02:00
Sébastien Crozet ba18f5aa70 Deprecate `na::`, move all reexport to the root crate.
This also moves the tests and benches to cargo-complient folders.

Fix #21.
2014-09-28 19:22:57 +02:00
Sébastien Crozet c408d5a0b2 Update to the last rust-nightly.
Version of rustc: 0.12.0-pre-nightly (01ec6fab2 2014-08-18 00:46:10 +0000).
2014-08-18 19:35:47 +02:00
Sébastien Crozet 5b1388888b Update the compilation section of the README. 2014-07-14 17:56:35 +02:00
Sébastien Crozet 65211aa89a Cleanup the Makefile + update travis.yml. 2014-07-14 16:27:46 +02:00
Sébastien Crozet 11ee4e46b1 Make cargo build a rlib too. 2014-07-14 13:48:31 +02:00
Sébastien Crozet e3d1bf6f92 Update to the last rust-nightly.
Version of rustc: 0.11.0-nightly (5ad7286dc37839b7234ff51aab172e48935869d8 2014-07-12 00:31:46 +0000)
2014-07-12 09:30:49 +02:00
Sébastien Crozet 7b9a3f2bb9 Update to the last rust-nightly.
Version of rustc: 0.11.0-nightly (459f155f81291c46633e86a480628b50304ffb1c 2014-07-04 23:46:44 +0000).
2014-07-05 10:33:57 +02:00
Sébastien Crozet ecbc159521 Update some links to point on `nalgebra.org`. 2014-06-09 21:48:24 +02:00
Sébastien Crozet f6c597f102 Update to the last rust-nightly.
Version of rustc: 0.11.0-pre-nightly (faa7ba7 2014-05-31 01:06:40 -0700).

Main changes:
        * `cmp::Ord` -> `cmp::PartialOrd`
        * `cmp::Eq`  ->  `cmp::PartialEq`

Note that `na::PartialOrd` is not the same as `cmp::PartialOrd`
(which lacks a lot of partial ordering operators).
2014-06-01 15:22:11 +02:00
Vincent Barrielle 5611307b4d QR decomposition depends less on DMat internals 2014-05-09 22:14:37 +02:00
Sébastien Crozet 06e18d214a Update to the last Rust.
Version of rustc: 0.10-pre (b8ef9fd 2014-03-31 15:51:33 -0700)

struct fields are now public by default.
2014-04-01 23:00:59 +02:00
Sébastien Crozet 606ad947c9 Use Vec instead of ~[].
Version of rustc: 0.10-pre (fc7a112 2014-03-14 23:11:31 -0700)
2014-03-15 12:23:54 +01:00
Peter Nguyen 7bc561c835 Update to latest rust.
`std::rand` was moved to it's own crate.
Version of rustc: rustc 0.10-pre (4d64441 2014-03-12 15:07:06 -0700)
2014-03-13 17:47:03 -04:00
Sébastien Crozet 9a49bb5895 Update to the last Rust.
Version of rustc: 0.10-pre (698042d 2014-02-21 21:26:49 -0800)
2014-02-22 09:09:04 +01:00
Sébastien Crozet becb77843e Update to the last Rust.
Version of rustc: 0.10-pre (b0ce960 2014-02-17 22:16:51 -0800)
This replaces uses of the `Orderable` trait by a `PartialOrd` trait: the `min` and `max` methods
are replaced by `inf` and `sup` methods.
Vectors do not implement the `Ord` trait any more.

Fix #4
2014-02-18 12:13:40 +01:00
Sébastien Crozet 96e77e4cfd Update to the last Rust.
Version of rustc: 0.10-pre (9a672f9 2014-02-05 18:31:36 -0800)
2014-02-06 08:59:27 +01:00
Sébastien Crozet 85c67b5544 Activate the unused_results lint. 2014-01-31 15:26:25 +01:00
Sébastien Crozet 4c262bb91d Remove useless parenthesis. 2014-01-23 01:22:23 +01:00
Sébastien Crozet f018478117 Fix the doc root url. 2014-01-21 08:24:23 +01:00
Sébastien Crozet 836a0d40ae Modify `.travis.yml` to generate the documentation. 2014-01-21 08:13:10 +01:00
Sébastien Crozet 5463da79ae Make `make test` test the documentation examples too. 2014-01-19 16:16:12 +01:00
Sébastien Crozet cbebbe8961 Add the `html_doc_url` attribute. 2014-01-18 19:57:36 +01:00
Sébastien Crozet 3e41e18c32 Fix the example on the README. 2014-01-14 09:52:18 +01:00
Sébastien Crozet f026585b63 Fix the link to the online documentation. 2014-01-14 09:48:03 +01:00
Sébastien Crozet 87c0d5b769 Make the `struct` and `traits` modules private.
Now that the documentation of public export of private modules is inlined on the exporter's
documentation, there is non need to export anything but the `na` module.
2014-01-14 09:40:12 +01:00
Sébastien Crozet db831f922e Update to the last Rust. 2013-12-24 11:46:16 +01:00
Sébastien Crozet effb1632d1 Update to the last Rust: pkgid -> crate_id 2013-12-20 12:55:15 +01:00
Sébastien Crozet e25bac3565 Fix pkgid. 2013-12-12 18:08:05 +01:00
Sébastien Crozet f83ddde824 Update to the last Rust.
This renames lib.rs to nalgebra.rs so that the generated *.so has the right name.
2013-12-11 16:32:03 +01:00
Sébastien Crozet 4addd531cf Add incomplete implementation of 4D rotation. 2013-11-22 09:46:48 +01:00
Sébastien Crozet 90e40aaec0 Make most out-of-place methods static.
This is to make people prefer the functional style.
Things like `a.dot(b)` dont make sense per se (there is no reason for `a` to have a different
status than `b`). Using static methods avoid this.

In-place methods are left unchanged.
2013-10-16 21:44:33 +02:00
Sébastien Crozet bb5654d220 Remove free-functions alliasing structures constructors.
Those constructors are not idiomatic. Use e.g. `Vec3::new(0, 0, 0)` instead.
2013-10-14 11:22:38 +02:00
Sébastien Crozet ccbc8b4429 Api change: deal with inplace/out of place methods.
Before, it was too easy to use an out of place method instead of the inplace one since they name
were pretty mutch the same. This kind of confusion may lead to silly bugs very hard to understand.
Thus the following changes have been made when a method is available both inplace and out-of-place:

* inplace version keep a short name.
* out-of-place version are suffixed by `_cpy` (meaning `copy`), and are static methods.

Methods applying transformations (rotation, translation or general transform) are now prefixed by
`append`, and a `prepend` version is available too.

Also, free functions doing in-place modifications dont really make sense. They have been removed.

Here are the naming changes:
* `invert` -> `inv`
* `inverted` -> `Inv::inv_cpy`
* `transpose` -> `transpose`
* `transposed` -> `Transpose::transpose_cpy`
* `transform_by` -> `append_transformation`
* `transformed` -> `Transform::append_transformation_cpy`
* `rotate_by` -> `apppend_rotation`
* `rotated` -> `Rotation::append_rotation_cpy`
* `translate_by` -> `apppend_translation`
* `translate` -> `Translation::append_translation_cpy`
* `normalized` -> `Norm::normalize_cpy`
* `rotated_wrt_point` -> `RotationWithTranslation::append_rotation_wrt_point_cpy`
* `rotated_wrt_center` -> `RotationWithTranslation::append_rotation_wrt_center_cpy`

Note that using those static methods is very verbose, and using in-place methods require an
explicit import of the related trait.

This is a way to convince the user to use free functions most of the time.
2013-10-14 10:42:07 +02:00
Sébastien Crozet 1c0b60c3ef Add a link to the on-line documentation. 2013-10-08 02:10:35 +02:00
Sébastien Crozet d25534610d Add a one-line description to each free-function.
This is better than nothing.
2013-10-08 01:59:15 +02:00
Sébastien Crozet edf17b5667 Update to the last Rust.
Also use free-functions on tests.
2013-10-08 01:22:56 +02:00
Sébastien Crozet 3f99bd62c6 Use `use` instead of `pub use` to import modules on the examples. 2013-10-06 19:36:59 +02:00
Sébastien Crozet ee2db8da99 Add the "nalgebra in use" part to the readme. 2013-10-06 19:32:31 +02:00