using System.Numerics; using System.Runtime.InteropServices; namespace Raylib_cs; /// /// Camera system modes /// public enum CameraMode { Custom = 0, Free, Orbital, FirstPerson, ThirdPerson } /// /// Camera projection /// public enum CameraProjection { Perspective = 0, Orthographic } /// /// Camera3D, defines position/orientation in 3d space /// [StructLayout(LayoutKind.Sequential)] public partial struct Camera3D { /// /// Camera position /// public Vector3 Position; /// /// Camera target it looks-at /// public Vector3 Target; /// /// Camera up vector (rotation over its axis) /// public Vector3 Up; /// /// Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic /// public float FovY; /// /// Camera type, defines projection type: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC /// public CameraProjection Projection; public Camera3D(Vector3 position, Vector3 target, Vector3 up, float fovY, CameraProjection projection) { this.Position = position; this.Target = target; this.Up = up; this.FovY = fovY; this.Projection = projection; } }