Package processing.opengl
Class PShapeOpenGL
java.lang.Object
processing.core.PShape
processing.opengl.PShapeOpenGL
- All Implemented Interfaces:
PConstants
This class holds a 3D model composed of vertices, normals, colors
(per vertex) and texture coordinates (also per vertex). All this data is
stored in Vertex Buffer Objects (VBO) in GPU memory for very fast access.
OBJ loading implemented using code from Saito's OBJLoader library:
http://code.google.com/p/saitoobjloader/
and OBJReader from Ahmet Kizilay
http://www.openprocessing.org/visuals/?visualID=191
By Andres Colubri
Other formats to consider:
AMF: http://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format
STL: http://en.wikipedia.org/wiki/STL_(file_format)
OFF: http://people.sc.fsu.edu/~jburkardt/data/off/off.html(file_format)
DXF: http://en.wikipedia.org/wiki/AutoCAD_DXF
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Fields inherited from class processing.core.PShape
colorMode, colorModeA, colorModeX, colorModeY, colorModeZ, depth, GEOMETRY, height, INSIDE_BEGIN_END_ERROR, NO_SUCH_VERTEX_ERROR, NO_VERTICES_ERROR, NOT_A_SIMPLE_VERTEX, OUTSIDE_BEGIN_END_ERROR, PATH, PER_VERTEX_UNSUPPORTED, PRIMITIVE, width
Fields inherited from interface processing.core.PConstants
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOS, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
-
Constructor Summary
ConstructorsConstructorDescriptionPShapeOpenGL
(PGraphicsOpenGL pg, int family) PShapeOpenGL
(PGraphicsOpenGL pg, int kind, float... p) Create a shape from the PRIMITIVE family, using this kind and these params -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a child PShape to a parent PShape that is defined as a GROUP.void
void
applyMatrix
(float n00, float n01, float n02, float n10, float n11, float n12) void
applyMatrix
(float n00, float n01, float n02, float n03, float n10, float n11, float n12, float n13, float n20, float n21, float n22, float n23, float n30, float n31, float n32, float n33) void
applyMatrix
(PMatrix2D source) void
void
void
void
attribColor
(String name, int color) void
attribNormal
(String name, float nx, float ny, float nz) void
attribPosition
(String name, float x, float y, float z) void
beginTessellation
(int kind) void
bezierDetail
(int detail) void
bezierVertex
(float x2, float y2, float x3, float y3, float x4, float y4) void
bezierVertex
(float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4) boolean
contains
(float x, float y) Return true if this x, y coordinate is part of this shape.static void
copyGroup
(PGraphicsOpenGL pg, PShape src, PShape dest) static PShapeOpenGL
createShape
(PGraphicsOpenGL pg, PShape src) void
curveDetail
(int detail) void
curveTightness
(float tightness) void
curveVertex
(float x, float y) void
curveVertex
(float x, float y, float z) void
Disables the shape's style data and uses Processing's current styles.void
Called by the following (the shape() command adds the g) PShape s = loadShape("blah.svg"); shape(s);void
Enables the shape's style data and ignores Processing's current styles.void
endShape
(int mode) void
int
getAmbient
(int index) boolean[]
float[]
int[]
int
getAttribColor
(String name, int index) getAttribNormal
(String name, int index, PVector vec) float
getAttribNormalX
(String name, int index) float
getAttribNormalY
(String name, int index) float
getAttribNormalZ
(String name, int index) getAttribPosition
(String name, int index, PVector vec) float
getAttribPositionX
(String name, int index) float
getAttribPositionY
(String name, int index) float
getAttribPositionZ
(String name, int index) float
getDepth()
Get the depth of the shape area (not necessarily the shape boundary).int
getEmissive
(int index) int
getFill
(int index) float
Get the height of the drawing area (not necessarily the shape boundary).float
getNormalX
(int index) float
getNormalY
(int index) float
getNormalZ
(int index) float
getShininess
(int index) int
getSpecular
(int index) int
getStroke
(int index) float
getStrokeWeight
(int index) Returns a PShape holding the tessellated geometry of this shape, composed entirely of triangles.float
getTextureU
(int index) float
getTextureV
(int index) int
getTint
(int index) int
getVertexCode
(int index) One of VERTEX, BEZIER_VERTEX, CURVE_VERTEX, or BREAK.int
int[]
int
The getVertexCount() method returns the number of vertices that make up a PShape.float
getVertexX
(int index) float
getVertexY
(int index) float
getVertexZ
(int index) float
getWidth()
Get the width of the drawing area (not necessarily the shape boundary).void
normal
(float nx, float ny, float nz) void
quadraticVertex
(float cx, float cy, float x3, float y3) void
quadraticVertex
(float cx, float cy, float cz, float x3, float y3, float z3) void
removeChild
(int idx) Remove the child shape with index idx.void
Replaces the current matrix of a shape with the identity matrix.void
rotate
(float angle) Rotates a shape the amount specified by the angle parameter.void
rotate
(float angle, float v0, float v1, float v2) void
rotateX
(float angle) Rotates a shape around the x-axis the amount specified by the angle parameter.void
rotateY
(float angle) Rotates a shape around the y-axis the amount specified by the angle parameter.void
rotateZ
(float angle) Rotates a shape around the z-axis the amount specified by the angle parameter.void
scale
(float s) Increases or decreases the size of a shape by expanding and contracting vertices.void
scale
(float x, float y) void
scale
(float x, float y, float z) void
setAmbient
(int ambient) void
setAmbient
(int index, int ambient) void
void
void
void
setAttribColor
(String name, int index, int color) void
setAttribNormal
(String name, int index, float nx, float ny, float nz) void
setAttribPosition
(String name, int index, float x, float y, float z) void
setEmissive
(int emissive) void
setEmissive
(int index, int emissive) void
setFill
(boolean fill) void
setFill
(int fill) The setFill() method defines the fill color of a PShape.void
setFill
(int index, int fill) void
setNormal
(int index, float nx, float ny, float nz) void
setParams
(float[] source) void
setPath
(int vcount, float[][] verts, int ccount, int[] codes) void
setShininess
(float shininess) void
setShininess
(int index, float shine) void
setSpecular
(int specular) void
setSpecular
(int index, int specular) void
setStroke
(boolean stroke) void
setStroke
(int stroke) The setStroke() method defines the outline color of a PShape.void
setStroke
(int index, int stroke) void
setStrokeCap
(int cap) void
setStrokeJoin
(int join) void
setStrokeWeight
(float weight) void
setStrokeWeight
(int index, float weight) void
setTexture
(PImage tex) void
setTextureMode
(int mode) void
setTextureUV
(int index, float u, float v) void
setTint
(boolean tint) void
setTint
(int tint) void
setTint
(int index, int tint) void
setVertex
(int index, float x, float y) The setVertex() method defines the coordinates of the vertex point located at the position defined by the index parameter.void
setVertex
(int index, float x, float y, float z) void
void
solid
(boolean solid) void
translate
(float tx, float ty) Specifies an amount to displace the shape.void
translate
(float tx, float ty, float tz) void
vertex
(float x, float y) void
vertex
(float x, float y, float z) void
vertex
(float x, float y, float u, float v) void
vertex
(float x, float y, float z, float u, float v) Methods inherited from class processing.core.PShape
addName, ambient, ambient, ambient, applyMatrix, applyMatrix, beginContour, beginShape, beginShape, beginTessellation, colorMode, colorMode, colorMode, colorMode, emissive, emissive, emissive, endContour, endShape, fill, fill, fill, fill, fill, fill, findChild, getChild, getChild, getChildCount, getChildIndex, getChildren, getFamily, getKind, getName, getNormal, getParam, getParams, getParams, getParent, getVertex, is2D, is3D, isClosed, isVisible, noFill, noStroke, noTexture, noTint, set3D, setFamily, setKind, setName, setPath, setVisible, shininess, specular, specular, specular, stroke, stroke, stroke, stroke, stroke, stroke, strokeCap, strokeJoin, strokeWeight, texture, textureMode, tint, tint, tint, tint, tint, tint
-
Field Details
-
POSITION
public static final int POSITION- See Also:
-
NORMAL
public static final int NORMAL- See Also:
-
TEXCOORD
public static final int TEXCOORD- See Also:
-
DIRECTION
public static final int DIRECTION- See Also:
-
OFFSET
public static final int OFFSET- See Also:
-
-
Constructor Details
-
PShapeOpenGL
-
PShapeOpenGL
Create a shape from the PRIMITIVE family, using this kind and these params
-
-
Method Details
-
addChild
Description copied from class:PShape
Adds a child PShape to a parent PShape that is defined as a GROUP. In the example, the three shapes path, rectangle, and circle are added to a parent PShape variable named house that is a GROUP. -
addChild
-
removeChild
public void removeChild(int idx) Description copied from class:PShape
Remove the child shape with index idx.- Overrides:
removeChild
in classPShape
-
createShape
-
copyGroup
-
getWidth
public float getWidth()Description copied from class:PShape
Get the width of the drawing area (not necessarily the shape boundary). -
getHeight
public float getHeight()Description copied from class:PShape
Get the height of the drawing area (not necessarily the shape boundary). -
getDepth
public float getDepth()Description copied from class:PShape
Get the depth of the shape area (not necessarily the shape boundary). Only makes sense for 3D PShape subclasses, such as PShape3D. -
setTextureMode
public void setTextureMode(int mode) - Overrides:
setTextureMode
in classPShape
-
setTexture
- Overrides:
setTexture
in classPShape
-
solid
public void solid(boolean solid) -
vertex
public void vertex(float x, float y) -
vertex
public void vertex(float x, float y, float u, float v) -
vertex
public void vertex(float x, float y, float z) -
vertex
public void vertex(float x, float y, float z, float u, float v) -
normal
public void normal(float nx, float ny, float nz) -
attribPosition
- Overrides:
attribPosition
in classPShape
-
attribNormal
- Overrides:
attribNormal
in classPShape
-
attribColor
- Overrides:
attribColor
in classPShape
-
attrib
-
attrib
-
attrib
-
endShape
public void endShape(int mode) -
setParams
public void setParams(float[] source) -
setPath
public void setPath(int vcount, float[][] verts, int ccount, int[] codes) -
translate
public void translate(float tx, float ty) Description copied from class:PShape
Specifies an amount to displace the shape. The x parameter specifies left/right translation, the y parameter specifies up/down translation, and the z parameter specifies translations toward/away from the screen. Subsequent calls to the method accumulates the effect. For example, calling translate(50, 0) and then translate(20, 0) is the same as translate(70, 0). This transformation is applied directly to the shape, it's not refreshed each time draw() is run.
Using this method with the z parameter requires using the P3D parameter in combination with size. -
translate
public void translate(float tx, float ty, float tz) -
rotate
public void rotate(float angle) Description copied from class:PShape
Rotates a shape the amount specified by the angle parameter. Angles should be specified in radians (values from 0 to TWO_PI) or converted to radians with the radians() method.
Shapes are always rotated around the upper-left corner of their bounding box. Positive numbers rotate objects in a clockwise direction. Transformations apply to everything that happens after and subsequent calls to the method accumulates the effect. For example, calling rotate(HALF_PI) and then rotate(HALF_PI) is the same as rotate(PI). This transformation is applied directly to the shape, it's not refreshed each time draw() is run. -
rotateX
public void rotateX(float angle) Description copied from class:PShape
Rotates a shape around the x-axis the amount specified by the angle parameter. Angles should be specified in radians (values from 0 to TWO_PI) or converted to radians with the radians() method.
Shapes are always rotated around the upper-left corner of their bounding box. Positive numbers rotate objects in a clockwise direction. Subsequent calls to the method accumulates the effect. For example, calling rotateX(HALF_PI) and then rotateX(HALF_PI) is the same as rotateX(PI). This transformation is applied directly to the shape, it's not refreshed each time draw() is run.
This method requires a 3D renderer. You need to use P3D as a third parameter for the size() function as shown in the example above. -
rotateY
public void rotateY(float angle) Description copied from class:PShape
Rotates a shape around the y-axis the amount specified by the angle parameter. Angles should be specified in radians (values from 0 to TWO_PI) or converted to radians with the radians() method.
Shapes are always rotated around the upper-left corner of their bounding box. Positive numbers rotate objects in a clockwise direction. Subsequent calls to the method accumulates the effect. For example, calling rotateY(HALF_PI) and then rotateY(HALF_PI) is the same as rotateY(PI). This transformation is applied directly to the shape, it's not refreshed each time draw() is run.
This method requires a 3D renderer. You need to use P3D as a third parameter for the size() function as shown in the example above. -
rotateZ
public void rotateZ(float angle) Description copied from class:PShape
Rotates a shape around the z-axis the amount specified by the angle parameter. Angles should be specified in radians (values from 0 to TWO_PI) or converted to radians with the radians() method.
Shapes are always rotated around the upper-left corner of their bounding box. Positive numbers rotate objects in a clockwise direction. Subsequent calls to the method accumulates the effect. For example, calling rotateZ(HALF_PI) and then rotateZ(HALF_PI) is the same as rotateZ(PI). This transformation is applied directly to the shape, it's not refreshed each time draw() is run.
This method requires a 3D renderer. You need to use P3D as a third parameter for the size() function as shown in the example above. -
rotate
public void rotate(float angle, float v0, float v1, float v2) -
scale
public void scale(float s) Description copied from class:PShape
Increases or decreases the size of a shape by expanding and contracting vertices. Shapes always scale from the relative origin of their bounding box. Scale values are specified as decimal percentages. For example, the method call scale(2.0) increases the dimension of a shape by 200%. Subsequent calls to the method multiply the effect. For example, calling scale(2.0) and then scale(1.5) is the same as scale(3.0). This transformation is applied directly to the shape, it's not refreshed each time draw() is run.
Using this method with the z parameter requires using the P3D parameter in combination with size. -
scale
public void scale(float x, float y) -
scale
public void scale(float x, float y, float z) -
applyMatrix
- Overrides:
applyMatrix
in classPShape
-
applyMatrix
public void applyMatrix(float n00, float n01, float n02, float n10, float n11, float n12) - Overrides:
applyMatrix
in classPShape
-
applyMatrix
public void applyMatrix(float n00, float n01, float n02, float n03, float n10, float n11, float n12, float n13, float n20, float n21, float n22, float n23, float n30, float n31, float n32, float n33) - Overrides:
applyMatrix
in classPShape
-
resetMatrix
public void resetMatrix()Description copied from class:PShape
Replaces the current matrix of a shape with the identity matrix. The equivalent function in OpenGL is glLoadIdentity().- Overrides:
resetMatrix
in classPShape
- See Also:
-
bezierDetail
public void bezierDetail(int detail) - Overrides:
bezierDetail
in classPShape
-
bezierVertex
public void bezierVertex(float x2, float y2, float x3, float y3, float x4, float y4) - Overrides:
bezierVertex
in classPShape
-
bezierVertex
public void bezierVertex(float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4) - Overrides:
bezierVertex
in classPShape
-
quadraticVertex
public void quadraticVertex(float cx, float cy, float x3, float y3) - Overrides:
quadraticVertex
in classPShape
-
quadraticVertex
public void quadraticVertex(float cx, float cy, float cz, float x3, float y3, float z3) - Overrides:
quadraticVertex
in classPShape
-
curveDetail
public void curveDetail(int detail) - Overrides:
curveDetail
in classPShape
-
curveTightness
public void curveTightness(float tightness) - Overrides:
curveTightness
in classPShape
-
curveVertex
public void curveVertex(float x, float y) - Overrides:
curveVertex
in classPShape
-
curveVertex
public void curveVertex(float x, float y, float z) - Overrides:
curveVertex
in classPShape
-
getVertexCount
public int getVertexCount()Description copied from class:PShape
The getVertexCount() method returns the number of vertices that make up a PShape. In the above example, the value 4 is returned by the getVertexCount() method because 4 vertices are defined in setup().- Overrides:
getVertexCount
in classPShape
- See Also:
-
getVertex
-
getVertexX
public float getVertexX(int index) - Overrides:
getVertexX
in classPShape
-
getVertexY
public float getVertexY(int index) - Overrides:
getVertexY
in classPShape
-
getVertexZ
public float getVertexZ(int index) - Overrides:
getVertexZ
in classPShape
-
setVertex
public void setVertex(int index, float x, float y) Description copied from class:PShape
The setVertex() method defines the coordinates of the vertex point located at the position defined by the index parameter. This method works when shapes are created as shown in the example above, but won't work properly when a shape is defined explicitly (e.g. createShape(RECT, 20, 20, 80, 80). -
setVertex
public void setVertex(int index, float x, float y, float z) -
setVertex
-
getNormal
-
getNormalX
public float getNormalX(int index) - Overrides:
getNormalX
in classPShape
-
getNormalY
public float getNormalY(int index) - Overrides:
getNormalY
in classPShape
-
getNormalZ
public float getNormalZ(int index) - Overrides:
getNormalZ
in classPShape
-
setNormal
public void setNormal(int index, float nx, float ny, float nz) -
getTextureU
public float getTextureU(int index) - Overrides:
getTextureU
in classPShape
-
getTextureV
public float getTextureV(int index) - Overrides:
getTextureV
in classPShape
-
setTextureUV
public void setTextureUV(int index, float u, float v) - Overrides:
setTextureUV
in classPShape
-
getFill
public int getFill(int index) -
setFill
public void setFill(boolean fill) -
setFill
public void setFill(int fill) Description copied from class:PShape
The setFill() method defines the fill color of a PShape. This method is used after shapes are created or when a shape is defined explicitly (e.g. createShape(RECT, 20, 20, 80, 80)) as shown in the above example. When a shape is created with beginShape() and endShape(), its attributes may be changed with fill() and stroke() within beginShape() and endShape(). However, after the shape is created, only the setFill() method can define a new fill value for the PShape. -
setFill
public void setFill(int index, int fill) -
getTint
public int getTint(int index) -
setTint
public void setTint(boolean tint) -
setTint
public void setTint(int tint) -
setTint
public void setTint(int index, int tint) -
getStroke
public int getStroke(int index) -
setStroke
public void setStroke(boolean stroke) -
setStroke
public void setStroke(int stroke) Description copied from class:PShape
The setStroke() method defines the outline color of a PShape. This method is used after shapes are created or when a shape is defined explicitly (e.g. createShape(RECT, 20, 20, 80, 80)) as shown in the above example. When a shape is created with beginShape() and endShape(), its attributes may be changed with fill() and stroke() within beginShape() and endShape(). However, after the shape is created, only the setStroke() method can define a new stroke value for the PShape. -
setStroke
public void setStroke(int index, int stroke) -
getStrokeWeight
public float getStrokeWeight(int index) - Overrides:
getStrokeWeight
in classPShape
-
setStrokeWeight
public void setStrokeWeight(float weight) - Overrides:
setStrokeWeight
in classPShape
-
setStrokeWeight
public void setStrokeWeight(int index, float weight) - Overrides:
setStrokeWeight
in classPShape
-
setStrokeJoin
public void setStrokeJoin(int join) - Overrides:
setStrokeJoin
in classPShape
-
setStrokeCap
public void setStrokeCap(int cap) - Overrides:
setStrokeCap
in classPShape
-
getAmbient
public int getAmbient(int index) - Overrides:
getAmbient
in classPShape
-
setAmbient
public void setAmbient(int ambient) - Overrides:
setAmbient
in classPShape
-
setAmbient
public void setAmbient(int index, int ambient) - Overrides:
setAmbient
in classPShape
-
getSpecular
public int getSpecular(int index) - Overrides:
getSpecular
in classPShape
-
setSpecular
public void setSpecular(int specular) - Overrides:
setSpecular
in classPShape
-
setSpecular
public void setSpecular(int index, int specular) - Overrides:
setSpecular
in classPShape
-
getEmissive
public int getEmissive(int index) - Overrides:
getEmissive
in classPShape
-
setEmissive
public void setEmissive(int emissive) - Overrides:
setEmissive
in classPShape
-
setEmissive
public void setEmissive(int index, int emissive) - Overrides:
setEmissive
in classPShape
-
getShininess
public float getShininess(int index) - Overrides:
getShininess
in classPShape
-
setShininess
public void setShininess(float shininess) - Overrides:
setShininess
in classPShape
-
setShininess
public void setShininess(int index, float shine) - Overrides:
setShininess
in classPShape
-
getAttribPosition
-
getAttribPositionX
-
getAttribPositionY
-
getAttribPositionZ
-
getAttribNormal
-
getAttribNormalX
-
getAttribNormalY
-
getAttribNormalZ
-
getAttribColor
-
getAttrib
-
getAttrib
-
getAttrib
-
setAttribPosition
-
setAttribNormal
-
setAttribColor
-
setAttrib
-
setAttrib
-
setAttrib
-
getVertexCodes
public int[] getVertexCodes()- Overrides:
getVertexCodes
in classPShape
-
getVertexCodeCount
public int getVertexCodeCount()- Overrides:
getVertexCodeCount
in classPShape
-
getVertexCode
public int getVertexCode(int index) One of VERTEX, BEZIER_VERTEX, CURVE_VERTEX, or BREAK.- Overrides:
getVertexCode
in classPShape
-
getTessellation
Description copied from class:PShape
Returns a PShape holding the tessellated geometry of this shape, composed entirely of triangles.- Overrides:
getTessellation
in classPShape
-
beginTessellation
public void beginTessellation(int kind) - Overrides:
beginTessellation
in classPShape
-
endTessellation
public void endTessellation()- Overrides:
endTessellation
in classPShape
-
contains
public boolean contains(float x, float y) Return true if this x, y coordinate is part of this shape. Only works with PATH shapes or GROUP shapes that contain other GROUPs or PATHs. This method is not imperfect and doesn't account for all cases (not all complex shapes: concave shapes or holes may have issues). -
disableStyle
public void disableStyle()Description copied from class:PShape
Disables the shape's style data and uses Processing's current styles. Styles include attributes such as colors, stroke weight, and stroke joints.Advanced
Overrides this shape's style information and uses PGraphics styles and colors. Identical to ignoreStyles(true). Also disables styles for all child shapes.- Overrides:
disableStyle
in classPShape
- See Also:
-
enableStyle
public void enableStyle()Description copied from class:PShape
Enables the shape's style data and ignores Processing's current styles. Styles include attributes such as colors, stroke weight, and stroke joints.- Overrides:
enableStyle
in classPShape
- See Also:
-
draw
Description copied from class:PShape
Called by the following (the shape() command adds the g) PShape s = loadShape("blah.svg"); shape(s);
-