forked from bartvdbraak/blender
rename mul_project_m4_v4 to mul_project_m4_v3.
This commit is contained in:
parent
3ddaaa3784
commit
2999d0fad9
@ -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]);
|
||||
|
@ -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;
|
||||
|
@ -271,7 +271,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
|
||||
/* if only one projector, project coords to UVs */
|
||||
if(num_projectors == 1 && projectors[0].uci==NULL)
|
||||
for(i = 0, co = coords; i < numVerts; ++i, ++co)
|
||||
mul_project_m4_v4(projectors[0].projmat, *co);
|
||||
mul_project_m4_v3(projectors[0].projmat, *co);
|
||||
|
||||
mface = dm->getFaceArray(dm);
|
||||
numFaces = dm->getNumFaces(dm);
|
||||
@ -345,11 +345,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
|
||||
project_from_camera(tface->uv[3], coords[mf->v4], best_projector->uci);
|
||||
}
|
||||
else {
|
||||
mul_project_m4_v4(best_projector->projmat, co1);
|
||||
mul_project_m4_v4(best_projector->projmat, co2);
|
||||
mul_project_m4_v4(best_projector->projmat, co3);
|
||||
mul_project_m4_v3(best_projector->projmat, co1);
|
||||
mul_project_m4_v3(best_projector->projmat, co2);
|
||||
mul_project_m4_v3(best_projector->projmat, co3);
|
||||
if(mf->v4)
|
||||
mul_project_m4_v4(best_projector->projmat, co4);
|
||||
mul_project_m4_v3(best_projector->projmat, co4);
|
||||
|
||||
/* apply transformed coords as UVs */
|
||||
tface->uv[0][0] = co1[0];
|
||||
|
Loading…
Reference in New Issue
Block a user