Project

General

Profile

« Previous | Next » 

Revision 9e7b6dbd

Added by Leszek Koltunski over 5 years ago

Redefine the Vertex Region from (x,y,r,unused) to (x,y,z,r). This takes into account the 'Z', which makes it possible to warp only one side of a 3D Mesh like Sphere.

Also corresponding changes in applications.

View differences:

src/main/java/org/distorted/examples/deform/DeformRenderer.java
158 158
   void setRegionRadius(int r)
159 159
      {
160 160
      mRadius = ( r==100 ? 100.0f : r/100.0f);
161
      mRegion.set3(mRadius*scrWidth);
161
      mRegion.set4(mRadius*scrWidth);
162 162
      }
163 163

  
164 164
///////////////////////////////////////////////////////////////////////////////////////////////////
......
175 175
     scrHeight = height;
176 176
     scrWidth  = width;
177 177

  
178
     mRegion.set3(mRadius*scrWidth);
178
     mRegion.set4(mRadius*scrWidth);
179 179

  
180 180
     Canvas stretchCanvas;
181 181
     int w=width/2;
......
223 223
       }
224 224
     catch(Exception ex)
225 225
       {
226
       android.util.Log.e("DeformRenderer", ex.toString() );
226
       android.util.Log.e("Deform", ex.toString() );
227 227
       }
228 228
     }
229 229

  

Also available in: Unified diff