More reorganizing
This commit is contained in:
parent
a83ac56b93
commit
6871808581
4 changed files with 67 additions and 57 deletions
40
Raylib-cs/types/Camera2D.cs
Normal file
40
Raylib-cs/types/Camera2D.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>
|
||||
/// Camera2D, defines position/orientation in 2d space
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public partial struct Camera2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Camera offset (displacement from target)
|
||||
/// </summary>
|
||||
public Vector2 offset;
|
||||
|
||||
/// <summary>
|
||||
/// Camera target (rotation and zoom origin)
|
||||
/// </summary>
|
||||
public Vector2 target;
|
||||
|
||||
/// <summary>
|
||||
/// Camera rotation in degrees
|
||||
/// </summary>
|
||||
public float rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Camera zoom (scaling), should be 1.0f by default
|
||||
/// </summary>
|
||||
public float zoom;
|
||||
|
||||
public Camera2D(Vector2 offset, Vector2 target, float rotation, float zoom)
|
||||
{
|
||||
this.offset = offset;
|
||||
this.target = target;
|
||||
this.rotation = rotation;
|
||||
this.zoom = zoom;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,41 +3,6 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>
|
||||
/// Camera2D, defines position/orientation in 2d space
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public partial struct Camera2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Camera offset (displacement from target)
|
||||
/// </summary>
|
||||
public Vector2 offset;
|
||||
|
||||
/// <summary>
|
||||
/// Camera target (rotation and zoom origin)
|
||||
/// </summary>
|
||||
public Vector2 target;
|
||||
|
||||
/// <summary>
|
||||
/// Camera rotation in degrees
|
||||
/// </summary>
|
||||
public float rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Camera zoom (scaling), should be 1.0f by default
|
||||
/// </summary>
|
||||
public float zoom;
|
||||
|
||||
public Camera2D(Vector2 offset, Vector2 target, float rotation, float zoom)
|
||||
{
|
||||
this.offset = offset;
|
||||
this.target = target;
|
||||
this.rotation = rotation;
|
||||
this.zoom = zoom;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Camera system modes
|
||||
/// </summary>
|
||||
|
|
@ -4,28 +4,6 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>
|
||||
/// Transform, vectex transformation data
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public partial struct Transform
|
||||
{
|
||||
/// <summary>
|
||||
/// Translation
|
||||
/// </summary>
|
||||
public Vector3 translation;
|
||||
|
||||
/// <summary>
|
||||
/// Rotation
|
||||
/// </summary>
|
||||
public Vector4 rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Scale
|
||||
/// </summary>
|
||||
public Vector3 scale;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Vertex data definning a mesh<br/>
|
||||
/// NOTE: Data stored in CPU memory (and GPU)
|
||||
|
|
|
|||
27
Raylib-cs/types/Transform.cs
Normal file
27
Raylib-cs/types/Transform.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>
|
||||
/// Transform, vectex transformation data
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public partial struct Transform
|
||||
{
|
||||
/// <summary>
|
||||
/// Translation
|
||||
/// </summary>
|
||||
public Vector3 translation;
|
||||
|
||||
/// <summary>
|
||||
/// Rotation
|
||||
/// </summary>
|
||||
public Vector4 rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Scale
|
||||
/// </summary>
|
||||
public Vector3 scale;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue