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

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.