예제 #1
0
    def __init__(self, camera, panda):
        self.threedee_math = threedee_math.threedee_math()
        self.camera = camera
        self.panda = panda
        self.orientation = "landscape"
        self.accept("y", self.Levitate)
        self.accept("y-repeat", self.Levitate)
        self.accept("h", self.Down)
        self.accept("h-repeat", self.Down)
        self.accept("q", self.spinLeft)
        self.accept("q-repeat", self.spinLeft)
        self.accept("e", self.spinRight)
        self.accept("e-repeat", self.spinRight)
        self.accept("x", self.Original)

        self.accept("z", self.slideLeft)
        self.accept("z-repeat", self.slideLeft)
        self.accept("c", self.slideRight)
        self.accept("c-repeat", self.slideRight)
        self.accept("shift-z", self.slideLeftFast)
        self.accept("shift-z-repeat", self.slideLeftFast)
        self.accept("shift-c", self.slideRightFast)
        self.accept("shift-c-repeat", self.slideRightFast)
        self.accept("r", self.tiltForward)
        self.accept("r-repeat", self.tiltForward)
        self.accept("f", self.tiltBack)
        self.accept("f-repeat", self.tiltBack)
        self.accept("b", self.jumpBack)
        self.accept("g", self.jumpUp)
        self.accept("t", self.rotateScene)
        self.accept("p", self.exampleSigns)
        self.accept("l", self.exampleMove)
        self.accept("o", self.exampleKill)

        self.accept("w", self.Forward)
        self.accept("w-repeat", self.Forward)
        self.accept("s", self.Backward)
        self.accept("s-repeat", self.Backward)
        self.accept("a", self.rotateLeft)
        self.accept("a-repeat", self.rotateLeft)
        self.accept("d", self.rotateRight)
        self.accept("d-repeat", self.rotateRight)
예제 #2
0
파일: build.py 프로젝트: dgou/gibson
    def __init__(self, conf_file):
        if not conf_file:
            conf_file = 'None'
        self.configuration = config.ConfigFile(conf_file)
        self.threedee_math = threedee_math.threedee_math()
        self.master_zone_array = []
        self.security_zones = self.configuration.zone_list()
        print self.security_zones
        self.zone_list = self.security_zones.split(',')
        for i in self.zone_list:
            temp_array = self.configuration.subnet(i).split(',')
            self.master_zone_array.append(temp_array)
        
        self.x = {}
        self.servers = {}
        self.names = {}

        for i in self.master_zone_array:
            for j in i:
                self.x[j] = 0
예제 #3
0
파일: build_subnet.py 프로젝트: dgou/gibson
    def __init__(self, camera, panda, conf_file):
        if not conf_file:
            conf_file = 'None'
        self.configuration = config.ConfigFile(conf_file)
        self.camera = camera
        self.panda = panda
        self.view = self.panda.subnetview
        self.skybox = self.panda.loader.loadModel("models/skybox-big.egg")
        self.skyboxTexture = self.panda.loader.loadTexture("images/sky1.jpg")
        self.skyboxTexture.setWrapU(Texture.WMRepeat)     
        self.skyboxTexture.setWrapV(Texture.WMRepeat)        
        self.skybox.setTexture(self.skyboxTexture, 1)
        self.skybox.reparentTo(self.view)
        self.skybox.setScale(100)
        self.skybox.setH(60)

        
        plight = DirectionalLight('my plight')
        plnp = self.view.attachNewNode(plight)
        plnp.setHpr(310, 0 ,30)
        self.view.setLight(plnp)
        alight = AmbientLight('alight')
        alight.setColor(VBase4(0.4, 0.4, 0.4, 1))
        alnp = self.view.attachNewNode(alight)
        self.view.setLight(alnp)
        
        self.threedee_math = threedee_math.threedee_math()
        self.master_zone_array = []
        self.security_zones = self.configuration.zone_list()
        print self.security_zones
        self.zone_list = self.security_zones.split(',')
        for i in self.zone_list:
            temp_array = self.configuration.subnet(i).split(',')
            self.master_zone_array.append(temp_array)
        self.x = {}
        for i in self.master_zone_array:
            self.x[self.master_zone_array.index(i)] = 0
        
        self.subnets = {}
        self.cidrs = {}
        self.map_subnets()
예제 #4
0
파일: main.py 프로젝트: dgou/gibson
    def __init__(self):
        self.accept('mouse1', self.leftClick)
        self.accept('space', self.leftClick)
        self.accept('mouse3', self.rightClick)
    def leftClick(self):
        scene.objectClicked()
    def rightClick(self):
        scene.objectRightClicked()
        
    
    
# Main
if __name__ == '__main__':
    option_parser = OptionParser()
    option_parser.add_option("-x", "--xml", dest="xmlfile", help="XMLFILE to use as input", metavar="XMLFILE")
    option_parser.add_option("-c", "--config", dest="configfile", help="read configuration from FILE", metavar="FILE")
    (options, args) = option_parser.parse_args()

    threedee_math = threedee_math.threedee_math()
    parser = xml.sax.make_parser()
    parser.setFeature(feature_namespaces, 0)
    dh = parse_nmap.ImportServer()
    parser.setContentHandler(dh)
    try:
        parser.parse(options.xmlfile)
    except:
        print "You have not specified an xml model. I'll assume you know what you're doing...."

    scene = Panda(options)
    scene.run()