Project

General

Profile

« Previous | Next » 

Revision a2878a67

Added by Leszek Koltunski over 3 years ago

Remove the 'inflate' vertex attributs from the Mesh and file format, and replace that with a per-component 'inflate centers' (which are as of yet untested)

View differences:

src/main/java/org/distorted/library/effect/VertexEffectRotate.java
95 95

  
96 96
    + "n.x = qw*nx + qz*ny - qy*nz - qx*nw;           \n"
97 97
    + "n.y = qw*ny - qz*nx - qy*nw + qx*nz;           \n"
98
    + "n.z = qw*nz - qz*nw + qy*nx - qx*ny;           \n"
99

  
100
    + "#ifdef PREAPPLY                                \n"
101

  
102
    + "float ix =  - inf.z*qy + inf.y*qz + inf.x*qw;  \n"
103
    + "float iy =  + inf.z*qx + inf.y*qw - inf.x*qz;  \n"
104
    + "float iz =  + inf.z*qw - inf.y*qx + inf.x*qy;  \n"
105
    + "float iw =  - inf.z*qz - inf.y*qy - inf.x*qx;  \n"
106

  
107
    + "inf.x = qw*ix + qz*iy - qy*iz - qx*iw;         \n"
108
    + "inf.y = qw*iy - qz*ix - qy*iw + qx*iz;         \n"
109
    + "inf.z = qw*iz - qz*iw + qy*ix - qx*iy;         \n"
110

  
111
    + "#endif                                         \n";
98
    + "n.z = qw*nz - qz*nw + qy*nx - qx*ny;           \n";
112 99
    }
113 100

  
114 101
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff