prep for chunk meshing

This commit is contained in:
2024-09-01 21:16:05 +10:00
parent cb0e7bb232
commit da26773221
11 changed files with 157 additions and 91 deletions

View File

@ -0,0 +1,16 @@
public struct Mesh<VertexType: Vertex, IndexType: UnsignedInteger> {
public let vertices: [VertexType]
public let indices: [IndexType]
}
public extension Mesh {
static var empty: Self { .init(vertices: .init(), indices: .init()) }
}
public protocol Vertex: Equatable {}
public struct VertexPositionNormalTexcoord: Vertex {
var position: SIMD3<Float>
var normal: SIMD3<Float>
var texCoord: SIMD2<Float>
}