ClusterConfig.py 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. from PandaObject import *
  2. from ClusterClient import *
  3. import string
  4. # A dictionary of information for various cluster configurations.
  5. # Dictionary is keyed on cluster-config string
  6. # Each dictionary contains a list of display configurations, one for
  7. # each display in the cluster
  8. # Information that can be specified for each display:
  9. # display name: Name of display (used in Configrc to specify server)
  10. # display type: Used to flag client vs. server
  11. # pos: positional offset of display's camera from main cluster group
  12. # hpr: orientation offset of display's camera from main cluster group
  13. # focal length: display's focal length (in mm)
  14. # film size: display's film size (in inches)
  15. # film offset: offset of film back (in inches)
  16. # Note: Note, this overrides offsets specified in DirectCamConfig.py
  17. # For now we only specify frustum for first display region of configuration
  18. # TODO: Need to handle multiple display regions per cluster node and to
  19. # generalize to non cluster situations
  20. ClientConfigs = {
  21. 'single-server' : [{'display name' : 'display0',
  22. 'pos' : Vec3(0),
  23. 'hpr' : Vec3(0)}
  24. ],
  25. 'two-server' : [{'display name' : 'display0',
  26. 'pos' : Vec3(0),
  27. 'hpr' : Vec3(-60,0,0)},
  28. {'display name' : 'display1',
  29. 'pos' : Vec3(0),
  30. 'hpr' : Vec3(60,0,0)}
  31. ],
  32. 'mono-modelcave-pipe0': [{'display name' : 'display0',
  33. 'pos' : Vec3(0),
  34. 'hpr' : Vec3(0)},
  35. {'display name' : 'display1',
  36. 'pos' : Vec3(0),
  37. 'hpr' : Vec3(0)}
  38. ],
  39. 'cavetestsmall' : [{'display name' : 'la',
  40. 'pos' : Vec3(-0.105, -0.020, 5.000),
  41. 'hpr' : Vec3(51.213, 0.000, 0.000),
  42. 'focal length' : 0.809,
  43. 'film size' : (1.000, 0.831),
  44. 'film offset' : (0.000, 0.173),
  45. },
  46. {'display name' : 'lb',
  47. 'display mode' : 'client',
  48. 'pos' : Vec3(-0.105, -0.020, 5.000),
  49. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  50. 'focal length' : 0.815,
  51. 'film size' : (1.000, 0.831),
  52. 'film offset' : (0.000, 0.173),
  53. },
  54. ],
  55. 'cavetest' : [{'display name' : 'la',
  56. 'pos' : Vec3(-0.105, -0.020, 5.000),
  57. 'hpr' : Vec3(51.213, 0.000, 0.000),
  58. 'focal length' : 0.809,
  59. 'film size' : (1.000, 0.831),
  60. 'film offset' : (0.000, 0.173),
  61. },
  62. {'display name' : 'lb',
  63. 'display mode' : 'client',
  64. 'pos' : Vec3(-0.105, -0.020, 5.000),
  65. 'hpr' : Vec3(-0.370, 0.000, 0.000),
  66. 'focal length' : 0.815,
  67. 'film size' : (1.000, 0.831),
  68. 'film offset' : (0.000, 0.173),
  69. },
  70. {'display name' : 'lc',
  71. 'pos' : Vec3(-0.105, -0.020, 5.000),
  72. 'hpr' : Vec3(-51.675, 0.000, 0.000),
  73. 'focal length' : 0.820,
  74. 'film size' : (1.000, 0.830),
  75. 'film offset' : (-0.000, 0.173),
  76. },
  77. {'display name' : 'ra',
  78. 'pos' : Vec3(0.105, -0.020, 5.000),
  79. 'hpr' : Vec3(51.675, 0.000, 0.000),
  80. 'focal length' : 0.820,
  81. 'film size' : (1.000, 0.830),
  82. 'film offset' : (0.000, 0.173),
  83. },
  84. {'display name' : 'rb',
  85. 'pos' : Vec3(0.105, -0.020, 5.000),
  86. 'hpr' : Vec3(0.370, 0.000, 0.000),
  87. 'focal length' : 0.815,
  88. 'film size' : (1.000, 0.831),
  89. 'film offset' : (0.000, 0.173),
  90. },
  91. {'display name' : 'rc',
  92. 'pos' : Vec3(0.105, -0.020, 5.000),
  93. 'hpr' : Vec3(-51.213, 0.000, 0.000),
  94. 'focal length' : 0.809,
  95. 'film size' : (1.000, 0.831),
  96. 'film offset' : (-0.000, 0.173),
  97. },
  98. ],
  99. }