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: f32The horizontal position of the node.
y: f32The vertical position of the node.
mass: f32The mass of the node.
Increasing the mass of a node increases the force with which it repels other nearby nodes.
is_anchor: boolWhether the node is fixed to its current position.
user_data: UserNodeDataArbitrary 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,