Struct pathfinder::Group
source · Expand description
Holds a set of nodes and applies properties to all child nodes when drawn. The group itself has no displayed output and is not visible.
Fields§
§settings: Node
§nodes: Vec<Node>
Implementations§
source§impl Group
impl Group
sourcepub fn new(name: &str, coordinates: Coordinate) -> Self
pub fn new(name: &str, coordinates: Coordinate) -> Self
Constructs a new Group
sourcepub fn new_node_min_max(&mut self, min: u32, max: u32)
pub fn new_node_min_max(&mut self, min: u32, max: u32)
Adds a Node with a specific minimum and maximum distance from the center of the Group.
sourcepub fn new_simple(x: i16, y: i16) -> Self
pub fn new_simple(x: i16, y: i16) -> Self
Removes all non-essentials from the standard implementation.
sourcepub fn get_dynamic_radius(&self) -> u32
pub fn get_dynamic_radius(&self) -> u32
Returns a dynamic radius based on the number of Nodes in the Group.
sourcepub fn gen_color(&self, coordinates: Coordinate) -> Rgba<u8>
pub fn gen_color(&self, coordinates: Coordinate) -> Rgba<u8>
Generates an image::Rgba based on the color of the Group and the distance from center.