diff options
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 0ceca1206f6..e46b7ca5130 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -1073,6 +1073,16 @@ float (*BKE_lattice_vert_coords_alloc(const Lattice *lt, int *r_vert_len))[3] return vert_coords; } +void BKE_lattice_vert_coords_apply_with_mat4(struct Lattice *lt, + const float (*vertexCos)[3], + const float mat[4][4]) +{ + int i, numVerts = lt->pntsu * lt->pntsv * lt->pntsw; + for (i = 0; i < numVerts; i++) { + mul_v3_m4v3(lt->def[i].vec, mat, vertexCos[i]); + } +} + void BKE_lattice_vert_coords_apply(Lattice *lt, const float (*vert_coords)[3]) { const int vert_len = lt->pntsu * lt->pntsv * lt->pntsw; |