public class PShapeOpenGL extends PShape
| Modifier and Type | Field and Description |
|---|---|
static int |
DIRECTION |
int |
glUsage |
static int |
NORMAL |
static int |
OFFSET |
static int |
POSITION |
static int |
TEXCOORD |
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, widthADD, 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, 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 and Description |
|---|
PShapeOpenGL(PGraphicsOpenGL pg,
int family) |
PShapeOpenGL(PGraphicsOpenGL pg,
int kind,
float... p)
Create a shape from the PRIMITIVE family, using this kind and these params
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(PShape who) |
void |
addChild(PShape who,
int idx) |
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 |
attrib(String name,
boolean... values) |
void |
attrib(String name,
float... values) |
void |
attrib(String name,
int... values) |
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 |
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 |
disableStyle()
( begin auto-generated from PShape_disableStyle.xml )
Disables the shape's style data and uses Processing's current styles.
|
void |
draw(PGraphics g)
Called by the following (the shape() command adds the g)
PShape s = loadShape("blah.svg");
shape(s);
|
void |
enableStyle()
( begin auto-generated from PShape_enableStyle.xml )
Enables the shape's style data and ignores Processing's current styles.
|
void |
endShape(int mode) |
int |
getAmbient(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 |
getHeight()
Get the height of the drawing area (not necessarily the shape boundary).
|
PVector |
getNormal(int index,
PVector vec) |
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) |
PShape |
getTessellation() |
float[] |
getTessellation(int kind,
int data) |
float |
getTextureU(int index) |
float |
getTextureV(int index) |
int |
getTint(int index) |
PVector |
getVertex(int index,
PVector vec) |
int |
getVertexCode(int index)
One of VERTEX, BEZIER_VERTEX, CURVE_VERTEX, or BREAK.
|
int |
getVertexCodeCount() |
int[] |
getVertexCodes() |
int |
getVertexCount() |
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 |
resetMatrix()
( begin auto-generated from PShape_resetMatrix.xml )
Replaces the current matrix of a shape with the identity matrix.
|
void |
rotate(float angle)
( begin auto-generated from PShape_rotate.xml )
Rotates a shape the amount specified by the angle parameter.
|
void |
rotate(float angle,
float v0,
float v1,
float v2) |
void |
rotateX(float angle)
( begin auto-generated from PShape_rotateX.xml )
Rotates a shape around the x-axis the amount specified by the
angle parameter.
|
void |
rotateY(float angle)
( begin auto-generated from PShape_rotateY.xml )
Rotates a shape around the y-axis the amount specified by the
angle parameter.
|
void |
rotateZ(float angle)
( begin auto-generated from PShape_rotateZ.xml )
Rotates a shape around the z-axis the amount specified by the
angle parameter.
|
void |
scale(float s)
( begin auto-generated from PShape_scale.xml )
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 |
setAttrib(String name,
int index,
boolean... values) |
void |
setAttrib(String name,
int index,
float... values) |
void |
setAttrib(String name,
int index,
int... values) |
void |
setEmissive(int emissive) |
void |
setEmissive(int index,
int emissive) |
void |
setFill(boolean fill) |
void |
setFill(int fill)
( begin auto-generated from PShape_setFill.xml )
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)
( begin auto-generated from PShape_setStroke.xml )
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) |
void |
setVertex(int index,
float x,
float y,
float z) |
void |
setVertex(int index,
PVector vec) |
void |
solid(boolean solid) |
void |
translate(float tx,
float ty)
( begin auto-generated from PShape_translate.xml )
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) |
addName, ambient, ambient, ambient, applyMatrix, applyMatrix, beginContour, beginShape, beginShape, 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, tintpublic static final int POSITION
public static final int NORMAL
public static final int TEXCOORD
public static final int DIRECTION
public static final int OFFSET
public int glUsage
public PShapeOpenGL(PGraphicsOpenGL pg, int family)
public PShapeOpenGL(PGraphicsOpenGL pg, int kind, float... p)
public void addChild(PShape who)
addChild in class PShapewho - any variable of type PShapePShape.getChild(int)public void addChild(PShape who, int idx)
public void removeChild(int idx)
PShaperemoveChild in class PShapepublic static PShapeOpenGL createShape(PGraphicsOpenGL pg, PShape src)
public static void copyGroup(PGraphicsOpenGL pg, PShape src, PShape dest)
public float getWidth()
PShapepublic float getHeight()
PShapepublic float getDepth()
PShapepublic void setTextureMode(int mode)
setTextureMode in class PShapepublic void setTexture(PImage tex)
setTexture in class PShapepublic void solid(boolean solid)
public void vertex(float x,
float y,
float z,
float u,
float v)
public void attribPosition(String name,
float x,
float y,
float z)
attribPosition in class PShapepublic void attribNormal(String name,
float nx,
float ny,
float nz)
attribNormal in class PShapepublic void attribColor(String name,
int color)
attribColor in class PShapepublic void setParams(float[] source)
public void setPath(int vcount,
float[][] verts,
int ccount,
int[] codes)
public void translate(float tx,
float ty)
PShapetranslate in class PShapetx - left/right translationty - up/down translationPShape.rotate(float),
PShape.scale(float),
PShape.resetMatrix()public void translate(float tx,
float ty,
float tz)
public void rotate(float angle)
PShaperotate in class PShapeangle - angle of rotation specified in radiansPShape.rotateX(float),
PShape.rotateY(float),
PShape.rotateZ(float),
PShape.scale(float),
PShape.translate(float, float),
PShape.resetMatrix()public void rotateX(float angle)
PShaperotateX in class PShapeangle - angle of rotation specified in radiansPShape.rotate(float),
PShape.rotateY(float),
PShape.rotateZ(float),
PShape.scale(float),
PShape.translate(float, float),
PShape.resetMatrix()public void rotateY(float angle)
PShaperotateY in class PShapeangle - angle of rotation specified in radiansPShape.rotate(float),
PShape.rotateX(float),
PShape.rotateZ(float),
PShape.scale(float),
PShape.translate(float, float),
PShape.resetMatrix()public void rotateZ(float angle)
PShaperotateZ in class PShapeangle - angle of rotation specified in radiansPShape.rotate(float),
PShape.rotateX(float),
PShape.rotateY(float),
PShape.scale(float),
PShape.translate(float, float),
PShape.resetMatrix()public void rotate(float angle,
float v0,
float v1,
float v2)
public void scale(float s)
PShapescale in class PShapes - percentate to scale the objectPShape.rotate(float),
PShape.translate(float, float),
PShape.resetMatrix()public void scale(float x,
float y,
float z)
public void applyMatrix(PMatrix2D source)
applyMatrix in class PShapepublic void applyMatrix(float n00,
float n01,
float n02,
float n10,
float n11,
float n12)
applyMatrix in class PShapepublic 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)
applyMatrix in class PShapepublic void resetMatrix()
PShaperesetMatrix in class PShapePShape.rotate(float),
PShape.scale(float),
PShape.translate(float, float)public void bezierDetail(int detail)
bezierDetail in class PShapepublic void bezierVertex(float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
bezierVertex in class PShapepublic void bezierVertex(float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
bezierVertex in class PShapepublic void quadraticVertex(float cx,
float cy,
float x3,
float y3)
quadraticVertex in class PShapepublic void quadraticVertex(float cx,
float cy,
float cz,
float x3,
float y3,
float z3)
quadraticVertex in class PShapepublic void curveDetail(int detail)
curveDetail in class PShapepublic void curveTightness(float tightness)
curveTightness in class PShapepublic void curveVertex(float x,
float y)
curveVertex in class PShapepublic void curveVertex(float x,
float y,
float z)
curveVertex in class PShapepublic int getVertexCount()
getVertexCount in class PShapePShape.getVertex(int),
PShape.setVertex(int, float, float)public float getVertexX(int index)
getVertexX in class PShapepublic float getVertexY(int index)
getVertexY in class PShapepublic float getVertexZ(int index)
getVertexZ in class PShapepublic void setVertex(int index,
float x,
float y)
setVertex in class PShapeindex - the location of the vertexx - the x value for the vertexy - the y value for the vertexPShape.getVertex(int),
PShape.getVertexCount()public void setVertex(int index,
float x,
float y,
float z)
public void setVertex(int index,
PVector vec)
public float getNormalX(int index)
getNormalX in class PShapepublic float getNormalY(int index)
getNormalY in class PShapepublic float getNormalZ(int index)
getNormalZ in class PShapepublic void setNormal(int index,
float nx,
float ny,
float nz)
public void setAttrib(String name,
int index,
float... values)
public void setAttrib(String name,
int index,
int... values)
public void setAttrib(String name,
int index,
boolean... values)
public float getTextureU(int index)
getTextureU in class PShapepublic float getTextureV(int index)
getTextureV in class PShapepublic void setTextureUV(int index,
float u,
float v)
setTextureUV in class PShapepublic void setFill(int fill)
PShapepublic void setStroke(int stroke)
PShapepublic float getStrokeWeight(int index)
getStrokeWeight in class PShapepublic void setStrokeWeight(float weight)
setStrokeWeight in class PShapepublic void setStrokeWeight(int index,
float weight)
setStrokeWeight in class PShapepublic void setStrokeJoin(int join)
setStrokeJoin in class PShapepublic void setStrokeCap(int cap)
setStrokeCap in class PShapepublic int getAmbient(int index)
getAmbient in class PShapepublic void setAmbient(int ambient)
setAmbient in class PShapepublic void setAmbient(int index,
int ambient)
setAmbient in class PShapepublic int getSpecular(int index)
getSpecular in class PShapepublic void setSpecular(int specular)
setSpecular in class PShapepublic void setSpecular(int index,
int specular)
setSpecular in class PShapepublic int getEmissive(int index)
getEmissive in class PShapepublic void setEmissive(int emissive)
setEmissive in class PShapepublic void setEmissive(int index,
int emissive)
setEmissive in class PShapepublic float getShininess(int index)
getShininess in class PShapepublic void setShininess(float shininess)
setShininess in class PShapepublic void setShininess(int index,
float shine)
setShininess in class PShapepublic int[] getVertexCodes()
getVertexCodes in class PShapepublic int getVertexCodeCount()
getVertexCodeCount in class PShapepublic int getVertexCode(int index)
getVertexCode in class PShapepublic PShape getTessellation()
getTessellation in class PShapepublic float[] getTessellation(int kind,
int data)
public boolean contains(float x,
float y)
PShapepublic void disableStyle()
PShapedisableStyle in class PShapePShape.enableStyle()public void enableStyle()
PShapeenableStyle in class PShapePShape.disableStyle()