Using newer simplemathv2, compiles fine but crashes :/)

simple_math_single_header
Martin Felis 2018-10-13 22:23:21 +02:00
parent 09db06fbfd
commit 2bd2a99f29
5 changed files with 758 additions and 768 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,24 +3,24 @@
#include "SimpleMath/SimpleMath.h"
typedef SimpleMath::Fixed<float, 2, 1> Vector2f;
typedef SimpleMath::Fixed<float, 2, 2> Matrix22f;
typedef SimpleMath::Matrix<float, 2, 1> Vector2f;
typedef SimpleMath::Matrix<float, 2, 2> Matrix22f;
typedef SimpleMath::Fixed<float, 3, 1> Vector3f;
typedef SimpleMath::Fixed<float, 3, 3> Matrix33f;
typedef SimpleMath::Matrix<float, 3, 1> Vector3f;
typedef SimpleMath::Matrix<float, 3, 3> Matrix33f;
typedef SimpleMath::Fixed<float, 4, 1> Vector4f;
typedef SimpleMath::Fixed<float, 4, 4> Matrix44f;
typedef SimpleMath::Matrix<float, 4, 1> Vector4f;
typedef SimpleMath::Matrix<float, 4, 4> Matrix44f;
typedef SimpleMath::Quaternion Quaternion;
typedef SimpleMath::GL::Quaternion Quaternion;
typedef SimpleMath::Dynamic<float> VectorNf;
typedef SimpleMath::Dynamic<float> MatrixNNf;
typedef SimpleMath::Matrix<float> VectorNf;
typedef SimpleMath::Matrix<float> MatrixNNf;
typedef SimpleMath::Fixed<double, 3, 1> Vector3d;
typedef SimpleMath::Fixed<double, 3, 3> Matrix33d;
typedef SimpleMath::Matrix<double, 3, 1> Vector3d;
typedef SimpleMath::Matrix<double, 3, 3> Matrix33d;
typedef SimpleMath::Dynamic<double> VectorNd;
typedef SimpleMath::Dynamic<double> MatrixNNd;
typedef SimpleMath::Matrix<double> VectorNd;
typedef SimpleMath::Matrix<double> MatrixNNd;
#endif

View File

@ -10,7 +10,7 @@
#include "imgui/imgui.h"
#include "imgui_dock.h"
using namespace SimpleMath;
using namespace SimpleMath::GL;
struct Renderer;

View File

@ -12,7 +12,7 @@
#include "imgui/imgui.h"
#include "imgui_dock.h"
using namespace SimpleMath;
using namespace SimpleMath::GL;
typedef tinygltf::TinyGLTF GLTFLoader;

View File

@ -46,10 +46,10 @@ void handle_mouse (struct module_state *state) {
view_dir = (poi - eye).normalized();
Vector3f right = camera_rot_inv.block<1,3>(0,0).transpose();
right = view_dir.cross (Vector3f (0.f, 1.f, 0.f));
Matrix33f rot_matrix_y = SimpleMath::RotateMat33(
Matrix33f rot_matrix_y = SimpleMath::GL::RotateMat33(
gGuiInputState->mousedY * 0.4f,
right[0], right[1], right[2]);
Matrix33f rot_matrix_x = SimpleMath::RotateMat33(
Matrix33f rot_matrix_x = SimpleMath::GL::RotateMat33(
gGuiInputState->mousedX * 0.4f,
0.f, 1.f, 0.f);
poi = eye + rot_matrix_x * rot_matrix_y * view_dir;