diff options
| author | raysan5 <raysan5@gmail.com> | 2016-05-03 19:27:06 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-05-03 19:27:06 +0200 |
| commit | fd67e31f630476980eb09e49177958703db5b3d3 (patch) | |
| tree | 0530cf022ef725c23735933924cd50d654f0444b | |
| parent | 8301980ba8f917dd445b346332c48ec3b2447511 (diff) | |
| download | raylib-fd67e31f630476980eb09e49177958703db5b3d3.tar.gz raylib-fd67e31f630476980eb09e49177958703db5b3d3.zip | |
Renamed function for consistency
| -rw-r--r-- | examples/core_world_screen.c | 2 | ||||
| -rw-r--r-- | src/core.c | 4 | ||||
| -rw-r--r-- | src/raylib.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/core_world_screen.c b/examples/core_world_screen.c index d89a296b..f3798830 100644 --- a/examples/core_world_screen.c +++ b/examples/core_world_screen.c @@ -43,7 +43,7 @@ int main() UpdateCamera(&camera); // Update internal camera and our camera // Calculate cube screen space position (with a little offset to be in top) - cubeScreenPosition = WorldToScreen((Vector3){cubePosition.x, cubePosition.y + 2.5f, cubePosition.z}, camera); + cubeScreenPosition = GetWorldToScreen((Vector3){cubePosition.x, cubePosition.y + 2.5f, cubePosition.z}, camera); //---------------------------------------------------------------------------------- // Draw @@ -905,7 +905,7 @@ Ray GetMouseRay(Vector2 mousePosition, Camera camera) Vector3 farPoint = rlglUnproject((Vector3){ deviceCoords.x, deviceCoords.y, 1.0f }, matProj, matView); #else // OPTION 2: Compute unprojection directly here - + // Calculate unproject matrix (multiply projection matrix and view matrix) and invert it Matrix matProjView = MatrixMultiply(matProj, matView); MatrixInvert(&matProjView); @@ -935,7 +935,7 @@ Ray GetMouseRay(Vector2 mousePosition, Camera camera) } // Returns the screen space position from a 3d world space position -Vector2 WorldToScreen(Vector3 position, Camera camera) +Vector2 GetWorldToScreen(Vector3 position, Camera camera) { // Calculate projection matrix (from perspective instead of frustum Matrix matProj = MatrixPerspective(camera.fovy, (double)GetScreenWidth()/(double)GetScreenHeight(), 0.01, 1000.0); diff --git a/src/raylib.h b/src/raylib.h index bc98181b..8af7d2fb 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -586,7 +586,7 @@ void BeginTextureMode(RenderTexture2D target); // Initializes rende void EndTextureMode(void); // Ends drawing to render texture Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -Vector2 WorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) void SetTargetFPS(int fps); // Set target FPS (maximum) |
