mirror of
https://github.com/bloeys/gglm.git
synced 2025-12-29 05:28:20 +00:00
New NewTrMatXYZ
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user