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

Method ViewMatrix

camera/camera.go:229–237  ·  view source on GitHub ↗

ViewMatrix returns the view matrix of the camera.

(m *math32.Matrix4)

Source from the content-addressed store, hash-verified

227
228// ViewMatrix returns the view matrix of the camera.
229func (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.
240func (c *Camera) ProjMatrix(m *math32.Matrix4) {

Callers 1

ProjectMethod · 0.95

Calls 3

MatrixWorldMethod · 0.80
UpdateMatrixWorldMethod · 0.65
GetInverseMethod · 0.45

Tested by

no test coverage detected