Struct force_graph::NodeData [−][src]
pub struct NodeData<UserNodeData = ()> { pub x: f32, pub y: f32, pub mass: f32, pub is_anchor: bool, pub user_data: UserNodeData, }
Expand description
Stores data associated with a node that can be modified by the user.
Fields
x: f32
The horizontal position of the node.
y: f32
The vertical position of the node.
mass: f32
The mass of the node.
Increasing the mass of a node increases the force with which it repels other nearby nodes.
is_anchor: bool
Whether the node is fixed to its current position.
user_data: UserNodeData
Arbitrary user data.
Defaults to ()
if not specified.
Trait Implementations
Auto Trait Implementations
impl<UserNodeData> RefUnwindSafe for NodeData<UserNodeData> where
UserNodeData: RefUnwindSafe,
impl<UserNodeData> UnwindSafe for NodeData<UserNodeData> where
UserNodeData: UnwindSafe,