[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebKitCSSMatrix and WebGL



The goal of CSSMatrix is to do the most common compute intensive operations. Matrix multiply and inverse are certainly at the top of that list. What other specific functions om Matrix do you think we need?

Matrix to and from Euler angles and to and from Quaternions?

It would be nice to have a function that would transform an entire
Float32Array of vec2/vec3/vec4 data though a 4x4 matrix in a single
call...either "in place" or from one array to another. Something like
that would REALLY earn it's keep in performance terms.


If you really wanted to go further into intersections and stuff - it
would be better to find an existing Open-Sourced C++ library (there are
dozens of them out there) and either port the code or wrap it.



Matrix3 X3DMatrix3 = newX3DMatrix3( f11, f12, f13, f21, f22, f23, f31, f32, f33); setTransform([translation][, rotation][, scale][, scaleOrientation][, center]); Transform.getTransform(translation, rotation, scale); Matrix3 = Transform.inverse(); Matrix3 = Transform.transpose(); Matrix3 = Transform.multRight(Matrix3); SFVec2f = Transform.multVecMatrix(vec); SFVec2f = Transform.multMatrixVec(vec); String = Transform.toString();

Matrix4
X3DMatrix4 = newX3DMatrix4(
f11, f12, f13, f14,
f21, f22, f23, f24,
f31, f32, f33, f34,
f41, f42, f43, f44);
setTransform([translation][, rotation][, scale][, scaleOrientation][, center])
getTransform( translation, rotation, scale)
Matrix4 = Transform.inverse()
Matrix4 = Transform.transpose()
Matrix4 = Transform.multLeft(matrix)
SFVec3f = Transform.multVecMatrix(rowvec)
String = Transform.toString()


in addition to the above mentioned Matrix to and from Euler angles and to and from Quaternions the above are often nice to have.
Thanks and Best Regards,
Joe








 -- Steve


----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email:


----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: