Beispiel #1
0
 def __init__(self, name):
     DNANode.__init__(self, name)
     self.code = ''
     self.wallColor = (1, 1, 1, 1)
     self.title = ''
     self.article = ''
     self.buildingType = ''
Beispiel #2
0
 def __init__(self, name):
     DNANode.__init__(self, name)
     self.code = ''
     self.color = (1, 1, 1, 1)
     self.width = 0
     self.height = 0
     self.bDefaultColor = True
Beispiel #3
0
 def __init__(self, name):
     DNANode.__init__(self, name)
     self.code = ''
     self.streetTexture = ''
     self.sideWalkTexture = ''
     self.curbTexture = ''
     self.streetColor = (1, 1, 1, 1)
     self.sideWalkColor = (1, 1, 1, 1)
     self.curbColor = (1, 1, 1, 1)
     self._setTextureCount = 0
     self._setColorCount = 0
Beispiel #4
0
    def __init__(self):
        DNANode.__init__(self, '')

        self.code = ''
        self.color = (1, 1, 1, 1)
        self.flags = ''
        self.indent = 0.0
        self.kern = 0.0
        self.wiggle = 0.0
        self.stumble = 0.0
        self.stomp = 0.0
        self.width = 0.0
        self.height = 0.0
Beispiel #5
0
    def traverse(self, recursive=True, verbose=False):
        packer = DNANode.traverse(self, recursive=False, verbose=verbose)
        packer.name = 'DNASignBaseline'  # Override the name for debugging.

        traversed_data = DNAPacker()

        for child in self.children:
            if recursive:
                traversed_data += child.traverse(recursive=recursive,
                                                 verbose=verbose)

        packer.pack('sign node code', self.code, STRING)
        packer.packColor('sign node color', *self.color)
        packer.pack('sign node flags', self.flags, STRING)
        packer.pack('sign node indent', self.indent, FLOAT32)
        packer.pack('sign node kern', self.kern, FLOAT32)
        packer.pack('sign node wiggle', self.wiggle, FLOAT32)
        packer.pack('sign node stumble', self.stumble, FLOAT32)
        packer.pack('sign node stomp', self.stomp, FLOAT32)
        packer.pack('sign node width', self.width, FLOAT32)
        packer.pack('sign node height', self.height, FLOAT32)

        if recursive:
            packer += traversed_data
            packer += b'\xFF'

        return packer
Beispiel #6
0
 def traverse(self, recursive=True, verbose=False):
     packer = DNANode.traverse(self, recursive=False, verbose=verbose)
     packer.name = 'DNAProp'  # Override the name for debugging.
     packer.pack('code', self.code, STRING)
     packer.packColor('color', *self.color)
     if recursive:
         packer += self.traverseChildren(verbose=verbose)
     return packer
Beispiel #7
0
 def traverse(self, recursive=True, verbose=False):
     packer = DNANode.traverse(self, recursive=False, verbose=verbose)
     packer.name = 'DNASignGraphic'  # Override the name for debugging.
     packer.pack('code', self.code, STRING)
     packer.packColor('color', *self.color)
     packer.pack('width', int(self.width * 100), INT16)
     packer.pack('height', int(self.height * 100), INT16)
     packer.pack('bDefaultColor', self.bDefaultColor, BOOLEAN)
     if recursive:
         packer += self.traverseChildren(verbose=verbose)
     return packer
Beispiel #8
0
 def traverse(self, recursive=True, verbose=False):
     packer = DNANode.traverse(self, recursive=False, verbose=verbose)
     packer.name = 'DNAStreet'  # Override the name for debugging.
     packer.pack('code', self.code, STRING)
     packer.pack('street texture', self.streetTexture, STRING)
     packer.pack('side walk texture', self.sideWalkTexture, STRING)
     packer.pack('curb texture', self.curbTexture, STRING)
     packer.packColor('street color', *self.streetColor)
     packer.packColor('side walk color', *self.sideWalkColor)
     packer.packColor('curb color', *self.curbColor)
     return packer
Beispiel #9
0
    def traverse(self, recursive=True, verbose=False):
        packer = DNANode.traverse(self, recursive=False, verbose=verbose)
        packer.name = 'DNALandmarkBuilding'  # Override the name for debugging.
        packer.pack('code', self.code, STRING)
        packer.packColor('wall color', *self.wallColor)
        packer.pack('title', self.title, STRING)
        packer.pack('article', self.article, STRING)
        packer.pack('building type', self.buildingType, STRING)

        if recursive:
            packer += self.traverseChildren(verbose=verbose)
        return packer
Beispiel #10
0
 def __init__(self, name):
     DNANode.__init__(self, name)
     self.code = ''
     self.height = 10
     self.color = (1, 1, 1, 1)
Beispiel #11
0
def p_dnanodedef(p):
    name = p[2]
    p[0] = DNANode(name)
    p.parser.parentGroup.add(p[0])
    p[0].setParent(p.parser.parentGroup)
    p.parser.parentGroup = p[0]
Beispiel #12
0
    def __init__(self):
        DNANode.__init__(self, '')

        self.code = ''
        self.color = (1, 1, 1, 1)
        self.letters = ''