Vladimír Vondruš
fe3a73aab2
SceneGraph: add DualQuaternionTransformation::rotate[XYZ]() overloads.
...
They only pass the arguments to original implementation but return
proper type to avoid weird issues with different method chaining order.
13 years ago
Vladimír Vondruš
ce6f999904
Math: better isNormalized() implementation.
...
Comparing squared length to 1 is not sufficient to compare within range
[1 - epsilon, 1 + epsilon], as e.g. Quaternion with dot() = 1 + 1e-7
when converted to matrix has column vectors with dot() = 1 + 1e-6, which
is just above 1 + epsilon. Thus it's needed to compare sqrt(dot()) in
range [1 - epsilon, 1 + epsilon] or dot() in range [1 - 2*epsilon +
epsilon^2, 1 + 2*epsilon + epsilon^2]. Because epsilon^2 is way off
machine precision, it's omitted, thus dot() in all isNormalized()
implementations is now compared this way:
abs(dot() - 1) < 2*epsilon;
13 years ago
Vladimír Vondruš
f4f44d9d90
Math: allow creating DualComplex/DualQuaternion from real part only.
...
Useful when creating transformation from rotation only.
13 years ago
Vladimír Vondruš
4744b631bb
Math: test pow() constexpr.
13 years ago
Vladimír Vondruš
7cb79b145e
Math: test Constants constexpr.
13 years ago
Vladimír Vondruš
b28b90a9df
Math: merged constExpressions() test cases into other test cases.
...
Simplifies the code and reduces duplicates.
13 years ago
Vladimír Vondruš
3e0e91d7db
Math: renamed {rotationAngle, rotationAxis}() -> {rotation, angle, axis}().
...
DualQuaternion and DualComplex has now only rotation() which returns
full rotation part, rotationAngle() and rotationAxis() on Quaternion and
Complex were renamed to angle() and axis().
13 years ago
Vladimír Vondruš
73a4e9b18a
Math: doc++
13 years ago
Vladimír Vondruš
b349eaf753
SceneGraph: new class DualQuaternionTransformation.
...
Uses dual quaternions for 3D transformation.
13 years ago
Vladimír Vondruš
85abf5767e
SceneGraph: new class DualComplexTransformation.
...
Uses dual complex numbers for 2D transformation.
13 years ago
Vladimír Vondruš
e9b3228943
SceneGraph: minor code cleanup.
13 years ago
Vladimír Vondruš
da2bbac104
Math: simplified Matrix::isOrthogonal().
...
No need to call std::abs() when comparing with zero, as dot() should
always be positive.
13 years ago
Vladimír Vondruš
b00554fd7f
Math: added convenience {Quaternion,DualQuaternion}::isNormalized().
13 years ago
Vladimír Vondruš
1790f37295
Math: added convenience functions {Complex,DualComplex}::isNormalized().
13 years ago
Vladimír Vondruš
3db2aa13c4
Math: added convenience function Vector::isNormalized().
13 years ago
Vladimír Vondruš
0d5f234f64
SceneGraph: public setTransformation() and transform() for RigidMT*D.
...
Now it is nearly similar to MatrixTransformation*D except for scaling.
Public functions setTransformation() and transform() assert that the
matrix represents rigid transformation.
13 years ago
Vladimír Vondruš
e4f14c4163
SceneGraph: assert proper matrix type in RigidMatrixTransformation*D.
13 years ago
Vladimír Vondruš
332e4cdb71
SceneGraph: added AbstractTransformation::resetTransformation().
...
It was doable in subclasses, but not via any interface, making some
things impossible.
13 years ago
Vladimír Vondruš
8548a2e08b
SceneGraph: renamed {Euclidean -> Rigid}MatrixTransformation{2,3}D.
...
It's shorter, following changes in Math (Matrix*::invertedRigid(),
Matrix*::isRigidTransformation()).
13 years ago
Vladimír Vondruš
da93b2ad6a
Math: ability to create Quaternion and DualQuaternion from matrix.
13 years ago
Vladimír Vondruš
9128820e35
Math: ability to create Complex and DualComplex from matrix.
13 years ago
Vladimír Vondruš
33058aa5b0
Math: Matrix::invertedOrthogonal(), Matrix{3,4}::invertedRigid().
...
Renamed original invertedEuclidean() functions to invertedRigid() and
simplified them using isRigidTransformation().
13 years ago
Vladimír Vondruš
dfe2571047
Math: added Matrix{3,4}::isRigidTransformation().
13 years ago
Vladimír Vondruš
4714cafedc
Math: added Matrix::isOrthogonal().
13 years ago
Vladimír Vondruš
408f40a908
Math: renamed MathTypeTraits to TypeTraits.
...
As there is no Magnum::TypeTraits struct anymore, there is no need to
have redundant name in it. Hopefully Doxygen will handle the difference
between this and Corrade's TypeTraits.h properly.
13 years ago
Vladimír Vondruš
75d8fefdde
Math: ability to access also matrix row vectors.
13 years ago
Vladimír Vondruš
a0b83edd2b
Relicensing to MIT/Expat license, part 4: CMake and documentation files.
...
They didn't contain license header before, but I think adding it also
there wouldn't do any harm. Documentation is also integral part of the
codebase.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
6a5d75d1e4
Relicensing to MIT/Expat license, part 2: headers.
13 years ago
Vladimír Vondruš
23f91fe339
Doc++
13 years ago
Vladimír Vondruš
5ff59b609e
DebugTools: added ForceRenderer.
...
Visualizes force using arrow.
13 years ago
Vladimír Vondruš
0f4c13a0a6
Better assertion message on ResourceManager destruction.
13 years ago
Vladimír Vondruš
7e9e8913ed
Don't spit assert in Mesh::addVertexBuffer() when it's not needed.
...
Vertex count is needed only for more than one attribute. Also updated
the assertion message to include function name.
13 years ago
Vladimír Vondruš
90a60ce7e9
Math: disable denormalize() test for UnsignedLong.
...
It works with GCC and -O3, but fails on unoptimized code.
13 years ago
Vladimír Vondruš
63cdd8ea6e
Doc++
13 years ago
Vladimír Vondruš
e8682b8893
AbstractFramebuffer::BlitMask is available also in ES.
...
Probably got forgotten when adding ES extensions support.
13 years ago
Vladimír Vondruš
ce89563aed
DebugTools: minor code cleanup.
13 years ago
Vladimír Vondruš
90dbb28763
Thorough CMakeLists cleanup.
...
* Calling enable_testing() only in root path.
* Using CORRADE_CXX_FLAGS instead of our own set to make things easier
to maintain.
* Various cleanup and reorganization.
13 years ago
Vladimír Vondruš
297d102200
Math: ability to convert Vector types from/to external types.
13 years ago
Vladimír Vondruš
231f3277ab
Adapted to Corrade changes.
...
Allowing to instantiate Trade::AbstractImporter subclasses directly
without plugin manager.
13 years ago
Vladimír Vondruš
3251660f81
Physics: doc++
13 years ago
Vladimír Vondruš
e9efd87e12
Text: off-by-one mistake.
...
Not exactly an error, because reserving one byte more doesn't harm
anything, but probably result of earlier copypaste from prerender().
13 years ago
Vladimír Vondruš
2afda6f34d
Text: split out HarfBuzz layouting into new HarfBuzzFont class.
...
It now allows to transparently select between FreeType and HarfBuzz
layouting. The new class is built only if USE_HARFBUZZ is enabled.
13 years ago
Vladimír Vondruš
9525dfd51b
Text: abstract base for fonts and layouters.
...
Font and text layouting is now abstracted out from its implementation.
Font class is renamed to FreeTypeFont and all the work can be done
through AbstractFont and AbstractLayouter interface.
13 years ago
Vladimír Vondruš
c864fefb95
Text: moved FontRenderer into Font header.
...
Now everything related to FreeType and HarfBuzz is in one header.
13 years ago
Vladimír Vondruš
b4950b59ac
Text: moved TextLayouter from TextRenderer internals to Font header.
...
Preparation for the whole thing to be testable, moving
implementation-dependent (FreeType/HarfBuzz) things together.
13 years ago
Vladimír Vondruš
2944a4e205
Text: non-templated base for TextRenderer.
...
Saves a lot of duplicated generated code.
13 years ago
Vladimír Vondruš
0d7baef932
Text: no need to explicitly specify Z coordinate in 3D text.
...
The coordinate is always 0 and Mesh can be configured to add it
implicitly. The code is now nearly the same for 2D and 3D, will redo it
without templates later.
13 years ago
Vladimír Vondruš
195ec4e9b2
Text: synchronized function parameter naming with documentation.
13 years ago
Vladimír Vondruš
2d98dadb0a
Shaders: first DistanceFieldVectorShader implementation.
...
Currently only fill and outline can be specified. Also crosslinked from
documentation of VectorShader and TextureTools::distanceField().
13 years ago