HE_Mesh  5.1.0
geomerative.RMesh Class Reference
+ Inheritance diagram for geomerative.RMesh:

Public Member Functions

 RMesh ()
 
 RMesh (RMesh m)
 
void addStrip ()
 
void draw (PGraphics g)
 
void draw (PApplet g)
 
RPoint[] getHandles ()
 
RPoint[] getPoints ()
 
RPoint getPoint (float t)
 
RPoint getTangent (float t)
 
RPoint[] getTangents ()
 
RPoint[][] getPointsInPaths ()
 
RPoint[][] getHandlesInPaths ()
 
RPoint[][] getTangentsInPaths ()
 
boolean contains (RPoint p)
 
int getType ()
 
void transform (RMatrix m)
 
RMesh toMesh ()
 
RPolygon toPolygon () throws RuntimeException
 
RShape toShape () throws RuntimeException
 
- Public Member Functions inherited from geomerative.RGeomElem
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.MESH
 
- Public Attributes inherited from geomerative.RGeomElem
float width
 
float height
 
String name = ""
 

Related Functions

(Note that these are not member functions.)

RStrip[] strips
 
int countStrips ()
 
void addStrip (RStrip s)
 
void setCurrent (int indStrip)
 
void addPoint (RPoint p)
 
void addPoint (float x, float y)
 
void addPoint (int indStrip, RPoint p)
 
void addPoint (int indStrip, float x, float y)
 

Additional Inherited Members

- Static Public Attributes inherited from geomerative.RGeomElem
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
 
- Protected Member Functions inherited from geomerative.RGeomElem
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 ()
 
- Protected Attributes inherited from geomerative.RGeomElem
float[] lenCurves
 
float lenCurve = -1F
 
RStyle style = new RStyle()
 

Detailed Description

RMesh is a reduced interface for creating, holding and drawing meshes. A mesh is a group of triangular strips (RStrip). RMesh Geometry

Constructor & Destructor Documentation

geomerative.RMesh.RMesh ( )

Create a new empty mesh. createaMesh

geomerative.RMesh.RMesh ( RMesh  m)

Copy a mesh. createaMesh

Parameters
mthe object of which to make a copy

Member Function Documentation

void geomerative.RMesh.addStrip ( )
boolean geomerative.RMesh.contains ( RPoint  p)
void geomerative.RMesh.draw ( PGraphics  g)

Use this method to draw the mesh. drawMesh

Parameters
gPGraphics, the graphics object on which to draw the mesh
void geomerative.RMesh.draw ( PApplet  g)
RPoint [] geomerative.RMesh.getHandles ( )

Use this to get the vertices of the mesh. It returns the points as an array of RPoint. RMesh_getHandles

Returns
RPoint[], the vertices returned in an array.
RPoint [][] geomerative.RMesh.getHandlesInPaths ( )
RPoint geomerative.RMesh.getPoint ( float  t)
RPoint [] geomerative.RMesh.getPoints ( )

Use this to get the vertices of the mesh. It returns the points as an array of RPoint. RMesh_getPoints

Returns
RPoint[], the vertices returned in an array.
RPoint [][] geomerative.RMesh.getPointsInPaths ( )
RPoint geomerative.RMesh.getTangent ( float  t)
RPoint [] geomerative.RMesh.getTangents ( )
RPoint [][] geomerative.RMesh.getTangentsInPaths ( )
int geomerative.RMesh.getType ( )

Use this method to get the type of element this is. RMesh_getType

Returns
int, will allways return RGeomElem.MESH
RMesh geomerative.RMesh.toMesh ( )
RPolygon geomerative.RMesh.toPolygon ( ) throws RuntimeException
RShape geomerative.RMesh.toShape ( ) throws RuntimeException
void geomerative.RMesh.transform ( RMatrix  m)

Use this method to transform the mesh. transformMesh

Parameters
mRMatrix, the matrix of the affine transformation to apply to the mesh

Friends And Related Function Documentation

void addPoint ( RPoint  p)
related

Add a new point to the current strip. addPoint

Parameters
pthe point to be added ( ) ( )
void addPoint ( float  x,
float  y 
)
related

Add a new point to the current strip. addPoint

Parameters
xthe x coordinate of the point to be added
ythe y coordinate of the point to be added ( ) ( )
void addPoint ( int  indStrip,
RPoint  p 
)
related

Add a new point to the given strip. addPoint

Parameters
indStripthe index of the strip to which the point will be added
pthe point to be added ( ) ( )
void addPoint ( int  indStrip,
float  x,
float  y 
)
related

Add a new point to the given strip. addPoint

Parameters
indStripthe index of the strip to which the point will be added
xthe x coordinate of the point to be added
ythe y coordinate of the point to be added ( ) ( )
void addStrip ( RStrip  s)
related

Add a new strip. addStrip

Parameters
sthe strip to be added ( )
int countStrips ( )
related

Use this method to count the number of strips in the mesh. countStrips

Returns
int, the number strips in the mesh ( )
void setCurrent ( int  indStrip)
related

Use this method to set the current strip to which append points. addStrip ( )

RStrip [] strips
related

Array of RStrip objects holding the contours of the polygon. strips

( ) ( )

Member Data Documentation

int geomerative.RMesh.type = RGeomElem.MESH

The documentation for this class was generated from the following file: