using System.Numerics;
using System.Runtime.InteropServices;
namespace Raylib_cs
{
///
/// Ray, ray for raycasting
///
[StructLayout(LayoutKind.Sequential)]
public partial struct Ray
{
///
/// Ray position (origin)
///
public Vector3 position;
///
/// Ray direction
///
public Vector3 direction;
public Ray(Vector3 position, Vector3 direction)
{
this.position = position;
this.direction = direction;
}
}
///
/// Raycast hit information
///
[StructLayout(LayoutKind.Sequential)]
public partial struct RayCollision
{
///
/// Did the ray hit something?
///
public CBool hit;
///
/// Distance to nearest hit
///
public float distance;
///
/// Position of nearest hit
///
public Vector3 point;
///
/// Surface normal of hit
///
public Vector3 normal;
}
}