Client LuaCsForBarotrauma
CoordinateSpace2D.cs
1
using
Microsoft.Xna.Framework;
2
namespace
Barotrauma.Utils;
3
4
public
struct
CoordinateSpace2D
5
{
6
public
static
readonly
CoordinateSpace2D
CanonicalSpace
=
new
CoordinateSpace2D
7
{
8
Origin
= Vector2.Zero,
9
I
= Vector2.UnitX,
10
J
= Vector2.UnitY
11
};
12
13
public
Vector2
Origin
;
14
public
Vector2
I
;
15
public
Vector2
J
;
16
17
public
Matrix
LocalToCanonical
18
=>
new
Matrix(
19
m11:
I
.X, m12:
I
.Y, m13: 0f, m14: 0f,
20
m21:
J
.X, m22:
J
.Y, m23: 0f, m24: 0f,
21
m31: 0f, m32: 0f, m33: 1f, m34: 0f,
22
m41: 0f, m42: 0f, m43: 0f, m44: 1f)
23
* Matrix.CreateTranslation(
Origin
.X,
Origin
.Y, 0f);
24
25
public
Matrix
CanonicalToLocal
=> Matrix.Invert(
LocalToCanonical
);
26
}
CoordinateSpace2D
Definition:
CoordinateSpace2D.cs:5
CoordinateSpace2D.Origin
Vector2 Origin
Definition:
CoordinateSpace2D.cs:13
CoordinateSpace2D.I
Vector2 I
Definition:
CoordinateSpace2D.cs:14
CoordinateSpace2D.CanonicalToLocal
Matrix CanonicalToLocal
Definition:
CoordinateSpace2D.cs:25
CoordinateSpace2D.LocalToCanonical
Matrix LocalToCanonical
Definition:
CoordinateSpace2D.cs:18
CoordinateSpace2D.CanonicalSpace
static readonly CoordinateSpace2D CanonicalSpace
Definition:
CoordinateSpace2D.cs:6
CoordinateSpace2D.J
Vector2 J
Definition:
CoordinateSpace2D.cs:15
Barotrauma
BarotraumaShared
SharedSource
Utils
CoordinateSpace2D.cs
Generated by
1.9.1