public Vector3f getRotationColumn(int i, Vector3f store) { if (store == null) store = new Vector3f(); float fTx  = 2.0f*x; float fTy  = 2.0f*y; float fTz  = 2.0f*z; float fTwx = fTx*w; float fTwy = fTy*w; float fTwz = fTz*w; float fTxx = fTx*x; float fTxy = fTy*x; float fTxz = fTz*x; float fTyy = fTy*y; float fTyz = fTz*y; float fTzz = fTz*z;  switch (i) { case 0: store.x = 1.0f-(fTyy+fTzz); store.y = fTxy+fTwz; store.z = fTxz-fTwy; break; case 1: store.x = fTxy-fTwz; store.y = 1.0f-(fTxx+fTzz); store.z = fTyz+fTwx; break; case 2: store.x = fTxz+fTwy; store.y = fTyz-fTwx; store.z = 1.0f-(fTxx+fTyy); break; default: LoggingSystem.getLogger().log( Level.WARNING, "Invalid column index."); throw new JmeException("Invalid column index. " + i); } return store;
public Vector3f getRotationColumn(int i) { return getRotationColumn(i, null);
    public Vector3f getRotationColumn(int i, Vector3f store) {        if (store == null) store = new Vector3f();        float fTx  = 2.0f*x;        float fTy  = 2.0f*y;        float fTz  = 2.0f*z;        float fTwx = fTx*w;        float fTwy = fTy*w;        float fTwz = fTz*w;        float fTxx = fTx*x;        float fTxy = fTy*x;        float fTxz = fTz*x;        float fTyy = fTy*y;        float fTyz = fTz*y;        float fTzz = fTz*z;        switch (i) {            case 0:                store.x = 1.0f-(fTyy+fTzz);                store.y = fTxy+fTwz;                store.z = fTxz-fTwy;                break;            case 1:                store.x = fTxy-fTwz;                store.y = 1.0f-(fTxx+fTzz);                store.z = fTyz+fTwx;                break;            case 2:                store.x = fTxz+fTwy;                store.y = fTyz-fTwx;                store.z = 1.0f-(fTxx+fTyy);                break;            default:                LoggingSystem.getLogger().log(                    Level.WARNING,                    "Invalid column index.");                throw new JmeException("Invalid column index. " + i);        }        return store;    }