Commit Graph

5 Commits

Author SHA1 Message Date
Philip Rideout
0e967726de Simplify CameraManipulator.
This removes a lot of code and will make it easier to migrate into a new
library with Java bindings, etc.

- The clipping planes and projection matrix were unused, removed them.

- In split view mode, our demos were using only 2 of the 3 manipulators,
  removed one.

- Instead of callbacks and update methods, users can simply ask for the
  current matrix at every frame.

- The manipulator's job is to consume mouse events and maintain an
  "look at" basis, there is no need to store a reference to a Filament
  Camera.
2019-12-04 08:05:17 -08:00
Mathias Agopian
7b3475f1da API change: rename matrix factory functions
scale() -> scaling()
translate() -> translation()
rotate() -> rotation()

These static functions create a matrix, they don't modify it.
Fixes #826
2019-03-04 14:34:02 -08:00
prideout
5ee359cf40 Move math namespace to fix #746. 2019-02-07 09:23:07 -08:00
Romain Guy
39ca6d146f Fix ambiguities with translate() and scale() (#154)
These two functions expect a vector of the same size as the
matrix's storage vectors (float4 for a mat4f for instance) which
has two major issues:

- The vector must end with 1 for homogeneous coordinates to work
- Passing a single scalar (mat4f::scale(0.5)) creates a matrix
  whose diagonal is set to that scalar, thus breaking homogeneous
  coordinates

With this change scale and translate expect a vector who dimensionality
is 1 less that of the matrix's underlying storage vectors. i.e. a float3
for mat4f.
2018-08-27 10:21:13 -07:00
Romain Guy
b3d758f3b3 Initial commit 2018-08-03 10:38:22 -07:00