using System;
using System.Numerics;
using System.Runtime.InteropServices;
namespace Raylib_cs
{
///
/// Transform, vectex transformation data
///
[StructLayout(LayoutKind.Sequential)]
public struct Transform
{
///
/// Translation
///
public Vector3 translation;
///
/// Rotation
///
public Vector4 rotation;
///
/// Scale
///
public Vector3 scale;
}
///
/// Vertex data definning a mesh
/// NOTE: Data stored in CPU memory (and GPU)
///
[StructLayout(LayoutKind.Sequential)]
public struct Mesh
{
///
/// Number of vertices stored in arrays
///
public int vertexCount;
///
/// Number of triangles stored (indexed or not)
///
public int triangleCount;
#region Default vertex data
///
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0, float *)
///
public IntPtr vertices;
///
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1, float *)
///
public IntPtr texcoords;
///
/// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5, float *)
///
public IntPtr texcoords2;
///
/// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2, float *)
///
public IntPtr normals;
///
/// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4, float *)
///
public IntPtr tangents;
///
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3, unsigned char *)
///
public IntPtr colors;
///
/// Vertex indices (in case vertex data comes indexed, unsigned short *)
///
public IntPtr indices;
#endregion
#region Animation vertex data
///
/// Animated vertex positions (after bones transformations, float *)
///
public IntPtr animVertices;
///
/// Animated normals (after bones transformations, float *)
///
public IntPtr animNormals;
///
/// Vertex bone ids, up to 4 bones influence by vertex (skinning, int *)
///
public IntPtr boneIds;
///
/// Vertex bone weight, up to 4 bones influence by vertex (skinning, float *)
///
public IntPtr boneWeights;
#endregion
#region OpenGL identifiers
///
/// OpenGL Vertex Array Object id
///
public uint vaoId;
///
/// OpenGL Vertex Buffer Objects id (default vertex data, uint[])
///
public IntPtr vboId;
#endregion
}
}