ViewMatrix returns the view matrix of the camera.
(m *math32.Matrix4)
| 227 | |
| 228 | // ViewMatrix returns the view matrix of the camera. |
| 229 | func (c *Camera) ViewMatrix(m *math32.Matrix4) { |
| 230 | |
| 231 | c.UpdateMatrixWorld() |
| 232 | matrixWorld := c.MatrixWorld() |
| 233 | err := m.GetInverse(&matrixWorld) |
| 234 | if err != nil { |
| 235 | panic("Camera.ViewMatrix: Couldn't invert matrix") |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | // ProjMatrix returns the projection matrix of the camera. |
| 240 | func (c *Camera) ProjMatrix(m *math32.Matrix4) { |
no test coverage detected