Renamed function for consistency
This commit is contained in:
parent
8301980ba8
commit
fd67e31f63
3 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ int main()
|
||||||
UpdateCamera(&camera); // Update internal camera and our camera
|
UpdateCamera(&camera); // Update internal camera and our camera
|
||||||
|
|
||||||
// Calculate cube screen space position (with a little offset to be in top)
|
// 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
|
// Draw
|
||||||
|
|
|
@ -935,7 +935,7 @@ Ray GetMouseRay(Vector2 mousePosition, Camera camera)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the screen space position from a 3d world space position
|
// 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
|
// Calculate projection matrix (from perspective instead of frustum
|
||||||
Matrix matProj = MatrixPerspective(camera.fovy, (double)GetScreenWidth()/(double)GetScreenHeight(), 0.01, 1000.0);
|
Matrix matProj = MatrixPerspective(camera.fovy, (double)GetScreenWidth()/(double)GetScreenHeight(), 0.01, 1000.0);
|
||||||
|
|
|
@ -586,7 +586,7 @@ void BeginTextureMode(RenderTexture2D target); // Initializes rende
|
||||||
void EndTextureMode(void); // Ends drawing to render texture
|
void EndTextureMode(void); // Ends drawing to render texture
|
||||||
|
|
||||||
Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position
|
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)
|
Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix)
|
||||||
|
|
||||||
void SetTargetFPS(int fps); // Set target FPS (maximum)
|
void SetTargetFPS(int fps); // Set target FPS (maximum)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue