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/VertexEffectQuaternion.java
78 78

  
79 79
     + "n.x = qw*nx + qz*ny - qy*nz - qx*nw;          \n"
80 80
     + "n.y = qw*ny - qz*nx - qy*nw + qx*nz;          \n"
81
     + "n.z = qw*nz - qz*nw + qy*nx - qx*ny;          \n"
82

  
83
     + "#ifdef PREAPPLY                                \n"
84

  
85
     + "float ix =  - inf.z*qy + inf.y*qz + inf.x*qw;  \n"
86
     + "float iy =  + inf.z*qx + inf.y*qw - inf.x*qz;  \n"
87
     + "float iz =  + inf.z*qw - inf.y*qx + inf.x*qy;  \n"
88
     + "float iw =  - inf.z*qz - inf.y*qy - inf.x*qx;  \n"
89

  
90
     + "inf.x = qw*ix + qz*iy - qy*iz - qx*iw;         \n"
91
     + "inf.y = qw*iy - qz*ix - qy*iw + qx*iz;         \n"
92
     + "inf.z = qw*iz - qz*iw + qy*ix - qx*iy;         \n"
93

  
94
     + "#endif                                         \n";
81
     + "n.z = qw*nz - qz*nw + qy*nx - qx*ny;          \n";
95 82
    }
96 83

  
97 84
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff