Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-20 14:09:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-20 14:09:03 +0400
commit2999d0fad9f2a7ec88315610bf998f63b6b97322 (patch)
tree59cccee3464aba0e53f374b6aa17cc31db941193 /source/blender/blenlib
parent3ddaaa37842f6fb9a30a5f403c71e51a2718b20a (diff)
rename mul_project_m4_v4 to mul_project_m4_v3.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h2
-rw-r--r--source/blender/blenlib/intern/math_matrix.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 939c4348461..d8719f399ae 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -84,7 +84,7 @@ void mul_v3_m4v3(float r[3], float M[4][4], 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_project_m4_v4(float M[4][4], float r[3]);
+void mul_project_m4_v3(float M[4][4], float vec[3]);
void mul_m3_v3(float M[3][3], float r[3]);
void mul_v3_m3v3(float r[3], float M[3][3], float a[3]);
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 9fde87d734f..5edf6e28d4c 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -340,11 +340,9 @@ void mul_mat3_m4_v3(float mat[][4], float *vec)
vec[2]= x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2];
}
-void mul_project_m4_v4(float mat[][4], float *vec)
+void mul_project_m4_v3(float mat[][4], float vec[3])
{
- float w;
-
- w = vec[0]*mat[0][3] + vec[1]*mat[1][3] + vec[2]*mat[2][3] + mat[3][3];
+ const float w= vec[0]*mat[0][3] + vec[1]*mat[1][3] + vec[2]*mat[2][3] + mat[3][3];
mul_m4_v3(mat, vec);
vec[0] /= w;