Update Camera.ProjectPoint documentation to be clearer
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -174,19 +174,19 @@ public:
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Projects the point from 3D world-space to the camera screen-space (in screen pixels for default viewport calculated from <see cref="Viewport"/>).
|
||||
/// Projects the point from 3D world-space to game window coordinates (in screen pixels for default viewport calculated from <see cref="Viewport"/>).
|
||||
/// </summary>
|
||||
/// <param name="worldSpaceLocation">The input world-space location (XYZ in world).</param>
|
||||
/// <param name="screenSpaceLocation">The output screen-space location (XY in screen pixels).</param>
|
||||
API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Vector2& screenSpaceLocation) const;
|
||||
/// <param name="gameWindowSpaceLocation">The output game window coordinates (XY in screen pixels).</param>
|
||||
API_FUNCTION() void ProjectPoint(const Vector3& worldSpaceLocation, API_PARAM(Out) Vector2& gameWindowSpaceLocation) const;
|
||||
|
||||
/// <summary>
|
||||
/// 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).
|
||||
/// </summary>
|
||||
/// <param name="worldSpaceLocation">The input world-space location (XYZ in world).</param>
|
||||
/// <param name="screenSpaceLocation">The output screen-space location (XY in screen pixels).</param>
|
||||
/// <param name="cameraViewportSpaceLocation">The output camera viewport-space location (XY in screen pixels).</param>
|
||||
/// <param name="viewport">The viewport.</param>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// Converts the mouse position to 3D ray.
|
||||
|
||||
Reference in New Issue
Block a user