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

Function NewMesh

graphic/mesh.go:27–32  ·  view source on GitHub ↗

NewMesh creates and returns a pointer to a mesh with the specified geometry and material. If the mesh has multi materials, the material specified here must be nil and the individual materials must be add using "AddMaterial" or AddGroupMaterial".

(igeom geometry.IGeometry, imat material.IMaterial)

Source from the content-addressed store, hash-verified

25// If the mesh has multi materials, the material specified here must be nil and the
26// individual materials must be add using "AddMaterial" or AddGroupMaterial".
27func NewMesh(igeom geometry.IGeometry, imat material.IMaterial) *Mesh {
28
29 m := new(Mesh)
30 m.Init(igeom, imat)
31 return m
32}
33
34// Init initializes the Mesh and its uniforms.
35func (m *Mesh) Init(igeom geometry.IGeometry, imat material.IMaterial) {

Callers 3

newNodeMethod · 0.92
LoadMeshMethod · 0.92
NewMeshMethod · 0.92

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected