Vladimír Vondruš
12817b505d
Test vector component accessors.
...
Really. To be sure. Forever.
14 years ago
Vladimír Vondruš
c3462ea266
Doc++
14 years ago
Vladimír Vondruš
a9d2062efe
More checks for sanity of Matrix4::rotation().
...
These should be true for all rotation matrices.
14 years ago
Vladimír Vondruš
049523cb74
Worked around long-standing Doxygen warnings.
14 years ago
Vladimír Vondruš
6dbdf58476
Component-wise comparison for Vector class.
14 years ago
Vladimír Vondruš
f184c6f005
Using real class for testing configuration value parsing.
14 years ago
Vladimír Vondruš
8a3d2c12c6
Doc++
...
Crosslinked types from Math namespace with typedefs in Magnum namespace.
14 years ago
Vladimír Vondruš
438bd52bf3
Doc++
14 years ago
Vladimír Vondruš
8e3e3ac6d3
Doc++
14 years ago
Vladimír Vondruš
6dda7e4c1f
Convenience functions for accessing Matrix[34] vectors.
14 years ago
Vladimír Vondruš
a3c37cd277
Doc++, minor cleanup.
14 years ago
Vladimír Vondruš
1e2720eeb7
Explicit template instantiation for common matrix and vector functions.
...
Common types used in OpenGL have now explicit template instantiation for
debug operators and configuration value parsers/readers.
14 years ago
Vladimír Vondruš
9d9517c824
Vector::angle(): reflect normalization requirement in parameter names.
...
Will be more intuitive when IDE autocompletion kicks in.
14 years ago
Vladimír Vondruš
350fb3a64c
Fixed documentation of Vector::angle().
14 years ago
Vladimír Vondruš
b5fc786478
Renamed Matrix4::[xyz]Rotation() to Matrix4::rotation[XYZ]().
...
* "Rotation around [XYZ]" makes more sense than "[XYZ] axis rotation".
* This naming will appear in autocompletion.
* SceneGraph transformation methods will be named similarly
rotate[XYZ]() (because [xyz]Rotate() is weird even more).
14 years ago
Vladimír Vondruš
f707e91599
Better parameter names in Matrix transformation methods.
...
Mainly it is now explicitly stated in parameter name that rotation axis
must be normalized.
14 years ago
Vladimír Vondruš
bf55b5854b
TypeTraits: Default inheritance type for structs is public.
...
Simplified already too long lines.
14 years ago
Vladimír Vondruš
f28f5398d3
Added some @todos .
14 years ago
Vladimír Vondruš
f2a569de0e
Workarounds to make Doxygen happy.
14 years ago
Vladimír Vondruš
c1cf94fb46
Using fixed-size integer types also everywhere else.
...
It solves issues with int/long int/long long int ambiguity, which is
good.
14 years ago
Vladimír Vondruš
cdc2e5302c
Using fixed-size 32bit integer instead of size_t for log/pow.
...
I want something like "use 32bit on x86, but 64bit on x86_64 and
x86_32", but <cstdint> header has nothing like that.
14 years ago
Vladimír Vondruš
0145343d59
Pedantic: using std::size_t instead of size_t from C compat headers.
14 years ago
Vladimír Vondruš
4aec678539
Have first letter of static constants uppercase, like previously.
...
Lowecase didn't prove to be better, because Doxygen cannot implicitly
link to it and it collides with non-type template parameters and private
variables.
14 years ago
Vladimír Vondruš
c9d375f7a3
Making _data member of RectangularMatrix protected.
...
Better than friending subclasses.
14 years ago
Vladimír Vondruš
2c52f7b85a
Non-explicit default constructor for Vector2 and Matrix*.
...
So you can now write
mat = {};
vec = {};
instead of
mat = Matrix3();
vec = Vector2();
14 years ago
Vladimír Vondruš
d65b2386b2
Code cleanup.
14 years ago
Vladimír Vondruš
16382c9ba9
No need to have separate ConfigurationValue implementation for Vector.
14 years ago
Vladimír Vondruš
5f822d0c9b
Fixed copypaste error in Matrix3::translation().
14 years ago
Vladimír Vondruš
ca2993cadc
Don't compute sine and cosine more times than necessary.
14 years ago
Vladimír Vondruš
14f53bf6a3
Doc++
14 years ago
Vladimír Vondruš
624f4f8531
Inlined inline functions.
14 years ago
Vladimír Vondruš
ecad221a8b
Faster alternatives for rotation around main axes.
14 years ago
Vladimír Vondruš
5d9c4038f5
Doc++
14 years ago
Vladimír Vondruš
6a2ebf5c3d
Fixed Vector, Point and Color constructors from smaller types.
...
Currently, when accidentaly creating specialized Vector from smaller
number of components than required, the error message isn't really
helpful, as it stops on static assert on wrong number of arguments
passed to RectangularMatrix:
Vector3(0, 1); // static assert: wrong number of arguments passed to
// RectangularMatrix<1, 2> -- wtf?!
Now the first argument is Vector2/Vector3 instead of Vector<2>/Vector<3>
and the error message now properly states that no matching constructor
was found.
14 years ago
Vladimír Vondruš
93961aca65
Don't include Matrix3 in Matrix4, as it isn't used.
...
Also updated includes in dependent headers.
14 years ago
Vladimír Vondruš
9e24a7bca0
Don't return Matrix3 from Matrix4 member functions.
...
Matrix3 is for 2D affine transformations, while Matrix4 is for 3D.
Returning Matrix3 would allow doing this, which isn't meaningful
operation at all:
Matrix4 transformation;
Vector2 wtf = transformation.rotationScaling().translation();
14 years ago
Vladimír Vondruš
b68a168fcb
Doc: crosslinking 1D/2D/3D alternatives.
14 years ago
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