From 9deb95087d6a184230416260f0fcc7f06da92bd0 Mon Sep 17 00:00:00 2001 From: Milan Nikolic Date: Tue, 25 May 2021 15:56:35 +0200 Subject: [PATCH] Sort functions --- raylib/core.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) 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)