rename ZM -> IM
This commit is contained in:
parent
d424523c63
commit
35a14c2d18
2
batch.go
2
batch.go
|
@ -30,7 +30,7 @@ var _ BasicTarget = (*Batch)(nil)
|
||||||
func NewBatch(container Triangles, pic Picture) *Batch {
|
func NewBatch(container Triangles, pic Picture) *Batch {
|
||||||
return &Batch{
|
return &Batch{
|
||||||
cont: Drawer{Triangles: container, Picture: pic},
|
cont: Drawer{Triangles: container, Picture: pic},
|
||||||
mat: ZM,
|
mat: IM,
|
||||||
col: NRGBA{1, 1, 1, 1},
|
col: NRGBA{1, 1, 1, 1},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,8 +230,8 @@ func (r Rect) Contains(u Vec) bool {
|
||||||
// vertically and then rotates everything by 90 degrees around the origin.
|
// vertically and then rotates everything by 90 degrees around the origin.
|
||||||
type Matrix [9]float64
|
type Matrix [9]float64
|
||||||
|
|
||||||
// ZM stands for Zero-Matrix which is the identity matrix. Does nothing, no transformation.
|
// IM stands for Zero-Matrix which is the identity matrix. Does nothing, no transformation.
|
||||||
var ZM = Matrix(mgl64.Ident3())
|
var IM = Matrix(mgl64.Ident3())
|
||||||
|
|
||||||
// Move moves everything by the delta vector.
|
// Move moves everything by the delta vector.
|
||||||
func (m Matrix) Move(delta Vec) Matrix {
|
func (m Matrix) Move(delta Vec) Matrix {
|
||||||
|
|
|
@ -109,7 +109,7 @@ func NewIMDraw(pic Picture) *IMDraw {
|
||||||
d: Drawer{Triangles: tri, Picture: pic},
|
d: Drawer{Triangles: tri, Picture: pic},
|
||||||
}
|
}
|
||||||
im.Precision(64)
|
im.Precision(64)
|
||||||
im.SetMatrix(ZM)
|
im.SetMatrix(IM)
|
||||||
im.SetColorMask(NRGBA{1, 1, 1, 1})
|
im.SetColorMask(NRGBA{1, 1, 1, 1})
|
||||||
return im
|
return im
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue