Sam Hocevar
155ae65a4e
Start working on the header-only part of the framework.
This implies creating a trimmed down branch that contains almost
nothing. It will then be usable by projects that do not need the
complex build system, and by the engine itself as a submodule from
the same repository.
il y a 5 ans
Sam Hocevar
968f7c92bb
Get rid of String::format in favour of a std::string version.
il y a 7 ans
Sam Hocevar
44e39867b1
Fix approximately 80 billion compilation warnings.
il y a 7 ans
Sam Hocevar
861568b146
misc: some cleanup in files, including UTF-8 BOM.
il y a 9 ans
Sam Hocevar
d64b117b8d
build: fix license and copyright information.
il y a 9 ans
Sam Hocevar
70edc0d38e
misc: carry on with the lowercase rampage.
Using “Array” instead of “array” is now fully deprecated, and I replaced
the Log::Debug() etc. functions with msg::debug() etc. because log:: was
unavailable due to being a maths function.
Added up-to-date copyright notice and BOM to modified files, just in case.
il y a 9 ans
Sam Hocevar
03c17fcae4
base: clean up and refactor containers.
The containers no longer force the user to use the ptrdiff_t type for
size information. For convenience, size() now always returns an int,
and the size_s() method offers a way to handle arrays with more than
2 billion elements. Internally, we still use ptrdiff_t, though.
Since so much code had to be changed, I took the opportunity to get
rid of capitalised accessors for classes that are lowercase.
il y a 9 ans
Sam Hocevar
cd988786b9
build: reorganise includes so that we can use precompiled headers later.
il y a 10 ans
Sam Hocevar
f7a8d5079b
math: disable a few unused operators (for integer quaternions, for instance).
il y a 10 ans
Sam Hocevar
62f7068516
math: move code from vector.cpp to matrix.cpp and transform.cpp.
il y a 10 ans
Sam Hocevar
4f28047fc4
math: refactor more shit, I have no idea what I’m doing.
il y a 10 ans
Sam Hocevar
52cd11358e
math: finish renaming matrix<> to mat<>.
il y a 10 ans
Sam Hocevar
7a28671dee
math: get rid of the base_vec* classes (thanks to relaxed unions), rename
MASK to SWIZZLE in the vector templates, rename matrix<> to mat<> for
consistency, implement transposition for all matrix sizes, make matrix
columns private and only accessible through operator[].
il y a 10 ans
Sam Hocevar
ad9a388e80
misc: remove 100% of the "using namespace std;" madness.
il y a 10 ans
Sam Hocevar
12aaff89e3
base: huge refactor in vector.h; GCC compilation times down by 50%.
il y a 10 ans
Sam Hocevar
fe665f85b4
base: strip core.h from its contents and put it in public/private headers.
il y a 10 ans
Benjamin ‘Touky’ Huet
60887138ff
Added tostring to vectors, similar to printf, but with tostring.
il y a 10 ans
Sam Hocevar
cb62b52ce6
math: add quat::axis() and quat::angle() to retrieve axis and angle from a
quaternion, improve quat::rotate(vec3, vec3) to gracefully handle corner
cases, and add unit tests for all of these.
il y a 11 ans
Sam Hocevar
8443733a08
math: add GLSL-inherited degrees() and radians() conversion functions.
il y a 11 ans
Sam Hocevar
2bbc0d965a
math: fix broken translation in lookat() function.
il y a 11 ans
Sam Hocevar
7cf2a85ae0
math: make mat4::lookat nicer to read.
il y a 11 ans
Sam Hocevar
3b62246ef8
math: minor rework in the Euler angles conversion.
il y a 11 ans
Sam Hocevar
5f3ad5cc15
math: add constant vectors vec2::zero, vec2::axis_x, etc.
il y a 11 ans
Benjamin ‘Touky’ Huet
0a7dc44a67
Added MessageService : Basic & Naive Message logging.
Camera & vector.cpp : Fixed shifted_perspective crash with almost zero FOV.
il y a 11 ans
Sam Hocevar
353d0a4417
math: last pass (hopefully) at the quaternion/euler conversions.
il y a 11 ans
Sam Hocevar
d5d73330e8
math: more quaternion to Euler angles fixes, plus unit tests.
il y a 11 ans
Sam Hocevar
9ecd579593
math: fix quaternion to euler conversion and add unit tests.
il y a 11 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 11 ans
Sam Hocevar
58ec9dd582
math: add lol::sq() square function and simplify quaternion conversions.
il y a 11 ans
Sam Hocevar
6adf553806
math: implement vec3::toeuler_* for Tait-Bryan angles.
il y a 11 ans
Sam Hocevar
f193bc2caa
scene: break text rendering again so that 2D games work properly...
il y a 11 ans
Benjamin ‘Touky’ Huet
876f62228c
btphystest : added new camera functions. Added funny camera stuff for cat simulation.
il y a 11 ans
Sam Hocevar
7fa84cdf36
math: remove debug code.
il y a 11 ans
Sam Hocevar
c6e453fe5c
math: add unit tests for quat::rotate(vec3, vec3).
il y a 11 ans
Sam Hocevar
af6deb15a2
math: create a quaternion from two vectors.
il y a 11 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 11 ans
Sam Hocevar
d8c6d4c198
doc: add some comments in vector.cpp functions.
il y a 11 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 12 ans
Sam Hocevar
eead925c59
math: use "degrees" as the variable name for rotations for clarity.
il y a 12 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 12 ans
Benjamin ‘Touky’ Huet
c7219ff1dd
New year copyright update.
il y a 12 ans
Sam Hocevar
d6634da83f
build: fix the WTFPL site URL in all code comments.
il y a 12 ans
Sam Hocevar
2bf4cb668b
math: add a uniform scaling matrix constructor.
il y a 12 ans
Sam Hocevar
5c5abfa53c
math: improve slerp implementation.
il y a 12 ans
jeunathe
5224a5dd99
Added test in slerp to avoid -1 quat members
il y a 12 ans
jeunathe
cbd842b21a
Added Slerp method to Quat
il y a 12 ans
Sam Hocevar
28728814cc
core: replace usage of sin() or std::sin() with lol::sin() where appropriate.
il y a 12 ans
Sam Hocevar
8375f3443d
build: fix the PS3 port by using our trig.h everywhere instead of stdlib
functions; also remove a lot of idiotic "using namespace std" from the
codebase.
il y a 12 ans
Sam Hocevar
59ba6e6c87
core: no longer deactivate std::ostream features on Android.
il y a 12 ans
Sam Hocevar
f30105e675
math: implement all Euler conversions for 3×3 matrices.
il y a 13 ans