CalculateMatrices calculates the model view and model view projection matrices.
(gs *gls.GLS, rinfo *core.RenderInfo)
| 246 | |
| 247 | // CalculateMatrices calculates the model view and model view projection matrices. |
| 248 | func (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. |
| 256 | func (gr *Graphic) ModelMatrix() *math32.Matrix4 { |
no test coverage detected