Project

General

Profile

« Previous | Next » 

Revision 20dcbcae

Added by Leszek Koltunski 25 days ago

  • ID 20dcbcae89d1bd90dabd7a6e564339f4c631faf7
  • Parent 0ec93041

fixes to touch control of ghosts

View differences:

src/main/java/org/distorted/library/helpers/QuatHelper.java
70 70
    ret[3] = rw*qw - rz*qz - ry*qy - rx*qx;
71 71
    }
72 72

  
73
///////////////////////////////////////////////////////////////////////////////////////////////////
74
// return quat1*quat(rx,ry,rz,rw)
75

  
76
    public static void quatMultiply( float[] ret, Static4D quat1, float rx, float ry, float rz, float rw )
77
      {
78
      float qx = quat1.get0();
79
      float qy = quat1.get1();
80
      float qz = quat1.get2();
81
      float qw = quat1.get3();
82

  
83
      ret[0] = rw*qx - rz*qy + ry*qz + rx*qw;
84
      ret[1] = rw*qy + rz*qx + ry*qw - rx*qz;
85
      ret[2] = rw*qz + rz*qw - ry*qx + rx*qy;
86
      ret[3] = rw*qw - rz*qz - ry*qy - rx*qx;
87
      }
88

  
73 89
///////////////////////////////////////////////////////////////////////////////////////////////////
74 90
// return quat1*quat2
75 91

  

Also available in: Unified diff