New NewTrMatXYZ

This commit is contained in:
bloeys
2024-05-05 00:27:05 +04:00
parent 3eb372dec3
commit b9faa2e59e

View File

@ -324,3 +324,21 @@ func NewTrMatId() TrMat {
Mat4: NewMat4Id(),
}
}
func NewTrMatWithPos(x, y, z float32) TrMat {
tr := TrMat{
Mat4: NewMat4Id(),
}
tr.Translate(x, y, z)
return tr
}
func NewTrMatWithPosVec(pos *Vec3) TrMat {
tr := TrMat{
Mat4: NewMat4Id(),
}
tr.TranslateVec(pos)
return tr
}