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/effects3d/Effects3DRenderer.java
199 199

  
200 200
///////////////////////////////////////////////////////////////////////////////////////////////////
201 201

  
202
    void setRegion(float x, float y, float r)
202
    void setRegion(float x, float y, float z, float r)
203 203
      {
204 204
      mFactorReg = 2*mFactorObj*r/mRegionTexture.getWidth();
205
      mRegionPoint.set(mFactorObj*x,-mFactorObj*y,0);
205
      mRegionPoint.set(mFactorObj*x,-mFactorObj*y, mFactorObj*z);
206 206
      mRegionScalePoint.set(mFactorReg,mFactorReg,mFactorReg);
207 207
      }
208 208

  

Also available in: Unified diff