|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgeomerative.RGeomElem
geomerative.RContour
public class RContour
RContour is a reduced interface for creating, holding and drawing contours. Contours are ordered lists of points (RPoint) which define the outlines of polygons. Contours can be self-intersecting.
| Field Summary | |
|---|---|
RPoint[] |
points
Array of RPoint objects holding the points of the contour. |
int |
type
|
| Fields inherited from class geomerative.RGeomElem |
|---|
COMMAND, CONTOUR, GROUP, MESH, name, POLYGON, SHAPE, SUBSHAPE, TRISTRIP, UNKNOWN |
| Constructor Summary | |
|---|---|
RContour()
|
|
RContour(RContour c)
|
|
RContour(RPoint[] contourpoints)
Create a countour given an array of points. |
|
| Method Summary | |
|---|---|
void |
addClose()
|
void |
addPoint(float x,
float y)
|
void |
addPoint(RPoint p)
Use this method to add new points to the contour. |
void |
addPoints(java.util.List morePoints)
Efficiently add a list of points to the contour. |
void |
addPoints(RPoint[] morePoints)
Efficiently add an array of points to the contour. |
boolean |
contains(RPoint p)
|
int |
countPoints()
Use this method to count the number of points in the contour. |
void |
draw(processing.core.PApplet g)
|
void |
draw(processing.core.PGraphics g)
Use this method to draw the contour. |
RPoint[] |
getHandles()
Use this to return the points of the contour. |
RPoint[][] |
getHandlesInPaths()
|
RPoint |
getPoint(float t)
|
RPoint[] |
getPoints()
Use this to return the points of the contour. |
RPoint[][] |
getPointsInPaths()
|
RPoint |
getTangent(float t)
|
RPoint[] |
getTangents()
|
RPoint[][] |
getTangentsInPaths()
|
int |
getType()
Use this method to get the type of element this is. |
boolean |
isHole()
Use this method to know if the contour is a hole. |
void |
print()
|
RMesh |
toMesh()
|
RPolygon |
toPolygon()
|
RShape |
toShape()
|
| Methods inherited from class geomerative.RGeomElem |
|---|
centerIn, centerIn, centerIn, contains, contains, containsBounds, containsHandles, draw, getArea, getBottomLeft, getBottomRight, getBounds, getBoundsPoints, getCenter, getCenteringTransf, getCenteringTransf, getCenteringTransf, getCentroid, getCurveLength, getCurveLengths, getHeight, getOrigHeight, getOrigWidth, getStyle, getTopLeft, getTopRight, getWidth, getX, getY, intersects, intersects, intersectsBounds, intersectsHandles, isIn, isIn, rotate, rotate, rotate, scale, scale, scale, scale, scale, scale, setAlpha, setAlpha, setAlpha, setFill, setFill, setFill, setFillAlpha, setFillAlpha, setName, setStroke, setStroke, setStroke, setStrokeAlpha, setStrokeAlpha, setStrokeCap, setStrokeJoin, setStrokeWeight, setStrokeWeight, setStyle, shear, skewX, skewY, transform, transform, transform, translate, translate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int type
public RPoint[] points
| Constructor Detail |
|---|
public RContour(RPoint[] contourpoints)
contourpoints - the points of the new contourpublic RContour()
public RContour(RContour c)
| Method Detail |
|---|
public int countPoints()
public void draw(processing.core.PGraphics g)
draw in class RGeomElemg - PGraphics, the graphics object on which to draw the meshpublic void draw(processing.core.PApplet g)
draw in class RGeomElempublic void addPoint(RPoint p)
public void addPoint(float x,
float y)
public void addPoints(RPoint[] morePoints)
public void addPoints(java.util.List morePoints)
public RPoint[] getHandles()
getHandles in class RGeomElempublic RPoint[] getPoints()
getPoints in class RGeomElempublic RPoint getPoint(float t)
getPoint in class RGeomElempublic RPoint getTangent(float t)
getTangent in class RGeomElempublic RPoint[] getTangents()
getTangents in class RGeomElempublic RPoint[][] getPointsInPaths()
getPointsInPaths in class RGeomElempublic RPoint[][] getHandlesInPaths()
getHandlesInPaths in class RGeomElempublic RPoint[][] getTangentsInPaths()
getTangentsInPaths in class RGeomElempublic boolean contains(RPoint p)
contains in class RGeomElempublic boolean isHole()
public void print()
print in class RGeomElempublic void addClose()
public RPolygon toPolygon()
toPolygon in class RGeomElem
public RShape toShape()
throws java.lang.RuntimeException
toShape in class RGeomElemjava.lang.RuntimeExceptionpublic RMesh toMesh()
toMesh in class RGeomElempublic int getType()
getType in class RGeomElem
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||