getTransformMatrix static method
Implementation
static Matrix4 getTransformMatrix(
double value,
Axis direction,
double perspective,
) {
final Matrix4 mtx = Matrix4(
1.0, 0.0, 0.0, 0.0, //
0.0, 1.0, 0.0, 0.0, //
0.0, 0.0, 1.0, 0.002 * perspective, //
0.0, 0.0, 0.0, 1.0,
);
if (value != 0) {
if (direction == Axis.vertical) {
mtx.rotateX(value * pi);
} else {
mtx.rotateY(value * pi);
}
}
return mtx;
}