6 package eu.mihosoft.vrl.v3d;
8 import java.util.ArrayList;
9 import java.util.Arrays;
10 import java.util.List;
11 import javafx.beans.value.ObservableValue;
12 import javafx.scene.Group;
13 import javafx.scene.PerspectiveCamera;
14 import javafx.scene.SceneAntialiasing;
15 import javafx.scene.SubScene;
16 import javafx.scene.input.MouseButton;
17 import javafx.scene.layout.Pane;
18 import javafx.scene.paint.Color;
19 import javafx.scene.paint.Material;
20 import javafx.scene.paint.PhongMaterial;
21 import javafx.scene.shape.CullFace;
22 import javafx.scene.shape.Mesh;
23 import javafx.scene.shape.MeshView;
52 private final Group
root =
new Group();
68 this(min, max, Arrays.asList(
meshes));
80 this.materials =
new ArrayList<>();
81 this.bounds =
new Bounds(min, max);
86 PhongMaterial material =
new PhongMaterial(Color.RED);
100 MeshContainer(Vector3d min, Vector3d max, List<Mesh>
meshes, List<Material>
materials) {
103 this.bounds =
new Bounds(min, max);
109 throw new IllegalArgumentException(
"Mesh list and Material list must not differ in size!");
182 List<MeshView> result =
new ArrayList<>(
meshes.size());
184 for (
int i = 0; i <
meshes.size(); i++) {
186 Mesh mesh =
meshes.get(i);
189 MeshView view =
new MeshView(mesh);
190 view.setMaterial(mat);
191 view.setCullFace(CullFace.NONE);
final List< Material > materials
List< Material > getMaterials()
List< MeshView > getAsMeshViews()
final List< Mesh > meshes
static Vector3d y(double y)
static Vector3d z(double z)
static Vector3d x(double x)