pub fn insert_inside(&mut self, outer_id: NodeId, items: &[NodeId]) {
        let outer = self.nodes.get(&outer_id).unwrap();
        for item_id in items {
            let item = self.nodes.get(item_id).unwrap();
            self.solver
                .add_constraints(&[
                    item.x | GE(REQUIRED) | outer.x,
                    item.y | GE(REQUIRED) | outer.y,
                    item.z | GE(REQUIRED) | outer.z,
                    item.x + item.width | LE(REQUIRED) | outer.x + outer.width,
                    item.y + item.height | LE(REQUIRED) | outer.y + outer.height,
                    item.z + item.depth | LE(REQUIRED) | outer.z + outer.depth,
                ])
                .unwrap();
        }
    }
/// Require that all `items` are bounded within `outer`
Require that all `items` are bounded within `outer`
Require that all ` items ` are bounded within ` outer `
pub fn insert_inside(&mut self, outer_id: NodeId, items: &[NodeId]) {
        let outer = self.nodes.get(&outer_id).unwrap();
        for item_id in items {
            let item = self.nodes.get(item_id).unwrap();
            self.solver
                .add_constraints(&[
                    item.x | GE(REQUIRED) | outer.x,
                    item.y | GE(REQUIRED) | outer.y,
                    item.z | GE(REQUIRED) | outer.z,
                    item.x + item.width | LE(REQUIRED) | outer.x + outer.width,
                    item.y + item.height | LE(REQUIRED) | outer.y + outer.height,
                    item.z + item.depth | LE(REQUIRED) | outer.z + outer.depth,
                ])
                .unwrap();
        }
    }
pub fn insert_inside ( & mut self , outer_id : NodeId , items : & [ NodeId ] ) { let outer = self . nodes . get ( & outer_id ) . unwrap ( ) ; for item_id in items { let item = self . nodes . get ( item_id ) . unwrap ( ) ; self . solver . add_constraints ( & [ item . x | GE ( REQUIRED ) | outer . x , item . y | GE ( REQUIRED ) | outer . y , item . z | GE ( REQUIRED ) | outer . z , item . x + item . width | LE ( REQUIRED ) | outer . x + outer . width , item . y + item . height | LE ( REQUIRED ) | outer . y + outer . height , item . z + item . depth | LE ( REQUIRED ) | outer . z + outer . depth , ] ) . unwrap ( ) ; } }
Require that all `items` are bounded within `outer`
Require that all ` items ` are bounded within ` outer `
&mut self
outer_id
NodeId
items
&[NodeId]
&mut self
outer_id
NodeId
items
&[NodeId]