MCPcopy Index your code
hub / github.com/g3n/engine / GetNormalMatrix

Method GetNormalMatrix

math32/matrix3.go:282–288  ·  view source on GitHub ↗

GetNormalMatrix set this matrix to the matrix to transform the normal vectors from the src matrix to transform the vertices. If the src matrix cannot be inverted returns error.

(src *Matrix4)

Source from the content-addressed store, hash-verified

280// from the src matrix to transform the vertices.
281// If the src matrix cannot be inverted returns error.
282func (m *Matrix3) GetNormalMatrix(src *Matrix4) error {
283
284 m.SetFromMatrix4(src)
285 err := m.GetInverse(m)
286 m.Transpose()
287 return err
288}
289
290// FromArray set this matrix array starting at offset.
291// Returns pointer to this updated matrix.

Callers 4

RenderSetupMethod · 0.95
RenderSetupMethod · 0.95
ApplyMatrixMethod · 0.95
UpdateMethod · 0.95

Calls 3

SetFromMatrix4Method · 0.95
GetInverseMethod · 0.95
TransposeMethod · 0.95

Tested by

no test coverage detected