org.gwoptics.graphics.colourmap
Interface IColourmap

All Known Implementing Classes:
CoolColourmap, EquationColourmap, FlipColourmap, GrayScaleColourmap, HotColourmap, RGBColourmap, WarmColourmap

public interface IColourmap

IColourmap interface provides several functions that are required for a colourmap to be used by an object. If you use a colourmap in your object it should be stored as an IColourmap if you want any variation of colourmap to be used.

While writing your own colourmap it should be noted there is already the EquationColourmap and RGBColourmap that might suit your needs. A custom colourmap should be written to be very efficient as it can be called upon many times while plotting graphs and such,

History

From 0.2.4 the IColourmap has been made more general so nodes are not required to generate maps, ie equations can be used instead.

Since:
0.1.1
Author:
Daniel Brown 12/6/09
See Also:
RGBColourmap, EquationColourmap

Method Summary
 void generateColourmap()
          This function needs to be called whenever a node is changed, added, or removed to update the colourmap.
 GWColour getColourAtLocation(float l)
          Gets a Colour object from the colourmap.
 int getIntAtLocation(float l)
          Gets an integer form of a Colour from the colourmap
 boolean isCentreAtZero()
          Should return true if 0 value for what the colourmap is displaying is represented by the colour at the point 0.5
 boolean isGenerated()
          Should return whether colourmap has been generated or not
 

Method Detail

getColourAtLocation

GWColour getColourAtLocation(float l)
Gets a Colour object from the colourmap.

Parameters:
l - location to get colour

getIntAtLocation

int getIntAtLocation(float l)
Gets an integer form of a Colour from the colourmap

Parameters:
l -

generateColourmap

void generateColourmap()
This function needs to be called whenever a node is changed, added, or removed to update the colourmap.


isCentreAtZero

boolean isCentreAtZero()
Should return true if 0 value for what the colourmap is displaying is represented by the colour at the point 0.5


isGenerated

boolean isGenerated()
Should return whether colourmap has been generated or not



processing library gwoptics by Daniel Brown and Andreas Freise. (c) 2009 onwards