|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OvusculeSnake2D
This interface encapsulates the number-crunching aspect of snakes.
OvusculeSnake2DKeeper
,
OvusculeSnake2DNode
Method Summary | |
---|---|
double |
energy()
The purpose of this method is to compute the energy of the snake. |
java.awt.geom.Point2D.Double[] |
getEnergyGradient()
The purpose of this method is to compute the gradient of the snake energy with respect to the snake-defining nodes. |
OvusculeSnake2DNode[] |
getNodes()
This method provides an accessor to the snake-defining nodes. |
OvusculeSnake2DScale[] |
getScales()
The purpose of this method is to detemine what to draw on screen, given the current configuration of nodes. |
void |
setNodes(OvusculeSnake2DNode[] node)
This method provides a mutator to the snake-defining nodes. |
Method Detail |
---|
double energy()
java.awt.geom.Point2D.Double[] getEnergyGradient()
OvusculeSnake2DKeeper.interactAndOtimize()
.
getNodes()
. If
null
is returned, the optimizer within the class
OvusculeSnake2DKeeper
will attempt to estimate the
gradient by a finite-difference approach.getNodes()
OvusculeSnake2DNode[] getNodes()
setNodes(ovusculeSnake2D.OvusculeSnake2DNode[])
OvusculeSnake2DScale[] getScales()
OvusculeSnake2DKeeper.interactAndOptimize()
. The origin
of coordinates lies at the top-left corner of the
display
parameter. Collectively, the array of scales
forms the skin of the snake.
OvusculeSnake2DScale
objects.
Straight lines will be drawn between the apices of each polygon, in
the specified color. It is not necessary to maintain a constant
number of polygons in the array, or a constant number of apices in a
given polygon.OvusculeSnake2DScale
void setNodes(OvusculeSnake2DNode[] node)
OvusculeSnake2DKeeper.interactAndOptimize()
.
node
- Array of subpixel node locations.getNodes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |