org.gwoptics.graphics.colourmap
Class ColourmapNode
java.lang.Object
org.gwoptics.graphics.colourmap.ColourmapNode
- All Implemented Interfaces:
- java.lang.Comparable<ColourmapNode>
public final class ColourmapNode
- extends java.lang.Object
- implements java.lang.Comparable<ColourmapNode>
ColourmapNode is a class that encapsulates the colour and location of a point, on a
colourmap. These nodes are then used to generate a gradient of colour between 2 locations.
Implements the Comparable interface to allow sorting of nodes into location order.
- Since:
- 0.1.1
- Author:
- Daniel Brown 12/6/09
Constructor Summary |
ColourmapNode()
|
ColourmapNode(float R,
float G,
float B,
float l)
Custom constructor that allows user specified RGB and location values. |
ColourmapNode(float Alpha,
float R,
float G,
float B,
float l)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
colour
public GWColour colour
location
public float location
ColourmapNode
public ColourmapNode()
ColourmapNode
public ColourmapNode(float R,
float G,
float B,
float l)
- Custom constructor that allows user specified RGB and location values.
- Parameters:
R
- Value between 0.0f and 1.0f relating to the red colour.G
- Value between 0.0f and 1.0f relating to the green colour.B
- Value between 0.0f and 1.0f relating to the blue colour.l
- Value between 0.0f and 1.0f relating to the location of the colour on the colourmap.
ColourmapNode
public ColourmapNode(float Alpha,
float R,
float G,
float B,
float l)
compareTo
public int compareTo(ColourmapNode o)
- Specified by:
compareTo
in interface java.lang.Comparable<ColourmapNode>
processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards