geomerative
public class RMesh extends RGeomElem
Modifier and Type | Field and Description |
---|---|
RStrip[] |
strips
Array of RStrip objects holding the contours of the polygon.
|
int |
type |
Constructor and Description |
---|
RMesh()
Create a new empty mesh.
|
RMesh(RMesh m)
Copy a mesh.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(float x,
float y)
Add a new point to the current strip.
|
void |
addPoint(int indStrip,
float x,
float y)
Add a new point to the given strip.
|
void |
addPoint(int indStrip,
RPoint p)
Add a new point to the given strip.
|
void |
addPoint(RPoint p)
Add a new point to the current strip.
|
void |
addStrip() |
void |
addStrip(RStrip s)
Add a new strip.
|
boolean |
contains(RPoint p) |
int |
countStrips()
Use this method to count the number of strips in the mesh.
|
void |
draw(processing.core.PApplet g) |
void |
draw(processing.core.PGraphics g)
Use this method to draw the mesh.
|
RPoint[] |
getHandles()
Use this to get the vertices of the mesh.
|
RPoint[][] |
getHandlesInPaths() |
RPoint |
getPoint(float t) |
RPoint[] |
getPoints()
Use this to get the vertices of the mesh.
|
RPoint[][] |
getPointsInPaths() |
RPoint |
getTangent(float t) |
RPoint[] |
getTangents() |
RPoint[][] |
getTangentsInPaths() |
int |
getType()
Use this method to get the type of element this is.
|
void |
setCurrent(int indStrip)
Use this method to set the current strip to which append points.
|
RMesh |
toMesh() |
RPolygon |
toPolygon() |
RShape |
toShape() |
void |
transform(RMatrix m)
Use this method to transform the mesh.
|
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, print, 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, translate, translate
public int type
public RStrip[] strips
public RMesh()
public RMesh(RMesh m)
m
- the object of which to make a copypublic int countStrips()
public void addStrip(RStrip s)
s
- the strip to be addedpublic void addStrip()
public void setCurrent(int indStrip)
public void addPoint(RPoint p)
p
- the point to be addedpublic void addPoint(float x, float y)
x
- the x coordinate of the point to be addedy
- the y coordinate of the point to be addedpublic void addPoint(int indStrip, RPoint p)
indStrip
- the index of the strip to which the point will be addedp
- the point to be addedpublic void addPoint(int indStrip, float x, float y)
indStrip
- the index of the strip to which the point will be addedx
- the x coordinate of the point to be addedy
- the y coordinate of the point to be addedpublic void draw(processing.core.PGraphics g)
public RPoint[] getHandles()
getHandles
in class RGeomElem
public RPoint[] getPoints()
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 int getType()
public void transform(RMatrix m)
public RPolygon toPolygon() throws java.lang.RuntimeException
Geomerative by Ricard Marxer, http://www.ricardmarxer.com/geomerative/