[x3d-public] CSAI round 5

GPU Group gpugroup at gmail.com
Thu Jan 26 14:42:42 PST 2023


Compiled Matrix4f close to current specs
CSAI_check3.c - compiles and runs, see console output below
https://drive.google.com/file/d/1bJZz50Noeo60k3qg9Dx7J5TShmqKMJpk/view?usp=share_link
- data[16] must be in struct to avoid allocations
- uses stack approach
- needed separate init_Matrix4f() function, because Matrix4f(void*) won't
have any function pointer initialized for constructor until after Matrix4f
struct is initialized.
- 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.
- defining simpler types -still as a struct- allows values to be passed as
stack objects.
typedef struct Vec3f { float data[3]; } Vec3f;
typedef struct Rotation { float dir[3]; float angle; } Rotation;
it would be optimal if return types from SFVec3f.get() would map to these
structs.
And mistakes declaring return type Matrix3f from Matrix4f functions.
console output from CSAI_check3.c
Hello world
| 1.000000 0.000000 0.000000 0.000000 |
| 0.000000 2.000000 0.000000 3.000000 |
| 0.000000 0.000000 1.000000 0.000000 |
| 0.000000 0.000000 0.000000 1.000000 |

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.
-Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230126/afc92b6f/attachment.html>


More information about the x3d-public mailing list