Sam Hocevar
5f3ad5cc15
math: add constant vectors vec2::zero, vec2::axis_x, etc.
il y a 12 ans
Sam Hocevar
7108f8566d
math: add orthogonal() and orthonormal() for 3-component vectors.
il y a 12 ans
Sam Hocevar
9cfe17fd8b
core: fix some minor compiler warnings.
il y a 12 ans
Benjamin ‘Touky’ Huet
04556dea8b
mat4 : removed useless ortho(). Fixed shifted_perspective so it actually works.
numeric : Added SmoothClamp & swap
camera : fixed target&up issues and added screen-scale factor.
touky_demo : correct camera integration & first pass on uro refactor. Also added Makefile to vcproj
il y a 12 ans
Benlitz
e50f75403a
core: added StartsWith and EndsWith function for strings, and a sign function for numeric types
il y a 12 ans
Sam Hocevar
58ec9dd582
math: add lol::sq() square function and simplify quaternion conversions.
il y a 12 ans
Sam Hocevar
6adf553806
math: implement vec3::toeuler_* for Tait-Bryan angles.
il y a 12 ans
Sam Hocevar
af6deb15a2
math: create a quaternion from two vectors.
il y a 12 ans
Sam Hocevar
e848af3f2a
math: fix an error in the quaternion code and update test suite.
il y a 12 ans
Lolbot
8cc04f0ba9
fixed 7 files out of 2745:
- removed 0 CR characters
- removed 21 trailing whitespaces
- replaced 42 tabs with spaces
il y a 12 ans
Sam Hocevar
e4d4f8df19
math: implement == and != for 2D and 3D box types.
il y a 12 ans
Benjamin ‘Touky’ Huet
181334f5ad
Added shifted_perspective for easier camera handling.
MeshViewer : Camera update and small object tweak.
ortho to perspective transition is now perfect.
il y a 12 ans
Sam Hocevar
384fca5af6
math: new constructor for Box2 and Box3 objects.
il y a 13 ans
Sam Hocevar
96e26a2bd5
math: rename Box2D to "box2" and add an integer version, "ibox2".
il y a 13 ans
Sam Hocevar
6faf4ee067
base: roll our own constants because it’s always a pain in the ass
to get M_PI from the platform headers and cast it to float.
il y a 13 ans
Sam Hocevar
18fd5c9081
math: try to refactor rand() to bypass an X360 compiler bug.
il y a 13 ans
Sam Hocevar
94acb0f519
build: the “fuck you, Apple” commit; work around three different
compiler bugs in the Xcode toolchain.
il y a 13 ans
Sam Hocevar
78636c40ef
math: fix the shit I just broke.
il y a 13 ans
Sam Hocevar
56f093817d
math: don't use the LLU suffix for 64-bit numbers and don't use floorf().
il y a 13 ans
Sam Hocevar
700520d4d6
math: move rand() to its own header, ensure it only returns
positive values, and add a unit test for rand<int>.
il y a 13 ans
Sam Hocevar
39a8c26fb5
base: start removing occurrences of NULL on our long journey to nullptr.
il y a 13 ans
Sam Hocevar
5b23d7cceb
math: minor code simplification in Box2D/Box3D.
il y a 13 ans
Sam Hocevar
8143b73ffb
math: add Box2d + vec2 operations for easy box translations.
il y a 13 ans
Sam Hocevar
fdc877cc29
math: fix an idiotic bug in the box-box intersection routine.
il y a 13 ans
Sam Hocevar
65161c6809
math: add BoxIsectBox() method to test interesections.
il y a 13 ans
Sam Hocevar
2cdb570799
math: add a default constructor to box classes.
il y a 13 ans
Sam Hocevar
eeca0c0339
math: add Box2D and Box3D classes.
il y a 13 ans
Sam Hocevar
80e0d4c1c0
math: replace Interp with TimeInterp. We'll see how useful it gets.
il y a 13 ans
Sam Hocevar
bb28344eb7
build: fix compiler warnings and Linux and PS3 build issues.
il y a 13 ans
Sam Hocevar
6c8186389f
math: Interp class for frame-independent interpolation.
il y a 13 ans
Sam Hocevar
33f2199903
math: minor improvements to the Remez exchange algorithm.
il y a 13 ans
Sam Hocevar
1fc53d4df9
math: avoid unnecessary conversions in the half class and remove a
static method that we can do without.
il y a 13 ans
Sam Hocevar
06c4ec01c3
base: move headers around and promote gpu/ to lol/gpu/.
il y a 13 ans
Sam Hocevar
eead925c59
math: use "degrees" as the variable name for rotations for clarity.
il y a 13 ans
Benjamin ‘Touky’ Huet
23c13f6c4b
comment : //Angle in degree
Because goldfishes have no memory.
il y a 13 ans
Sam Hocevar
4ee0f5e29e
math: friend declarations aren’t proper declarations; add the
required declarations for real free functions.
il y a 13 ans
Sam Hocevar
d4766d410f
build: fix all vector/scalar type mismatches such as "vec2 * double"
instead of "vec2 * float".
il y a 13 ans
Sam Hocevar
16d53895fa
math: remove coercion rules in the vector classes, they increase the
compilation time for very little benefit and maybe even confusion.
il y a 13 ans
Sam Hocevar
2ef61862d8
math: implement clamp() for base C++ types and add more safeguards
to the RGB to HSV conversion.
il y a 13 ans
Benjamin ‘Touky’ Huet
b273f1729e
Small fix in template lerp
il y a 13 ans
Lolbot
7e4da3d634
fixed 27 files out of 2315:
- removed 0 CR characters
- removed 188 trailing whitespaces
- replaced 537 tabs with spaces
il y a 13 ans
Benjamin ‘Touky’ Huet
3d56a23a55
Added geometry basic functions.
TODO : second pass on coding-style, and some tweak & usage modification.
il y a 13 ans
Benjamin ‘Touky’ Huet
c7219ff1dd
New year copyright update.
il y a 13 ans
Sam Hocevar
1fe4a5796e
math: mark unused arguments as used in fract().
il y a 13 ans
Sam Hocevar
e00d987083
math: implement fract() for vectors and scalar types.
il y a 13 ans
Sam Hocevar
ecfb33af45
math: define lol::pow to remove ambiguous calls.
il y a 13 ans
Sam Hocevar
d6634da83f
build: fix the WTFPL site URL in all code comments.
il y a 13 ans
Sam Hocevar
8c50a08147
doc: fix claims in the documentation introduction and disable vector.h
subtelties to avoid polluting Doxygen.
il y a 13 ans
Sam Hocevar
397c7f2fda
core: implement hashing functions for half, float and double.
il y a 13 ans
Sam Hocevar
63868aa10a
math: prefix all convenience macros with "LOL_", make sure we #undef
them after use, and refactor them so that free functions such as
fmod() or clamp() are directly accessible in the lol namespace.
il y a 13 ans