| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469 |
- from direct.showbase.DirectObject import *
- from ClusterClient import *
- import string
- # A dictionary of information for various cluster configurations.
- # Dictionary is keyed on cluster-config string
- # Each dictionary contains a list of display configurations, one for
- # each display in the cluster
- # Information that can be specified for each display:
- # display name: Name of display (used in Configrc to specify server)
- # display type: Used to flag client vs. server
- # pos: positional offset of display's camera from main cluster group
- # hpr: orientation offset of display's camera from main cluster group
- # focal length: display's focal length (in mm)
- # film size: display's film size (in inches)
- # film offset: offset of film back (in inches)
- # Note: Note, this overrides offsets specified in DirectCamConfig.py
- # For now we only specify frustum for first display region of configuration
- # TODO: Need to handle multiple display regions per cluster node and to
- # generalize to non cluster situations
- ClientConfigs = {
- 'single-server' : [{'display name' : 'display0',
- 'display mode' : 'client',
- 'pos' : Vec3(0),
- 'hpr' : Vec3(0)}
- ],
- 'two-server' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(0),
- #'hpr' : Vec3(30,0,0)},
- 'hpr' : Vec3(0,0,0)},
- {'display name' : 'la',
- 'pos' : Vec3(0),
- #'hpr' : Vec3(-30,0,0)
- 'hpr' : Vec3(0,0,0)
- }
- ],
- 'mono-cave' : [{'display name' : 'la',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lb',
- 'display mode' : 'client',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lc',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (-0.000, 0.173),
- },
- ],
- 'seamless-cave' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'la',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lb',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lc',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (-0.000, 0.173),
- },
- {'display name' : 'ra',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rb',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rc',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (-0.000, 0.173),
- },
- ],
- 'nemo-cave' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'la',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lb',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lc',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (-0.000, 0.173),
- },
- {'display name' : 'ra',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rb',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rc',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (-0.000, 0.173),
- },
- {'display name' : 'lAudienceL',
- 'pos' : Vec3(-4.895, -0.020, 5.000),
- 'hpr' : Vec3(51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rAudienceL',
- 'pos' : Vec3(-5.105, -8.0, 5.000),
- 'hpr' : Vec3(51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lAudienceR',
- 'pos' : Vec3(5.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rAudienceR',
- 'pos' : Vec3(4.895, -8.0, 5.000),
- 'hpr' : Vec3(-51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- ],
- 'nemo-cave-narrow' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'la',
- 'pos' : Vec3(-0.105, -19.890, 4.500),
- 'hpr' : Vec3(51.500, 0.000, 0.000),
- 'focal length' : 1.662,
- 'film size' : (1.000, 0.828),
- 'film offset' : (1.079, 0.207),
- },
- {'display name' : 'lb',
- 'pos' : Vec3(-0.105, -19.890, 4.500),
- 'hpr' : Vec3(0.000, 0.000, 0.000),
- 'focal length' : 2.186,
- 'film size' : (1.000, 0.828),
- 'film offset' : (0.007, 0.207),
- },
- {'display name' : 'lc',
- 'pos' : Vec3(-0.105, -19.890, 4.500),
- 'hpr' : Vec3(-51.500, 0.000, 0.000),
- 'focal length' : 1.673,
- 'film size' : (1.000, 0.828),
- 'film offset' : (-1.070, 0.207),
- },
- {'display name' : 'ra',
- 'pos' : Vec3(0.105, -19.890, 4.500),
- 'hpr' : Vec3(51.500, 0.000, 0.000),
- 'focal length' : 1.673,
- 'film size' : (1.000, 0.828),
- 'film offset' : (1.070, 0.207),
- },
- {'display name' : 'rb',
- 'pos' : Vec3(0.105, -19.890, 4.500),
- 'hpr' : Vec3(0.000, 0.000, 0.000),
- 'focal length' : 2.186,
- 'film size' : (1.000, 0.828),
- 'film offset' : (-0.007, 0.207),
- },
- {'display name' : 'rc',
- 'pos' : Vec3(0.105, -19.890, 4.500),
- 'hpr' : Vec3(-51.500, 0.000, 0.000),
- 'focal length' : 1.662,
- 'film size' : (1.000, 0.828),
- 'film offset' : (-1.079, 0.207),
- },
- {'display name' : 'lAudienceL',
- 'pos' : Vec3(-0.105, -19.890, 4.500),
- 'hpr' : Vec3(49.038, 0.000, 0.000),
- 'focal length' : 1.452,
- 'film size' : (1.000, 0.797),
- 'film offset' : (-0.292, 0.149),
- },
- {'display name' : 'rAudienceL',
- 'pos' : Vec3(0.105, -19.890, 4.500),
- 'hpr' : Vec3(49.038, 0.000, 0.000),
- 'focal length' : 1.468,
- 'film size' : (1.000, 0.797),
- 'film offset' : (-0.306, 0.149),
- },
- {'display name' : 'lAudienceR',
- 'pos' : Vec3(-0.105, -19.890, 4.500),
- 'hpr' : Vec3(-52.750, 0.000, 0.000),
- 'focal length' : 1.551,
- 'film size' : (1.000, 0.796),
- 'film offset' : (0.245, 0.149),
- },
- {'display name' : 'rAudienceR',
- 'pos' : Vec3(0.105, -19.890, 4.500),
- 'hpr' : Vec3(-52.750, 0.000, 0.000),
- 'focal length' : 1.534,
- 'film size' : (1.000, 0.796),
- 'film offset' : (0.232, 0.149),
- },
- {'display name' : 'lCart',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rCart',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- ],
- 'fourd-cave' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'la',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lb',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lc',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (-0.000, 0.173),
- },
- {'display name' : 'ra',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(51.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rb',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rc',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(-51.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (-0.000, 0.173),
- },
- {'display name' : 'lAudienceL',
- 'pos' : Vec3(-4.895, -0.020, 5.000),
- 'hpr' : Vec3(65.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rAudienceL',
- 'pos' : Vec3(-5.105, -8.0, 5.000),
- 'hpr' : Vec3(65.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lAudienceR',
- 'pos' : Vec3(5.105, -0.020, 5.000),
- 'hpr' : Vec3(-65.213, 0.000, 0.000),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rAudienceR',
- 'pos' : Vec3(4.895, -8.0, 5.000),
- 'hpr' : Vec3(-65.675, 0.000, 0.000),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- ],
- 'parallax-cave' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'la',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lb',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'lc',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (-0.000, 0.173),
- },
- {'display name' : 'ra',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.820,
- 'film size' : (1.000, 0.830),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rb',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'rc',
- 'pos': Vec3(0),
- 'hpr': Vec3(0),
- 'focal length' : 0.809,
- 'film size' : (1.000, 0.831),
- 'film offset' : (-0.000, 0.173),
- },
- ],
- 'carttest' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(0),
- 'hpr' : Vec3(0),
- },
- {'display name' : 'left',
- 'pos' : Vec3(-.105,0,0),
- 'hpr' : Vec3(0,0,0)},
- {'display name' : 'right',
- 'pos' : Vec3(.105,0,0),
- 'hpr' : Vec3(0,0,0)}
- ],
- 'ursula' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(0),
- 'hpr' : Vec3(0),
- },
- {'display name' : 'l',
- 'pos' : Vec3(-.105,0,0),
- 'hpr' : Vec3(0,0,0),
- 'focal length' : 15,
- 'film size' : (13.33, 10),
- #'film offset' : (0.105, -2),
- 'film offset' : (0.105, -1),
- },
- {'display name' : 'r',
- 'pos' : Vec3(.105,0,0),
- 'hpr' : Vec3(0,0,0),
- 'focal length' : 15,
- 'film size' : (13.33, 10),
- #'film offset' : (-0.105, -2),
- 'film offset' : (-0.105, -1),
- }
- ],
- 'composite' : [{'display name' : 'master',
- 'display mode' : 'client',
- 'pos' : Vec3(0),
- },
- {'display name' : 'left',
- 'pos' : Vec3(-0.105, -0.020, 5.000),
- 'hpr' : Vec3(-0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- },
- {'display name' : 'right',
- 'pos' : Vec3(0.105, -0.020, 5.000),
- 'hpr' : Vec3(0.370, 0.000, 0.000),
- 'focal length' : 0.815,
- 'film size' : (1.000, 0.831),
- 'film offset' : (0.000, 0.173),
- }
- ],
- }
|