cohydra.visualization.netanimvisualization¶
NetAnim Visualization using the NetAnim format.
Classes
The NetAnimVisualization class produces a netanim.xml file which contains visualization details in the NetAnim format. |
-
class
cohydra.visualization.netanimvisualization.
NetAnimVisualization
[source]¶ Bases:
cohydra.visualization.visualization.Visualization
The NetAnimVisualization class produces a netanim.xml file which contains visualization details in the NetAnim format.
To create a NetAnim visualization, use the following code and hand the object to the scenario.
from cohydra.visualization.netanimvisualization import NetAnimVisualization visualization = NetAnimVisualization() visualization.set_node_size(5.0) scenario.set_visualization(visualization)
-
animation_interface
= None¶ The netanim animation interface
-
prepare_node
(node)[source]¶ Gives the visualization the oppertunity to prepare a node
- Parameters
node (
Node
) – The related node.
-
set_node_position
(node, x, y, z=0)[source]¶ Set the position of the node in the visualization.
- Parameters
node (
Node
) – The related node.x (float) – The x-position.
y (float) – The y-position.
z (float) – The z-position.
-
static
get_visualization
()¶ Return the current visualization. Default is no visualization
-
set_node_size
(new_node_size: float)¶ Sets a new node size
- Parameters
new_node_size (float) – The new node size.
-
set_output_directory
(new_output_directory: str)¶ Sets a new output directory
- Parameters
new_output_directory (str) – The new output directory
-
static
set_visualization
(visualization)¶ Sets a new visualization.
- Parameters
node (
Visualization
) – The new visualization object.
-
Inheritance Diagramm