Trait fdg_sim::ForceGraphHelper
source · [−]pub trait ForceGraphHelper<N, E> {
fn add_force_node(&mut self, name: impl AsRef<str>, data: N) -> NodeIndex;
fn add_force_node_with_color(
&mut self,
name: impl AsRef<str>,
data: N,
color: [u8; 4]
) -> NodeIndex;
fn add_force_node_with_coords(
&mut self,
name: impl AsRef<str>,
data: N,
location: Vec3
) -> NodeIndex;
}
Expand description
Syntactic sugar to make adding Node
s to a ForceGraph
easier.
Required Methods
fn add_force_node(&mut self, name: impl AsRef<str>, data: N) -> NodeIndex
fn add_force_node(&mut self, name: impl AsRef<str>, data: N) -> NodeIndex
Add a Node
to the graph with only the name and arbitrary data.
Add a Node
to the graph with the name, arbitrary data, and a custom color.