|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.paulhertz.aifile.BezVertex
public class BezVertex
Provides storage for a cubic Bezier curves's control points and terminal anchor point.
Field Summary | |
---|---|
static int |
segmentType
path segemnt type |
Constructor Summary | |
---|---|
BezVertex()
initializes all points to 0,0 |
|
BezVertex(float cx1,
float cy1,
float cx2,
float cy2,
float x,
float y)
|
Method Summary | |
---|---|
BezVertex |
clone()
|
float[] |
coords()
|
float |
cx1()
|
float |
cx2()
|
float |
cy1()
|
float |
cy2()
|
void |
draw(PApplet parent)
Draws a path to the display. |
void |
draw(PGraphics pg)
Draws a path to an offscreen buffer. |
int |
segmentType()
|
void |
setCx1(float newCx1)
|
void |
setCx2(float newCx2)
|
void |
setCy1(float newCy1)
|
void |
setCy2(float newCy2)
|
void |
setX(float newX)
|
void |
setY(float newY)
|
void |
write(PrintWriter output)
Writes a path segment to file. |
float |
x()
|
float |
y()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int segmentType
Constructor Detail |
---|
public BezVertex(float cx1, float cy1, float cx2, float cy2, float x, float y)
cx1
- x-coordinate of first control pointcy1
- y-coordinate of first control pointcx2
- x-coordinate of second control pointcy2
- y-coordinate of second control pointx
- x-coordinate of terminal anchor pointy
- y-coordinate of terminal anchor pointpublic BezVertex()
Method Detail |
---|
public float cx1()
public void setCx1(float newCx1)
public float cy1()
public void setCy1(float newCy1)
public float cx2()
public void setCx2(float newCx2)
public float cy2()
public void setCy2(float newCy2)
public float x()
x
in interface Vertex2DINF
public void setX(float newX)
public float y()
y
in interface Vertex2DINF
public void setY(float newY)
public int segmentType()
segmentType
in interface Vertex2DINF
public float[] coords()
coords
in interface Vertex2DINF
public BezVertex clone()
clone
in interface Vertex2DINF
clone
in class Object
public void draw(PApplet parent)
Vertex2DINF
draw
in interface Vertex2DINF
parent
- the PApplet that handles drawingpublic void draw(PGraphics pg)
Vertex2DINF
draw
in interface Vertex2DINF
pg
- a PGraphics instancepublic void write(PrintWriter output)
Vertex2DINF
write
in interface Vertex2DINF
output
- a PrintWriter for output to file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |