Skip to content

Commit

Permalink
some untestet stufff
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWandererProductions committed May 31, 2024
1 parent 7bd7e04 commit 1ca3b0a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Mathematics/Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public sealed class Transform
/// <value>
/// Up.
/// </value>
public Vector3D Up { get; set; }
public Vector3D Up { get; set; } = new Vector3D(0, 1, 0); //untested

/// <summary>
/// Gets or sets the right.
Expand All @@ -51,7 +51,7 @@ public sealed class Transform
/// <value>
/// The right.
/// </value>
public Vector3D Right { get; set; } = new();
public Vector3D Right { get; set; } = new Vector3D(1, 0, 0);//= new();

/// <summary>
/// Gets or sets the forward.
Expand All @@ -60,7 +60,7 @@ public sealed class Transform
/// <value>
/// The forward.
/// </value>
public Vector3D Forward { get; set; } = new();
public Vector3D Forward { get; set; } = new Vector3D(0, 0, 1);//= new ();

/// <summary>
/// Gets or sets the pitch.
Expand Down Expand Up @@ -133,7 +133,10 @@ public static Transform GetInstance()
Position = new Vector3D(),
Translation = new Vector3D(),
Rotation = new Vector3D(),
Scale = Vector3D.UnitVector
Scale = Vector3D.UnitVector,
//new
Right = new Vector3D(1, 0, 0),
Forward = new Vector3D(0, 0, 1)
};
}

Expand All @@ -153,7 +156,10 @@ public static Transform GetInstance(Vector3D translation, Vector3D scale, Vector
Position = new Vector3D(),
Translation = translation,
Rotation = rotation,
Scale = scale
Scale = scale,
//new
Right = new Vector3D(1, 0, 0),
Forward = new Vector3D(0, 0, 1)
};
}

Expand Down Expand Up @@ -201,7 +207,7 @@ public void LeftCamera(double x = 0.05d)
switch (CameraType)
{
case Cameras.Orbit:
Position += Right * x;
Position -= Right * x; //switch
break;
case Cameras.PointAt:
Position.X -= x;
Expand All @@ -219,7 +225,7 @@ public void RightCamera(double x = 0.05d)
switch (CameraType)
{
case Cameras.Orbit:
Position -= Right * x;
Position += Right * x;//switch
break;
case Cameras.PointAt:
Position.X += x;
Expand Down

0 comments on commit 1ca3b0a

Please sign in to comment.