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

Function NewMorphGeometry

geometry/morph.go:28–39  ·  view source on GitHub ↗

NewMorphGeometry creates and returns a pointer to a new MorphGeometry.

(baseGeometry *Geometry)

Source from the content-addressed store, hash-verified

26
27// NewMorphGeometry creates and returns a pointer to a new MorphGeometry.
28func NewMorphGeometry(baseGeometry *Geometry) *MorphGeometry {
29
30 mg := new(MorphGeometry)
31 mg.baseGeometry = baseGeometry
32
33 mg.targets = make([]*Geometry, 0)
34 mg.weights = make([]float32, 0)
35
36 mg.baseGeometry.ShaderDefines.Set("MORPHTARGETS", strconv.Itoa(MaxActiveMorphTargets))
37 mg.uniWeights.Init("morphTargetInfluences")
38 return mg
39}
40
41// GetGeometry satisfies the IGeometry interface.
42func (mg *MorphGeometry) GetGeometry() *Geometry {

Callers 1

LoadMeshMethod · 0.92

Calls 2

SetMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected