Package mgui.util

Class Colour3f

java.lang.Object
mgui.util.Colour
mgui.util.Colour3f
All Implemented Interfaces:
XMLObject

public class Colour3f
extends Colour
  • Constructor Details

    • Colour3f

      public Colour3f()
    • Colour3f

      public Colour3f​(float red, float green, float blue)
    • Colour3f

      public Colour3f​(java.awt.Color c)
  • Method Details

    • getDims

      public int getDims()
      Overrides:
      getDims in class Colour
    • getAlpha

      public float getAlpha()
      Overrides:
      getAlpha in class Colour
    • getBlue

      public float getBlue()
      Overrides:
      getBlue in class Colour
    • getGreen

      public float getGreen()
      Overrides:
      getGreen in class Colour
    • getRed

      public float getRed()
      Overrides:
      getRed in class Colour
    • setBlue

      public void setBlue​(float b)
      Overrides:
      setBlue in class Colour
    • setGreen

      public void setGreen​(float g)
      Overrides:
      setGreen in class Colour
    • setIntensity

      public void setIntensity​(int i)
      Overrides:
      setIntensity in class Colour
    • setRed

      public void setRed​(float r)
      Overrides:
      setRed in class Colour
    • getDim

      public float getDim​(int i)
      Overrides:
      getDim in class Colour
    • setDim

      public void setDim​(int i, float val)
      Overrides:
      setDim in class Colour
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • getXML

      public java.lang.String getXML​(int tab)
      Description copied from interface: XMLObject
      Returns this object's XML representation as a single string. NOTE: this is not feasible for larger objects and containers, thus may not be implemented for these objects. Use the XMLObject.writeXML(int,java.io.Writer,mgui.io.standard.xml.XMLOutputOptions,mgui.interfaces.ProgressUpdater) functions to write larger objects to file.
      Specified by:
      getXML in interface XMLObject
      Overrides:
      getXML in class Colour
      Parameters:
      tab - The number of tabs to place before the opening XML wrapper
      Returns:
    • getShortXML

      public java.lang.String getShortXML​(int tab)
      Description copied from interface: XMLObject
      Returns a short XML representation of this object.
      Specified by:
      getShortXML in interface XMLObject
      Overrides:
      getShortXML in class Colour
      Returns:
    • handleXMLElementStart

      public void handleXMLElementStart​(java.lang.String localName, org.xml.sax.Attributes attributes, XMLObject.XMLType type)
      Description copied from interface: XMLObject
      Handles the start of an XML element.
      Specified by:
      handleXMLElementStart in interface XMLObject
      Overrides:
      handleXMLElementStart in class Colour
      Parameters:
      localName - Local name of the element
      attributes - Set of element attributes
      type - The XMLType of this element
    • getColor4f

      public org.jogamp.vecmath.Color4f getColor4f()
      Overrides:
      getColor4f in class Colour
    • getColor3f

      public org.jogamp.vecmath.Color3f getColor3f()
      Overrides:
      getColor3f in class Colour
    • getLocalName

      public java.lang.String getLocalName()
      Description copied from interface: XMLObject
      Returns the local name associated with this XML object.
      Specified by:
      getLocalName in interface XMLObject
      Overrides:
      getLocalName in class Colour
      Returns:
    • getXMLInstance

      public static XMLObject getXMLInstance​(org.xml.sax.Attributes attributes)