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
package my3d;
import java.util.ArrayList;
import javafx.scene.canvas.Canvas;
import javafx.scene.control.CheckMenuItem;
import javafx.scene.control.MenuItem;
public abstract class _viewer3d5 extends _viewer3d4 {
@Override
public _viewport3d create_viewport(Canvas view) {
return new _viewport3d3(view);
}
@Override
public void init_menu() {
super.init_menu();
_viewport3d3 vp3 = (_viewport3d3)vp;
ArrayList<MenuItem> items = add_setting_menu(
(index) -> {
vp3.set_zbuffer_enable(!vp3.is_zbuffer_enable());
repaint();
},
"cZバッファ"
);
((CheckMenuItem)items.get(0)).setSelected(vp3.is_zbuffer_enable());
}
}