From a5c86f9c31d35c7b83050adc6cf3933efecc1d95 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 3 Nov 2018 16:02:35 -0400 Subject: [PATCH] Doc comments! --- Terrain2/Terrain.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Terrain2/Terrain.swift b/Terrain2/Terrain.swift index 9a979f9..23c08f7 100644 --- a/Terrain2/Terrain.swift +++ b/Terrain2/Terrain.swift @@ -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