Hello, during the transplant from Objective-C to Swift, I was unable to convert the following substitution parts, so I asked you a question.
Source Code
let positionsArray: vector_float3 =_templeVertexPositions.contents()
Origin Code
vector_float3*positionsArray=(vector_float3*)_templeVertexPositions.contents;
Error Code
Cannot convert value of type 'UnsafeMutableRawPointer' to specified type 'vector_float3' (aka'SIMD3<Float>')
Transplanting code
https://developer.apple.com/documentation/metal/migrating_opengl_code_to_metal
vector_float3 is also having trouble converting.
I think I can do it by converting different types of arrays, but I can't solve it.
I look forward to working with you if there is any good way.
I solved myself!
let positionsArray: [vector_float3] = [vector_float3] (_impossibleCocoaArray:_templeVertexPositions)
*Additional note This one seems to be more correct
let positionsArray:UnsafeMutableRawPointer=_templeVertexPositions.contents()
367 To Limit Column Values to Strings in a String List Using sqlalchemy
356 Unity Virtual Stick Does Not Return to Center When You Release Your Finger
356 I want to create an array of sequences from "1" to a specified number.
342 Memory layouts learned in theory don't work out as expected when actually printed as addresses.
© 2023 OneMinuteCode. All rights reserved.