Vladimír Vondruš
c820cbeee6
Point*D overload for Matrix subclasses.
14 years ago
Vladimír Vondruš
6aa7e3e806
Added Point*D::vector() function.
...
Equivalent to xy() and xyz(), useful for seamless 2D/3D integration.
14 years ago
Vladimír Vondruš
9feb8d32a5
Overloaded operators also for Point2D and Point3D.
14 years ago
Vladimír Vondruš
5b7ffedce3
Fixed serious copypasta error.
...
It's weird that it was working until now.
14 years ago
Vladimír Vondruš
2c0995cf26
2D equivalents of Geometry::Distance functions.
...
Also using std::sqrt() instead of sqrt() (has overloads for float).
14 years ago
Vladimír Vondruš
e114fc12df
Hide Matrix::ij() reimplementation from documentation.
14 years ago
Vladimír Vondruš
fb70ef046a
Functions for getting translation part of the matrix.
14 years ago
Vladimír Vondruš
71784a777c
Functions for getting 2D rotation and scaling part of 3x3 matrix.
...
Crosslinked the documentation with 2D/3D alternatives and
"setters"/"getters".
14 years ago
Vladimír Vondruš
a385441c02
Moved type conversion constructor from Vector to RectangularMatrix.
14 years ago
Vladimír Vondruš
5d639095ee
Removed "wontfix" TODOs.
...
Loop unrolling is better to leave up to the compiler, as it will do it
automatically and it doesn't add any maintenance burden. Constexpr
addition, multiplication etc. of Vector would be nice, but will that be
really useful? Maybe once if at all?
14 years ago
Vladimír Vondruš
391e721ac6
Cache-oblivious traversing order in Matrix functions.
...
Loop through all cols, then rows, so the memory is accessed
continuously.
14 years ago
Vladimír Vondruš
03f135e696
Documentation clarification, assertion update.
...
Don't yell at the user all the time.
14 years ago
Vladimír Vondruš
7c17871c90
Assuming the vectors are normalized in Matrix4::rotation().
14 years ago
Vladimír Vondruš
071afa0b7a
Point*D Vector* subclasses for homogeneous coordinates.
...
Vector4 doesn't set W component to one by default anymore, this is now
handled by Point*D itself. This finally allows creating of 2D primitives
and 2D position vectors without messing explicitly with Z = 1.
All classes which should use Point instead of Vector were updated to use
Point instead.
14 years ago
Vladimír Vondruš
eb803200d6
Disabled denormalization test for long double altogether.
...
Fails in Debug, but passes in Release mode on my GCC 4.7 @ x86_64. Not
sure what to do about it.
14 years ago
Vladimír Vondruš
7acda40a67
Doc++ (vector components, not values).
14 years ago
Vladimír Vondruš
619f44347c
Doxygen documentation workarounds.
14 years ago
Vladimír Vondruš
6a4b68410c
Doc: brief introduction to matrix and vector classes.
...
DDD - documentation driven development. Not all advertised features are
available right now, but they will come.
14 years ago
Vladimír Vondruš
4d46fd12cf
Returning references from vector component accessors.
...
Before it has to be done with overly verbose and cumbersome Java-style:
Vector4 vec;
vec.setX(vec.x() + 5);
vec = Vector4(vec.xyz()*2, vec.w());
Now it can be done this way:
vec.x() += 5;
vec.xyz() *= 2;
14 years ago
Vladimír Vondruš
3d77885555
Revert "Overflow test for large types in Math::normalize() started working."
...
It was working because of some weird state of my build dir, expecting
fail again.
This reverts commit 75d0505a60 .
14 years ago
Vladimír Vondruš
75d0505a60
Overflow test for large types in Math::normalize() started working.
...
I don't know what caused that... :-)
14 years ago
Vladimír Vondruš
08c8696978
Doc++, added missing inline.
14 years ago
Vladimír Vondruš
fe62f547de
Reduced #includes in headers.
...
Magnum.h now doesn't include anything except OpenGL headers, thus
changes in Math library don't trigger recompilation of everything, but
only of things really depending on it.
Math constants moved to separate file for similar reasons, de-inlined
some functions to remove the need for some #includes.
14 years ago
Vladimír Vondruš
08f26a7e3a
Oops, premature refactoring.
...
RectangularMatrix doesn't have ones on diagonal by default.
14 years ago
Vladimír Vondruš
1727357cc5
Gauss-Jordan elimination.
14 years ago
Vladimír Vondruš
742a75277d
Moved unary operator- from Vector to RectangularMatrix.
14 years ago
Vladimír Vondruš
e21c9ca3a5
Function for computing trace of square matrix.
14 years ago
Vladimír Vondruš
3558859cc6
Utility function for clamping value in given limits.
14 years ago
Vladimír Vondruš
fb61c22e07
Fixed matrix multiplication in RectangularMatrix subclasses.
...
Now all possible cases are properly handled (row vector * column vector,
column vector * row vector, ...). All operators taking arbitrary type as
argument (element-wise multiplication) now have std::enable_if only for
numerical types.
14 years ago
Vladimír Vondruš
70402d687f
Added missing #include.
14 years ago
Vladimír Vondruš
357b744d59
Vector function and operator reimplementation also for Color.
14 years ago
Vladimír Vondruš
8911dbdffe
Moved multiplication and division from Vector to RectangularMatrix.
14 years ago
Vladimír Vondruš
4bcc805616
Moved add/subtract operators from Vector to RectangularMatrix.
14 years ago
Vladimír Vondruš
90881e7337
New base for matrices and vectors: RectangularMatrix.
...
Currently moved only non-square functionality from Matrix there. Also
static constant members such as row/column count and size are now
lowercase, as they are variables, not types.
14 years ago
Vladimír Vondruš
070c4c1901
Removed unneeded friend declaration.
14 years ago
Vladimír Vondruš
0e74c3847d
Support for storing matrices and vectors in configuration.
14 years ago
Vladimír Vondruš
1ade64ca6b
New crossreferenced @debugoperator alias.
14 years ago
Vladimír Vondruš
2b62cc4012
Prefer to use (col, row) instead of [col][row] on matrices.
...
They should be in theory both compiled to the same code, but in practice
[][] sometimes fails during optimization.
14 years ago
Vladimír Vondruš
a5b8afa122
Added Vector2::*Scale() and Vector3::*Scale().
...
Complements to *Axis for scaling.
14 years ago
Vladimír Vondruš
d96cb96d60
Documented convenience functions on vectors and angles.
14 years ago
Vladimír Vondruš
b8750d3702
Added Vector2::*Axis(), similar to those in Vector3.
14 years ago
Vladimír Vondruš
c451b22392
Revert "Documentation: organizing the classes into "modules"."
...
It only caused another maintenance burden and was confusing to users.
Now when scene graph is in SceneGraph namespace there is no need for
another grouping. Namespaces are (and should be) sufficient.
This reverts commit 79945ab6fc .
Conflicts:
src/BufferedImage.h
src/BufferedTexture.h
src/Framebuffer.h
src/Query.h
src/SceneGraph/Scene.h
14 years ago
Vladimír Vondruš
9d750179cd
Swapped template parameters in Vector/Matrix debug operator.
...
Forgotten in cc1f9c60c9 , swapped them to
make things consistent.
14 years ago
Vladimír Vondruš
8dbae4f09c
Added @todo .
14 years ago
Vladimír Vondruš
0e08138806
Added number*Vector and number/Vector operators.
14 years ago
Vladimír Vondruš
5157abc439
Disabled original Vector div/mult for non-arithmetic types.
14 years ago
Vladimír Vondruš
a4c80d18ed
Added component-wise multiplication and division to Vector.
14 years ago
Vladimír Vondruš
125a0fa9d1
Doc++
14 years ago
Vladimír Vondruš
fec65aa6f5
Ability to construct Vector from another of different type.
14 years ago
Vladimír Vondruš
88d988c715
Added Type and Size members to Matrix.
14 years ago