Node<T > class
Constructors
Node (T data , [Vector2? position ])
Properties
data
→ T
final
hashCode
→ int
The hash code for this object.
no setter override
mass
↔ double
getter/setter pair
position
↔ Vector2
getter/setter pair
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
applyForce (Vector2 force )
→ void
calculateRepulsionForce (Node other , {required double k })
→ Vector2
Coulomb's law calculates the repulsive force
connect (Node other )
→ Edge
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
static ()
→ void
toString ()
→ String
A string representation of this object.
override
unStatic ()
→ void
updatePosition ({required double scaling , required double minVelocity , required double maxStaticFriction , required double damping })
→ bool
scaling: displacement scaling factor 0-1
return: whether it is in motion
Within a time step, calculate the displacement of the node based on mechanics,
also need to consider whether the current node is stationary,
then consider the static friction, consider the dynamic friction
flutter_force_directed_graph 1.0.6