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

Public Member Functions

int countPoints ()
 
 RContour (RPoint[] contourpoints)
 
 RContour ()
 
 RContour (RContour c)
 
void draw (PGraphics g)
 
void draw (PApplet g)
 
void addPoint (RPoint p)
 
void addPoint (float x, float y)
 
void addPoints (RPoint[] morePoints)
 
void addPoints (List morePoints)
 
RPoint[] getHandles ()
 
RPoint[] getPoints ()
 
RPoint getPoint (float t)
 
RPoint getTangent (float t)
 
RPoint[] getTangents ()
 
RPoint[][] getPointsInPaths ()
 
RPoint[][] getHandlesInPaths ()
 
RPoint[][] getTangentsInPaths ()
 
boolean contains (RPoint p)
 
void addClose ()
 
RPolygon toPolygon ()
 
RShape toShape () throws RuntimeException
 
RMesh toMesh ()
 
int getType ()
 
- 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.CONTOUR
 
- Public Attributes inherited from geomerative.RGeomElem
float width
 
float height
 
String name = ""
 

Related Functions

(Note that these are not member functions.)

RPoint[] points
 
boolean isHole ()
 

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

RContour is a reduced interface for creating, holding and drawing contours. Contours are ordered lists of points (RPoint) which define the outlines of polygons. Contours can be self-intersecting. RContour Geometry

Constructor & Destructor Documentation

geomerative.RContour.RContour ( RPoint[]  contourpoints)

Create a countour given an array of points.

Parameters
contourpointsthe points of the new contour
geomerative.RContour.RContour ( )
geomerative.RContour.RContour ( RContour  c)

Member Function Documentation

void geomerative.RContour.addClose ( )
void geomerative.RContour.addPoint ( RPoint  p)

Use this method to add new points to the contour. addPoint ( )

void geomerative.RContour.addPoint ( float  x,
float  y 
)
void geomerative.RContour.addPoints ( RPoint[]  morePoints)

Efficiently add an array of points to the contour.

void geomerative.RContour.addPoints ( List  morePoints)

Efficiently add a list of points to the contour.

boolean geomerative.RContour.contains ( RPoint  p)
int geomerative.RContour.countPoints ( )

Use this method to count the number of points in the contour. countPoints

Returns
int, the number points in the contour
void geomerative.RContour.draw ( PGraphics  g)

Use this method to draw the contour. drawContour

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

Use this to return the points of the contour. It returns the points in the way of an array of RPoint. RContour_getHandles

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

Use this to return the points of the contour. It returns the points in the way of an array of RPoint. RContour_getPoints

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

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

Returns
int, will allways return RGeomElem.POLYGON
RMesh geomerative.RContour.toMesh ( )
RPolygon geomerative.RContour.toPolygon ( )
RShape geomerative.RContour.toShape ( ) throws RuntimeException

Friends And Related Function Documentation

boolean isHole ( )
related

Use this method to know if the contour is a hole. Remember to use the method update() on the polygon before using this method. RPolygon_isHole

Returns
boolean, true if it is a hole ( )
RPoint [] points
related

Array of RPoint objects holding the points of the contour. points

( ) ( )

Member Data Documentation

int geomerative.RContour.type = RGeomElem.CONTOUR

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