Examples of Pixel2D_24Bit


Examples of eas.math.geometry.Pixel2D_24Bit

      state.setField("VRGBR", sensedColor.getValue().getRed());
      state.setField("VRGBG", sensedColor.getValue().getGreen());
      state.setField("VRGBB", sensedColor.getValue().getBlue());
     
    //update RGB Sensor
    Pixel2D_24Bit ambientColor = this.getEnvironment().getProjectorPixelAt(this.getEnvironment().getAgentPosition(this.id()));
      state.setField("VRGBRB", ambientColor.getRed());
      state.setField("VRGBGB", ambientColor.getGreen());
      state.setField("VRGBBB", ambientColor.getBlue());
     
    //update line sensor values
    state.setField("VBLEFT", floorSensors[0].getLineValue());
    state.setField("VBMIDDLE", floorSensors[1].getLineValue());
    state.setField("VBRIGHT", floorSensors[2].getLineValue());
View Full Code Here

Examples of eas.math.geometry.Pixel2D_24Bit

          && posInImg.y > 0 && posInImg.y < img.getHeight()) {
       
        int[] rgb = new int[3];       
        img.getData().getPixel(Math.round((int) posInImg.x), (int) Math.round(posInImg.y), rgb);
       
        return new Pixel2D_24Bit(posInImg.x, posInImg.y, rgb);
      }
    }

    Color bg = this.getBackgroundColor();
    return new Pixel2D_24Bit((int) Math.round(posInImg.x),
        (int) Math.round(posInImg.y), new int[] { bg.getRed(),
            bg.getGreen(), bg.getBlue() });
  }
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.