package com.lloydm.geosword;
import com.threed.jpct.GLSLShader;
import com.threed.jpct.IRenderHook;
import com.threed.jpct.Object3D;
public class BeamSplitRenderHook implements IRenderHook
{
     public int whichhalf = 0; // either -1 or +1....
     public GLSLShader myshader = null;
     public float[] cuttingplane = null;
     @Override
     public void afterRendering(int arg0)
     {
     }
     @Override
     public void beforeRendering(int arg0)
     {
                     // glslshader gets called here....ahh! so that's how we do it....
                     if (cuttingplane != null && whichhalf != 0)
                     {
                                     // cuttingplane = vec4....
                                     // plane equation...
                                     // cuttingplane[0] = nx;
                                     // cuttingplane[1] = ny;
                                     // cuttingplane[2] = nz;
                                     // cuttingplane[3] = d;
                                     // cuttingplane[3] *= whichhalf.....
                                     myshader.setUniform("cuttingplane", cuttingplane);
                     }
     }
     @Override
     public void onDispose()
     {
     }
     @Override
     public boolean repeatRendering()
     {
                     return false;
     }
     @Override
     public void setCurrentObject3D(Object3D arg0)
     {
     }
     @Override
     public void setCurrentShader(GLSLShader arg0)
     {
     }
     @Override
     public void setTransparency(float arg0)
     {
     }
}