Examples of Visual


Examples of com.neophob.sematrix.core.glue.Visual

   
    private void testWithResolution(int x, int y) {
      MatrixData matrix = new MatrixData(x,y);
     
      List<Visual> vlist = new ArrayList<Visual>();
      Visual v = createVisual(matrix, col);
      vlist.add(v);
      Collector.getInstance().setAllVisuals(vlist);
           
      PixelControllerFader pcf = new PixelControllerFader(ph, matrix, fps);     
      for (int i=0; i<4; i++) {
        IFader f = pcf.getVisualFader(i);       
        f.startFade(0, 0);
        f.getBuffer(v.getBuffer(), v.getBuffer());
        f.cleanUp();
       
        f = pcf.getPresetFader(i);
        f.startFade(0, v.getBuffer());
        f.getBuffer(v.getBuffer(), v.getBuffer());
      }
     
    }
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

   
    private Visual createVisual(MatrixData matrix, ColorSet col) {
      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
      Mixer m = new PassThruMixer();
      return new Visual(g,e,m,col);
    }
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

  /* (non-Javadoc)
   * @see com.neophob.sematrix.core.generator.Generator#update()
   */
  @Override
  public void update() {
    Visual visual = Collector.getInstance().getVisual(0);
      this.internalBuffer = visual.getMixer().getBuffer(visual);
  }
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

     */
    private Visual createVisual(MatrixData matrix, ColorSet col) {
      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
      Mixer m = new PassThruMixer();
      return new Visual(g,e,m,col);
    }
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

            }
            long recievedMB = col.getPixConStat().getRecievedOscBytes()/1024/1024;
            String oscStat  = messages.getString("GeneratorGui.OSC_STATISTIC")+col.getPixConStat().getRecievedOscPakets()+"/"+recievedMB;
            oscStatistic.setText(oscStat);
           
            Visual v = col.getVisual(col.getCurrentVisual());
            if (v!=null) {       
                if (v.getGenerator1().isPassThoughModeActive() || v.getGenerator2().isPassThoughModeActive()) {
                  passThroughMode.setText(messages.getString("GeneratorGui.PASSTHROUGH_MODE"));
                } else {
                  passThroughMode.setText("");
                }
            }
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

      if (registerGuiClass.isTextfieldInEditMode()) {
        return;
      }
     
        Collector col = Collector.getInstance();
        Visual v = col.getVisual(col.getCurrentVisual());
        boolean validKey = false;
       
        switch (key) {
       
        //change current Colorset
        case 'C':           
            if (v!=null) {
              String colorSetName = v.getColorSet().getName();
               
                boolean takeNext = false;
                ColorSet nextColorSet = col.getColorSets().get(0);
                for (ColorSet cs : col.getColorSets()) {
                  if (takeNext) {
                    nextColorSet = cs;
                    break;
                  }
                 
                  if (cs.getName().equals(colorSetName)) {
                    takeNext = true;
                  }
                }
                v.setColorSet(nextColorSet.getName());
                validKey = true;
            }
            break;

        //change current generator 1
        case 'F':
          if (v!=null) {             
            int currentGenerator = v.getGenerator1Idx();
            int nrOfGenerators = 1+col.getPixelControllerGenerator().getSize();

            int count=nrOfGenerators;
            Generator g=null;
            while (count>=0 && g==null) {
              currentGenerator++;
              g = col.getPixelControllerGenerator().getGenerator(currentGenerator%nrOfGenerators);
            }

            if (g!=null && g.getName() != null) {
              v.setGenerator1(currentGenerator%nrOfGenerators);
              validKey = true;
            } else {
              LOG.log(Level.INFO, "Could not find new Generator!");
            }
          }
          break;

        //change current generator 2
        case 'G':
          if (v!=null) {       
            int currentGenerator = v.getGenerator2Idx();
            int nrOfGenerators = 1+col.getPixelControllerGenerator().getSize();

            int count=nrOfGenerators;
            Generator g=null;
            while (count>=0 && g==null) {
              currentGenerator++;
              g = col.getPixelControllerGenerator().getGenerator(currentGenerator%nrOfGenerators);
            }

            if (g!=null && g.getName() != null) {
              v.setGenerator2(currentGenerator%nrOfGenerators);
              validKey = true;
            } else {
              LOG.log(Level.INFO, "Could not find new Generator!");
            }
          }
            break;

        //change current effect 1
        case 'W':
            if (v!=null) {
                int currentEffect = v.getEffect1Idx();
                int nrOfEffects = col.getPixelControllerEffect().getSize();
                currentEffect++;
                v.setEffect1(currentEffect%nrOfEffects);
                validKey = true;
            }
            break;

        //change current effect 2
        case 'E':
            if (v!=null) {
                int currentEffect = v.getEffect2Idx();
                int nrOfEffects = col.getPixelControllerEffect().getSize();
                currentEffect++;
                v.setEffect2(currentEffect%nrOfEffects);
                validKey = true;
            }
            break;

        //change current mixer
        case 'M':
            if (v!=null) {
                int currentMixer = v.getMixerIdx();
                int nrOfMixerss = col.getPixelControllerMixer().getSize();
                currentMixer++;
                v.setMixer(currentMixer%nrOfMixerss);
                validKey = true;
            }
            break;
           
        //randomize
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
      Mixer m = new Checkbox(matrix);
      ColorSet c = new ColorSet("test", new int[]{1,2,3});
      Visual v = new Visual(g,e,m,c);     

      for (Effect eff: pce.getAllEffects()) {
        eff.getBuffer(v.getBuffer());
        eff.update();
       
        if (eff.getId() == EffectName.ROTOZOOM.getId()) {
          RotoZoom roto = (RotoZoom)eff;
          roto.setAngle(50);
          eff.getBuffer(v.getBuffer());
          eff.update();
          roto.setAngle(5000);
        }

        if (eff.getId() == EffectName.ZOOM.getId()) {
          Zoom zoom = (Zoom)eff;
          zoom.setZoomMode(ZoomMode.ZOOM_OUT.ordinal());
          zoom.update();
          zoom.getBuffer(v.getBuffer());
          zoom.setZoomMode(ZoomMode.HORIZONTAL.ordinal());
          zoom.update();
          zoom.getBuffer(v.getBuffer());
          zoom.setZoomMode(ZoomMode.VERTICAL.ordinal());
          zoom.update();
          zoom.getBuffer(v.getBuffer());
          zoom.setZoomMode(ZoomMode.ZOOM_IN.ordinal());
        }

        if (eff.getId() == EffectName.TEXTURE_DEFORMATION.getId()) {
          TextureDeformation td = (TextureDeformation)eff;
          for (int i=0;i<16;i++) {
            td.changeLUT(i);
              td.update();
              td.getBuffer(v.getBuffer());
          }
        }

       
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
      Mixer m = new Checkbox(matrix);
      ColorSet c = new ColorSet("test", new int[]{1,2,3});
      Visual v = new Visual(g,e,m,c);     

      for (IResize rsz: pcr.getAllResizers()) {
        BufferedImage bi = rsz.createImage(v.getBuffer(), matrix.getBufferXSize(), matrix.getBufferYSize());
        int[] b1 = rsz.getBuffer(bi, matrix.getDeviceXSize(), matrix.getDeviceYSize());
        int[] b2 = rsz.getBuffer(v.getBuffer(), matrix.getDeviceXSize(), matrix.getDeviceYSize(),
            matrix.getBufferXSize(), matrix.getBufferYSize());
        assertArrayEquals(b1, b2);
      }
     
    }
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

          for (int x=1; x<38; x++) {
              MatrixData matrix = new MatrixData(x,y);

              Generator g = new Fire(matrix);
              Effect e = new PassThru(matrix);
                Visual visual = new Visual(g, e, m, c);       
                   
              IFader fader = new Switch(matrix, 100);
              OutputMapping map = new OutputMapping(fader, 0);
             
                assertNotNull(matrix.getScreenBufferForDevice(visual, map));     
View Full Code Here

Examples of com.neophob.sematrix.core.glue.Visual

      Generator g = new PassThruGen(matrix);
      Effect e = new PassThru(matrix);
      Mixer m = new Checkbox(matrix);
      ColorSet c = new ColorSet("test", new int[]{1,2,3});
      Visual v = new Visual(g,e,m,c);     

      for (Mixer mix: pcm.getAllMixer()) {
        //System.out.println(mix);
        mix.getBuffer(v);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.