geomerative
public class RGroup extends RGeomElem
| Modifier and Type | Field and Description |
|---|---|
RGeomElem[] |
elements
Array of RGeomElem objects holding the elements of the group.
|
int |
type |
| Constructor and Description |
|---|
RGroup()
Use this method to create a new empty group.
|
RGroup(RGroup grp)
Use this method to create a copy of a group.
|
| Modifier and Type | Method and Description |
|---|---|
void |
adapt(RGroup grp) |
void |
adapt(RGroup grp,
float wght,
float lngthOffset)
Use this method to adapt a group of of figures to a group.
|
void |
adapt(RShape shp) |
void |
adapt(RShape shp,
float wght,
float lngthOffset) |
void |
addElement(RGeomElem elem)
Use this method to add a new element.
|
void |
addGroup(RGroup grupo)
Use this method to add a new element.
|
boolean |
contains(RPoint p)
Use this to return a specific tangent on the curve.
|
int |
countElements()
Use this method to count the number of elements in the group.
|
void |
draw(processing.core.PApplet a) |
void |
draw(processing.core.PGraphics g)
Use this method to draw the group.
|
RPoint |
getCentroid()
Use this method to get the centroid of the element.
|
RPoint[] |
getHandles()
Use this to return the points of the group.
|
RPoint[][] |
getHandlesInPaths() |
RPoint |
getPoint(float t) |
RPoint[] |
getPoints()
Use this to return the points of the group.
|
RPoint[][] |
getPointsInPaths()
Use this to return the points of each path of the group.
|
RPoint |
getTangent(float t) |
RPoint[] |
getTangents()
Use this to return the points of the group.
|
RPoint[][] |
getTangentsInPaths() |
int |
getType()
Use this method to get the type of element this is.
|
void |
insertHandleInPaths(float t)
Use this to insert a split point into each command of the group.
|
void |
polygonize() |
void |
print() |
void |
removeElement(int i)
Use this method to remove an element.
|
RGroup[] |
split(float t) |
RGroup[] |
splitPaths(float t) |
RMesh |
toMesh() |
RGroup |
toMeshGroup()
Use this method to get a new group whose elements are the corresponding meshes of the elements in the current group.
|
RPolygon |
toPolygon() |
RGroup |
toPolygonGroup()
Use this method to get a new group whose elements are the corresponding polygons of the elements in the current group.
|
RShape |
toShape() |
RGroup |
toShapeGroup()
Use this method to get a new group whose elements are all the corresponding shapes of the elements in the current group.
|
centerIn, centerIn, centerIn, contains, contains, containsBounds, containsHandles, draw, getArea, getBottomLeft, getBottomRight, getBounds, getBoundsPoints, getCenter, getCenteringTransf, getCenteringTransf, getCenteringTransf, 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, translatepublic int type
public RGeomElem[] elements
public RGroup()
public RGroup(RGroup grp)
public RPoint getCentroid()
getCentroid in class RGeomElempublic int countElements()
public void draw(processing.core.PGraphics g)
public void addElement(RGeomElem elem)
elem - RGeomElem, any kind of RGeomElem to add. It accepts the classes RShape, RPolygon and RMesh.public void addGroup(RGroup grupo)
grupo - RGroup, A group of elements to add to this group.public void removeElement(int i)
throws java.lang.RuntimeException
i - int, the index of the element to remove from the group.java.lang.RuntimeExceptionpublic RGroup toMeshGroup() throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic RGroup toPolygonGroup() throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic RGroup toShapeGroup() throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic RMesh toMesh() throws java.lang.RuntimeException
public RPolygon toPolygon() throws java.lang.RuntimeException
public RShape toShape() throws java.lang.RuntimeException
public RPoint[] getHandles()
getHandles in class RGeomElempublic RPoint[] getPoints()
public 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)
public int getType()
public RGroup[] split(float t)
public RGroup[] splitPaths(float t)
public void insertHandleInPaths(float t)
t - float, the parameter of advancement on the curve. t must have values between 0 and 1.public void adapt(RGroup grp, float wght, float lngthOffset) throws java.lang.RuntimeException
grp - the path to which to adaptjava.lang.RuntimeExceptionpublic void adapt(RGroup grp) throws java.lang.RuntimeException
java.lang.RuntimeExceptionpublic void adapt(RShape shp)
public void adapt(RShape shp, float wght, float lngthOffset)
public void polygonize()
Geomerative by Ricard Marxer, http://www.ricardmarxer.com/geomerative/