4#include "math/Matrix4.h"
18 Matrix4(
float _m00,
float _m01,
float _m02,
float _m03,
19 float _m10,
float _m11,
float _m12,
float _m13,
20 float _m20,
float _m21,
float _m22,
float _m23,
21 float _m30,
float _m31,
float _m32,
float _m33)
46 auto n = kmyMath::Matrix4::perspectiveFOV(fov * 2, asp, znear, zfar);
52 auto n = kmyMath::Matrix4::ortho(
left,
right, top, bottom, znear, zfar);
58 return Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1);
63 return Matrix4(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);
101 return Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
107 nm = kmyMath::Matrix4::inverse(nm);
119 kmyMath::Matrix4 res = nm1 * nm2;
248 if (x == 0.0f || y == 0.0f || z == 0.0f) {
249 PRINTF(
"Matrix4 scale reset error");
280 kmyMath::Vector3 v = nm.getEularZXY();
287 auto v = nm.getScale();
Vector3 getScale()
Definition: Matrix4.h:284
Vector3 translation()
Definition: Matrix4.h:227
Vector3 getEularZXY()
Definition: Matrix4.h:276
static Matrix4 ortho(float left, float right, float top, float bottom, float znear, float zfar)
Definition: Matrix4.h:50
float m31
Definition: Matrix4.h:16
static Matrix4 rotateX(float r)
Definition: Matrix4.h:66
static Vector4 operator*(Matrix4 m, Vector4 v)
Definition: Matrix4.h:167
float m02
Definition: Matrix4.h:13
static Matrix4 inverse(Matrix4 m)
Definition: Matrix4.h:104
float m10
Definition: Matrix4.h:14
float m30
Definition: Matrix4.h:16
static Matrix4 operator*(Matrix4 m1, Matrix4 m2)
Definition: Matrix4.h:112
float m12
Definition: Matrix4.h:14
float m22
Definition: Matrix4.h:15
static Matrix4 rotateZ(float r)
Definition: Matrix4.h:88
float m01
Definition: Matrix4.h:13
float m33
Definition: Matrix4.h:16
float m00
Definition: Matrix4.h:13
static Vector4 operator*(Matrix4 m, Vector3 v)
Definition: Matrix4.h:157
static Matrix4 scale(float x, float y, float z)
Definition: Matrix4.h:61
Vector3 left()
Definition: Matrix4.h:301
Vector3 up()
Definition: Matrix4.h:311
static Matrix4 fromNativeMatrix4(const kmyMath::Matrix4 &m)
Definition: Matrix4.h:202
float m23
Definition: Matrix4.h:15
Vector3 down()
Definition: Matrix4.h:316
float m20
Definition: Matrix4.h:15
Matrix4(float _m00, float _m01, float _m02, float _m03, float _m10, float _m11, float _m12, float _m13, float _m20, float _m21, float _m22, float _m23, float _m30, float _m31, float _m32, float _m33)
Definition: Matrix4.h:18
float m32
Definition: Matrix4.h:16
Vector3 front()
Definition: Matrix4.h:291
static Matrix4 perspectiveFOV(float fov, float asp, float znear, float zfar)
Definition: Matrix4.h:44
static Matrix4 identity()
Definition: Matrix4.h:99
static Matrix4 translate(float x, float y, float z)
Definition: Matrix4.h:56
kmyMath::Matrix4 toNativeMatrix4()
Definition: Matrix4.h:177
Matrix4 scaleIdentity()
Definition: Matrix4.h:241
float m13
Definition: Matrix4.h:14
float m03
Definition: Matrix4.h:13
static Matrix4 lookat(Vector3 eye, Vector3 target, Vector3 upvec)
Definition: Matrix4.h:124
Vector3 right()
Definition: Matrix4.h:306
Vector3 scale()
Definition: Matrix4.h:232
Vector3 back()
Definition: Matrix4.h:296
float m21
Definition: Matrix4.h:15
Matrix4 translateIdentity()
Definition: Matrix4.h:269
static Matrix4 rotateY(float r)
Definition: Matrix4.h:77
float m11
Definition: Matrix4.h:14
Definition: RefCapture.h:3
float y
Definition: Vector3.h:11
float z
Definition: Vector3.h:11
static Vector3 crossProduct(Vector3 v1, Vector3 v2)
Definition: Vector3.h:99
float x
Definition: Vector3.h:11
static Vector3 normalize(Vector3 v)
Definition: Vector3.h:30
Definition: Vector3.h:112
float x
Definition: Vector3.h:115
float w
Definition: Vector3.h:115
float y
Definition: Vector3.h:115
float z
Definition: Vector3.h:115