HE_Mesh
5.1.0
|
Public Member Functions | |
RGroup () | |
RGroup (RGroup grp) | |
void | print () |
void | draw (PGraphics g) |
void | draw (PApplet a) |
RMesh | toMesh () throws RuntimeException |
RPolygon | toPolygon () throws RuntimeException |
RShape | toShape () throws RuntimeException |
RPoint[] | getHandles () |
RPoint | getPoint (float t) |
RPoint[] | getPoints () |
RPoint | getTangent (float t) |
RPoint[] | getTangents () |
RPoint[][] | getPointsInPaths () |
RPoint[][] | getHandlesInPaths () |
RPoint[][] | getTangentsInPaths () |
boolean | contains (RPoint p) |
int | getType () |
RGroup[] | split (float t) |
RGroup[] | splitPaths (float t) |
void | insertHandleInPaths (float t) |
void | adapt (RGroup grp, float wght, float lngthOffset) throws RuntimeException |
void | adapt (RGroup grp) throws RuntimeException |
void | adapt (RShape shp) |
void | adapt (RShape shp, float wght, float lngthOffset) |
void | polygonize () |
![]() | |
abstract void | draw (PGraphics g) |
abstract void | draw (PApplet g) |
void | draw () |
abstract RPoint | getPoint (float t) |
abstract RPoint | getTangent (float t) |
abstract RPoint[] | getHandles () |
abstract RPoint[] | getPoints () |
abstract RPoint[] | getTangents () |
abstract RPoint[][] | getHandlesInPaths () |
abstract RPoint[][] | getPointsInPaths () |
abstract RPoint[][] | getTangentsInPaths () |
abstract boolean | contains (RPoint p) |
abstract int | getType () |
abstract RShape | toShape () |
void | print () |
void | setFill (boolean _fill) |
void | setFill (int _fillColor) |
void | setFill (String str) |
void | setStroke (boolean _stroke) |
void | setStroke (int _strokeColor) |
void | setStroke (String str) |
void | setStrokeWeight (float value) |
void | setStrokeWeight (String str) |
void | setStrokeCap (String str) |
void | setStrokeJoin (String str) |
void | setStrokeAlpha (int opacity) |
void | setStrokeAlpha (String str) |
void | setFillAlpha (int opacity) |
void | setFillAlpha (String str) |
void | setAlpha (float opacity) |
void | setAlpha (int opacity) |
void | setAlpha (String str) |
RStyle | getStyle () |
void | setStyle (RStyle s) |
void | setName (String str) |
float[] | getCurveLengths () |
float | getCurveLength () |
RPolygon | toPolygon () |
RMesh | toMesh () |
void | transform (RMatrix m) |
void | transform (float x, float y, float w, float h) |
boolean | isIn (PGraphics g) |
boolean | isIn (PApplet g) |
RMatrix | getCenteringTransf (PGraphics g) throws RuntimeException |
RMatrix | getCenteringTransf (PGraphics g, float margin) throws RuntimeException |
void | centerIn (PGraphics g) |
void | centerIn (PGraphics g, float margin) |
void | centerIn (PGraphics g, float margin, float sclDamping, float trnsDamping) throws RuntimeException |
void | rotate (float angle) |
void | scale (float sx, float sy) |
void | scale (float s) |
Public Attributes | |
int | type = RGeomElem.GROUP |
![]() | |
float | width |
float | height |
String | name = "" |
Protected Member Functions | |
void | calculateCurveLengths () |
![]() | |
void | saveContext (PGraphics g) |
void | saveContext (PApplet p) |
void | saveContext () |
void | restoreContext (PGraphics g) |
void | restoreContext (PApplet p) |
void | restoreContext () |
void | setContext (PGraphics g) |
void | setContext (PApplet p) |
void | setContext () |
void | setStyle (RGeomElem p) |
void | setStyle (String styleString) |
void | calculateCurveLengths () |
void | updateOrigParams () |
Private Member Functions | |
float[] | indAndAdvAt (float t) |
void | append (RGeomElem elem) |
void | extract (int i) throws RuntimeException |
Related Functions | |
(Note that these are not member functions.) | |
RGeomElem[] | elements |
RPoint | getCentroid () |
int | countElements () |
void | addElement (RGeomElem elem) |
void | addGroup (RGroup grupo) |
void | removeElement (int i) throws RuntimeException |
RGroup | toMeshGroup () throws RuntimeException |
RGroup | toPolygonGroup () throws RuntimeException |
RGroup | toShapeGroup () throws RuntimeException |
![]() | |
boolean | contains (RGeomElem shp) |
boolean | containsBounds (RGeomElem shp) |
boolean | containsHandles (RGeomElem shp) |
boolean | contains (RPoint[] ps) |
boolean | intersects (RGeomElem shp) |
boolean | intersectsBounds (RGeomElem shp) |
boolean | intersectsHandles (RGeomElem shp) |
boolean | intersects (RPoint[] ps) |
void | transform (float x, float y, float w, float h, boolean keepAspectRatio) |
RRectangle | getBounds () |
RPoint[] | getBoundsPoints () |
RPoint | getTopLeft () |
RPoint | getTopRight () |
RPoint | getBottomLeft () |
RPoint | getBottomRight () |
float | getX () |
float | getY () |
float | getOrigHeight () |
float | getOrigWidth () |
float | getWidth () |
float | getHeight () |
RPoint | getCenter () |
RPoint | getCentroid () |
float | getArea () |
RMatrix | getCenteringTransf (PGraphics g, float margin, float sclDamping, float trnsDamping) throws RuntimeException |
void | translate (float tx, float ty) |
void | translate (RPoint t) |
void | rotate (float angle, float vx, float vy) |
void | rotate (float angle, RPoint v) |
void | scale (float sx, float sy, RPoint p) |
void | scale (float sx, float sy, float x, float y) |
void | scale (float s, RPoint p) |
void | scale (float s, float x, float y) |
void | skewX (float angle) |
void | skewY (float angle) |
void | shear (float shx, float shy) |
Additional Inherited Members | |
![]() | |
static final int | SHAPE = 0 |
static final int | SUBSHAPE = 1 |
static final int | COMMAND = 2 |
static final int | POLYGON = 3 |
static final int | CONTOUR = 4 |
static final int | MESH = 5 |
static final int | TRISTRIP = 6 |
static final int | GROUP = 7 |
static final int | UNKNOWN = 8 |
![]() | |
float[] | lenCurves |
float | lenCurve = -1F |
RStyle | style = new RStyle() |
RGroup is a holder for a group of geometric elements that can be drawn and transformed, such as shapes, polygons or meshes. geometry
geomerative.RGroup.RGroup | ( | ) |
Use this method to create a new empty group. RGroup
void geomerative.RGroup.adapt | ( | RGroup | grp, |
float | wght, | ||
float | lngthOffset | ||
) | throws RuntimeException |
Use this method to adapt a group of of figures to a group. RGroup_adapt
grp | the path to which to adapt |
void geomerative.RGroup.adapt | ( | RGroup | grp | ) | throws RuntimeException |
void geomerative.RGroup.adapt | ( | RShape | shp | ) |
void geomerative.RGroup.adapt | ( | RShape | shp, |
float | wght, | ||
float | lngthOffset | ||
) |
|
private |
|
protected |
boolean geomerative.RGroup.contains | ( | RPoint | p | ) |
Use this to return a specific tangent on the curve. It returns true if the point passed as a parameter is inside the group.
p | the point for which to test containment.. |
void geomerative.RGroup.draw | ( | PGraphics | g | ) |
Use this method to draw the group. This will draw each element at a time, without worrying about intersections or holes. This is the main difference between having a shape with multiple paths and having a group with multiple shapes. RGroup_draw
g | PGraphics, the graphics object on which to draw the group |
void geomerative.RGroup.draw | ( | PApplet | a | ) |
|
private |
RPoint [] geomerative.RGroup.getHandles | ( | ) |
RPoint [][] geomerative.RGroup.getHandlesInPaths | ( | ) |
RPoint geomerative.RGroup.getPoint | ( | float | t | ) |
RPoint [] geomerative.RGroup.getPoints | ( | ) |
RPoint [][] geomerative.RGroup.getPointsInPaths | ( | ) |
RPoint geomerative.RGroup.getTangent | ( | float | t | ) |
RPoint [] geomerative.RGroup.getTangents | ( | ) |
RPoint [][] geomerative.RGroup.getTangentsInPaths | ( | ) |
int geomerative.RGroup.getType | ( | ) |
Use this method to get the type of element this is. RPolygon_getType
|
private |
void geomerative.RGroup.insertHandleInPaths | ( | float | t | ) |
Use this to insert a split point into each command of the group. insertHandleInPaths
t | float, the parameter of advancement on the curve. t must have values between 0 and 1. |
void geomerative.RGroup.polygonize | ( | ) |
void geomerative.RGroup.print | ( | ) |
RGroup [] geomerative.RGroup.split | ( | float | t | ) |
RGroup [] geomerative.RGroup.splitPaths | ( | float | t | ) |
RMesh geomerative.RGroup.toMesh | ( | ) | throws RuntimeException |
RPolygon geomerative.RGroup.toPolygon | ( | ) | throws RuntimeException |
RShape geomerative.RGroup.toShape | ( | ) | throws RuntimeException |
|
related |
|
related |
Use this method to add a new element. RGroup_addGroup
grupo | RGroup, A group of elements to add to this group. ( ) |
|
related |
Use this method to count the number of elements in the group. RGroup_countElements
|
related |
Array of RGeomElem objects holding the elements of the group. When accessing theses elements we must cast them to their class in order to get all the functionalities of each representation. e.g. RShape s = group.elements[i].toShape() If the element cannot be converted to the target class it will throw a RuntimeException, to ignore these, use try-catch syntax. RGroup_elements
( ) ( ) ( )
|
related |
Use this method to get the centroid of the element. RGroup_getCentroid
|
related |
Use this method to remove an element. RGroup_removeElement
i | int, the index of the element to remove from the group. ( ) |
|
related |
Use this method to get a new group whose elements are the corresponding meshes of the elements in the current group. This can be used for increasing performance in exchange of losing abstraction. RGroup_toMeshGroup
|
related |
Use this method to get a new group whose elements are the corresponding polygons of the elements in the current group. At this moment there is no implementation for transforming a mesh to a polygon so applying this method to groups holding mesh elements will generate an exception. RGroup_toPolygonGroup
|
related |
Use this method to get a new group whose elements are all the corresponding shapes of the elements in the current group. At this moment there is no implementation for transforming a mesh or a polygon to a shape so applying this method to groups holding mesh or polygon elements will generate an exception. RGroup_toShapeGroup
int geomerative.RGroup.type = RGeomElem.GROUP |