Cannot set struct in Objective C
Hi,
I cannot set a struct for an SCNNode.position, where position is a struct of 3 floats.
I have defined an ObjC struct for SCNVector using define-objc-struct. As per the docs for invoke, http://www.lispworks.com/documentation/lw61/OBJC/html/objc-47.htm#46194, for 'other structures',
-- The argument should be a foreign pointer to the appropriate struct object and is copied.
My understanding here is I just need to pass a pointer to SCNVector3. Is that right?
I am not able to identify why after I allocate a foreign object to SCNVector3, it ends up with this error:
-------
Error: #<Pointer to type (:STRUCT SCN-VECTOR3) = #x00112400> cannot be converted to foreign type (:STRUCT SCN-VECTOR3).
-------
I have attached the code in svn-position.lisp file. Just loading it will show the error. I am running LW 6.1 32 bit on OS X 10.10.
Thanks,