Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.cult3d.world
Class RGB

    java.lang.Object
      |
      +--com.cult3d.world.RGB

public class RGB
extends java.lang.Object

This class provides a representation of a RGB color.

Since:
  Cult3D 4.2

Field Summary
`float` | `B` The B component of the RGB color.
`float` | `G` The G component of the RGB color.
`float` | `R` The R component of the RGB color.

Constructor Summary
`RGB()` Constructs a RGB object and initializes it to the color black (R=0, B=0, G=0).
`RGB(java.awt.Color color)` Constructs a RGB object and initializes it to match the color of the given Color object.
`RGB(float r, float g, float b)` Constructs a RGB object and initializes it to the RGB color given as arguments.

Method Summary
`java.lang.String` | `getInfo()` This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.
`java.lang.String` | `toString()` Returns a string representation of the values of this object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### R

    public float R

  The R component of the RGB color.
  Since:
    Cult3D 4.2

### G

    public float G

  The G component of the RGB color.
  Since:
    Cult3D 4.2

### B

    public float B

  The B component of the RGB color.
  Since:
    Cult3D 4.2

Constructor Detail

### RGB

    public RGB()

  Constructs a RGB object and initializes it to the color black (R=0, B=0, G=0).
  Since:
    Cult3D 4.2

### RGB

    public RGB(float r,
               float g,
               float b)

  Constructs a RGB object and initializes it to the RGB color given as arguments.
  Parameters:
    `r` - The R component of the RGB color.
    `g` - The G component of the RGB color.
    `b` - The B component of the RGB color.
  Since:
    Cult3D 4.2

### RGB

    public RGB(java.awt.Color color)

  Constructs a RGB object and initializes it to match the color of the given Color object.
  Parameters:
    `color` - The java.awt.Color object which color will be copied.
  Since:
    Cult3D 4.2

Method Detail

### getInfo

    public java.lang.String getInfo()

  This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

  Returns:
    A string representing this object.
  Since:
    Cult3D 5.3

### toString

    public java.lang.String toString()

  Returns a string representation of the values of this object.

  This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations and versions of Cult3D.

  Overrides:
    toString in class java.lang.Object
  Returns:
    A string representing this object.

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD