def __init__(self, pos = 1,width = 1,height = 1, name = "Box", color = (0,1,0), isRotated=False ):
     self.pos = pos
     self.width = width
     self.height = height
     self.nodeList = []
     self.children = []
     self.name = name
     self.color = color
     self.isRotated = isRotated
     VisibleObject.__init__(self, pos = pos)
 def __init__(self, pos, url, updateRate):
     # nashville's position on the earth
     # 46.3736798434 -814.257043345 595.764172455
     VisibleObject.__init__(self, pos = pos)
     self.url  = url
     self.updateRate = updateRate
     self.textureGL = None
     self.topLeft     = None
     self.bottomRight = None
     self.width  = 1
     self.height = 1
     
     updateLambda = lambda x: self.updateImage(x)
     glutTimerFunc(0, updateLambda, 1)
    def __init__(self):
        # nashville's position on the earth
        # 46.3736798434 -814.257043345 595.764172455
        VisibleObject.__init__(self, pos=(45.9604490329, 580.455382799, 797.001287513))
        self.blips = []
        self.nodes = []
        seBox = NodeBox((0.2, -0.6, -1), 0.23, 1.6, "StorageElements", (0.87, 0.5, 0.0), isRotated=True)
        depotBox = NodeBox((-0.3, -0.6, -1), 0.1, 1.6, "Depots", (0.87, 0.5, 0.0), isRotated=True)
        clusterBox = NodeBox((-1.9, -0.1, -1), 1, 1, "VAMPIRE", (0.87, 0.5, 0.0))
        globalBox = NodeBox((1, 0, -1), 0.9, 0.9, "External", (0.87, 0.5, 0.0))
        externalSpeedBox5 = NodeBox((1, -0.9, -1), 0.9, 0.6, "GridFTP Transfers", (1, 0, 0))
        externalSpeedBox60 = NodeBox((1, -0.9, -1), 0.9, 0.6, "GridFTP Transfers", (1, 0, 0))
        externalSpeedBox60.setInvisible()
        self.addChild(seBox, depotBox, clusterBox, globalBox, externalSpeedBox5, externalSpeedBox60)

        inLabel5 = TextBox(pos=(0, 0.5, 0.01), color=(1, 1, 0), text="Inbound (/5min)")
        inSpeed5 = TextBox(pos=(0, 0.4, 0.01), color=(1, 1, 0), text="  100 MB/sec")
        outLabel5 = TextBox(pos=(0, 0.3, 0.01), color=(1, 1, 0), text="Outbound (/5min)")
        outSpeed5 = TextBox(pos=(0, 0.2, 0.01), color=(1, 1, 0), text="  100 MB/sec")

        externalSpeedBox5.addChild(inLabel5, inSpeed5, outLabel5, outSpeed5)

        inLabel60 = TextBox(pos=(0, 0.5, 0.01), color=(1, 1, 0), text="Inbound (/1hr)")
        inSpeed60 = TextBox(pos=(0, 0.4, 0.01), color=(1, 1, 0), text="  100 MB/sec")
        outLabel60 = TextBox(pos=(0, 0.3, 0.01), color=(1, 1, 0), text="Outbound (/1hr)")
        outSpeed60 = TextBox(pos=(0, 0.2, 0.01), color=(1, 1, 0), text="  100 MB/sec")

        externalSpeedBox60.addChild(inLabel60, inSpeed60, outLabel60, outSpeed60)

        self.externalSpeedBox5 = externalSpeedBox5
        self.externalSpeedBox60 = externalSpeedBox60
        self.inSpeed5 = inSpeed5
        self.inSpeed60 = inSpeed60
        self.outSpeed5 = outSpeed5
        self.outSpeed60 = outSpeed60
        toggleGridftpBox = lambda x: self.toggleGridftpBox(x)

        glutTimerFunc(5000, toggleGridftpBox, 1)

        self.allNodes = {}

        self.inboundGridftp = []
        self.outboundGridftp = []
 def __init__(self, pos = None):
     VisibleObject.__init__( self, pos )
     print "nashville is at %s %s %s" % self.toCartesian(36.1658, -86.7844,999)
     if not TexturedGlobe.textureGL:
         im = Image.open("world.jpg")
         try:
             # get image meta-data (dimensions) and data
             ix, iy, image = im.size[0], im.size[1], im.tostring("raw", "RGBA", 0, -1)
         except SystemError:
             # has no alpha channel, synthesize one, see the
             # texture module for more realistic handling
             ix, iy, image = im.size[0], im.size[1], im.tostring("raw", "RGBX", 0, -1)
         
         print "Texture is this size %s %s" % (ix, iy) 
         # generate a texture ID
         ID = glGenTextures(1)
         # make it current
         glBindTexture(GL_TEXTURE_2D, ID)
         glPixelStorei(GL_UNPACK_ALIGNMENT,1)
         # copy the texture into the current texture ID
         glTexImage2D(GL_TEXTURE_2D, 0, 3, ix, iy, 0, GL_RGBA, GL_UNSIGNED_BYTE, image)
         # return the ID for use
         TexturedGlobe.textureGL = ID
 def __init__(self, pos,color,text):
     VisibleObject.__init__(self, pos = pos)
     self.color = color
     self.text = text