Ejemplo n.º 1
0
func (g *Geometry) buildTranslate() func(float64, float64, float64) *Geometry {
	// translate geometry
	var m1 math3d.Matrix4
	return func(x, y, z float64) *Geometry {
		if m1 == nil {
			m1 = math3d.NewMatrix4()
		}
		m1.MakeTranslation(x, y, z)
		g.ApplyMatrix(m1)
		return g
	}
}