|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cycling74.max.MaxObject
utility.Visualizer
public class Visualizer
This class encapsulates a graphical animation that provides a visualization of a single particle moving around a space. The visualization relies on the client to dictate the position of the particle. The animation is driven by the client successively updating the particle's position.
Field Summary |
---|
Fields inherited from class com.cycling74.max.MaxObject |
---|
EMPTY_STRING_ARRAY, NO_INLETS, NO_OUTLETS |
Constructor Summary | |
---|---|
Visualizer(int horizontalDimension,
int verticalDimension)
|
Method Summary | |
---|---|
static java.awt.Color |
chooseColorFromSpectrum(float normalizedHueAngle)
Returns a color from the spectrum that spans from red to violet. |
void |
inlet(java.awt.Point p)
Specify the next position of the particle and redraw the canvas. |
void |
setColor(java.awt.Color c)
|
Methods inherited from class com.cycling74.max.MaxObject |
---|
error, gc, getAttr, getAttrAtomArray, getAttrBool, getAttrBoolArray, getAttrByte, getAttrByteArray, getAttrChar, getAttrCharArray, getAttrDouble, getAttrDoubleArray, getAttrFloat, getAttrFloatArray, getAttributeInfo, getAttrInt, getAttrIntArray, getAttrLongArray, getAttrShort, getAttrShortArray, getAttrString, getAttrStringArray, getCodeSourcePath, getContext, getErrorStream, getInfoIdx, getInletAssist, getInletType, getLongAttr, getMaxBox, getName, getNumInlets, getNumOutlets, getOutletAssist, getOutletType, getParentPatcher, getPostStream, ouch, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outletBang, outletBangHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, post, postCodePath, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setName, showException, showException, toString, viewsource, zap |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Visualizer(int horizontalDimension, int verticalDimension)
Method Detail |
---|
public void inlet(java.awt.Point p)
p
- the next position of the particle.public void setColor(java.awt.Color c)
public static java.awt.Color chooseColorFromSpectrum(float normalizedHueAngle)
normalizedHueAngle
- a float on the closed interval [0,1]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |