mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 13:11:33 +00:00
prep for chunk meshing
This commit is contained in:
16
Sources/Voxelotl/Renderer/Mesh.swift
Normal file
16
Sources/Voxelotl/Renderer/Mesh.swift
Normal 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>
|
||||
}
|
Reference in New Issue
Block a user