Many 3d programs uses an outline to hint the user when 3d object is selected .
is there a way to mimic that behavior in javafx ?
Many 3d programs uses an outline to hint the user when 3d object is selected .
is there a way to mimic that behavior in javafx ?
Copyright © 2021 Jogjafile Inc.
Outline with a scaled 3d object with front faces culled
In this aproach . A 3d object is instansiated with the class type of
PickResultnode when mouse is entered on aGroupnode , that object has the same sizes of the picked one and the same translations ( in this case is just x axis ) but is slightly scaled (1.1). So , the 3d object is bigger and it is in the same spot but is not overlaping the shape3d underneath beacuse any face looking toward the camera is culled with Culface.FRONT enum inShape3d.setCullFace(). Finally , when mouse exits pickresult node the 3d object is removed from group's children allowing next iterations . This is a single class functional javafx app you can tryApp.java
Note Shape3d objects scale from its very center . If this method will be implemented with custom MeshView objects , those meshes needs to scale at its center as well