Package ca.eandb.jmist.framework.color

Examples of ca.eandb.jmist.framework.color.RGB.b()


   */
  @Override
  public void modify(ShadingContext context) {
    Basis3 basis = context.getBasis();
    RGB c = painter.getColor(context, WAVELENGTH_PACKET).toRGB();
    Vector3 n = Vector3.unit(c.r() - 0.5, c.g() - 0.5, c.b() - 0.5);
    Vector3 u = basis.u();
    Vector3 v = basis.v();

    basis = Basis3.fromWUV(n, u, v);
    context.setShadingBasis(basis);
View Full Code Here


   */
  @Override
  public void modify(ShadingContext context) {
    Basis3 basis = context.getShadingBasis();
    RGB c = painter.getColor(context, WAVELENGTH_PACKET).toRGB();
    Vector3 n = basis.toStandard(c.r() - 0.5, 0.5 - c.g(), c.b() - 0.5).unit();
    Vector3 u = basis.u();
    Vector3 v = basis.v();

    basis = Basis3.fromWUV(n, u, v);
    context.setShadingBasis(basis);
View Full Code Here

   * @see ca.eandb.jmist.framework.color.ColorModel#fromXYZ(double, double, double)
   */
  @Override
  public Spectrum fromXYZ(double x, double y, double z) {
    RGB rgb = ColorUtil.convertXYZ2RGB(x, y, z);
    return fromRGB(rgb.r(), rgb.g(), rgb.b());
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.ColorModel#getBlack()
   */
 
View Full Code Here

   */
  @Override
  public RGB visualize(Color color) {
    RGB rgb = inner.visualize(color);
    if (highlightNegativeCheckBox.isSelected()
        && (rgb.r() < 0.0 || rgb.g() < 0.0 || rgb.b() < 0.0)) {
      return negative;
    } else if (highlightUnderCheckBox.isSelected()
        && (rgb.r() < EPSILON && rgb.g() < EPSILON && rgb.b() < EPSILON)) {
      return underexposed;
    } else if (highlightOverCheckBox.isSelected()
View Full Code Here

    RGB rgb = inner.visualize(color);
    if (highlightNegativeCheckBox.isSelected()
        && (rgb.r() < 0.0 || rgb.g() < 0.0 || rgb.b() < 0.0)) {
      return negative;
    } else if (highlightUnderCheckBox.isSelected()
        && (rgb.r() < EPSILON && rgb.g() < EPSILON && rgb.b() < EPSILON)) {
      return underexposed;
    } else if (highlightOverCheckBox.isSelected()
        && (rgb.r() >= 1.0 - EPSILON && rgb.g() >= 1.0 - EPSILON && rgb
            .b() >= 1.0 - EPSILON)) {
      return overexposed;
View Full Code Here

      return negative;
    } else if (highlightUnderCheckBox.isSelected()
        && (rgb.r() < EPSILON && rgb.g() < EPSILON && rgb.b() < EPSILON)) {
      return underexposed;
    } else if (highlightOverCheckBox.isSelected()
        && (rgb.r() >= 1.0 - EPSILON && rgb.g() >= 1.0 - EPSILON && rgb
            .b() >= 1.0 - EPSILON)) {
      return overexposed;
    }
    return rgb;
  }
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.