[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49727] branches/soc-2012-swiss_cheese/ source/blender/blenlib: adding some proper consts to matrix functions
Jason Wilkins
Jason.A.Wilkins at gmail.com
Thu Aug 9 11:03:57 CEST 2012
Revision: 49727
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49727
Author: jwilkins
Date: 2012-08-09 09:03:56 +0000 (Thu, 09 Aug 2012)
Log Message:
-----------
adding some proper consts to matrix functions
Modified Paths:
--------------
branches/soc-2012-swiss_cheese/source/blender/blenlib/BLI_math_matrix.h
branches/soc-2012-swiss_cheese/source/blender/blenlib/intern/math_matrix.c
Modified: branches/soc-2012-swiss_cheese/source/blender/blenlib/BLI_math_matrix.h
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/blenlib/BLI_math_matrix.h 2012-08-09 06:15:14 UTC (rev 49726)
+++ branches/soc-2012-swiss_cheese/source/blender/blenlib/BLI_math_matrix.h 2012-08-09 09:03:56 UTC (rev 49727)
@@ -89,8 +89,8 @@
void mul_v4_m4v3(float r[4], const float M[4][4], const float v[3]);
void mul_v3_m4v3_q(float r[3], float M[4][4], const float v[3]);
void mul_mat3_m4_v3(float M[4][4], float r[3]);
-void mul_m4_v4(float M[4][4], float r[4]);
-void mul_v4_m4v4(float r[4], float M[4][4], float v[4]);
+void mul_m4_v4(const float M[4][4], float r[4]);
+void mul_v4_m4v4(float r[4], const float M[4][4], float v[4]);
void mul_project_m4_v3(float M[4][4], float vec[3]);
void mul_m3_v3(float M[3][3], float r[3]);
Modified: branches/soc-2012-swiss_cheese/source/blender/blenlib/intern/math_matrix.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/blenlib/intern/math_matrix.c 2012-08-09 06:15:14 UTC (rev 49726)
+++ branches/soc-2012-swiss_cheese/source/blender/blenlib/intern/math_matrix.c 2012-08-09 09:03:56 UTC (rev 49727)
@@ -403,7 +403,7 @@
vec[2] /= w;
}
-void mul_v4_m4v4(float r[4], float mat[4][4], float v[4])
+void mul_v4_m4v4(float r[4], const float mat[4][4], float v[4])
{
float x, y, z;
@@ -417,7 +417,7 @@
r[3] = x * mat[0][3] + y * mat[1][3] + z * mat[2][3] + mat[3][3] * v[3];
}
-void mul_m4_v4(float mat[4][4], float r[4])
+void mul_m4_v4(const float mat[4][4], float r[4])
{
mul_v4_m4v4(r, mat, r);
}
More information about the Bf-blender-cvs
mailing list