MCPcopy
hub / github.com/g3n/engine / SetMaterial

Method SetMaterial

graphic/mesh.go:52–56  ·  view source on GitHub ↗

SetMaterial clears all materials and adds the specified material for all vertices.

(imat material.IMaterial)

Source from the content-addressed store, hash-verified

50
51// SetMaterial clears all materials and adds the specified material for all vertices.
52func (m *Mesh) SetMaterial(imat material.IMaterial) {
53
54 m.Graphic.ClearMaterials()
55 m.Graphic.AddMaterial(m, imat, 0, 0)
56}
57
58// AddMaterial adds a material for the specified subset of vertices.
59func (m *Mesh) AddMaterial(imat material.IMaterial, start, count int) {

Callers

nothing calls this directly

Calls 2

ClearMaterialsMethod · 0.80
AddMaterialMethod · 0.45

Tested by

no test coverage detected