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

Method CalculateMatrices

graphic/graphic.go:248–253  ·  view source on GitHub ↗

CalculateMatrices calculates the model view and model view projection matrices.

(gs *gls.GLS, rinfo *core.RenderInfo)

Source from the content-addressed store, hash-verified

246
247// CalculateMatrices calculates the model view and model view projection matrices.
248func (gr *Graphic) CalculateMatrices(gs *gls.GLS, rinfo *core.RenderInfo) {
249
250 gr.mm = gr.MatrixWorld()
251 gr.mvm.MultiplyMatrices(&rinfo.ViewMatrix, &gr.mm)
252 gr.mvpm.MultiplyMatrices(&rinfo.ProjMatrix, &gr.mvm)
253}
254
255// ModelViewMatrix returns the last cached model view matrix for this graphic.
256func (gr *Graphic) ModelMatrix() *math32.Matrix4 {

Callers 1

RenderMethod · 0.80

Calls 2

MatrixWorldMethod · 0.80
MultiplyMatricesMethod · 0.45

Tested by

no test coverage detected