diff --git a/panda/src/chancfg/chancfg.cxx b/panda/src/chancfg/chancfg.cxx index 7e54dee103..40ed02fd10 100644 --- a/panda/src/chancfg/chancfg.cxx +++ b/panda/src/chancfg/chancfg.cxx @@ -123,9 +123,6 @@ INLINE bool ConfigDefined(std::string sym) { (WindowDB->find(sym) != WindowDB->end()); } -//KEH: Moving this up to .h file -//typedef pvector SVec; - bool ChanCheckLayouts(SetupSyms& S) { if (S.empty()) return false; @@ -145,14 +142,6 @@ bool ChanCheckSetups(SetupSyms& S) { chancfg_cat.error() << "no setup called '" << *i << "'" << endl; return false; } - if (((*SetupDB)[*i]).getRecurse()) { - SetupSyms a = ((*SetupDB)[*i]).getLayouts(); - if (!ChanCheckLayouts(a)) - return false; - a = ((*SetupDB)[*i]).getSetups(); - if (!ChanCheckSetups(a)) - return false; - } } return true; } @@ -228,77 +217,81 @@ void ChanConfig::chan_eval(GraphicsWindow* win, WindowItem& W, LayoutItem& L, camera[icam] = new NamedNode(nodeName.c_str()); } for (j=0, k=S.begin(); jerror()<<"Recursive setups no longer supported"<error()<<"Skipping ..."<get_channel(hw_offset); - } else - chan = win->get_channel((*k).getChan()); - // HW channels always start with the full area of the channel - v = ChanViewport(0., 1., 0., 1.); - } else { - chan = win->get_channel(0); - } - ChanViewport v2(ChanScaleViewport(v, (*k).getViewport())); - PT(GraphicsLayer) layer = chan->make_layer(); - PT(DisplayRegion) dr = - layer->make_display_region(v2.left(), v2.right(), - v2.bottom(), v2.top()); - if (want_cameras && camera[0] != (Node *)NULL) { - // now make a camera for it - PT(Camera) cam = new Camera; - dr->set_camera(cam); - _display_region.push_back(dr); - SetupFOV fov = (*k).getFOV(); - fov = ChanResolveFOV(fov, xsize*(v2.right()-v2.left()), - ysize*(v2.top()-v2.bottom())); - if (chancfg_cat->is_debug()) { - chancfg_cat->debug() << "ChanEval:: FOVhoriz = " << fov.getHoriz() - << " FOVvert = " << fov.getVert() << endl; - chancfg_cat->debug() << "ChanEval:: xsize = " << xsize - << " ysize = " << ysize << endl; - } - Frustumf frust; - frust.make_perspective(fov.getHoriz(), fov.getVert(), 1., 10000.); - cam->set_projection(PerspectiveProjection(frust)); - if (chancfg_cat->is_debug()) - chancfg_cat->debug() << "ChanEval:: camera hfov = " - << cam->get_hfov() << " vfov = " - << cam->get_vfov() << endl; - cam->set_scene(render); + ChanViewport v(ChanScaleViewport(V, L[j])); + PT(GraphicsChannel) chan; + if ((*k).getHWChan() && W.getHWChans()) { + if ((*k).getChan() == -1) { + chan = win->get_channel(hw_offset); + } else + chan = win->get_channel((*k).getChan()); + // HW channels always start with the full area of the channel + v = ChanViewport(0., 1., 0., 1.); + } else { + chan = win->get_channel(0); + } + ChanViewport v2(ChanScaleViewport(v, (*k).getViewport())); + PT(GraphicsLayer) layer = chan->make_layer(); + PT(DisplayRegion) dr = + layer->make_display_region(v2.left(), v2.right(), + v2.bottom(), v2.top()); + if (want_cameras && camera[0] != (Node *)NULL) { + // now make a camera for it + PT(Camera) cam = new Camera; + dr->set_camera(cam); + _display_region.push_back(dr); + SetupFOV fov = (*k).getFOV(); + fov = ChanResolveFOV(fov, xsize*(v2.right()-v2.left()), + ysize*(v2.top()-v2.bottom())); + if (chancfg_cat->is_debug()) { + chancfg_cat->debug() << "ChanEval:: FOVhoriz = " << fov.getHoriz() + << " FOVvert = " << fov.getVert() << endl; + chancfg_cat->debug() << "ChanEval:: xsize = " << xsize + << " ysize = " << ysize << endl; + } - // take care of the orientation - PT(TransformTransition) orient; - - switch ((*k).getOrientation()) { - case SetupItem::Up: - break; - case SetupItem::Down: - orient = new TransformTransition( - LMatrix4f::rotate_mat_normaxis(180., LVector3f::forward())); - break; - case SetupItem::Left: - orient = new TransformTransition( - LMatrix4f::rotate_mat_normaxis(90., LVector3f::forward())); - break; - case SetupItem::Right: - orient = new TransformTransition( - LMatrix4f::rotate_mat_normaxis(-90., LVector3f::forward())); - break; - } + // take care of the orientation + PT(TransformTransition) orient; + float hFov, vFov; + + switch ((*k).getOrientation()) { + case SetupItem::Up: + hFov = fov.getHoriz(); vFov = fov.getVert(); + break; + case SetupItem::Down: + hFov = fov.getHoriz(); vFov = fov.getVert(); + orient = new TransformTransition( + LMatrix4f::rotate_mat_normaxis(180., LVector3f::forward())); + break; + case SetupItem::Left: + // vertical and horizontal FOV are being switched + hFov = fov.getVert(); vFov = fov.getHoriz(); + orient = new TransformTransition( + LMatrix4f::rotate_mat_normaxis(90., LVector3f::forward())); + break; + case SetupItem::Right: + // vertical and horizontal FOV are being switched + hFov = fov.getHoriz(); vFov = fov.getVert(); + orient = new TransformTransition( + LMatrix4f::rotate_mat_normaxis(-90., LVector3f::forward())); + break; + } - RenderRelation *tocam = new RenderRelation(camera[W.getCameraGroup(j)], cam); - if (orient != (TransformTransition *)NULL) { - tocam->set_transition(orient); - } - } - } + Frustumf frust; + frust.make_perspective(hFov, vFov, 1., 10000.); + cam->set_projection(PerspectiveProjection(frust)); + // hfov and vfov for camera are switched from what was specified + // if the orientation is sideways. + if (chancfg_cat->is_debug()) + chancfg_cat->debug() << "ChanEval:: camera hfov = " + << cam->get_hfov() << " vfov = " + << cam->get_vfov() << endl; + cam->set_scene(render); + + RenderRelation *tocam = new RenderRelation(camera[W.getCameraGroup(j)], cam); + if (orient != (TransformTransition *)NULL) { + tocam->set_transition(orient); + } + } } _group_node = camera; return; diff --git a/panda/src/chancfg/chansetup.I b/panda/src/chancfg/chansetup.I index 79021a391e..36061f303a 100644 --- a/panda/src/chancfg/chansetup.I +++ b/panda/src/chancfg/chansetup.I @@ -60,10 +60,7 @@ INLINE float SetupFOV::getVert(void) const { INLINE SetupItem::SetupItem(void) : _viewport(0., 1., 0., 1.) {} -INLINE SetupItem::SetupItem(bool r) : _recurse(r), _viewport(0., 1., 0., 1.) {} - -INLINE SetupItem::SetupItem(const SetupItem& c) : _recurse(c._recurse), - _layouts(c._layouts), +INLINE SetupItem::SetupItem(const SetupItem& c) : _layouts(c._layouts), _setups(c._setups), _stereo(c._stereo), _hw_chan(c._hw_chan), @@ -76,7 +73,6 @@ INLINE SetupItem::SetupItem(const SetupItem& c) : _recurse(c._recurse), INLINE SetupItem::~SetupItem(void) {} INLINE SetupItem& SetupItem::operator=(const SetupItem& c) { - _recurse = c._recurse; _layouts = c._layouts; _setups = c._setups; _stereo = c._stereo; @@ -88,11 +84,6 @@ INLINE SetupItem& SetupItem::operator=(const SetupItem& c) { return *this; } -INLINE void SetupItem::AddRecurse(std::string& l, std::string& s) { - _layouts.push_back(l); - _setups.push_back(s); -} - INLINE void SetupItem::setState(const bool st, const bool hw, const int pvc, const ChanViewport& v, const SetupFOV& f, const Orientation& o) { @@ -104,10 +95,6 @@ INLINE void SetupItem::setState(const bool st, const bool hw, const int pvc, _orientation = o; } -INLINE bool SetupItem::getRecurse(void) const { - return _recurse; -} - INLINE SetupSyms SetupItem::getLayouts(void) const { return _layouts; } diff --git a/panda/src/chancfg/chansetup.cxx b/panda/src/chancfg/chansetup.cxx index c65d233f01..46033fa81b 100644 --- a/panda/src/chancfg/chansetup.cxx +++ b/panda/src/chancfg/chansetup.cxx @@ -43,160 +43,123 @@ void SetupParseFunctor::operator()(std::string S) { ChanCheckScoping(S); ChanDescope(S); - bool recurse = ChanReadNextBool(S); - SetupItem s(recurse); + SetupItem s; - if (recurse) { - ChanCheckScoping(S); - int i = S.find_first_of(")"); - std::string layouts = S.substr(1, i-2); + bool stereo = ChanReadNextBool(S); + //KEH + //bool hw_chan = ChanReadNextBool(S); + //int chan_num = ChanReadNextIntB(S); + + ChanCheckScoping(S); + int i = S.find_first_of(")"); + std::string stmp = S.substr(1, i-2); + S.erase(0, i+1); + ChanEatFrontWhite(S); + ChanViewport v(ChanReadNextFloat(stmp), ChanReadNextFloat(stmp), + ChanReadNextFloat(stmp), ChanReadNextFloat(stmp)); + if (!stmp.empty()) { + // error, there shouldn't be anything left after eating the viewport + nout << "error, tailing text in viewport spec '" << stmp << "'" << endl; + stmp.erase(0, std::string::npos); + } + SetupFOV fov; + if (S[0] == '#') { + bool b = ChanReadNextBool(S); + if (b) { + // error, #t is not allowed here + nout << "error, cannot have #t for FOV spec" << endl; + b = false; + } + fov.setFOV(); + } else if (S[0] == '(') { + i = S.find_first_of(")"); + stmp = S.substr(1, i-2); S.erase(0, i+1); ChanEatFrontWhite(S); - ChanCheckScoping(S); - i = S.find_first_of(")"); - std::string setups = S.substr(1, i-2); - S.erase(0, i+1); - if (!S.empty()) { - // error, there shouldn't be any more here - nout << "error, trailing data in recursive definition '" << S << "'" - << endl; - S.erase(0, std::string::npos); - } - std::string a, b; - while ((!layouts.empty())&&(!setups.empty())) { - a = ChanReadNextWord(layouts); - b = ChanReadNextWord(setups); - s.AddRecurse(a, b); + fov.setFOV(ChanReadNextFloat(stmp), ChanReadNextFloat(stmp)); + if (!stmp.empty()) { + // error, there shouldn't be anything left after eating the fov + nout << "error, trailing text after fov spec '" << stmp << "'" << endl; + stmp.erase(0, std::string::npos); } } else { - bool stereo = ChanReadNextBool(S); - bool hw_chan = ChanReadNextBool(S); - int chan_num = ChanReadNextIntB(S); - ChanCheckScoping(S); - int i = S.find_first_of(")"); - std::string stmp = S.substr(1, i-2); - S.erase(0, i+1); - ChanEatFrontWhite(S); - ChanViewport v(ChanReadNextFloat(stmp), ChanReadNextFloat(stmp), - ChanReadNextFloat(stmp), ChanReadNextFloat(stmp)); - if (!stmp.empty()) { - // error, there shouldn't be anything left after eating the viewport - nout << "error, tailing text in viewport spec '" << stmp << "'" << endl; - stmp.erase(0, std::string::npos); - } - SetupFOV fov; - if (S[0] == '#') { - bool b = ChanReadNextBool(S); - if (b) { - // error, #t is not allowed here - nout << "error, cannot have #t for FOV spec" << endl; - b = false; - } - fov.setFOV(); - } else if (S[0] == '(') { - i = S.find_first_of(")"); - stmp = S.substr(1, i-2); - S.erase(0, i+1); - ChanEatFrontWhite(S); - fov.setFOV(ChanReadNextFloat(stmp), ChanReadNextFloat(stmp)); - if (!stmp.empty()) { - // error, there shouldn't be anything left after eating the fov - nout << "error, trailing text after fov spec '" << stmp << "'" << endl; - stmp.erase(0, std::string::npos); - } - } else { - fov.setFOV(ChanReadNextFloat(S)); - } - SetupItem::Orientation orie = SetupItem::Up; - if (!S.empty()) { - stmp = ChanReadNextWord(S); - if (stmp == "up") { - // nothing really to do - orie = SetupItem::Up; - } else if (stmp == "down") { - orie = SetupItem::Down; - } else if (stmp == "left") { - orie = SetupItem::Left; - } else if (stmp == "right") { - orie = SetupItem::Right; - } else { - // error, not a recognized orientation - nout << "error, invalid orientation '" << stmp << "'" << endl; - stmp.erase(0, std::string::npos); - } - } - if (!S.empty()) { - // error, we should have consumed all the data by now - nout << "error, trailing text on setup spec '" << S << "'" << endl; - S.erase(0, std::string::npos); - } - s.setState(stereo, hw_chan, chan_num, v, fov, orie); + fov.setFOV(ChanReadNextFloat(S)); } + SetupItem::Orientation orie = SetupItem::Up; + if (!S.empty()) { + stmp = ChanReadNextWord(S); + if (stmp == "up") { + // nothing really to do + orie = SetupItem::Up; + } else if (stmp == "down") { + orie = SetupItem::Down; + } else if (stmp == "left") { + orie = SetupItem::Left; + } else if (stmp == "right") { + orie = SetupItem::Right; + } else { + // error, not a recognized orientation + nout << "error, invalid orientation '" << stmp << "'" << endl; + stmp.erase(0, std::string::npos); + } + } + if (!S.empty()) { + // error, we should have consumed all the data by now + nout << "error, trailing text on setup spec '" << S << "'" << endl; + S.erase(0, std::string::npos); + } + //KEH + //s.setState(stereo, hw_chan, chan_num, v, fov, orie); + s.setState(stereo, false, -1, v, fov, orie); if (chancfg_cat.is_debug()) { chancfg_cat->debug() << "parsed a setup called '" << sym << "':" << endl; - if (s.getRecurse()) { - chancfg_cat->debug() << " is a recursive setup" << endl; - SetupSyms q(s.getLayouts()); - chancfg_cat->debug() << " has " << q.size() << " sub-layouts" << endl; - SetupSyms::iterator r; - for (r=q.begin(); r!=q.end(); ++r) - chancfg_cat->debug() << " sub-layout #" << (r-q.begin()) << ": '" - << *r << "'" << endl; - q = s.getSetups(); - chancfg_cat->debug() << " has " << q.size() << " sub-setups" << endl; - for (r=q.begin(); r!=q.end(); ++r) - chancfg_cat->debug() << " sub-setups #" << (r-q.begin()) << ": '" - << *r << "'" << endl; - } else { - chancfg_cat->debug() << " is not a recursive setup" << endl; - chancfg_cat->debug() << " is" << (s.getStereo()?" ":" not ") - << "a stereo setup" << endl; - chancfg_cat->debug() <<" is" << (s.getHWChan()?" ":" not ") - << "a HW channel setup" << endl; - chancfg_cat->debug() << " prefered HW channel number: " << s.getChan() - << endl; - ChanViewport qv(s.getViewport()); - chancfg_cat->debug() << " sub viewport: (" << qv.left() << ", " - << qv.right() << ", " << qv.bottom() << ", " - << qv.top() << ")" << endl; - SetupFOV qf(s.getFOV()); - switch (qf.getType()) { + chancfg_cat->debug() << " is" << (s.getStereo()?" ":" not ") + << "a stereo setup" << endl; + chancfg_cat->debug() <<" is" << (s.getHWChan()?" ":" not ") + << "a HW channel setup" << endl; + chancfg_cat->debug() << " prefered HW channel number: " << s.getChan() + << endl; + ChanViewport qv(s.getViewport()); + chancfg_cat->debug() << " sub viewport: (" << qv.left() << ", " + << qv.right() << ", " << qv.bottom() << ", " + << qv.top() << ")" << endl; + SetupFOV qf(s.getFOV()); + switch (qf.getType()) { case SetupFOV::Invalid: - chancfg_cat->debug() << " FOV is invalid" << endl; - break; + chancfg_cat->debug() << " FOV is invalid" << endl; + break; case SetupFOV::Default: - chancfg_cat->debug() << " FOV takes defaults" << endl; - break; + chancfg_cat->debug() << " FOV takes defaults" << endl; + break; case SetupFOV::Horizontal: - chancfg_cat->debug() << " FOV specifies only horizontal: " - << qf.getHoriz() << endl; - break; + chancfg_cat->debug() << " FOV specifies only horizontal: " + << qf.getHoriz() << endl; + break; case SetupFOV::Both: - chancfg_cat->debug() << " FOV: " << qf.getHoriz() << " x " - << qf.getVert() << endl; - break; + chancfg_cat->debug() << " FOV: " << qf.getHoriz() << " x " + << qf.getVert() << endl; + break; default: - chancfg_cat->debug() << " FOV is of an unknown type (" << qf.getType() + chancfg_cat->debug() << " FOV is of an unknown type (" << qf.getType() << ")" << endl; - } - switch (s.getOrientation()) { + } + switch (s.getOrientation()) { case SetupItem::Up: - chancfg_cat->debug() << " setup is oriented Up" << endl; - break; + chancfg_cat->debug() << " setup is oriented Up" << endl; + break; case SetupItem::Down: - chancfg_cat->debug() << " setup is oriented Down" << endl; - break; + chancfg_cat->debug() << " setup is oriented Down" << endl; + break; case SetupItem::Left: - chancfg_cat->debug() << " setup is oriented Left" << endl; - break; + chancfg_cat->debug() << " setup is oriented Left" << endl; + break; case SetupItem::Right: - chancfg_cat->debug() << " setup is oriented Right" << endl; - break; + chancfg_cat->debug() << " setup is oriented Right" << endl; + break; default: - chancfg_cat->debug() << " setup has an unknown orientation (" - << s.getOrientation() << ")" << endl; - } + chancfg_cat->debug() << " setup has an unknown orientation (" + << s.getOrientation() << ")" << endl; } } (*SetupDB)[sym] = s; diff --git a/panda/src/chancfg/chansetup.h b/panda/src/chancfg/chansetup.h index cadd64924b..f1941c5c84 100644 --- a/panda/src/chancfg/chansetup.h +++ b/panda/src/chancfg/chansetup.h @@ -53,8 +53,6 @@ class SetupItem { public: enum Orientation { Up, Down, Left, Right }; private: - bool _recurse; - SetupSyms _layouts; SetupSyms _setups; @@ -66,18 +64,14 @@ private: Orientation _orientation; public: INLINE SetupItem(void); - INLINE SetupItem(bool); INLINE SetupItem(const SetupItem&); INLINE ~SetupItem(void); INLINE SetupItem& operator=(const SetupItem&); - INLINE void AddRecurse(std::string&, std::string&); - INLINE void setState(const bool, const bool, const int, const ChanViewport&, const SetupFOV&, const Orientation&); - INLINE bool getRecurse(void) const; INLINE SetupSyms getLayouts(void) const; INLINE SetupSyms getSetups(void) const; INLINE bool getStereo(void) const; diff --git a/panda/src/chancfg/chanwindow.cxx b/panda/src/chancfg/chanwindow.cxx index 2850365828..3ac792f9d7 100644 --- a/panda/src/chancfg/chanwindow.cxx +++ b/panda/src/chancfg/chanwindow.cxx @@ -44,9 +44,10 @@ void WindowParseFunctor::operator()(std::string S) { ChanCheckScoping(S); ChanDescope(S); - bool hw_chans = ChanReadNextBool(S); - bool dvr = ChanReadNextBool(S); - int hw_chan_offset = ChanReadNextInt(S); + //KEH temp + //bool hw_chans = ChanReadNextBool(S); + //bool dvr = ChanReadNextBool(S); + //int hw_chan_offset = ChanReadNextInt(S); std::string layout = ChanReadNextWord(S); SetupSyms sv; PTA(int) cameraGroup; @@ -106,6 +107,15 @@ void WindowParseFunctor::operator()(std::string S) { } bool border = ChanReadNextBool(S); bool cursor = ChanReadNextBool(S); + + //KEH + bool hw_chans = false; + int hw_chan_offset = 0; + bool dvr = false; + if (!S.empty()) { + int hw_chan_offset = ChanReadNextInt(S); + hw_chans = true; + } if (!S.empty()) { // error, should have consumed all of the data by now nout << "error, trailing text in window spec '" << S << "'" << endl; diff --git a/panda/src/chancfg/setup_db b/panda/src/chancfg/setup_db index 1dd223812d..31fd50facb 100644 --- a/panda/src/chancfg/setup_db +++ b/panda/src/chancfg/setup_db @@ -20,63 +20,54 @@ ;;; divided. ;;; ;;; Abbreviations used below are: -;;; PVC - Pipe Video Chanel -;;; DVR - Dynamic Video Resolution ;;; ofs - offset ;;; rgn - region ;;; ;;; The format for a setup is: -;;; setup sub mono use PVC view- FOV orientation -;;; name rgn ster PVC # port -;;; (string (#f bool bool bool/int (---) bool/float/list [direction])) -;;; -or- -;;; setup sub lay- set- -;;; name rgn outs ups -;;; (string (#t (---) (---))) +;;; setup mono view- FOV orientation +;;; name ster port +;;; (string (bool (---) bool/float/list [direction])) +;;; * The viewport specification allows you to render to less than the +;;; full display region. ;;; -;;; * The 'sub-region' flag indicates whether this region is to be further -;;; subdivided and layed out. This allows an easer way to describe -;;; layouts who have parts who's proportions are relatively prime to other -;;; parts. -;;; * In the case of this being a sub-region setup, the next two elements -;;; are exactly like in the config. A list of layouts and setups for -;;; those layouts. -;;; * In the case of this not being a sub-region setup, the next 4 elements -;;; are the mono/stereo flag, a flag to indicate if this region should -;;; use a PVC, the PVC # (or #f for default), the viewport specification -;;; (allowing you to render to less then the full channel), and lastly -;;; the optional orientation of the channel (without this, the default is -;;; up). +;;; The format for a viewport is: +;;; left right bottom top +;;; (float float float float) +;;; +;;; * these are fractions in the range 0. - 1. and are relative to +;;; the local region. +;;; * a full region would be (0. 1. 0. 1.) +;;; +;;; * If a single value is given for the FOV, it is the horizontal field +;;; of view. The vertical field of view is calculated from that if not +;;; given. The field of view is for the specified viewport. +;;; * Orientation specifies which edge will actually end up on the top +;;; of the display. The horizontal FOV will be the horizontal FOV +;;; AFTER rotation, i.e. as you see it on the actual display device. +;;; For example: In the modelling cave, which uses a "left" orientation, +;;; the image shows up sideways on the console so that is shows up +;;; correctly in the actual cave. The horizontal FOV is horizontal +;;; in the cave, vertical on the console. ;;; * The orientation can have the valid values of: up, down, left, right. -;;; * The orientation specifies an in-channel rotation. The values of up, -;;; down, left, and right correspond to what edge of the actual channel -;;; the top of the image will be on. ;;; -;;; The format for a viewport is: -;;; left right bottom top -;;; (float float float float) -;;; -;;; * these are fractions in the range 0. - 1. and are relative to the local -;;; region. -;;; * a full region would be (0. 1. 0. 1.) ;;; ;;;. ;;;*Public -(setup-mono-plain (#f #f #f #f (0. 1. 0. 1.) #f)) -(setup-mono-right (#f #f #f #f (0. 1. 0. 1.) #f right)) -(setup-mono-left (#f #f #f #f (0. 1. 0. 1.) #f left)) -(setup-mono-down (#f #f #f #f (0. 1. 0. 1.) #f down)) -(setup-stereo-plain (#f #t #t #f (0. 1. 0. 1.) #f)) -(setup-stereo-right (#f #t #t #f (0. 1. 0. 1.) #f right)) -(setup-stereo-left (#f #t #t #f (0. 1. 0. 1.) #f left)) -(setup-pronto-plain (#f #f #f #f (0. 1. 0.1 0.9) 114.)) -(setup-mono-hmd (#f #f #t #f (0. 1. 0. 1.) (90. 73.74))) -(setup-mono-wide (#f #f #f #f (0. 1. 0. 1.) 180.)) -(setup-mono-wide-vptrim (#f #f #f #f (0. 1. 0.667 1.) 180.)) -(setup-mono-wide-vptrim2 (#f #f #f #f (0. 1. 0.5 1.) 180.)) +(setup-mono-plain (#f (0. 1. 0. 1.) #f)) +(setup-mono-right (#f (0. 1. 0. 1.) #f right)) +(setup-mono-left (#f (0. 1. 0. 1.) #f left)) +(setup-mono-down (#f (0. 1. 0. 1.) #f down)) +(setup-stereo-plain (#t (0. 1. 0. 1.) #f)) +(setup-stereo-right (#t (0. 1. 0. 1.) #f right)) +(setup-stereo-left (#t (0. 1. 0. 1.) #f left)) +(setup-pronto-plain (#f (0. 1. 0.1 0.9) 114.)) +(setup-mono-hmd (#f (0. 1. 0. 1.) (90. 73.74))) +(setup-mono-wide (#f (0. 1. 0. 1.) 180.)) +(setup-mono-wide-vptrim (#f (0. 1. 0.667 1.) 180.)) +(setup-mono-wide-vptrim2 (#f (0. 1. 0.5 1.) 180.)) ;;;*Private diff --git a/panda/src/chancfg/window_db b/panda/src/chancfg/window_db index e90debc474..2e8c9d0691 100644 --- a/panda/src/chancfg/window_db +++ b/panda/src/chancfg/window_db @@ -21,20 +21,16 @@ ;;; ;;; Abbreviations used below are: ;;; PVC - Pipe Video Chanel -;;; DVR - Dynamic Video Resolution ;;; ofs - offset ;;; rgn - region ;;; ;;; The format for a config is: -;;; window lay- set- default bor- cur- PVC -;;; name out ups size der sor offset +;;; window lay- set- default bor- cur- PVC +;;; name out ups size der sor offset ;;; (string ((---) (({int setup}+)+) (int int) bool bool [int] )) ;;; -;;; * In order to have DVR, we must also be using Pipe Video Channels -;;; * If Pipe Video Channels are being used, we do not need the default size -;;; * If Pipe Video Channels are being used, the PVC offset will give the -;;; first chanel number to be used for channels that allow default -;;; assignment (see setup below). +;;; * The use of Pipe Video Channels is indicated by specifying a PVC offset.;;; The PVC offset will give the first chanel number to be used for +;;; channels that allow default assignment (see setup below). ;;; * Setups is an arbitrarilly long list of setup specs. Any region that ;;; does not have a coresponding setup, does not get configured. There is ;;; an index associated with each setup from the range of 0 to the number @@ -46,23 +42,25 @@ ;;;*Public -(single (#f #f 0 layout1x1 ((0 setup-mono-plain)) (640 480) #t #t)) -(single+god (#f #f 0 layout2x1 ((0 setup-mono-plain)(1 setup-mono-plain)) (640 480) #t #t)) -(cave3 (#f #f 0 layout3x1 ((0 setup-mono-plain 1 setup-mono-plain - 2 setup-mono-plain)) (720 320) #t #t)) -(cave3+god (#f #f 0 layout3x2-1+3x1 ((0 setup-mono-plain 1 setup-mono-plain - 2 setup-mono-plain) (3 setup-mono-plain)) +(single (layout1x1 ((0 setup-mono-plain)) (640 480) #t #t)) +(single+god (layout2x1 ((0 setup-mono-plain)(1 setup-mono-plain)) + (640 480) #t #t)) +(cave3 (layout3x1 ((0 setup-mono-plain 1 setup-mono-plain + 2 setup-mono-plain)) (720 320) #t #t)) +(cave3+god (layout3x2-1+3x1 ((0 setup-mono-plain 1 setup-mono-plain + 2 setup-mono-plain) (3 setup-mono-plain)) (720 640) #t #t)) -(cave3passive (#f #f 0 layout3x2 ((0 setup-mono-plain 1 setup-mono-plain - 2 setup-mono-plain 3 setup-mono-plain - 4 setup-mono-plain 5 setup-mono-plain)) +(cave3passive (layout3x2 ((0 setup-mono-plain 1 setup-mono-plain + 2 setup-mono-plain 3 setup-mono-plain + 4 setup-mono-plain 5 setup-mono-plain)) (720 640) #t #t)) -(multipass-tile (#f #f 0 layout4x4 ((0 setup-mono-plain 1 setup-mono-plain - 2 setup-mono-plain 3 setup-mono-plain - 4 setup-mono-plain 5 setup-mono-plain - 6 setup-mono-plain 7 setup-mono-plain - 8 setup-mono-plain 9 setup-mono-plain - 10 setup-mono-plain 11 setup-mono-plain - 12 setup-mono-plain 13 setup-mono-plain - 14 setup-mono-plain 15 setup-mono-plain)) - (720 320) #t #t)) +(mono-modelcave-pipe0 (layout1x3 ((0 setup-mono-left 1 setup-mono-left + 2 setup-mono-left)) (640 1440) #t #t)) +(mono-modelcave-pipe1 (layout1x2 ((0 setup-mono-left 1 setup-mono-left)) + (640 960) #t #t)) +(mono-cave (layout3x2 ((0 setup-mono-cave 1 setup-mono-cave + 2 setup-mono-cave 3 setup-mono-cave + 4 setup-mono-cave 5 setup-mono-cave)) + (1920 960) #f #t)) + +