Java Code Examples for processing.opengl.PGraphics3D#background()
The following examples show how to use
processing.opengl.PGraphics3D#background() .
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: Skylight_Movie2.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(16); displaySamples(canvas); } canvas.shape(group_cubes); // ground plane float sx = bounds[3] - bounds[0]; float sy = bounds[4] - bounds[1]; float sz = bounds[5] - bounds[2]; canvas.noStroke(); canvas.fill(16,64,180); // canvas.fill(180,120,64); // canvas.box(sx*1.5f, sy*1.5f, 10); canvas.box(sx, sy, 10); }
Example 2
Source File: Skylight_BulletPhysics_Breakable3.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.shape(group_collisions); pg.popMatrix(); }
Example 3
Source File: Skylight_BulletPhysics_Breakable_VideoExport.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 4
Source File: Skylight_BulletPhysics_Breakable.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 5
Source File: Skylight_Movie.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(BACKGROUND_COLOR); } // draw shapes canvas.pushMatrix(); canvas.translate(0, 0, cube_size + cube_size * cube_numy /2); canvas.rotateX(-PI/2); canvas.shape(group_cubes); canvas.popMatrix(); // draw ground plane float sx = scene_bounds[3] - scene_bounds[0]; float sy = scene_bounds[4] - scene_bounds[1]; canvas.noStroke(); canvas.fill(255); canvas.ellipse(0,0, sx * SQRT2, sy * SQRT2); }
Example 6
Source File: Skylight_Capture.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(BACKGROUND_COLOR); } // draw shapes canvas.pushMatrix(); canvas.translate(0, 0, cube_size + cube_size * cube_numy /2 + 50); canvas.rotateX(-PI/2); if(group_cubes != null){ canvas.shape(group_cubes); } canvas.popMatrix(); // draw ground plane float sx = scene_bounds[3] - scene_bounds[0]; float sy = scene_bounds[4] - scene_bounds[1]; canvas.noStroke(); canvas.fill(255); canvas.ellipse(0,0, sx * SQRT2, sy * SQRT2); }
Example 7
Source File: Skylight_Movie1.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(16); displaySamples(canvas); } canvas.shape(group_cubes); // ground plane float sx = bounds[3] - bounds[0]; float sy = bounds[4] - bounds[1]; float sz = bounds[5] - bounds[2]; canvas.noStroke(); canvas.fill(16,64,180); // canvas.fill(180,120,64); // canvas.box(sx*1.5f, sy*1.5f, 10); canvas.box(sx, sy, 10); }
Example 8
Source File: Skylight_BulletPhysics_TowerDemolition.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 9
Source File: Skylight_Capture1.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(16); displaySamples(canvas); } // ground plane float sx = bounds[3] - bounds[0]; float sy = bounds[4] - bounds[1]; float sz = bounds[5] - bounds[2]; canvas.pushMatrix(); canvas.translate(0, 0, 20 + sz/2); canvas.rotateX(-PI/2); canvas.shape(group_cubes); canvas.popMatrix(); canvas.noStroke(); canvas.fill(16,64,180); // canvas.fill(180,120,64); // canvas.box(sx*1.5f, sy*1.5f, 10); canvas.box(sx, sy, 10); }
Example 10
Source File: Skylight_BulletPhysics_MengerSponge.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(180); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 11
Source File: Skylight_BulletPhysics_CellFracture.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 12
Source File: Skylight_BulletPhysics_Cubes.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 13
Source File: Skylight_Cubes.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(16); displaySamples(canvas); } canvas.shape(group_cubes); // ground plane float sx = bounds[3] - bounds[0]; float sy = bounds[4] - bounds[1]; float sz = bounds[5] - bounds[2]; canvas.noStroke(); canvas.fill(16,64,180); // canvas.box(sx*1.5f, sy*1.5f, 10); canvas.box(sx, sy, 10); }
Example 14
Source File: Skylight_PoissonSphereSamples.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(16); displaySamples(canvas); } canvas.shape(shp_samples_spheres); // ground plane float sx = bounds[3] - bounds[0]; float sy = bounds[4] - bounds[1]; float sz = bounds[5] - bounds[2]; canvas.noStroke(); canvas.fill(16,64,180); canvas.box(sx*1.5f, sy*1.5f, 10); }
Example 15
Source File: Skylight_BulletPhysics_Basic.java From PixelFlow with MIT License | 6 votes |
public void displayScene(PGraphics3D pg){ if(pg == skylight.renderer.pg_render){ pg.background(16); } if(pg == geombuffer.pg_geom){ pg.background(255, 255); pg.pgl.clearColor(1, 1, 1, 6000); pg.pgl.clear(PGL.COLOR_BUFFER_BIT); } pg.pushMatrix(); pg.applyMatrix(mat_scene_view); pg.shape(group_bulletbodies); pg.popMatrix(); }
Example 16
Source File: Skylight_Movie3.java From PixelFlow with MIT License | 5 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == skylight.renderer.pg_render){ canvas.background(255); } // ground plane float sx = bounds[3] - bounds[0]; float sy = bounds[4] - bounds[1]; float sz = bounds[5] - bounds[2]; // sx *= 2; // sy *= 2; canvas.pushMatrix(); canvas.translate(0, 0, cube_size + cube_size * cube_numy /2); canvas.rotateX(-PI/2); canvas.shape(group_cubes); canvas.popMatrix(); // canvas.beginShape(QUAD); // canvas.texture(pg_src); // canvas.textureMode(NORMAL); // canvas.vertex(bounds[0], bounds[1], 20, 0,0); // canvas.vertex(bounds[3], bounds[1], 20, 1,0); // canvas.vertex(bounds[3], bounds[4], 20, 1,1); // canvas.vertex(bounds[0], bounds[4], 20, 0,1); // canvas.endShape(); canvas.noStroke(); canvas.fill(255); // canvas.fill(16,64,255); // canvas.fill(96,160,255); // canvas.fill(180,120,64); // canvas.fill(255,180,128); // canvas.box(sx*1.5f, sy*1.5f, 10); // canvas.box(sx, sy, 10); // canvas.rect(-sx/2, -sy/2, sx, sy); canvas.ellipse(0,0, sx * SQRT2, sy * SQRT2); }
Example 17
Source File: AntiAliasingComparison.java From PixelFlow with MIT License | 5 votes |
public void displaySceneWrap(PGraphics3D canvas){ canvas.beginDraw(); DwUtils.copyMatrices((PGraphics3D) this.g, canvas); float BACKGROUND_COLOR_GAMMA = (float) (Math.pow(BACKGROUND_COLOR/255.0, gamma) * 255.0); // background canvas.blendMode(PConstants.BLEND); canvas.background(BACKGROUND_COLOR_GAMMA); displayScene(canvas); canvas.endDraw(); }
Example 18
Source File: PickAndMove.java From PixelFlow with MIT License | 5 votes |
public void displayScene(PGraphics3D canvas){ if(canvas == pg_pick){ canvas.blendMode(REPLACE); canvas.clear(); canvas.noLights(); canvas.shape(group_pick); } else { canvas.blendMode(BLEND); canvas.background(32); canvas.lights(); canvas.shape(shp_gizmo); canvas.shape(shp_grid); canvas.shape(group_render); } }
Example 19
Source File: DepthOfField_Demo.java From PixelFlow with MIT License | 5 votes |
public void displayScene(PGraphics3D canvas){ // lights canvas.directionalLight(255, 255, 255, 200,600,400); canvas.directionalLight(255, 255, 255, -200,-600,-400); canvas.ambientLight(64, 64, 64); if(canvas == geombuffer.pg_geom){ canvas.background(255, 255); canvas.pgl.clearColor(1, 1, 1, 6000); canvas.pgl.clear(PGL.COLOR_BUFFER_BIT); } sceneShape(canvas); }
Example 20
Source File: DepthOfField_Demo.java From PixelFlow with MIT License | 5 votes |
public void displaySceneWrap(PGraphics3D canvas){ canvas.beginDraw(); DwUtils.copyMatrices((PGraphics3D) this.g, canvas); // background canvas.blendMode(PConstants.BLEND); canvas.background(2); displayScene(canvas); canvas.endDraw(); }