|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgeomerative.RGeomElem
geomerative.RMesh
public class RMesh
RMesh is a reduced interface for creating, holding and drawing meshes. Meshes are a group of tiangle strips (RStrip).
| Field Summary | |
|---|---|
RStrip[] |
strips
Array of RStrip objects holding the contours of the polygon. |
int |
type
|
| Fields inherited from class geomerative.RGeomElem |
|---|
COMMAND, CONTOUR, GROUP, MESH, name, POLYGON, SHAPE, SUBSHAPE, TRISTRIP, UNKNOWN |
| Constructor Summary | |
|---|---|
RMesh()
Create a new empty mesh. |
|
RMesh(RMesh m)
Copy a mesh. |
|
| Method Summary | |
|---|---|
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. |
| 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, 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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int type
public RStrip[] strips
| Constructor Detail |
|---|
public RMesh()
public RMesh(RMesh m)
m - the object of which to make a copy| Method Detail |
|---|
public 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 added
public void addPoint(float x,
float y)
x - the x coordinate of the point to be addedy - the y coordinate of the point to be added
public void addPoint(int indStrip,
RPoint p)
indStrip - the index of the strip to which the point will be addedp - the point to be added
public 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)
draw in class RGeomElemg - PGraphics, the graphics object on which to draw the meshpublic void draw(processing.core.PApplet g)
draw in class RGeomElempublic 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 int getType()
getType in class RGeomElempublic void transform(RMatrix m)
transform in class RGeomElemm - RMatrix, the matrix of the affine transformation to apply to the meshpublic RMesh toMesh()
toMesh in class RGeomElem
public RPolygon toPolygon()
throws java.lang.RuntimeException
toPolygon in class RGeomElemjava.lang.RuntimeException
public RShape toShape()
throws java.lang.RuntimeException
toShape in class RGeomElemjava.lang.RuntimeException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||