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

## simogl.material
Class Material

    java.lang.Object
      simogl.material.Material

    public class Material

extends java.lang.Object

This class is used to represent materials

Author:
  Frank Bruns

Constructor Summary
`Material(float red, float green, float blue, float alpha)` Creates a new Material object with the specified color values

Method Summary
`float[]` | `getMaterialColorAmbDiff()` Returns the materials ambient and diffuse RGBA color, which have the same values
`float[]` | `getMaterialColorEmission()` Returns the emission material RGBA color
`float[]` | `getMaterialColorSpecular()` Returns the material's specular RGBA color
`float` | `getShininess()` Returns the material's shininess value
`void` | `setMaterialColorAmbDiff(float red, float green, float blue, float alpha)` Sets the material's ambient and diffuse color to the specified parameters.
`void` | `setMaterialColorEmission(float red, float green, float blue, float alpha)` Sets the material's emission RGBA color
`void` | `setMaterialColorSpecular(float red, float green, float blue, float alpha)` Sets the material's specular RGBA color
`void` | `setShininess(float value)` Sets the material's shininess.

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

Constructor Detail

### Material

    public Material(float red,
                    float green,
                    float blue,
                    float alpha)

  Creates a new Material object with the specified color values

  Parameters:
    `red` - amount of red
    `green` - amount of green
    `blue` - amount of blue
    `alpha` - alpha-value

Method Detail

### getMaterialColorAmbDiff

    public float[] getMaterialColorAmbDiff()

  Returns the materials ambient and diffuse RGBA color, which have the same values

  Returns:
    ambient and diffuse material color

### setMaterialColorAmbDiff

    public void setMaterialColorAmbDiff(float red,
                                        float green,
                                        float blue,
                                        float alpha)

  Sets the material's ambient and diffuse color to the specified parameters. Both the ambient and diffuse material get the same color, because this is the usual behavior for real world object.

  Parameters:
    `red` - amount of red
    `green` - amount of green
    `blue` - amount of blue
    `alpha` - alpha-value

### getMaterialColorEmission

    public float[] getMaterialColorEmission()

  Returns the emission material RGBA color

  Returns:
    emission material color

### setMaterialColorEmission

    public void setMaterialColorEmission(float red,
                                         float green,
                                         float blue,
                                         float alpha)

  Sets the material's emission RGBA color

  Parameters:
    `red` - amount of red
    `green` - amount of green
    `blue` - amount of blue
    `alpha` - alpha-value

### getMaterialColorSpecular

    public float[] getMaterialColorSpecular()

  Returns the material's specular RGBA color

  Returns:
    material's specular color

### setMaterialColorSpecular

    public void setMaterialColorSpecular(float red,
                                         float green,
                                         float blue,
                                         float alpha)

  Sets the material's specular RGBA color

  Parameters:
    `red` - amount of red
    `green` - amount of green
    `blue` - amount of blue
    `alpha` - alpha-value

### getShininess

    public float getShininess()

  Returns the material's shininess value

  Returns:
    shininess value

### setShininess

    public void setShininess(float value)

  Sets the material's shininess.

  Parameters:
    `value` - shininess factor

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