From f3817882b03a76ba89c85d1ad3530fac047f7bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Thu, 16 May 2019 23:50:03 +0200 Subject: [PATCH] Improve vec3Xmat4 --- s3l.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/s3l.h b/s3l.h index b40f244..2c64ea1 100644 --- a/s3l.h +++ b/s3l.h @@ -382,6 +382,12 @@ void S3L_vec3Xmat4(S3L_Vec4 *v, S3L_Mat4 *m) { S3L_Vec4 vBackup; + #define dotCol(col)\ + (vBackup.x * (*m)[col][0]) / S3L_FRACTIONS_PER_UNIT +\ + (vBackup.y * (*m)[col][1]) / S3L_FRACTIONS_PER_UNIT +\ + (vBackup.z * (*m)[col][2]) / S3L_FRACTIONS_PER_UNIT +\ + (*m)[col][3] + vBackup.x = v->x; vBackup.y = v->y; vBackup.z = v->z;