diff --git a/raylib/core.go b/raylib/core.go index 57b5b0c..d3bec97 100644 --- a/raylib/core.go +++ b/raylib/core.go @@ -375,6 +375,22 @@ func GetMouseRay(mousePosition Vector2, camera Camera) Ray { return v } +// GetCameraMatrix - Returns camera transform matrix (view matrix) +func GetCameraMatrix(camera Camera) Matrix { + ccamera := camera.cptr() + ret := C.GetCameraMatrix(*ccamera) + v := newMatrixFromPointer(unsafe.Pointer(&ret)) + return v +} + +// GetCameraMatrix2D - Returns camera 2d transform matrix +func GetCameraMatrix2D(camera Camera2D) Matrix { + ccamera := camera.cptr() + ret := C.GetCameraMatrix2D(*ccamera) + v := newMatrixFromPointer(unsafe.Pointer(&ret)) + return v +} + // GetWorldToScreen - Returns the screen space position from a 3d world space position func GetWorldToScreen(position Vector3, camera Camera) Vector2 { cposition := position.cptr() @@ -402,22 +418,6 @@ func GetScreenToWorld2D(position Vector2, camera Camera2D) Vector2 { return v } -// GetCameraMatrix - Returns camera transform matrix (view matrix) -func GetCameraMatrix(camera Camera) Matrix { - ccamera := camera.cptr() - ret := C.GetCameraMatrix(*ccamera) - v := newMatrixFromPointer(unsafe.Pointer(&ret)) - return v -} - -// GetCameraMatrix2D - Returns camera 2d transform matrix -func GetCameraMatrix2D(camera Camera2D) Matrix { - ccamera := camera.cptr() - ret := C.GetCameraMatrix2D(*ccamera) - v := newMatrixFromPointer(unsafe.Pointer(&ret)) - return v -} - // SetTargetFPS - Set target FPS (maximum) func SetTargetFPS(fps int32) { cfps := (C.int)(fps)