[][src]Trait broccoli::query::NodeMassTrait

pub trait NodeMassTrait: Clone + Copy {
    type No: Copy + Send;
    type Num: Num;
    type Item: Aabb<Num = Self::Num>;
    pub fn get_rect(no: &Self::No) -> &Rect<Self::Num>;
pub fn handle_node_with_node(&self, a: &mut Self::No, b: &mut Self::No);
pub fn handle_bot_with_bot(
        &self,
        a: PMut<'_, Self::Item>,
        b: PMut<'_, Self::Item>
    );
pub fn handle_node_with_bot(
        &self,
        a: &mut Self::No,
        b: PMut<'_, Self::Item>
    );
pub fn is_far_enough(&self, b: [Self::Num; 2]) -> bool;
pub fn is_far_enough_half(&self, b: [Self::Num; 2]) -> bool;
pub fn apply_to_bots<'a, I: Iterator<Item = PMut<'a, Self::Item>>>(
        &'a self,
        a: &'a Self::No,
        it: I
    );
pub fn new<'a, I: Iterator<Item = &'a Self::Item>>(
        &'a self,
        it: I,
        rect: Rect<Self::Num>
    ) -> Self::No; }

User trait to fill out which is then passed to the nbody query function.

Associated Types

type No: Copy + Send[src]

type Num: Num[src]

type Item: Aabb<Num = Self::Num>[src]

Loading content...

Required methods

pub fn get_rect(no: &Self::No) -> &Rect<Self::Num>[src]

pub fn handle_node_with_node(&self, a: &mut Self::No, b: &mut Self::No)[src]

pub fn handle_bot_with_bot(
    &self,
    a: PMut<'_, Self::Item>,
    b: PMut<'_, Self::Item>
)
[src]

pub fn handle_node_with_bot(&self, a: &mut Self::No, b: PMut<'_, Self::Item>)[src]

pub fn is_far_enough(&self, b: [Self::Num; 2]) -> bool[src]

pub fn is_far_enough_half(&self, b: [Self::Num; 2]) -> bool[src]

pub fn apply_to_bots<'a, I: Iterator<Item = PMut<'a, Self::Item>>>(
    &'a self,
    a: &'a Self::No,
    it: I
)
[src]

pub fn new<'a, I: Iterator<Item = &'a Self::Item>>(
    &'a self,
    it: I,
    rect: Rect<Self::Num>
) -> Self::No
[src]

Loading content...

Implementors

Loading content...