Package com.neophob.sematrix.core.glue

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


      IFader f = new Switch(matrix, 50);
      List<OutputMapping> ioMapping = new ArrayList<OutputMapping>();
     
      //testcase#1: each output has a visual assigned
    for (int n=0; n<panels; n++) {
      ioMapping.add(new OutputMapping(f, n));     
    }
      LayoutModel lom0 = l.getDataForScreen(0, ioMapping);
      assertEquals(0, lom0.getOfsX());
      assertEquals(0, lom0.getOfsY());
      assertEquals(1, lom0.getSameFxOnX());
View Full Code Here


   * @return the int
   */
  private int howManyScreensShareThisFxOnTheXAxis(int fxInput, List<OutputMapping> ioMapping) {
    int max=0;
    int min=MAXVAL;
    OutputMapping o;

    //we only have 2 rows
    for (int y=0; y<YSIZE; y++) { 
      for (int x=0; x<row1Size; x++) {
        o = ioMapping.get(row1Size*y+x);
        if (o.getVisualId()==fxInput) {
          if (x<min) {
            min=x;
          }
          //save the maximal x position
          //if there are multiple fx'es, store the max position
View Full Code Here

   * @return the int
   */
  private int howManyScreensShareThisFxOnTheYAxis(int fxInput, List<OutputMapping> ioMapping) {
    int max=0;
    int min=MAXVAL;
    OutputMapping o;

    //we only have 2 rows
    for (int x=0; x<row1Size; x++) {
      for (int y=0; y<YSIZE; y++) {
        o = ioMapping.get(row1Size*y+x);

        if (o.getVisualId()==fxInput) {
          if (y<min) {
            min=y;
          }
          //save the maximal x position
          //if there are multiple fx'es, store the max position
View Full Code Here

    // O = Visual 1
    // X = Visual 2
    //
    int xOfs = ret;
    for (int i=0; i<ret; i++) {
      OutputMapping o1 = ioMapping.get(0+i);
      OutputMapping o2 = ioMapping.get(row1Size+i);
      if ((o1.getVisualId()!=visualId) && (o2.getVisualId()!=visualId)) {       
        if (xOfs>0) {
          xOfs--;
        }
      }     
    }
View Full Code Here

              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));     
                assertNotNull(matrix.getScreenBufferForDevice(visual, lmDefault, map, output));
                assertNotNull(matrix.getScreenBufferForDevice(visual, lmBox1, map, output));
                assertNotNull(matrix.getScreenBufferForDevice(visual, lmBox2, map, output));
View Full Code Here

     
      MatrixData matrix = new MatrixData(8, 8);
      IFader fader = new Switch(matrix, 50);
      List<OutputMapping> ioMapping = new ArrayList<OutputMapping>();
    for (int n=0; n<panels+panels; n++) {
      ioMapping.add(new OutputMapping(fader, n));     
    }

    //testcase#1: each output has a visual assigned
      LayoutModel lom0 = l.getDataForScreen(0, ioMapping);
      assertEquals(0, lom0.getOfsX());
      assertEquals(0, lom0.getOfsY());
      assertEquals(1, lom0.getSameFxOnX());
      assertEquals(1, lom0.getSameFxOnY());
      assertEquals(0, lom0.getVisualId());
      assertEquals(true, lom0.screenDoesNotNeedStretching());
     
    //testcase#2: visual 0 is displayed on ALL outputs     
      ioMapping.clear();
    for (int n=0; n<panels+panels; n++) {
      ioMapping.add(new OutputMapping(fader, 0));     
    }
    lom0 = l.getDataForScreen(0, ioMapping);
      assertEquals(0, lom0.getOfsX());
      assertEquals(0, lom0.getOfsY());
      assertEquals(panels, lom0.getSameFxOnX());
View Full Code Here

    int[] buffer;
    Visual v;
   
    for (int screen = 0; screen < this.collector.getNrOfScreens(); screen++) {
      LayoutModel lm = this.layout.getDataForScreen(screen, Collector.getInstance().getAllOutputMappings());
      OutputMapping map = this.collector.getOutputMappings(screen);
      v = this.collector.getVisual(lm.getVisualId());
     
      if (lm.screenDoesNotNeedStretching()) {
        buffer = this.matrixData.getScreenBufferForDevice(v, map);
      } else {
View Full Code Here

TOP

Related Classes of com.neophob.sematrix.core.glue.OutputMapping

Copyright © 2018 www.massapicom. 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.