typedef struct _Enesim_Matrix { double xx, xy, xz; double yx, yy, yz; double zx, zy, zz; } Enesim_Matrix; EAPI void enesim_matrix_translate(Enesim_Matrix *t, double tx, double ty); EAPI void enesim_matrix_scale(Enesim_Matrix *t, double sx, double sy); EAPI void enesim_matrix_rotate(Enesim_Matrix *t, double rad);

With the following Ender definition:

struct "Matrix" { double "xx"; double "xy"; double "xz"; double "yx"; double "yy"; double "yz"; double "zx"; double "zy"; double "zz"; translate(double, double); scale(double, double); rotate(double); };

And then do something like this on ender:

Ender_Element *e; e = ender_namespace_element_new(ns, "Matrix"); ender_element_property_set(e, "xx", 150.0, "yy", 320.0, NULL); ender_element_function_call(e, "rotate", 180.0, NULL);

So now both structs and unions behave as an opaque pointer (objects). Another pending issue was to remove the Enesim dependency on Ender and Escen. That implies that the types

*SURFACE*and

*MATRIX*are no longer valid and things like this on escen files are not supported anymore:

set { transformation = rotate(0.78, 64, 64), translate(-30, -30); };

Later we will find a solution, maybe add scripting directly? Who knows ...

## No comments:

Post a Comment