Ejemplo n.º 1
0
def nesw(name, **i):
    """
    Make four nodes for n, e, w, s from a location.
    Keywords:
        images: ni, ei, wi, si.
        destinations: n, e, w, s.
    """

    name_ = name + ':'
    ret = []
    left = {'n': 'w', 'e': 'n', 's': 'e', 'w': 's'}
    right = {'n': 'e', 'e': 's', 's': 'w', 'w': 'n'}

    # repair missing positions.
    for d in "nesw":
        if not i.has_key(d + 'i'):
            oldleft = left[d]
            oldright = right[d]
            left[oldright] = oldleft
            right[oldleft] = oldright

    # create the nodes
    for d in "nesw":
        if i.has_key(d + 'i'):
            if i.has_key(d):
                node = lfr(name_ + d, i[d + 'i'], name_ + left[d], i[d],
                           name_ + right[d])
            else:
                node = lr(name_ + d, i[d + 'i'], name_ + left[d],
                          name_ + right[d])

            ret.append(node)

    return ret
Ejemplo n.º 2
0
def nesw(name, **i):
    """
    Make four nodes for n, e, w, s from a location.
    Keywords:
        images: ni, ei, wi, si.
        destinations: n, e, w, s.
    """

    name_ = name + ':'
    ret = []
    left = {'n': 'w', 'e': 'n', 's': 'e', 'w': 's'}
    right = {'n': 'e', 'e': 's', 's': 'w', 'w': 'n'}
    
    # repair missing positions.
    for d in "nesw":
        if not i.has_key(d + 'i'):
            oldleft = left[d]
            oldright = right[d]
            left[oldright] = oldleft
            right[oldleft] = oldright
            
    # create the nodes                
    for d in "nesw":
        if i.has_key(d + 'i'):
            if i.has_key(d):
                node = lfr(
                        name_ + d,
                        i[d + 'i'],
                        name_ + left[d],
                        i[d],
                        name_ + right[d]
                        )
            else:
                node = lr(
                        name_ + d,
                        i[d + 'i'],
                        name_ + left[d],
                        name_ + right[d]
                        )
                
            ret.append(node)

    return ret
Ejemplo n.º 3
0
        ei = nov12(501),    e = 'livingroom:e',
        si = jul12(23),     s = 'playroom_right',
        wi = jul12(30),     w = 'diningroom_in',
    ),
    
    lr('playroom_right',    jul12(27),  'playroom_left',                        'hall:n'),
    lr('playroom_left',     jul12(25),  'hall:n',                               'playroom_right'),

    nesw('livingroom',
        ni = nov12(497),
        ei = nov12(494),
        si = nov12(495),    s = 'stereo_s',
        wi = nov12(496),    w = 'hall:w'
         ),

    lfr('stereo_s', nov12(498), 'stereo_e',     'menu_stereo',  'livingroom:n'),
    lfr('stereo_e', nov12(500), 'livingroom:n', 'porch:e',      'stereo_s'),
                            
    bf('porch:e',           jul12(37),   'porch:w',          'porch:e'),
    bf('porch:w',           jul12(41),   'porch:e',          'livingroom:n'),

    bf('diningroom_in',     r'C:\img\vol1\20010405\dscf0015.jpg',   'diningroom_out',   'diningroom_in'),
    bf('diningroom_out',    r'C:\img\vol1\20010508a\dscf0016.jpg',  'diningroom_in',    'hall:e'),

    nesw('front43',
        ni = nov4(17),
        ei = nov4(18),      e = 'allerton_hawthorne:e',
        si = nov10(381),    s = 'hall:s',
        wi = nov4(16),      w = 'markliesl:w'
    ),
Ejemplo n.º 4
0
     e='livingroom:e',
     si=jul12(23),
     s='playroom_right',
     wi=jul12(30),
     w='diningroom_in',
 ),
 lr('playroom_right', jul12(27), 'playroom_left', 'hall:n'),
 lr('playroom_left', jul12(25), 'hall:n', 'playroom_right'),
 nesw('livingroom',
      ni=nov12(497),
      ei=nov12(494),
      si=nov12(495),
      s='stereo_s',
      wi=nov12(496),
      w='hall:w'),
 lfr('stereo_s', nov12(498), 'stereo_e', 'menu_stereo', 'livingroom:n'),
 lfr('stereo_e', nov12(500), 'livingroom:n', 'porch:e', 'stereo_s'),
 bf('porch:e', jul12(37), 'porch:w', 'porch:e'),
 bf('porch:w', jul12(41), 'porch:e', 'livingroom:n'),
 bf('diningroom_in', r'C:\img\vol1\20010405\dscf0015.jpg', 'diningroom_out',
    'diningroom_in'),
 bf('diningroom_out', r'C:\img\vol1\20010508a\dscf0016.jpg',
    'diningroom_in', 'hall:e'),
 nesw('front43',
      ni=nov4(17),
      ei=nov4(18),
      e='allerton_hawthorne:e',
      si=nov10(381),
      s='hall:s',
      wi=nov4(16),
      w='markliesl:w'),