@@ -34,7 +34,7 @@ import StructureKitCTypes
3434// 1. the depth frame
3535// 2. the cube
3636// 3. the depth overlay inside the cube
37- class STKDepthRenderer {
37+ public class STKDepthRenderer {
3838 private var mtkView : MTKView
3939 private var renderDepthState : MTLRenderPipelineState
4040 private var renderDepthFrameState : MTLRenderPipelineState
@@ -53,7 +53,7 @@ class STKDepthRenderer {
5353 private var _vertexCubeBuffer : MTLBuffer !
5454 private var _indexCubeBuffer : MTLBuffer !
5555
56- init ( view: MTKView , device: MTLDevice ) {
56+ public init ( view: MTKView , device: MTLDevice ) {
5757 mtkView = view
5858 self . device = device
5959
@@ -154,7 +154,7 @@ class STKDepthRenderer {
154154 textureColor? . replace ( region: region, mipmapLevel: 0 , withBytes: & depthRenderingColors, bytesPerRow: bytesPerRow)
155155 }
156156
157- func uploadColorTextureFromDepth( _ depthFrame: STKDepthFrame ) {
157+ public func uploadColorTextureFromDepth( _ depthFrame: STKDepthFrame ) {
158158 if let texture = textureDepth {
159159 if texture. width != depthFrame. width || texture. height != depthFrame. height {
160160 textureDepth = nil // invalidate texture
@@ -178,7 +178,7 @@ class STKDepthRenderer {
178178 textureDepth? . replace ( region: region, mipmapLevel: 0 , withBytes: depthMap!, bytesPerRow: bytesPerRow)
179179 }
180180
181- func renderDepthOverlay(
181+ public func renderDepthOverlay(
182182 _ commandEncoder: MTLRenderCommandEncoder ,
183183 volumeSizeInMeters: simd_float3 ,
184184 cameraPosition: float4x4 ,
@@ -228,7 +228,7 @@ class STKDepthRenderer {
228228 commandEncoder. popDebugGroup ( )
229229 }
230230
231- func renderDepthFrame(
231+ public func renderDepthFrame(
232232 _ commandEncoder: MTLRenderCommandEncoder ,
233233 orientation: float4x4 ,
234234 minDepth: Float ,
@@ -257,7 +257,7 @@ class STKDepthRenderer {
257257
258258 }
259259
260- func renderCubeOutline(
260+ public func renderCubeOutline(
261261 _ commandEncoder: MTLRenderCommandEncoder ,
262262 volumeSizeInMeters: simd_float3 ,
263263 cameraPosition: float4x4 ,
0 commit comments