it.unibo.scafi.renderer3d.manager
Adds a new 3D node at the specified position and with the specified ID.
Adds a new 3D node at the specified position and with the specified ID.
the position where the new node will be placed
the unique id of the new node
This method adds a small job to the ones that the javaFx thread has to run and it waits for its result.
This method adds a small job to the ones that the javaFx thread has to run and it waits for its result. Therefore, it blocks the calling thread until the javaFx thread is free enough to run the new job. Since the rest of the api returns immediately, this should be used to avoid the main loop being too fast and flooding the javaFx thread with requests, by calling this method in the main loop.
Connects the two specified nodes if not already connected, adding the connection to the scene.
Connects the two specified nodes if not already connected, adding the connection to the scene.
the id of the first node to connect
the id of the second node to connect
Unit, since it has the side effect of connecting the two nodes.
Decreases the font size of every label.
Decreases the font size of every label. This applies to labels not already created, too.
Disconnects the two specified nodes if not already disconnected, removing the connection from the scene.
Disconnects the two specified nodes if not already disconnected, removing the connection from the scene.
the id of the first node to disconnect
the id of the second node to disconnect
Unit, since it has the side effect of disconnecting the two nodes.
Enables or disables the colored sphere (not the outlined one) centered on the specified node.
Enables or disables the colored sphere (not the outlined one) centered on the specified node.
the id of the affected node
specifies if the method should enable or disable the sphere
Gets the first node selected, the one that is in the center of the selection cube.
Gets the first node selected, the one that is in the center of the selection cube.
a String if the initial node exists, None otherwise.
Gets the IDs of the currently selected nodes.
Gets the IDs of the currently selected nodes.
a Set containing the IDs of the currently selected nodes
Increases the font size of every label.
Increases the font size of every label. This applies to labels not already created, too.
This can be used to know whether the user is currently attempting a selection or not.
This can be used to know whether the user is currently attempting a selection or not.
true if the user is currently attempting a selection, false otherwise
Moves the node with the specified ID to the specified position.
Moves the node with the specified ID to the specified position.
the unique id of the node to move
the new position to set
whether the view should show the movement direction or not
Removes the node with the specified ID, so that it's not in the scene anymore.
Removes the node with the specified ID, so that it's not in the scene anymore.
the unique id of the node to remove
Deletes all the nodes and connections, obtaining an empty scene with only a light and the camera facing the nodes.
Deletes all the nodes and connections, obtaining an empty scene with only a light and the camera facing the nodes.
Unit, since it has the side effect of resetting the scene
Sets the action to execute whenever the user moves the selected nodes.
Sets the action to execute whenever the user moves the selected nodes.
the action to set
Sets the background color of the scene.
Sets the background color of the scene.
the color to set
Unit, since it has the side effect of setting the scene's color
Sets the background image of the scene.
Sets the background image of the scene.
the image to set as background
Unit, since it has the side effect of setting the scene's background image
Sets the camera scale to the new one, making it bigger or smaller.
Sets the camera scale to the new one, making it bigger or smaller. This is useful if the scene is not well visible because the nodes are too big or small to be seen.
the scale to set
Sets the color that every connection will have.
Sets the color that every connection will have.
the chosen color
Unit, since it has the side effect of changing the connection color
Sets the color of the selected nodes.
Sets the color of the selected nodes. This does not set the color of nodes that might get selected in the future.
the new color of the selected nodes
Sets the color of all the colored spheres centered on the nodes.
Sets the color of all the colored spheres centered on the nodes. This applies to spheres not already created, too.
the new default color for the spheres
Sets the color of the specified node to a new one.
Sets the color of the specified node to a new one.
the unique id of the node
the new color of the node
Sets the label text of the specified node to the new text
Sets the label text of the specified node to the new text
the unique id of the node
the new text to set
Sets the label text of the specified node to the position of that node in 2D, from the point of view of the camera
Sets the label text of the specified node to the position of that node in 2D, from the point of view of the camera
the unique id of the node
the function used to format the position before setting it as the label's text
Sets the default and movement colors of all the nodes.
Sets the default and movement colors of all the nodes. This applies to nodes not already created, too.
the new default color for the nodes
Sets the scale of all the nodes (and also their labels).
Sets the scale of all the nodes (and also their labels). This applies to nodes not already created, too.
the new scale of the nodes
Sets the scene's size and also the camera, connections and nodes scale accordingly, so that the scene is visible.
Sets the scene's size and also the camera, connections and nodes scale accordingly, so that the scene is visible. Setting this value correctly makes it possible to update the labels' position only when needed. ATTENTION: big values will cause performance problems, while small values move the labels too far away from the nodes. If sceneSize is 1000 the 3d points should be positioned in a 1000*1000*1000 space. This method has to be called before setting the scale of the nodes.
it's the side's length of the imaginary cube that encloses the whole scene
Unit, since it has the side effect of changing the scene's size
Sets the color of the current selection.
Sets the color of the current selection.
the new color of the selection
Sets the radius of the colored spheres and the outlined ones, centered on the nodes.
Sets the radius of the colored spheres and the outlined ones, centered on the nodes.
the radius of the outlined spheres
the radius of the colored spheres
Shows the node as a normal, non moving node.
Shows the node as a normal, non moving node.
the unique id of the node to move
Toggles the connections on or off, making them visible or invisible.
Toggles the connections on or off, making them visible or invisible.
Unit, since it has the side effect of making the connections visible or invisible
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
Main entry point of this module. This class extends JFXPanel (because NetworkRenderer does) so that it can be used as a normal JPanel inside Swing. This panel is the main one, it renders all the nodes, the connections, etc. This class offers all the main APIs needed for adding, removing and moving nodes and connections, handling the selected nodes, etc. Developers can also enable a FPS counter to check performance (off by default).