src/main/java/weathfold/partixel/core/Commons.java
/**
     * Currently is a very naive approach... optimize later
     * a b c are matrices used, should be cached. result is finally in a.
     */
Currently is a very naive approach... optimize later
a b c are matrices used, should be cached. result is finally in a.
Currently is a very naive approach ... optimize later a b c are matrices used should be cached . result is finally in a .
public static void eularMatrix(float yaw, float pitch, float roll, Matrix4f a, Matrix4f b, Matrix4f c) {
        yaw = toRad(yaw);
        pitch = toRad(pitch);
        roll = toRad(roll);
        float sy = MathHelper.sin(yaw), cy = MathHelper.cos(sy),
                sp = MathHelper.sin(pitch), cp = MathHelper.cos(pitch),
                sr = MathHelper.sin(roll), cr = MathHelper.cos(roll);
        a.setIdentity();
        a.m00 = cr;
        a.m01 = -sr;
        a.m10 = sr;
        a.m11 = cr;
        b.setIdentity();
        b.m00 = cp;
        b.m02 = sp;
        b.m20 = -sp;
        b.m22 = cp;
        Matrix4f.mul(b, a, c);
        b.setIdentity();
        b.m11 = cy;
        b.m12 = -sy;
        b.m21 = sy;
        b.m22 = cy;
        Matrix4f.mul(b, c, a);
    }
public static void eularMatrix ( float yaw , float pitch , float roll , Matrix4f a , Matrix4f b , Matrix4f c ) { yaw = toRad ( yaw ) ; pitch = toRad ( pitch ) ; roll = toRad ( roll ) ; float sy = MathHelper . sin ( yaw ) , cy = MathHelper . cos ( sy ) , sp = MathHelper . sin ( pitch ) , cp = MathHelper . cos ( pitch ) , sr = MathHelper . sin ( roll ) , cr = MathHelper . cos ( roll ) ; a . setIdentity ( ) ; a . m00 = cr ; a . m01 = - sr ; a . m10 = sr ; a . m11 = cr ; b . setIdentity ( ) ; b . m00 = cp ; b . m02 = sp ; b . m20 = - sp ; b . m22 = cp ; Matrix4f . mul ( b , a , c ) ; b . setIdentity ( ) ; b . m11 = cy ; b . m12 = - sy ; b . m21 = sy ; b . m22 = cy ; Matrix4f . mul ( b , c , a ) ; }
Currently is a very naive approach... optimize later
 a b c are matrices used, should be cached.
Currently is a very naive approach ... optimize later a b c are matrices used should be cached .