ushort
06/20/2021, 1:21 AMushort
06/20/2021, 2:24 AMclass Vector3D(var x: Float, var y: Float, var z: Float) {
internal fun asNative() = nativeHeap.alloc<aiVector3D> {
x = this@Vector3D.x
y = this@Vector3D.y
z = this@Vector3D.z
}
companion object {
internal fun create(cPointer: CPointer<aiVector3D>): Vector3D {
val aiVector = cPointer.pointed
return Vector3D(aiVector.x, aiVector.y, aiVector.z)
}
}
}
Would this be a proper way?Clocks
06/20/2021, 12:39 PMClocks
06/20/2021, 12:40 PM