mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Remove Position3 usage
This commit is contained in:
parent
cf893b2c58
commit
d0c8efdfa8
2 changed files with 0 additions and 68 deletions
|
|
@ -279,23 +279,6 @@ namespace Dalamud.Game.Gui
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts in-world coordinates to screen coordinates (upper left corner origin).
|
||||
/// </summary>
|
||||
/// <param name="worldPos">Coordinates in the world.</param>
|
||||
/// <param name="screenPos">Converted coordinates.</param>
|
||||
/// <returns>True if worldPos corresponds to a position in front of the camera.</returns>
|
||||
/// <remarks>
|
||||
/// This overload requires a conversion to SharpDX vectors, however the penalty should be negligible.
|
||||
/// </remarks>
|
||||
public bool WorldToScreen(Position3 worldPos, out Vector2 screenPos)
|
||||
{
|
||||
// This overload is necessary due to Positon3 implicit operators.
|
||||
var result = this.WorldToScreen((SharpDX.Vector3)worldPos, out var sharpScreenPos);
|
||||
screenPos = sharpScreenPos.ToSystem();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts screen coordinates to in-world coordinates via raycasting.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Dalamud.Game
|
||||
{
|
||||
/// <summary>
|
||||
/// A game native equivalent of a Vector3.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Position3
|
||||
{
|
||||
/// <summary>
|
||||
/// The X of (X,Z,Y).
|
||||
/// </summary>
|
||||
public float X;
|
||||
|
||||
/// <summary>
|
||||
/// The Z of (X,Z,Y).
|
||||
/// </summary>
|
||||
public float Z;
|
||||
|
||||
/// <summary>
|
||||
/// The Y of (X,Z,Y).
|
||||
/// </summary>
|
||||
public float Y;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Position3"/> struct.
|
||||
/// </summary>
|
||||
/// <param name="x">The X position.</param>
|
||||
/// <param name="z">The Z position.</param>
|
||||
/// <param name="y">The Y position.</param>
|
||||
public Position3(float x, float z, float y)
|
||||
{
|
||||
this.X = x;
|
||||
this.Z = z;
|
||||
this.Y = y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert this Position3 to a System.Numerics.Vector3.
|
||||
/// </summary>
|
||||
/// <param name="pos">Position to convert.</param>
|
||||
public static implicit operator System.Numerics.Vector3(Position3 pos) => new(pos.X, pos.Y, pos.Z);
|
||||
|
||||
/// <summary>
|
||||
/// Convert this Position3 to a SharpDX.Vector3.
|
||||
/// </summary>
|
||||
/// <param name="pos">Position to convert.</param>
|
||||
public static implicit operator SharpDX.Vector3(Position3 pos) => new(pos.X, pos.Z, pos.Y);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue