javafx-3d

Coloring individual triangles in a triangle mesh on javafx

雨燕双飞 提交于 2019-11-27 04:34:56
问题 I have a triangle mesh object in JAVAFX and would like to either color individual triangles of the triangle mesh or color individual vertices of each triangle and have the triangle be colored according to an interpolation of the colors of each vertex (say for instance with a Gouraud shading). The particular triangle mesh object is an icosphere with millions of faces (that is why I am using a triangle mesh: I need speed). I have NOT used texture coordinates since I have been unable to find a

Rotate a 3D object on 3 axis in JavaFX properly

限于喜欢 提交于 2019-11-27 02:25:21
问题 So the method that I've used so far to rotate objects in JavaFX was that I layered it in 3 groups, each of them with a Rotate attached and locked to a single axis like so: Rotate heading, roll, pitch; Group normalrotate, rollrotate, verticalrotate; heading.setAxis(new Point3D(0,1,0)); normalrotate.getTransforms().add(heading); roll.setAxis(new Point3D(0,0,1)); rollrotate.getTransforms().add(roll); pitch.setAxis(new Point3D(1,0,0)); verticalrotate.getTransforms().add(pitch); and did a setAngle

JavaFX Moving 3D objects with mouse on a virtual plane

∥☆過路亽.° 提交于 2019-11-27 01:41:37
问题 As I was creating my first 3D game in JavaFX - where you would be able to assemble ships from parts using the mouse. This presents a problem since JAVAFX seems to have no native metods that work for converting PerspectiveCamera screen 2D coordinates into the scene's 3D space. Here is a representation of what I'm trying to acheive. A block moved by the mouse should move on an imaginary plane that is always rotated 90 in relation to the camera: I've tried to solve the problem with trigonometry