Watch
2
0
Fork
You've already forked raylib-cs
0

Update Mesh.cs

This commit is contained in:
Nickolas McDonald 2023-09-09 12:51:14 -04:00
commit c9679c390e

View file

@ -154,19 +154,25 @@ public unsafe partial struct Mesh
return new(Normals, 3 * VertexCount * sizeof(float) / sizeof(T)); return new(Normals, 3 * VertexCount * sizeof(float) / sizeof(T));
} }
/// <summary>Access <see cref="Tangents"/></summary> /// <summary>
/// Access <see cref="Tangents"/>
/// </summary>
public readonly Span<T> TangentsAs<T>() where T : unmanaged public readonly Span<T> TangentsAs<T>() where T : unmanaged
{ {
return new(Tangents, 4 * VertexCount * sizeof(float) / sizeof(T)); return new(Tangents, 4 * VertexCount * sizeof(float) / sizeof(T));
} }
/// <summary>Access <see cref="Colors"/></summary> /// <summary>
/// Access <see cref="Colors"/>
/// </summary>
public readonly Span<T> ColorsAs<T>() where T : unmanaged public readonly Span<T> ColorsAs<T>() where T : unmanaged
{ {
return new(Colors, 4 * VertexCount * sizeof(byte) / sizeof(T)); return new(Colors, 4 * VertexCount * sizeof(byte) / sizeof(T));
} }
/// <summary>Access <see cref="Indices"/></summary> /// <summary>
/// Access <see cref="Indices"/>
/// </summary>
public readonly Span<T> IndicesAs<T>() where T : unmanaged public readonly Span<T> IndicesAs<T>() where T : unmanaged
{ {
return new(Indices, 3 * TriangleCount * sizeof(ushort) / sizeof(T)); return new(Indices, 3 * TriangleCount * sizeof(ushort) / sizeof(T));