Doc comments!

This commit is contained in:
Eryn Wells 2018-11-03 16:02:35 -04:00
parent 5fa89d1e47
commit a5c86f9c31

View file

@ -11,7 +11,7 @@ import MetalKit
class Terrain: NSObject {
/// Creete a Metal vertex descriptor specifying how vertices will by laid out for input into our render pipeline and how we'll layout our Model IO vertices.
/// Create a Metal vertex descriptor specifying how vertices will by laid out for input into our render pipeline and how we'll layout our Model IO vertices.
class func buildVertexDescriptor() -> MTLVertexDescriptor {
let mtlVertexDescriptor = MTLVertexDescriptor()
@ -35,6 +35,10 @@ class Terrain: NSObject {
}
/// Create and condition mesh data to feed into a pipeline using the given vertex descriptor.
/// @param dimensions Coordinate dimensions of the plane
/// @param segments Number of segments to divide each dimension into
/// @param device Metal device
/// @param vertexDescriptor Description of how to lay out vertex data in GPU memory
class func buildMesh(withDimensions dimensions: float2, segments: uint2, device: MTLDevice, vertexDescriptor: MTLVertexDescriptor) throws -> MTKMesh {
let metalAllocator = MTKMeshBufferAllocator(device: device)
@ -58,7 +62,6 @@ class Terrain: NSObject {
let dimensions: float2
let segments: uint2
let vertexDescriptor: MTLVertexDescriptor
let mesh: MTKMesh