Following up the GLES support with scripting functions necessary for 3d math:
- "mat4" and "vec3" types in scripting
- Multiply matrices
- Transform a point
Code: Select all
mat4 m1;
vec3 v1;
v1=transformPoint(m1,v1);
- Access matrix/vector elements
Code: Select all
mat4 m1;
vec3 v1;
m1[0, 0] = 1.0;
v1[0] = 1.0;
- mat4 and vec3 is also supported in Variable and Array components (including local arrays)
- mat4, vec3 are automatically garbaged collected values (just like strings). This allows you to create functions which return these values.
- Get and set current matrix.
Code: Select all
mat4 m1;
getMatrix(0,m1); //0 = Model view, 1 = Projection, 2 = Texture
m1[0,0]=2.5;
setMatrix(0,m1);
- Local arrays are now also garbaged collected. So you can write functions that return local arrays (not possible before): "int[] getArray() { ... }"
- Variable and Array components now show their data type in the project tree (e.g. "I1 : Variable <int>" etc).
http://www.zgameeditor.org/files/ZGameEditor_beta.zip