commit
f264ec92ff
@ -240,6 +240,22 @@ function mat4:scale(s)
|
||||
return mat4(m) * mat4(self)
|
||||
end
|
||||
|
||||
function mat4:shear(yx,zx,xy,zy,xz,yz)
|
||||
local yx = yx or 0
|
||||
local zx = zx or 0
|
||||
local xy = xy or 0
|
||||
local zy = zy or 0
|
||||
local xz = xz or 0
|
||||
local yz = yz or 0
|
||||
local m = {
|
||||
1, yx, zx, 0,
|
||||
xy, 1, zy, 0,
|
||||
xz, yz, 1, 0,
|
||||
0, 0, 0, 1
|
||||
}
|
||||
return mat4(m) * mat4(self)
|
||||
end
|
||||
|
||||
function mat4:rotate(angle, axis)
|
||||
if type(angle) == "table" then
|
||||
angle, axis = angle:to_axis_angle()
|
||||
|
Loading…
x
Reference in New Issue
Block a user