Available Methods
- fill ( )
- endShape ( )
- noStroke ( )
- beginDraw ( )
- beginShape ( )
- translate ( )
- stroke ( )
- popMatrix ( )
- vertex ( )
- endDraw ( )
- rect ( )
- pushMatrix ( )
- noFill ( )
- ellipse ( )
- background ( )
- shape ( )
- image ( )
- texture ( )
- clear ( )
- pop ( )
- line ( )
- rotate ( )
- popStyle ( )
- rotateX ( )
- smooth ( )
- text ( )
- rotateZ ( )
- textureMode ( )
- rectMode ( )
- filter ( )
- push ( )
- strokeWeight ( )
- hint ( )
- textureWrap ( )
- textFont ( )
- box ( )
- showWarning ( )
- ellipseMode ( )
- scale ( )
- createShape ( )
- textSize ( )
- sphere ( )
- textAlign ( )
- noSmooth ( )
Related Classes
- java.io.InputStream
- java.net.URL
- java.util.stream.Collectors
- java.net.URI
- java.nio.ByteBuffer
- java.net.URISyntaxException
- java.awt.image.BufferedImage
- java.awt.Font
- java.awt.Rectangle
- java.awt.FontFormatException
- processing.core.PApplet
- processing.core.PImage
- com.jogamp.opengl.GL2
- processing.core.PConstants
- processing.core.PFont
- processing.core.PVector
- com.jogamp.opengl.GL4
- processing.core.PShape
- processing.opengl.PGL
- processing.opengl.PGraphicsOpenGL
- processing.opengl.Texture
Java Code Examples for processing.core.PGraphics#sphere()
The following examples show how to use
processing.core.PGraphics#sphere() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Demo_SpatialLighting.java From haxademic with MIT License | 5 votes |
protected void drawLight(PGraphics pg) { PG.push(pg); pg.fill(color.colorInt()); pg.translate(position.x * roomW, position.y * roomH, position.z * roomD); pg.sphere(20); // draw debug channel text pg.translate(25, 0, 0); pg.fill(0, 255, 0); pg.text(name, 0, 0); // pop PG.pop(pg); }
Example 2
Source File: Particle3d.java From haxademic with MIT License | 5 votes |
public void update(PGraphics pg) { if(available()) return; // update position if(gravity.mag() > 0) speed.add(gravity); if(acceleration != 1) speed.mult(acceleration); pos.add(speed); rotation.add(rotationSpeed); // update size sizeProgress.update(); float curSize = size * Penner.easeOutSine(sizeProgress.value()); if(sizeProgress.value() == 1) sizeProgress.setTarget(0); // draw image pg.pushMatrix(); pg.translate(pos.x, pos.y, pos.z); pg.rotateX(rotation.x); pg.rotateY(rotation.y); pg.rotateZ(rotation.z); pg.fill(color); if(customShape != null) { pg.pushMatrix(); pg.scale(Penner.easeOutExpo(sizeProgress.value()) * curSize / customShape.getHeight()); pg.shape(customShape); pg.popMatrix(); } else { if(isSphere) { pg.sphere(curSize/2f); } else { pg.box(curSize, curSize, curSize); } } pg.fill(255); pg.popMatrix(); }