|
||||||||
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, height, MESH, name, POLYGON, SHAPE, SUBSHAPE, TRISTRIP, UNKNOWN, width |
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 RGeomElem
g
- PGraphics, the graphics object on which to draw the meshpublic void draw(processing.core.PApplet g)
draw
in class RGeomElem
public 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 RGeomElem
public RPoint[] getPoints()
getPoints
in class RGeomElem
public RPoint getPoint(float t)
getPoint
in class RGeomElem
public RPoint getTangent(float t)
getTangent
in class RGeomElem
public RPoint[] getTangents()
getTangents
in class RGeomElem
public RPoint[][] getPointsInPaths()
getPointsInPaths
in class RGeomElem
public RPoint[][] getHandlesInPaths()
getHandlesInPaths
in class RGeomElem
public RPoint[][] getTangentsInPaths()
getTangentsInPaths
in class RGeomElem
public boolean contains(RPoint p)
contains
in class RGeomElem
public boolean isHole()
public void print()
print
in class RGeomElem
public void addClose()
public RPolygon toPolygon()
toPolygon
in class RGeomElem
public RShape toShape() throws java.lang.RuntimeException
toShape
in class RGeomElem
java.lang.RuntimeException
public RMesh toMesh()
toMesh
in class RGeomElem
public int getType()
getType
in class RGeomElem
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |