|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgeomerative.RGeomElem
geomerative.RGroup
public class RGroup
RGroup is a holder for a group of geometric element that can be drawn and transformed, such as Shapes, Polygons or Meshes.
| Field Summary | |
|---|---|
RGeomElem[] |
elements
Array of RGeomElem objects holding the elements of the group. |
int |
type
|
| Fields inherited from class geomerative.RGeomElem |
|---|
COMMAND, CONTOUR, GROUP, MESH, name, POLYGON, SHAPE, SUBSHAPE, TRISTRIP, UNKNOWN |
| Constructor Summary | |
|---|---|
RGroup()
Use this method to create a new empty group. |
|
RGroup(RGroup grp)
Use this method to create a copy of a group. |
|
| Method Summary | |
|---|---|
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 elemnts in the current group. |
RPolygon |
toPolygon()
|
RGroup |
toPolygonGroup()
Use this method to get a new group whose elements are the corresponding Polygons of the elemnts 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 elemnts in the current group. |
| Methods inherited from class geomerative.RGeomElem |
|---|
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, translate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int type
public RGeomElem[] elements
| Constructor Detail |
|---|
public RGroup()
public RGroup(RGroup grp)
| Method Detail |
|---|
public RPoint getCentroid()
getCentroid in class RGeomElempublic int countElements()
public void print()
print in class RGeomElempublic void draw(processing.core.PGraphics g)
draw in class RGeomElemg - PGraphics, the graphics object on which to draw the grouppublic void draw(processing.core.PApplet a)
draw in class RGeomElempublic 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.RuntimeException
public RGroup toMeshGroup()
throws java.lang.RuntimeException
java.lang.RuntimeException
public RGroup toPolygonGroup()
throws java.lang.RuntimeException
java.lang.RuntimeException
public RGroup toShapeGroup()
throws java.lang.RuntimeException
java.lang.RuntimeException
public RMesh toMesh()
throws java.lang.RuntimeException
toMesh in class RGeomElemjava.lang.RuntimeException
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.RuntimeExceptionpublic RPoint[] getHandles()
getHandles in class RGeomElempublic RPoint getPoint(float t)
getPoint in class RGeomElempublic RPoint[] getPoints()
getPoints 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 RGeomElemp - the point for which to test containement..
public int getType()
getType in class RGeomElempublic 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 adapt
java.lang.RuntimeException
public 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()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||