<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Compiled Matrix4f close to current specs</div><div>CSAI_check3.c - compiles and runs, see console output below<br></div><div><a href="https://drive.google.com/file/d/1bJZz50Noeo60k3qg9Dx7J5TShmqKMJpk/view?usp=share_link">https://drive.google.com/file/d/1bJZz50Noeo60k3qg9Dx7J5TShmqKMJpk/view?usp=share_link</a></div><div>- data[16] must be in struct to avoid allocations</div><div>- uses stack approach </div><div>- needed separate init_Matrix4f() function, because Matrix4f(void*) won't have any function pointer initialized for constructor until after Matrix4f struct is initialized.</div><div>- SFVec3f, SFRotation the wrong types to pass into Matrix.setTransform, from a CSAI app because those types are already defined as wrappers talking to the server.</div><div>- defining simpler types -still as a struct- allows values to be passed as stack objects.</div><div><div>typedef struct Vec3f { float data[3]; } Vec3f;</div><div>typedef struct Rotation { float dir[3]; float angle; } Rotation;</div></div><div>it would be optimal if return types from SFVec3f.get() would map to these structs.</div><div>And mistakes declaring return type Matrix3f from Matrix4f functions.</div><div>console output from CSAI_check3.c</div><div>Hello world</div><div>| 1.000000 0.000000 0.000000 0.000000 |</div><div>| 0.000000 2.000000 0.000000 3.000000 |</div><div>| 0.000000 0.000000 1.000000 0.000000 |</div><div>| 0.000000 0.000000 0.000000 1.000000 |</div><div><br></div><div>Recommendation: clarify the difference between SAI getter/setter stateless wrappers, and primitive local stack objects returned from SFVec3f.get() , and use the local stack primitives in Matrix operations.<br></div><div>-Doug</div></div></div></div></div>