-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test_building01.java
52 lines (40 loc) · 1.12 KB
/
Test_building01.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package archi;
import java.util.Random;
import peasy.PeasyCam;
import processing.core.PApplet;
public class Test_building01 extends PApplet{
PeasyCam cam;
Render render;
Building building;
public void setup() {
size(1000, 1000, P3D);
cam = new PeasyCam(this, 1000);
cam.setMinimumDistance(50);
cam.setMaximumDistance(500);
render = new Render(this);
building = new Building(200,50,500);
building.setSeed(100); //100,102,103,104,150,200,
building.addSlice(50,50,50,50,50,50,50,50,50);
building.addSlice(30, 7000);
}
public void draw() {
background(255);
directionalLight(255, 255, 255, 1, 1, -1);
directionalLight(200, 200, 200, -1, -1, 1);
building.draw(render);
drawSystem();
}
public static void main(String[] args) {
PApplet.main("archi.Test_building01");
}
private void drawSystem() {
this.pushStyle();
this.stroke(255, 0, 0);
this.line(0, 0, 0, 10000, 0, 0);
this.stroke(0, 255, 0);
this.line(0, 0, 0, 0, 10000, 0);
this.stroke(0, 0, 255);
this.line(0, 0, 0, 0, 0, 10000);
this.popStyle();
}
}