diff --git a/Source/Engine/Level/Actors/Camera.cpp b/Source/Engine/Level/Actors/Camera.cpp index 95eebefc1..1f9de6d41 100644 --- a/Source/Engine/Level/Actors/Camera.cpp +++ b/Source/Engine/Level/Actors/Camera.cpp @@ -101,12 +101,12 @@ void Camera::SetOrthographicScale(float value) } } -void Camera::ProjectPoint(const Vector3& worldSpaceLocation, Vector2& screenSpaceLocation) const +void Camera::ProjectPoint(const Vector3& worldSpaceLocation, Vector2& gameWindowSpaceLocation) const { - ProjectPoint(worldSpaceLocation, screenSpaceLocation, GetViewport()); + ProjectPoint(worldSpaceLocation, gameWindowSpaceLocation, GetViewport()); } -void Camera::ProjectPoint(const Vector3& worldSpaceLocation, Vector2& screenSpaceLocation, const Viewport& viewport) const +void Camera::ProjectPoint(const Vector3& worldSpaceLocation, Vector2& cameraViewportSpaceLocation, const Viewport& viewport) const { Matrix v, p, vp; GetMatrices(v, p, viewport); @@ -114,7 +114,7 @@ void Camera::ProjectPoint(const Vector3& worldSpaceLocation, Vector2& screenSpac Vector3 clipSpaceLocation; Vector3::Transform(worldSpaceLocation, vp, clipSpaceLocation); viewport.Project(worldSpaceLocation, vp, clipSpaceLocation); - screenSpaceLocation = Vector2(clipSpaceLocation); + cameraViewportSpaceLocation = Vector2(clipSpaceLocation); } Ray Camera::ConvertMouseToRay(const Vector2& mousePosition) const diff --git a/Source/Engine/Level/Actors/Camera.h b/Source/Engine/Level/Actors/Camera.h index 7f40617dd..4bf277279 100644 --- a/Source/Engine/Level/Actors/Camera.h +++ b/Source/Engine/Level/Actors/Camera.h @@ -174,19 +174,19 @@ public: public: /// - /// Projects the point from 3D world-space to the camera screen-space (in screen pixels for default viewport calculated from ). + /// Projects the point from 3D world-space to game window coordinates (in screen pixels for default viewport calculated from ). /// /// The input world-space location (XYZ in world). - /// The output screen-space location (XY in screen pixels). - API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Vector2& screenSpaceLocation) const; + /// The output game window coordinates (XY in screen pixels). + API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Vector2& gameWindowSpaceLocation) const; /// - /// Projects the point from 3D world-space to the camera screen-space (in screen pixels for given viewport). + /// Projects the point from 3D world-space to the camera viewport-space (in screen pixels for given viewport). /// /// The input world-space location (XYZ in world). - /// The output screen-space location (XY in screen pixels). + /// The output camera viewport-space location (XY in screen pixels). /// The viewport. - API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Vector2& screenSpaceLocation, API_PARAM(Ref) const Viewport& viewport) const; + API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Vector2& cameraViewportSpaceLocation, API_PARAM(Ref) const Viewport& viewport) const; /// /// Converts the mouse position to 3D ray.