Revision f0c98ff5
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/library/main/QuatHelper.java | ||
---|---|---|
97 | 97 |
return new Static4D(tx,ty,tz,tw); |
98 | 98 |
} |
99 | 99 |
|
100 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
101 |
// ret = (qx,qy,qz,qw)*(rx,ry,rz,rw) |
|
102 |
|
|
103 |
public static void quatMultiply( float[] ret, float qx, float qy, float qz, float qw, float rx, float ry, float rz, float rw ) |
|
104 |
{ |
|
105 |
ret[0] = rw*qx - rz*qy + ry*qz + rx*qw; |
|
106 |
ret[1] = rw*qy + rz*qx + ry*qw - rx*qz; |
|
107 |
ret[2] = rw*qz + rz*qw - ry*qx + rx*qy; |
|
108 |
ret[3] = rw*qw - rz*qz - ry*qy - rx*qx; |
|
109 |
} |
|
110 |
|
|
111 | 100 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
112 | 101 |
// ret = (qx,qy,qz,qw)*(rx,ry,rz,rw) |
113 | 102 |
|
Also available in: Unified diff
Adjust ShapeChanging so that it can handle concave cubit faces.
Now it is working also in case of the Ivy corner cubits.