HE_Mesh
5.1.0
|
Classes | |
class | FontNotLoadedException |
class | LibraryNotInitializedException |
class | NoPathInitializedException |
Static Public Member Functions | |
static RFont | loadFont (String fontFile) |
static void | text (String text) |
static void | textFont (RFont font, int size) |
static RShape | getText (String text, String font, int size, int align) |
static RShape | getText (String text) |
static void | shape (RShape shp, float x, float y, float w, float h) |
static void | shape (RShape shp, float x, float y) |
static void | shape (RShape shp) |
static RShape | createShape (RPoint[][] points) |
static RShape | loadShape (String filename) |
static void | saveShape (String filename, RShape shape) |
static void | beginShape () |
static void | breakShape (int endMode) |
static void | breakShape () |
static void | vertex (float x, float y) |
static void | bezierVertex (float cx1, float cy1, float cx2, float cy2, float x, float y) |
static void | endShape (PGraphics g) |
static void | endShape () |
static RShape | getShape () |
static RShape | getEllipse (float x, float y, float w, float h) |
static RShape | getEllipse (float x, float y, float w) |
static RShape | getLine (float x1, float y1, float x2, float y2) |
static RShape | getRect (float x, float y, float w, float h) |
static RShape | getRect (float x, float y, float w) |
static RShape | getStar (float x, float y, float widthBig, float widthSmall, int spikes) |
static RShape | getRing (float x, float y, float widthBig, float widthSmall) |
static RShape | centerIn (RShape grp, PGraphics g, float margin) |
static RShape | centerIn (RShape grp, PGraphics g) |
static RShape[] | split (RShape shp, float t) |
static void | init (PApplet _parent) |
static boolean | initialized () |
static void | setDpi (int _dpi) |
static void | ignoreStyles (boolean value) |
static void | ignoreStyles () |
static void | setAdaptorScale (float adptorScale) |
static void | setAdaptorLengthOffset (float adptorLengthOffset) throws RuntimeException |
Static Public Attributes | |
static boolean | ignoreStyles = false |
static boolean | useFastClip = true |
static final int | BYPOINT = 0 |
static final int | BYELEMENTPOSITION = 1 |
static final int | BYELEMENTINDEX = 2 |
static int | ADAPTATIVE = RCommand.ADAPTATIVE |
static int | UNIFORMLENGTH = RCommand.UNIFORMLENGTH |
static int | UNIFORMSTEP = RCommand.UNIFORMSTEP |
Static Protected Member Functions | |
static PApplet | parent () |
static int | dpi () |
Static Private Attributes | |
static boolean | initialized = false |
static PApplet | parent |
Related Functions | |
(Note that these are not member functions.) | |
static RShape | adapt (RShape shp, RShape path) |
static RShape | polygonize (RShape shp) |
static RShape | diff (RShape a, RShape b) |
static RShape | union (RShape a, RShape b) |
static RShape | intersection (RShape a, RShape b) |
static RShape | xor (RShape a, RShape b) |
static void | setAdaptor (int adptorType) |
static void | setPolygonizer (int segmenterMethod) |
static void | setPolygonizerAngle (float angle) |
static void | setPolygonizerLength (float length) |
static void | setPolygonizerStep (float step) |
RG is a static class containing all the states, modes, etc.. Geomerative is mostly used by calling RG methods. e.g. RShape s = RG.getEllipse(30, 40, 80, 80)
|
static |
Begin to create a shape. createShape
|
static |
Add a bezierVertex to the shape. Can only be called inside beginShape() and endShape(). createShape
cx1 | the x coordinate of the first control point |
cy1 | the y coordinate of the first control point |
cx2 | the x coordinate of the second control point |
cy2 | the y coordinate of the second control point |
x | the x coordinate of the end point |
y | the y coordinate of the end point |
|
static |
Begin a new path in the current shape. Can only be called inside beginShape() and endShape().
endMode | if called with RG.CLOSE it closes the current path before starting the new one. createShape |
|
static |
Create a shape from an array of point arrays. createShape
|
staticprotected |
|
static |
End the shape being created and draw it to the screen or the PGraphics passed as parameter. createShape
g | the canvas on which to draw. By default it draws on the screen |
|
static |
|
static |
Get an ellipse as a shape object. getEllipse
x | x coordinate of the center of the shape |
y | y coordinate of the center of the shape |
w | width of the ellipse |
h | height of the ellipse |
|
static |
|
static |
Get a line as a shape object. getLine
x1 | x coordinate of the first point of the line |
y1 | y coordinate of the first point of the line |
x2 | x coordinate of the last point of the line |
y2 | y coordinate of the last point of the line |
|
static |
Get an rectangle as a shape object. getRect
x | x coordinate of the top left corner of the shape |
y | y coordinate of the top left of the shape |
w | width of the rectangle |
h | height of the rectangle |
|
static |
|
static |
Get a ring as a shape object. getRing
x | x coordinate of the center of the shape |
y | y coordinate of the center of the shape |
widthBig | the outter width of the ring polygon |
widthSmall | the inner width of the ring polygon |
|
static |
End the shape being created and get it as an object. getShape
|
static |
Get a star as a shape object. getStar
x | x coordinate of the center of the shape |
y | y coordinate of the center of the shape |
widthBig | the outter width of the star polygon |
widthSmall | the inner width of the star polygon |
spikes | the amount of spikes on the star polygon |
|
static |
Get the shape corresponding to a text. Use the textFont method to select the font and size. getText
font | the filename of the font to be loaded |
text | the string to be created |
size | the size of the font to be used |
align | the alignment. Use RG.CENTER, RG.LEFT or RG.RIGHT |
|
static |
|
static |
Ignore the styles of the shapes when drawing and use the Processing style methods. ignoreStyles
value | value to which the ignoreStyles state should be set |
|
static |
|
static |
Initialize the library. Must be called before any call to Geomerative methods. Must be called by passing the PApplet. e.g. RG.init(this)
|
static |
|
static |
Load and get the font object that can be used in the textFont method. loadFont
fontFile | the filename of the font to be loaded |
|
static |
Load a shape object from a file. loadShape
filename | the SVG file to be loaded. Must be in the data directory |
|
staticprotected |
|
static |
Save a shape object to a file. saveShape
filename | the SVG file to be saved. |
shape | the shape to be saved. |
|
static |
Use this to set the adaptor length offset. This specifies where to start adapting the group to the shape. RShape_setAdaptorLengthOffset
adptorLengthOffset | the offset along the curve of the shape. Must be a value between 0 and 1; |
|
static |
Use this to set the adaptor scaling. This scales the transformation of the adaptor. RShape_setAdaptor
adptorScale | the scaling coefficient |
|
static |
Use this to set the resolution of the display. This specifies the Dots Per Inch of the display.
_dpi | the dots per inch of the display |
|
static |
Draw a shape to a given position on the screen. shape
shp | the shape to be drawn |
x | the horizontal coordinate |
y | the vertical coordinate |
w | the width with which we draw the shape |
h | the height with which we draw the shape |
|
static |
|
static |
Split a shape along the curve length in two parts. split
shp | the shape to be splited |
t | the proportion (a value from 0 to 1) along the curve where to split |
|
static |
Draw text to the screen using the font set using the textFont method. text
text | the string to be drawn on the screen |
|
static |
Set the font object to be used in all text calls. textFont
font | the font object to be set |
size | the size of the font |
|
static |
Add a vertex to the shape. Can only be called inside beginShape() and endShape(). createShape
x | the x coordinate of the vertex |
y | the y coordinate of the vertex |
Adapt a shape along the curve of another shape. split
shp | the shape to be adapted |
path | the shape which curve will be followed |
Binary difference between two shapes. binaryOps
a | first shape to operate on |
b | second shape to operate on |
Binary intersection between two shapes. binaryOps
a | first shape to operate on |
b | second shape to operate on |
Polygonize a shape. split
shp | the shape to be polygonized |
|
related |
Use this to set the adaptor type. RShape_setAdaptor
adptorType | it can be RG.BYPOINT, RG.BYELEMENTPOSITION or RG.BYELEMENTINDEX |
|
related |
Use this to set the polygonizer type.
segmenterMethod | can be RG.ADAPTATIVE, RG.UNIFORMLENGTH or RG.UNIFORMSTEP. |
setPolygonizer
|
related |
Use this to set the segmentator angle tolerance for the ADAPTATIVE segmentator and set the segmentator to ADAPTATIVE. setPolygonizerAngle
angle | an angle from 0 to PI/2 it defines the maximum angle between segments. |
|
related |
Use this to set the segmentator length for the UNIFORMLENGTH segmentator and set the segmentator to UNIFORMLENGTH. setPolygonizerLength
length | the length of each resulting segment. |
( )
|
related |
Use this to set the segmentator step for the UNIFORMSTEP segmentator and set the segmentator to UNIFORMSTEP. setSegmentStep
step | if a float from +0.0 to 1.0 is passed it's considered as the step, else it's considered as the number of steps. When a value of 0.0 is used the steps will be calculated automatically depending on an estimation of the length of the curve. The special value -1 is the same as 0.0 but also turning of the segmentation of lines (faster segmentation). |
( )
Binary union between two shapes. binaryOps
a | first shape to operate on |
b | second shape to operate on |
Binary xor between two shapes. binaryOps
a | first shape to operate on |
b | second shape to operate on |
|
static |
ADAPTATIVE segmentator minimizes the number of segments avoiding perceptual artifacts like angles or cusps. Use this in order to have polygons and meshes with the fewest possible vertices.
|
static |
The adaptor adapts the shape to a particular shape by adapting each of the groups elements indices. This mantains the proportions of the shapes.
|
static |
The adaptor adapts the shape to a particular shape by adapting each of the groups elements positions. This mantains the proportions of the shapes.
|
static |
The adaptor adapts the shape to a particular shape by adapting each of the groups points. This can cause deformations of the individual elements in the group.
|
static |
|
staticprivate |
|
staticprivate |
|
static |
UNIFORMLENGTH segmentator is the slowest segmentator and it segments the curve on segments of equal length. This can be useful for very specific applications when for example drawing incrementaly a shape with a uniform speed.
|
static |
UNIFORMSTEP segmentator is the fastest segmentator and it segments the curve based on a constant value of the step of the curve parameter, or on the number of segments wanted. This can be useful when segmpointsentating very often a Shape or when we know the amount of segments necessary for our specific application.
|
static |