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 SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class processing.core.PShapecolorMode, 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, widthFields inherited from interface processing.core.PConstantsADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BICUBIC, BILINEAR, 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, NEAREST_NEIGHBOR, 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 SummaryConstructorsConstructorDescriptionPShapeOpenGL(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 SummaryModifier and TypeMethodDescriptionvoidAdds a child PShape to a parent PShape that is defined as a GROUP.voidvoidapplyMatrix(float n00, float n01, float n02, float n10, float n11, float n12) voidapplyMatrix(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) voidapplyMatrix(PMatrix2D source) voidvoidvoidvoidattribColor(String name, int color) voidattribNormal(String name, float nx, float ny, float nz) voidattribPosition(String name, float x, float y, float z) voidbeginTessellation(int kind) voidbezierDetail(int detail) voidbezierVertex(float x2, float y2, float x3, float y3, float x4, float y4) voidbezierVertex(float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4) booleancontains(float x, float y) Return true if this x, y coordinate is part of this shape.static voidcopyGroup(PGraphicsOpenGL pg, PShape src, PShape dest) static PShapeOpenGLcreateShape(PGraphicsOpenGL pg, PShape src) voidcurveDetail(int detail) voidcurveTightness(float tightness) voidcurveVertex(float x, float y) voidcurveVertex(float x, float y, float z) voidDisables the shape's style data and uses Processing's current styles.voidCalled by the following (the shape() command adds the g) PShape s = loadShape("blah.svg"); shape(s);voidEnables the shape's style data and ignores Processing's current styles.voidendShape(int mode) voidintgetAmbient(int index) boolean[]float[]int[]intgetAttribColor(String name, int index) getAttribNormal(String name, int index, PVector vec) floatgetAttribNormalX(String name, int index) floatgetAttribNormalY(String name, int index) floatgetAttribNormalZ(String name, int index) getAttribPosition(String name, int index, PVector vec) floatgetAttribPositionX(String name, int index) floatgetAttribPositionY(String name, int index) floatgetAttribPositionZ(String name, int index) floatgetDepth()Get the depth of the shape area (not necessarily the shape boundary).intgetEmissive(int index) intgetFill(int index) floatGet the height of the drawing area (not necessarily the shape boundary).floatgetNormalX(int index) floatgetNormalY(int index) floatgetNormalZ(int index) floatgetShininess(int index) intgetSpecular(int index) intgetStroke(int index) floatgetStrokeWeight(int index) Returns a PShape holding the tessellated geometry of this shape, composed entirely of triangles.floatgetTextureU(int index) floatgetTextureV(int index) intgetTint(int index) intgetVertexCode(int index) One of VERTEX, BEZIER_VERTEX, CURVE_VERTEX, or BREAK.intint[]intintgetVertexCount(boolean includeChildren) The getVertexCount() method returns the number of vertices (with an option to count children by passing true as boolean parameter to method call) that make up a PShape.floatgetVertexX(int index) floatgetVertexY(int index) floatgetVertexZ(int index) floatgetWidth()Get the width of the drawing area (not necessarily the shape boundary).voidnormal(float nx, float ny, float nz) voidquadraticVertex(float cx, float cy, float x3, float y3) voidquadraticVertex(float cx, float cy, float cz, float x3, float y3, float z3) voidremoveChild(int idx) Remove the child shape with index idx.voidReplaces the current matrix of a shape with the identity matrix.voidrotate(float angle) Rotates a shape the amount specified by the angle parameter.voidrotate(float angle, float v0, float v1, float v2) voidrotateX(float angle) Rotates a shape around the x-axis the amount specified by the angle parameter.voidrotateY(float angle) Rotates a shape around the y-axis the amount specified by the angle parameter.voidrotateZ(float angle) Rotates a shape around the z-axis the amount specified by the angle parameter.voidscale(float s) Increases or decreases the size of a shape by expanding and contracting vertices.voidscale(float x, float y) voidscale(float x, float y, float z) voidsetAmbient(int ambient) voidsetAmbient(int index, int ambient) voidvoidvoidvoidsetAttribColor(String name, int index, int color) voidsetAttribNormal(String name, int index, float nx, float ny, float nz) voidsetAttribPosition(String name, int index, float x, float y, float z) voidsetEmissive(int emissive) voidsetEmissive(int index, int emissive) voidsetFill(boolean fill) voidsetFill(int fill) The setFill() method defines the fill color of a PShape.voidsetFill(int index, int fill) voidsetNormal(int index, float nx, float ny, float nz) voidsetParams(float[] source) voidsetPath(int vcount, float[][] verts, int ccount, int[] codes) voidsetShininess(float shininess) voidsetShininess(int index, float shine) voidsetSpecular(int specular) voidsetSpecular(int index, int specular) voidsetStroke(boolean stroke) voidsetStroke(int stroke) The setStroke() method defines the outline color of a PShape.voidsetStroke(int index, int stroke) voidsetStrokeCap(int cap) voidsetStrokeJoin(int join) voidsetStrokeWeight(float weight) voidsetStrokeWeight(int index, float weight) voidsetTexture(PImage tex) voidsetTextureMode(int mode) voidsetTextureUV(int index, float u, float v) voidsetTint(boolean tint) voidsetTint(int tint) voidsetTint(int index, int tint) voidsetVertex(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.voidsetVertex(int index, float x, float y, float z) voidvoidsolid(boolean solid) voidtranslate(float tx, float ty) Specifies an amount to displace the shape.voidtranslate(float tx, float ty, float tz) voidvertex(float x, float y) voidvertex(float x, float y, float z) voidvertex(float x, float y, float u, float v) voidvertex(float x, float y, float z, float u, float v) Methods inherited from class processing.core.PShapeaddName, 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- 
POSITIONpublic static final int POSITION- See Also:
 
- 
NORMALpublic static final int NORMAL- See Also:
 
- 
TEXCOORDpublic static final int TEXCOORD- See Also:
 
- 
DIRECTIONpublic static final int DIRECTION- See Also:
 
- 
OFFSETpublic static final int OFFSET- See Also:
 
 
- 
- 
Constructor Details- 
PShapeOpenGL
- 
PShapeOpenGLCreate a shape from the PRIMITIVE family, using this kind and these params
 
- 
- 
Method Details- 
addChildDescription copied from class:PShapeAdds 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
- 
removeChildpublic void removeChild(int idx) Description copied from class:PShapeRemove the child shape with index idx.- Overrides:
- removeChildin class- PShape
 
- 
createShape
- 
copyGroup
- 
getWidthpublic float getWidth()Description copied from class:PShapeGet the width of the drawing area (not necessarily the shape boundary).
- 
getHeightpublic float getHeight()Description copied from class:PShapeGet the height of the drawing area (not necessarily the shape boundary).
- 
getDepthpublic float getDepth()Description copied from class:PShapeGet the depth of the shape area (not necessarily the shape boundary). Only makes sense for 3D PShape subclasses, such as PShape3D.
- 
setTextureModepublic void setTextureMode(int mode) - Overrides:
- setTextureModein class- PShape
 
- 
setTexture- Overrides:
- setTexturein class- PShape
 
- 
solidpublic void solid(boolean solid) 
- 
vertexpublic void vertex(float x, float y) 
- 
vertexpublic void vertex(float x, float y, float u, float v) 
- 
vertexpublic void vertex(float x, float y, float z) 
- 
vertexpublic void vertex(float x, float y, float z, float u, float v) 
- 
normalpublic void normal(float nx, float ny, float nz) 
- 
attribPosition- Overrides:
- attribPositionin class- PShape
 
- 
attribNormal- Overrides:
- attribNormalin class- PShape
 
- 
attribColor- Overrides:
- attribColorin class- PShape
 
- 
attrib
- 
attrib
- 
attrib
- 
endShapepublic void endShape(int mode) 
- 
setParamspublic void setParams(float[] source) 
- 
setPathpublic void setPath(int vcount, float[][] verts, int ccount, int[] codes) 
- 
translatepublic void translate(float tx, float ty) Description copied from class:PShapeSpecifies 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.
- 
translatepublic void translate(float tx, float ty, float tz) 
- 
rotatepublic void rotate(float angle) Description copied from class:PShapeRotates 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.
- 
rotateXpublic void rotateX(float angle) Description copied from class:PShapeRotates 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.
- 
rotateYpublic void rotateY(float angle) Description copied from class:PShapeRotates 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.
- 
rotateZpublic void rotateZ(float angle) Description copied from class:PShapeRotates 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.
- 
rotatepublic void rotate(float angle, float v0, float v1, float v2) 
- 
scalepublic void scale(float s) Description copied from class:PShapeIncreases 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.
- 
scalepublic void scale(float x, float y) 
- 
scalepublic void scale(float x, float y, float z) 
- 
applyMatrix- Overrides:
- applyMatrixin class- PShape
 
- 
applyMatrixpublic void applyMatrix(float n00, float n01, float n02, float n10, float n11, float n12) - Overrides:
- applyMatrixin class- PShape
 
- 
applyMatrixpublic 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:
- applyMatrixin class- PShape
 
- 
resetMatrixpublic void resetMatrix()Description copied from class:PShapeReplaces the current matrix of a shape with the identity matrix. The equivalent function in OpenGL is glLoadIdentity().- Overrides:
- resetMatrixin class- PShape
- See Also:
 
- 
bezierDetailpublic void bezierDetail(int detail) - Overrides:
- bezierDetailin class- PShape
 
- 
bezierVertexpublic void bezierVertex(float x2, float y2, float x3, float y3, float x4, float y4) - Overrides:
- bezierVertexin class- PShape
 
- 
bezierVertexpublic void bezierVertex(float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4) - Overrides:
- bezierVertexin class- PShape
 
- 
quadraticVertexpublic void quadraticVertex(float cx, float cy, float x3, float y3) - Overrides:
- quadraticVertexin class- PShape
 
- 
quadraticVertexpublic void quadraticVertex(float cx, float cy, float cz, float x3, float y3, float z3) - Overrides:
- quadraticVertexin class- PShape
 
- 
curveDetailpublic void curveDetail(int detail) - Overrides:
- curveDetailin class- PShape
 
- 
curveTightnesspublic void curveTightness(float tightness) - Overrides:
- curveTightnessin class- PShape
 
- 
curveVertexpublic void curveVertex(float x, float y) - Overrides:
- curveVertexin class- PShape
 
- 
curveVertexpublic void curveVertex(float x, float y, float z) - Overrides:
- curveVertexin class- PShape
 
- 
getVertexCountpublic int getVertexCount()- Overrides:
- getVertexCountin class- PShape
 
- 
getVertexCountpublic int getVertexCount(boolean includeChildren) Description copied from class:PShapeThe getVertexCount() method returns the number of vertices (with an option to count children by passing true as boolean parameter to method call) that make up a PShape. By default, it does not count child vertices for GROUP shapes. To include child vertices, pass true as a boolean parameter. In the above example, the value 4 is returned by the getVertexCount() method because 4 vertices are defined in setup().- Overrides:
- getVertexCountin class- PShape
- See Also:
 
- 
getVertex
- 
getVertexXpublic float getVertexX(int index) - Overrides:
- getVertexXin class- PShape
 
- 
getVertexYpublic float getVertexY(int index) - Overrides:
- getVertexYin class- PShape
 
- 
getVertexZpublic float getVertexZ(int index) - Overrides:
- getVertexZin class- PShape
 
- 
setVertexpublic void setVertex(int index, float x, float y) Description copied from class:PShapeThe 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).
- 
setVertexpublic void setVertex(int index, float x, float y, float z) 
- 
setVertex
- 
getNormal
- 
getNormalXpublic float getNormalX(int index) - Overrides:
- getNormalXin class- PShape
 
- 
getNormalYpublic float getNormalY(int index) - Overrides:
- getNormalYin class- PShape
 
- 
getNormalZpublic float getNormalZ(int index) - Overrides:
- getNormalZin class- PShape
 
- 
setNormalpublic void setNormal(int index, float nx, float ny, float nz) 
- 
getTextureUpublic float getTextureU(int index) - Overrides:
- getTextureUin class- PShape
 
- 
getTextureVpublic float getTextureV(int index) - Overrides:
- getTextureVin class- PShape
 
- 
setTextureUVpublic void setTextureUV(int index, float u, float v) - Overrides:
- setTextureUVin class- PShape
 
- 
getFillpublic int getFill(int index) 
- 
setFillpublic void setFill(boolean fill) 
- 
setFillpublic void setFill(int fill) Description copied from class:PShapeThe 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.
- 
setFillpublic void setFill(int index, int fill) 
- 
getTintpublic int getTint(int index) 
- 
setTintpublic void setTint(boolean tint) 
- 
setTintpublic void setTint(int tint) 
- 
setTintpublic void setTint(int index, int tint) 
- 
getStrokepublic int getStroke(int index) 
- 
setStrokepublic void setStroke(boolean stroke) 
- 
setStrokepublic void setStroke(int stroke) Description copied from class:PShapeThe 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.
- 
setStrokepublic void setStroke(int index, int stroke) 
- 
getStrokeWeightpublic float getStrokeWeight(int index) - Overrides:
- getStrokeWeightin class- PShape
 
- 
setStrokeWeightpublic void setStrokeWeight(float weight) - Overrides:
- setStrokeWeightin class- PShape
 
- 
setStrokeWeightpublic void setStrokeWeight(int index, float weight) - Overrides:
- setStrokeWeightin class- PShape
 
- 
setStrokeJoinpublic void setStrokeJoin(int join) - Overrides:
- setStrokeJoinin class- PShape
 
- 
setStrokeCappublic void setStrokeCap(int cap) - Overrides:
- setStrokeCapin class- PShape
 
- 
getAmbientpublic int getAmbient(int index) - Overrides:
- getAmbientin class- PShape
 
- 
setAmbientpublic void setAmbient(int ambient) - Overrides:
- setAmbientin class- PShape
 
- 
setAmbientpublic void setAmbient(int index, int ambient) - Overrides:
- setAmbientin class- PShape
 
- 
getSpecularpublic int getSpecular(int index) - Overrides:
- getSpecularin class- PShape
 
- 
setSpecularpublic void setSpecular(int specular) - Overrides:
- setSpecularin class- PShape
 
- 
setSpecularpublic void setSpecular(int index, int specular) - Overrides:
- setSpecularin class- PShape
 
- 
getEmissivepublic int getEmissive(int index) - Overrides:
- getEmissivein class- PShape
 
- 
setEmissivepublic void setEmissive(int emissive) - Overrides:
- setEmissivein class- PShape
 
- 
setEmissivepublic void setEmissive(int index, int emissive) - Overrides:
- setEmissivein class- PShape
 
- 
getShininesspublic float getShininess(int index) - Overrides:
- getShininessin class- PShape
 
- 
setShininesspublic void setShininess(float shininess) - Overrides:
- setShininessin class- PShape
 
- 
setShininesspublic void setShininess(int index, float shine) - Overrides:
- setShininessin class- PShape
 
- 
getAttribPosition
- 
getAttribPositionX
- 
getAttribPositionY
- 
getAttribPositionZ
- 
getAttribNormal
- 
getAttribNormalX
- 
getAttribNormalY
- 
getAttribNormalZ
- 
getAttribColor
- 
getAttrib
- 
getAttrib
- 
getAttrib
- 
setAttribPosition
- 
setAttribNormal
- 
setAttribColor
- 
setAttrib
- 
setAttrib
- 
setAttrib
- 
getVertexCodespublic int[] getVertexCodes()- Overrides:
- getVertexCodesin class- PShape
 
- 
getVertexCodeCountpublic int getVertexCodeCount()- Overrides:
- getVertexCodeCountin class- PShape
 
- 
getVertexCodepublic int getVertexCode(int index) One of VERTEX, BEZIER_VERTEX, CURVE_VERTEX, or BREAK.- Overrides:
- getVertexCodein class- PShape
 
- 
getTessellationDescription copied from class:PShapeReturns a PShape holding the tessellated geometry of this shape, composed entirely of triangles.- Overrides:
- getTessellationin class- PShape
 
- 
beginTessellationpublic void beginTessellation(int kind) - Overrides:
- beginTessellationin class- PShape
 
- 
endTessellationpublic void endTessellation()- Overrides:
- endTessellationin class- PShape
 
- 
containspublic 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).
- 
disableStylepublic void disableStyle()Description copied from class:PShapeDisables the shape's style data and uses Processing's current styles. Styles include attributes such as colors, stroke weight, and stroke joints.AdvancedOverrides this shape's style information and uses PGraphics styles and colors. Identical to ignoreStyles(true). Also disables styles for all child shapes.- Overrides:
- disableStylein class- PShape
- See Also:
 
- 
enableStylepublic void enableStyle()Description copied from class:PShapeEnables the shape's style data and ignores Processing's current styles. Styles include attributes such as colors, stroke weight, and stroke joints.- Overrides:
- enableStylein class- PShape
- See Also:
 
- 
drawDescription copied from class:PShapeCalled by the following (the shape() command adds the g) PShape s = loadShape("blah.svg"); shape(s);
 
-