#include <Iguana/GLBrowsers/interface/Ig3DBaseBrowser.h>
Public Slots | |
virtual void | autoPrint (const std::string text) |
virtual void | autoPrint (void) |
virtual void | invertCamera (void) |
void | pick (void) |
void | resetToHomePosition (void) |
void | saveHomePosition (void) |
void | seek (void) |
void | setFeedbackVisibility (bool enable) |
void | setGL2PSOptions (int options) |
virtual void | setGridVisibility (bool enable) |
void | setWhatsThisPicking (bool enable=true) |
virtual void | toggleCameraType (void) |
void | view (void) |
void | viewAll (void) |
virtual void | viewPlaneX (void) |
virtual void | viewPlaneY (void) |
virtual void | viewPlaneZ (void) |
void | zoom (const float diffvalue) |
void | zoomIn (void) |
void | zoomOut (void) |
Signals | |
void | cameraToggled (void) |
Public Member Functions | |
virtual void | browse (IgRepresentable *object) |
Begin browsing the object. | |
virtual void | focusIn (void) |
virtual void | focusOut (void) |
virtual Ig3DBaseRep * | getCurrentPick (void) const |
virtual const SoPickedPoint * | getCurrentPickPoint (void) const |
int | getGL2PSOptions (void) |
virtual Ig3DBaseRep * | getSelection (void) const |
Ig3DBaseBrowser (IgState *state, IgSite *site, Ig3DBaseModel *model) | |
bool | isGridVisible (void) |
bool | isWhatsThisPicking (void) |
Ig3DBaseRep * | menuRep (void) |
virtual Ig3DBaseModel * | model (void) const |
virtual void | printBitmap (QString file, float ppi, float dpi, QString format) |
virtual void | printVector (QString file, QString format, int level) |
void | repMenu (IgQtObjectMenuMessage message) |
virtual void | select (Ig3DBaseRep *rep) |
void | setAutoClipping (SbBool enable) |
virtual IgState * | state (void) const |
~Ig3DBaseBrowser (void) | |
Static Public Member Functions | |
static SoNode * | findGroup (SoNode *node, const char *name) |
static SoNode * | openNode (const QString &nodeName, const QString &title, QWidget *parent=0, const char *file=0) |
static bool | saveNode (SoNode *node, const QString &title, QWidget *parent=0, const char *file=0) |
static bool | writeNode (SoNode *node, const QString &file, bool binary, QWidget *parent=0) |
Static Public Attributes | |
static const int | MENU_3D_OPS = 100 |
static const int | MENU_CLIP = 103 |
static const int | MENU_ID_3D = 3000 |
static const int | MENU_ID_3D_2D_VIEW_PROPERTIES = 3014 |
static const int | MENU_ID_3D_ANIMS = 3011 |
static const int | MENU_ID_3D_CLIPS = 3009 |
static const int | MENU_ID_3D_FIELDPLANES = 3015 |
static const int | MENU_ID_3D_FILESEP = 3003 |
static const int | MENU_ID_3D_GRIDS = 3017 |
static const int | MENU_ID_3D_LEGO_VIEW_PROPERTIES = 3112 |
static const int | MENU_ID_3D_LGHT_BASE = 3113 |
static const int | MENU_ID_3D_LGHT_MANIP = 3101 |
static const int | MENU_ID_3D_LGHT_NEW = 3102 |
static const int | MENU_ID_3D_LGHT_NEW_DIR = 3103 |
static const int | MENU_ID_3D_LGHT_NEW_PNT = 3104 |
static const int | MENU_ID_3D_LGHT_NEW_SPT = 3105 |
static const int | MENU_ID_3D_LGHT_SEP = 3110 |
static const int | MENU_ID_3D_LIGHTS = 3010 |
static const int | MENU_ID_3D_MISCSEP = 3007 |
static const int | MENU_ID_3D_NODEMANIP = 3016 |
static const int | MENU_ID_3D_RPHI_VIEW_PROPERTIES = 3114 |
static const int | MENU_ID_3D_RZ_VIEW_PROPERTIES = 3113 |
static const int | MENU_ID_3D_SPARE_VIEW_PROPERTIES = 3115 |
static const int | MENU_ID_3D_TOOLBAR = 3004 |
static const int | MENU_ID_3D_TOOLBAR_SEP = 3005 |
static const int | MENU_ID_3D_VIEW_PROPERTIES = 3006 |
static const int | MENU_ID_3D_VIEWPOINTS = 3012 |
static const int | MENU_ID_3D_VP_BASE = 3203 |
static const int | MENU_ID_3D_VP_NEW = 3201 |
static const int | MENU_ID_3D_VP_SEP = 3202 |
static const int | MENU_ID_3D_Z_SLICE = 3008 |
static const int | MENU_SEEKTO = 101 |
static const int | MENU_SLICE = 102 |
Protected Member Functions | |
virtual QWidget * | buildBottomTrim (QWidget *parent) |
virtual QWidget * | buildLeftTrim (QWidget *parent) |
virtual QWidget * | buildRightTrim (QWidget *parent) |
virtual void | createViewerButtons (QWidget *parent, SbPList *buttonlist) |
Overloaded from parent class to add the tool tips. | |
virtual void | initWidget (IgSite *site) |
virtual void | modelChanged (Ig3DBaseModelEvent event) |
virtual void | selectMessage (IgSelectionMessage message) |
virtual void | setCurrentPick (Ig3DBaseRep *rep) |
virtual void | setCurrentPickPoint (const SoPickedPoint *pick) |
Static Protected Member Functions | |
static SbBool | eventCallback (void *closure, QEvent *event) |
static QWidget * | initialise (IgState *state, IgSite *site) |
Private Slots | |
void | leftWheelChanged (float by) |
void | leftWheelPressed (void) |
void | leftWheelReleased (void) |
void | print (void) |
void | repSeekTo (void) |
void | save (void) |
Private Member Functions | |
virtual void | drawGrid (const bool enable) |
Ig3DBaseBrowser (const Ig3DBaseBrowser &) | |
Ig3DBaseBrowser & | operator= (const Ig3DBaseBrowser &) |
Static Private Member Functions | |
static void | farDistanceSensorCB (void *me, SoSensor *sensor) |
static void | nearDistanceSensorCB (void *me, SoSensor *sensor) |
static void | onDeselect (void *cb, SoPath *selection) |
static void | onFinishPick (void *cb, SoQtViewer *viewer) |
static SoPath * | onPick (void *cb, const SoPickedPoint *pick) |
static void | onSelect (void *cb, SoPath *selection) |
static void | onStartPick (void *cb, SoQtViewer *viewer) |
Private Attributes | |
Ig3DBaseRep * | m_currentPick |
SoFieldSensor * | m_farDistanceSensor |
bool | m_first_time |
int | m_gl2psFBBufferSize |
int | m_gl2psOptions |
bool | m_grid |
QPopupMenu * | m_menu |
Ig3DBaseRep * | m_menuRep |
Ig3DBaseModel * | m_model |
SoFieldSensor * | m_nearDistanceSensor |
bool | m_oldSeek |
bool | m_oldView |
const SoPickedPoint * | m_pick |
Ig3DBaseRep * | m_selection |
IgSite * | m_site |
IgState * | m_state |
bool | m_whatsThisPicking |
Definition at line 41 of file Ig3DBaseBrowser.h.
Ig3DBaseBrowser::Ig3DBaseBrowser | ( | IgState * | state, | |
IgSite * | site, | |||
Ig3DBaseModel * | model | |||
) |
Definition at line 113 of file Ig3DBaseBrowser.cc.
References ASSERT, Ig3DBaseModel::attachPoint(), Ig3DBaseModel::encode(), farDistanceSensorCB(), Ig3DBaseRep::findMagic(), initWidget(), m_farDistanceSensor, m_grid, m_nearDistanceSensor, nearDistanceSensorCB(), and prof2calltree::node.
00116 : SoQtExaminerViewer (initialise (state, site), "3D Browser", 00117 true, BUILD_ALL, BROWSER, false), 00118 m_state (new IgState (state)), 00119 m_model (model), 00120 m_selection (0), 00121 m_menuRep (0), 00122 m_first_time (true), 00123 m_grid (false), 00124 m_gl2psOptions (GL2PS_SIMPLE_LINE_OFFSET 00125 | GL2PS_BEST_ROOT 00126 | GL2PS_OCCLUSION_CULL), 00127 m_currentPick (0), 00128 m_whatsThisPicking (false), 00129 m_oldView (true), 00130 m_oldSeek (false), 00131 m_gl2psFBBufferSize (1024*1024), 00132 m_farDistanceSensor (0), 00133 m_nearDistanceSensor (0) 00134 { 00135 initWidget (site); 00136 //FIXME: remove when SoQt fixes the continious rendering problem 00137 //create sersors to sence the near and for clip plane distance and 00138 //force them to be 0.1 and SHRT_MAX 00139 SoCamera * const camera = SoQtExaminerViewer::getCamera (); 00140 00141 ASSERT (camera); 00142 camera->farDistance = SHRT_MAX; 00143 camera->nearDistance = 0.1; 00144 m_farDistanceSensor = new SoFieldSensor (&farDistanceSensorCB, this); 00145 m_farDistanceSensor->attach (&camera->farDistance); 00146 m_nearDistanceSensor = new SoFieldSensor (&nearDistanceSensorCB, this); 00147 m_nearDistanceSensor->attach (&camera->nearDistance); 00148 00149 SoNode *node = model->attachPoint ()->findMagic ( 00150 Ig3DBaseModel::encode ("Default Grid Group")); 00151 if (node && dynamic_cast<SoGroup*>(node)->getNumChildren ()) 00152 m_grid = true; 00153 }
Ig3DBaseBrowser::~Ig3DBaseBrowser | ( | void | ) |
Definition at line 338 of file Ig3DBaseBrowser.cc.
References lat::CreateCallback(), DBSPlugin::get(), m_model, m_state, Ig3DBaseModel::ModelChanged, modelChanged(), selectMessage(), and Ig3DBaseModel::unlisten().
00339 { 00340 // FIXME: remove model selection, picking callbacks? 00341 IgSelectionService::get (m_state) 00342 ->remove (lat::CreateCallback (this, &Ig3DBaseBrowser::selectMessage)); 00343 m_model->unlisten (Ig3DBaseModel::ModelChanged, 00344 lat::CreateCallback (this, &Ig3DBaseBrowser::modelChanged)); 00345 }
Ig3DBaseBrowser::Ig3DBaseBrowser | ( | const Ig3DBaseBrowser & | ) | [private] |
void Ig3DBaseBrowser::autoPrint | ( | const std::string | text | ) | [virtual, slot] |
Definition at line 1106 of file Ig3DBaseBrowser.cc.
References c, file, and pydbsAccessor::root.
01107 { 01108 QDateTime dt = QDateTime::currentDateTime (); 01109 QString fName = "screenShot-" + dt.toString ("hh:mm:ss.zzz-dd.MM.yyyy") + ".png"; 01110 QString dName = "screenShot-" + dt.toString ("hh:mm:ss.zzz-dd.MM.yyyy") + ".date"; 01111 01112 SbColor c = getBackgroundColor (); 01113 SoOffscreenRenderer osr (this->getViewportRegion ()); 01114 osr.setBackgroundColor (c); 01115 SoNode *root = getSceneManager ()->getSceneGraph (); 01116 SbBool ok = osr.render (root); 01117 01118 if (!ok) { return; } 01119 // ok = osr.writeToRGB (fName); 01120 ok = osr.writeToFile (fName.latin1 (), "png"); 01121 if (!ok) { return; } 01122 01123 dt = QDateTime::currentDateTime (); 01124 QFile file (dName); 01125 if (file.open (IO_WriteOnly)) 01126 { 01127 QTextStream stream (&file); 01128 stream << dt.toString ("ddd MMM d hh:mm:ss.zzz yyyy") << "\n"; 01129 stream << text << "\n"; 01130 file.close (); 01131 } 01132 }
Definition at line 1100 of file Ig3DBaseBrowser.cc.
Referenced by Ig3DBaseWindow::print().
01101 { 01102 autoPrint (this->getTitle ()); 01103 }
void Ig3DBaseBrowser::browse | ( | IgRepresentable * | object | ) | [virtual] |
Begin browsing the object.
The implementation must represent object in all its models. object (its representation, that is) may then be made the current selection of this and all other browsers in the same IgSession as this browser. This last step should be implemented by broadcasting a IgSelectMessage on the session IgSelectionService; the browser itself can simply respond to the message as it is delivered to it.
object | The object to visualise. Even though the object is not const , the browser should not assume it can change it. All non-editor browsers should treat the object purely as const . Editors should treat the object as const as long as possible, preferably until the user explicitly requests the object to be changed. Thus, editors should make changes only to the representation until it is clear that the user is committed to making the changes to the object, too. |
Implements IgBrowser.
Definition at line 528 of file Ig3DBaseBrowser.cc.
References IgRepSet::lookup(), m_first_time, m_model, and viewAll().
Referenced by Ig3DBaseWindow::browse().
00529 { 00530 // FIXME: can we just depend on model change event? 00531 IgRep *rep = IgRepSet::lookup (object, m_model, true); 00532 00533 // FIXME: terrible kludge; need something more robust... 00534 if (rep && m_first_time) 00535 { 00536 m_first_time = false; 00537 viewAll (); 00538 } 00539 00540 // FIXME: select? 00541 }
QWidget * Ig3DBaseBrowser::buildBottomTrim | ( | QWidget * | parent | ) | [protected, virtual] |
Reimplemented in Ig2DBrowser, IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 320 of file Ig3DBaseBrowser.cc.
References HLT_VtxMuL3::result.
00321 { 00322 QWidget *result = new QWidget (parent); 00323 result->setFixedHeight (0); 00324 00325 return result; 00326 }
QWidget * Ig3DBaseBrowser::buildLeftTrim | ( | QWidget * | parent | ) | [protected, virtual] |
Reimplemented in Ig2DBrowser, IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 311 of file Ig3DBaseBrowser.cc.
References HLT_VtxMuL3::result.
00312 { 00313 QWidget *result = new QWidget (parent); 00314 result->setFixedWidth (0); 00315 00316 return result; 00317 }
QWidget * Ig3DBaseBrowser::buildRightTrim | ( | QWidget * | parent | ) | [protected, virtual] |
Reimplemented in Ig2DBrowser, IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 329 of file Ig3DBaseBrowser.cc.
References HLT_VtxMuL3::result.
00330 { 00331 QWidget *result = new QWidget (parent); 00332 result->setFixedWidth (0); 00333 00334 return result; 00335 }
Referenced by toggleCameraType().
void Ig3DBaseBrowser::createViewerButtons | ( | QWidget * | parent, | |
SbPList * | buttonlist | |||
) | [protected, virtual] |
Overloaded from parent class to add the tool tips.
Overloaded from parent class to add the tool tips
Definition at line 244 of file Ig3DBaseBrowser.cc.
References reco::fitHelper::add(), CAMERA_BUTTON, EXAMINE_BUTTON, HOME_BUTTON, INTERACT_BUTTON, SEEK_BUTTON, SET_HOME_BUTTON, and VIEW_ALL_BUTTON.
00245 { 00246 SoQtExaminerViewer::createViewerButtons (parent, buttonlist); 00247 00248 // Are there any buttons? 00249 int nrbuttons = buttonlist->getLength(); 00250 if (nrbuttons == 0) return; 00251 00252 QToolTip::add ((QWidget*) ((*buttonlist ) [INTERACT_BUTTON]), "Select/Pick"); 00253 QWhatsThis::add ((QWidget*) ((*buttonlist) [INTERACT_BUTTON]), 00254 tr ("<b>Select/Pick Button:</b>\n" 00255 "Selects object manipulation or pick mode \n" 00256 "(and deselects camera or viewer mode).\n" 00257 "The cursor shape will change to an arrow.\n" 00258 "In this mode, the user is manipulating objects\n" 00259 "in the scene graph.")); 00260 00261 QToolTip::add ((QWidget*) ((*buttonlist ) [EXAMINE_BUTTON]), "View"); 00262 QWhatsThis::add ((QWidget*) ((*buttonlist) [EXAMINE_BUTTON]), 00263 tr ("<b>View Button:</b>\n" 00264 "Selects camera or viewer mode (and deselects object \n" 00265 "manipulation or pick mode). The cursor shape will\n" 00266 "change to a circular arrows icon. In this mode,\n" 00267 "the user is moving the camera in 3D space.")); 00268 00269 QToolTip::add ((QWidget*) ((*buttonlist ) [HOME_BUTTON]), "Home"); 00270 QWhatsThis::add ((QWidget*) ((*buttonlist) [HOME_BUTTON]), 00271 tr ("<b>Home Button:</b>\n" 00272 "Returns the camera to its home position\n" 00273 "(initial position if not reset).")); 00274 00275 QToolTip::add ((QWidget*) ((*buttonlist ) [SET_HOME_BUTTON]), "Set Home"); 00276 QWhatsThis::add ((QWidget*) ((*buttonlist) [SET_HOME_BUTTON]), 00277 tr ("<b>Set Home Button:</b>\n" 00278 "Resets the home position to the current\n" 00279 "camera position.")); 00280 00281 QToolTip::add ((QWidget*) ((*buttonlist ) [VIEW_ALL_BUTTON]), "View All"); 00282 QWhatsThis::add ((QWidget*) ((*buttonlist) [VIEW_ALL_BUTTON]), 00283 tr ("<b>View All Button:</b>\n" 00284 "Brings the entire scene graph into view.")); 00285 00286 QToolTip::add ((QWidget*) ((*buttonlist ) [SEEK_BUTTON]), "Seek"); 00287 QWhatsThis::add ((QWidget*) ((*buttonlist) [SEEK_BUTTON]), 00288 tr ("<b>Seek Button:</b>\n" 00289 "Allows the user to select a new center\n" 00290 "of rotation for the camera. When clicked\n" 00291 "on (and in viewer mode) the cursor changes\n" 00292 "to a crosshair. The next left mouse\n" 00293 "buttonpress causes whatever is underneath\n" 00294 "the cursor to be selected as the new center\n" 00295 "of rotation. Once the button is released,\n" 00296 "the camera either jumps or animates to its\n" 00297 "new position depending on the current\n" 00298 "setting of the seek time in the preferences\n" 00299 "dialog box.")); 00300 00301 QToolTip::add ((QWidget*) ((*buttonlist ) [CAMERA_BUTTON]), "Projection"); 00302 QWhatsThis::add ((QWidget*) ((*buttonlist) [CAMERA_BUTTON]), 00303 tr ("<b>Projection Button:</b>\n" 00304 "Selects the type of camera used\n" 00305 "by the viewer. It toggles between\n" 00306 "the two available camera types -\n" 00307 "perspective and orthographic.")); 00308 }
Reimplemented in IgRPhiBrowser, and IgSpareBrowser.
Definition at line 388 of file Ig3DBaseBrowser.cc.
References python::cmstools::all(), Ig3DBaseModel::encode(), findGroup(), getString(), i, m_grid, model(), and IgSoGridPlane::on.
Referenced by setGridVisibility().
00389 { 00390 // find the grid planes group 00391 SoNode* grid = findGroup (model ()->attachPoint (), Ig3DBaseModel::encode ("Grid Planes").getString ()); 00392 SoGroup* all = 0; 00393 00394 if (grid) 00395 { 00396 // and now find the group which contains all planes 00397 all = dynamic_cast<SoGroup *> (findGroup (grid, Ig3DBaseModel::encode ("All").getString ())); 00398 } 00399 00400 if (all) 00401 { 00402 unsigned nbrChildren = all->getNumChildren (); 00403 IgSoGridPlane* plane = 0; 00404 00405 // iterate over all planes and enable or disable them 00406 for (unsigned i = 0; i < nbrChildren; i++) 00407 { 00408 plane = dynamic_cast<IgSoGridPlane* > (all->getChild (i)); 00409 if (plane) 00410 { 00411 plane->on = enable; 00412 } 00413 } 00414 } 00415 m_grid = enable; 00416 }
SbBool Ig3DBaseBrowser::eventCallback | ( | void * | closure, | |
QEvent * | event | |||
) | [static, protected] |
Reimplemented in Ig2DBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 156 of file Ig3DBaseBrowser.cc.
Referenced by IgRZBrowser::eventCallback(), Ig2DBrowser::eventCallback(), IgRPhiBrowser::eventCallback(), IgSpareBrowser::eventCallback(), and initWidget().
00157 { 00158 Ig3DBaseBrowser *self = static_cast<Ig3DBaseBrowser *> (closure); 00159 if (!self->getParentWidget()->hasMouse () || 00160 !self->isViewing()) 00161 return false; 00162 00163 if (QWheelEvent *wheelEvent = dynamic_cast<QWheelEvent *> (event)) 00164 { 00165 self->zoom (0.1 * (wheelEvent->delta () > 0 ? 1:-1)); 00166 return true; 00167 } 00168 else if (QMouseEvent *mEvent = dynamic_cast<QMouseEvent *> (event)) 00169 { 00170 if (mEvent->button () == Qt::LeftButton 00171 && mEvent->type () == QEvent::MouseButtonRelease 00172 && self->isSeekMode()) 00173 { 00174 self->setComponentCursor (SoQtCursor::getRotateCursor ()); 00175 return true; 00176 } 00177 return false; 00178 } 00179 return false; 00180 }
Definition at line 502 of file Ig3DBaseBrowser.cc.
Referenced by Ig3DBaseBrowser().
00503 { 00504 Ig3DBaseBrowser *self = static_cast<Ig3DBaseBrowser *> (me); 00505 if (self->isAutoClipping ()) 00506 { 00507 SoCamera * const camera = self->getCamera (); 00508 self->m_farDistanceSensor->detach (); 00509 camera->farDistance = SHRT_MAX; 00510 self->m_farDistanceSensor->attach (&camera->farDistance); 00511 } 00512 }
SoNode * Ig3DBaseBrowser::findGroup | ( | SoNode * | node, | |
const char * | name | |||
) | [static] |
Definition at line 1323 of file Ig3DBaseBrowser.cc.
References count, group, i, and n.
Referenced by drawGrid(), Ig3DGridCategory::openIVFile(), openNode(), and Ig3DGridCategory::saveIVFile().
01324 { 01325 if (node->isOfType(SoGroup::getClassTypeId())) 01326 { 01327 if (node->getName () == name) 01328 return node; 01329 else 01330 { 01331 SoGroup * group = dynamic_cast<SoGroup*>(node); 01332 int count = group->getNumChildren (); 01333 for (int i = 0; i < count; i++) 01334 { 01335 SoNode *n = findGroup (group->getChild(i), name); 01336 if (n) return n; 01337 } 01338 } 01339 } 01340 return 0; 01341 }
Definition at line 222 of file Ig3DBaseBrowser.cc.
References m_model, onDeselect(), onPick(), onSelect(), and Ig3DBaseModel::sceneGraph().
Referenced by Ig3DBaseWindow::focusIn().
00223 { 00224 // Make the model the scene graph. Note that the model always has 00225 // a hidden root whether or not it contains anything. 00226 SoSelection *top = static_cast<SoSelection *> (m_model->sceneGraph ()); 00227 top->setPickFilterCallback (onPick, this); 00228 top->addSelectionCallback (onSelect, this); 00229 top->addDeselectionCallback (onDeselect, this); 00230 }
Definition at line 233 of file Ig3DBaseBrowser.cc.
References m_model, onDeselect(), onSelect(), and Ig3DBaseModel::sceneGraph().
Referenced by Ig3DBaseWindow::focusOut().
00234 { 00235 SoSelection *top = static_cast<SoSelection *> (m_model->sceneGraph ()); 00236 top->removeSelectionCallback (onSelect, this); 00237 top->removeDeselectionCallback (onDeselect, this); 00238 }
Ig3DBaseRep * Ig3DBaseBrowser::getCurrentPick | ( | void | ) | const [virtual] |
Definition at line 592 of file Ig3DBaseBrowser.cc.
References m_currentPick.
00593 { 00594 return m_currentPick; 00595 }
const SoPickedPoint * Ig3DBaseBrowser::getCurrentPickPoint | ( | void | ) | const [virtual] |
Definition at line 614 of file Ig3DBaseBrowser.cc.
References m_pick.
00615 { 00616 return m_pick; 00617 }
Definition at line 956 of file Ig3DBaseBrowser.cc.
References m_gl2psOptions.
Referenced by printVector(), and IgGL2PSPrintCategory::updateGL2PSOptions().
00957 { return m_gl2psOptions; }
Ig3DBaseRep * Ig3DBaseBrowser::getSelection | ( | void | ) | const [virtual] |
Definition at line 598 of file Ig3DBaseBrowser.cc.
References m_selection.
Referenced by Ig3DNodeCategory::focusIn(), and onPick().
00599 { 00600 return m_selection; 00601 }
Definition at line 88 of file Ig3DBaseBrowser.cc.
References IgQtSite::hostFrom(), Ig3DSystem::init(), IgQtSite::selfFrom(), size, and w.
00089 { 00090 // Ig3DBaseBrowser inherits SoQtExaminerViewer. However, we need to 00091 // initialise the 3D subsystem properly before creating the 00092 // viewer. Thus we need to run a special between the entering of 00093 // the Ig3DBaseBrowser constructor and before running the base class 00094 // (SoQtExaminerViewer) constructor. This function is that magic 00095 // initialiser hook. The return value is the geometry-managing 00096 // parent widget for the examiner window (see the comment above 00097 // for the details). 00098 00099 // Initialise SoQt if it hasn't been done yet. 00100 Ig3DSystem::init (state, IgQtSite::selfFrom (site)->topLevelWidget ()); 00101 00102 // Return the magic intermediate widget parent to manage geometry. 00103 QWidget *w = new QWidget (IgQtSite::hostFrom (site)); 00104 (new QVBoxLayout (w))->setAutoAdd (true); 00105 QSize size = IgQtSite::hostFrom (site)->size(); 00106 if (size.width () > 1) 00107 w->resize (size); 00108 return w; 00109 }
Definition at line 183 of file Ig3DBaseBrowser.cc.
References ASSERT, lat::CreateCallback(), eventCallback(), DBSPlugin::get(), IgQtSite::host(), Ig3DBaseModel::listen(), m_model, m_state, Ig3DBaseModel::ModelChanged, modelChanged(), Ig3DBaseModel::sceneGraph(), and selectMessage().
Referenced by Ig3DBaseBrowser().
00184 { 00185 ASSERT (m_model); 00186 // Host in the site and decorate the viewer with more buttons. 00187 IgQtSite::host (site, getParentWidget ()); 00188 setBaseWidget (buildWidget (getParentWidget ())); 00189 00190 // FIXME: from cmscan 00191 // setBottomWheelString ("Rot Z"); 00192 // parent->setIcon (QPixmap (cmsLogo_xpm)); 00193 00194 // Hook on the selection service 00195 ASSERT (IgSelectionService::get (m_state)); 00196 IgSelectionService::get (m_state) 00197 ->add (lat::CreateCallback (this, &Ig3DBaseBrowser::selectMessage)); 00198 m_model->listen (Ig3DBaseModel::ModelChanged, 00199 lat::CreateCallback (this, &Ig3DBaseBrowser::modelChanged)); 00200 00201 // Make the model the scene graph. Note that the model always has 00202 // a hidden root whether or not it contains anything. 00203 SoGroup *graph = m_model->sceneGraph (); 00204 ASSERT (graph); 00205 setSceneGraph (graph); 00206 00207 // Put selection hooks on the scene graph. The know that the 00208 // model's hidden root is always a SoSelection. 00209 ASSERT (graph->isOfType (SoSelection::getClassTypeId ())); 00210 SoSelection *top = static_cast<SoSelection *> (graph); 00211 top->policy.setValue (SoSelection::SINGLE); 00212 00213 redrawOnSelectionChange (top); 00214 setGLRenderAction (new SoLineHighlightRenderAction); 00215 setEventCallback (eventCallback, this); 00216 00217 // Make myself visible: get SoQt to do some preparations. 00218 show (); 00219 }
Reimplemented in IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 490 of file Ig3DBaseBrowser.cc.
00491 { 00492 SoCamera * const camera = this->getCamera (); 00493 if (!camera) return; // probably a scene-less viewer 00494 00495 camera->position = camera->position.getValue () * -1.0F; 00496 camera->orientation.setValue ( 00497 SbRotation (SbVec3f (0.F,-1.F,0.F), M_PI) 00498 * camera->orientation.getValue ()); 00499 }
Reimplemented in IgRPhiBrowser, and IgSpareBrowser.
Definition at line 382 of file Ig3DBaseBrowser.cc.
References m_grid.
Referenced by gridButtonCallback().
00383 { 00384 return m_grid; 00385 }
Definition at line 1344 of file Ig3DBaseBrowser.cc.
References m_whatsThisPicking.
01345 { return m_whatsThisPicking; }
void Ig3DBaseBrowser::leftWheelChanged | ( | float | by | ) | [private, slot] |
Ig3DBaseRep * Ig3DBaseBrowser::menuRep | ( | void | ) |
Definition at line 1040 of file Ig3DBaseBrowser.cc.
References m_menuRep.
01041 { return m_menuRep; }
Ig3DBaseModel * Ig3DBaseBrowser::model | ( | void | ) | const [virtual] |
Definition at line 352 of file Ig3DBaseBrowser.cc.
References m_model.
Referenced by Ig3DAnimsCategory::buildDefaults(), Ig3DSlicersCategory::buildDefaults(), Ig3DLightsCategory::buildDefaults(), Ig3DGridCategory::buildDefaults(), Ig3DClipsCategory::buildDefaults(), Ig3DClipsCategory::deleteOne(), Ig3DAnimsCategory::deleteOne(), Ig3DGridCategory::deleteOne(), Ig3DSlicersCategory::deleteOne(), Ig3DLightsCategory::deleteOne(), IgSpareBrowser::drawGrid(), IgRPhiBrowser::drawGrid(), drawGrid(), Ig3DLightsCategory::lightTypeChanged(), Ig3DGridCategory::makeCustomOne(), Ig3DLightsCategory::makeOne(), Ig3DAnimsCategory::makeOne(), Ig3DSlicersCategory::makeOne(), Ig3DClipsCategory::makeOne(), Ig3DGridCategory::makeOne(), Ig3DGridCategory::openIVFile(), Ig3DLightsCategory::reconstruct(), Ig3DClipsCategory::reconstruct(), Ig3DAnimsCategory::reconstruct(), Ig3DSlicersCategory::reconstruct(), Ig3DGridCategory::reconstruct(), Ig3DViewpointsCategory::registerBrowser(), Ig3DGridCategory::removeGrids(), Ig3DGridCategory::saveIVFile(), Ig3DLightsCategory::toggleOne(), Ig2DBrowser::viewPlaneX(), Ig2DBrowser::viewPlaneY(), and Ig2DBrowser::viewPlaneZ().
00353 { return m_model; }
void Ig3DBaseBrowser::modelChanged | ( | Ig3DBaseModelEvent | event | ) | [protected, virtual] |
Definition at line 710 of file Ig3DBaseBrowser.cc.
Referenced by initWidget(), and ~Ig3DBaseBrowser().
Definition at line 515 of file Ig3DBaseBrowser.cc.
Referenced by Ig3DBaseBrowser().
00516 { 00517 Ig3DBaseBrowser *self = static_cast<Ig3DBaseBrowser *> (me); 00518 if (self->isAutoClipping ()) 00519 { 00520 SoCamera * const camera = self->getCamera (); 00521 self->m_nearDistanceSensor->detach (); 00522 camera->nearDistance = 0.1; 00523 self->m_nearDistanceSensor->attach (&camera->nearDistance); 00524 } 00525 }
Definition at line 685 of file Ig3DBaseBrowser.cc.
References Ig3DBaseRep::asRep(), ASSERT, DBSPlugin::get(), LOG, edm::match(), and GsfMatrixTools::trace().
Referenced by focusIn(), and focusOut().
00686 { 00687 // FIXME: handle multiple selection? 00688 LOG(0, trace, LF3dbrowser, "deselect: " << selection->getLength () << '\n'); 00689 Ig3DBaseBrowser *self = static_cast<Ig3DBaseBrowser *> (cb); 00690 Ig3DBaseRep *match = Ig3DBaseRep::asRep (selection->getNodeFromTail (0)); 00691 ASSERT (match); 00692 self->setCurrentPick (0); 00693 IgSelectionService::get (self->m_state) 00694 ->broadcast (IgSelectionMessage (0)); 00695 }
SoPath * Ig3DBaseBrowser::onPick | ( | void * | cb, | |
const SoPickedPoint * | pick | |||
) | [static, private] |
Definition at line 628 of file Ig3DBaseBrowser.cc.
References Ig3DBaseRep::asRep(), getSelection(), index, LOG, edm::match(), prof2calltree::node, and GsfMatrixTools::trace().
Referenced by focusIn().
00629 { 00630 // FIXME: pass pick to the 3d rep to allow it to give more detail 00631 Ig3DBaseBrowser *self = static_cast<Ig3DBaseBrowser *> (cb); 00632 //if (self->isWhatsThisPicking ()) return 0; 00633 00634 self->setCurrentPickPoint (pick); 00635 00636 // Find a matching rep for the selected node 00637 SoPath *selection = pick->getPath (); 00638 const int length = selection->getLength (); 00639 int index = 0; 00640 Ig3DBaseRep *match = 0; 00641 for ( ; index < length; ++index) 00642 { 00643 // skip until we find a representation boundary 00644 SoNode *node = selection->getNodeFromTail (index); 00645 LOG(0, trace, LF3dbrowser, "pick node [-" << index << "] = " 00646 << node->getName ().getString () << '\n'); 00647 00648 if ((match = Ig3DBaseRep::asRep (node))) 00649 break; 00650 } 00651 00652 // select if matched and not already selected; otherwise deselect 00653 LOG(0, trace, LF3dbrowser, "pick --> " << index << " of " << length); 00654 if (index < length && self->getSelection () != match) 00655 { 00656 LOG(0, trace, LF3dbrowser, ": match and different from previous\n"); 00657 return selection->copy (0, length - index); 00658 } 00659 else 00660 { 00661 LOG(0, trace, LF3dbrowser, ": no match or same as previously\n"); 00662 return 0; 00663 } 00664 }
Definition at line 667 of file Ig3DBaseBrowser.cc.
References Ig3DBaseRep::asRep(), ASSERT, Ig3DBaseRep::context(), DBSPlugin::get(), LOG, edm::match(), and GsfMatrixTools::trace().
Referenced by focusIn(), and focusOut().
00668 { 00669 // FIXME: if 3d rep set more detail on pick, use it here 00670 // FIXME: handle multiple selection? 00671 ASSERT (selection); 00672 ASSERT (selection->getLength () > 0); 00673 00674 LOG(0, trace, LF3dbrowser, "select: " << selection->getLength () << '\n'); 00675 Ig3DBaseBrowser *self = static_cast<Ig3DBaseBrowser *> (cb); 00676 Ig3DBaseRep *match = Ig3DBaseRep::asRep (selection->getNodeFromTail (0)); 00677 ASSERT (match); 00678 00679 self->setCurrentPick (match); 00680 IgSelectionService::get (self->m_state) 00681 ->broadcast (IgSelectionMessage (match->context ())); 00682 }
SoNode * Ig3DBaseBrowser::openNode | ( | const QString & | nodeName, | |
const QString & | title, | |||
QWidget * | parent = 0 , |
|||
const char * | file = 0 | |||
) | [static] |
Definition at line 1268 of file Ig3DBaseBrowser.cc.
References EgammaValidation_cff::filename, findGroup(), prof2calltree::node, SiStripLorentzAngle_cfi::read, and warning.
Referenced by Ig3DViewpointsCategory::load(), Ig3DGridCategory::openIVFile(), and Ig3DWindow::printViews().
01270 { 01271 // note: 01272 // SoDB::read (&file, node) [sometimes] has a buggy behaviour when 01273 // loading *.iv files. Some parts of the scene graph might get copied 01274 // because of a still unknown reason. For example when tried to save a 01275 // "grid planes" graph, the grid plane would get a "shadow" grid. 01276 01277 QString filename = ""; 01278 if (file != 0) 01279 { 01280 filename = file; 01281 } 01282 else 01283 { 01284 filename = 01285 QFileDialog::getOpenFileName ("./", 01286 "Open Inventor files (*.iv)", 01287 0, 01288 QString::null, 01289 0, 01290 0, 01291 title); 01292 } 01293 01294 if (filename != QString::null && !filename.isEmpty()) 01295 { 01296 SoNode *node = 0; 01297 SoInput file; 01298 if (! file.openFile (filename.latin1 ()) 01299 || ! SoDB::read (&file, node) 01300 || ! node) 01301 { 01302 QMessageBox::warning (parent, 01303 "File Access Error", 01304 "Can not open file \""+ filename + "\" for reading.", "Ok"); 01305 return 0; 01306 } 01307 QDir::setCurrent (QFileInfo (filename).dirPath ()); 01308 01309 if (nodeName.isEmpty ()) return node; 01310 01311 node = findGroup (node, nodeName.latin1 ()); 01312 01313 if (!node) 01314 QMessageBox::warning (parent, 01315 "Wrong file", 01316 "Can not find node \""+nodeName+"\" in file \""+ filename + "\".", "Ok"); 01317 return node; 01318 } 01319 return 0; 01320 }
Ig3DBaseBrowser& Ig3DBaseBrowser::operator= | ( | const Ig3DBaseBrowser & | ) | [private] |
Definition at line 1089 of file Ig3DBaseBrowser.cc.
Referenced by Ig3DBaseWindow::pick(), and setWhatsThisPicking().
01090 { 01091 if (isViewing () != false) 01092 { 01093 SoQtViewer::setViewing (false); 01094 SoQtViewer::setSeekMode (false); 01095 setComponentCursor(SoQtCursor(SoQtCursor::DEFAULT)); 01096 } 01097 }
Definition at line 722 of file Ig3DBaseBrowser.cc.
References description, dir, f, filter, i, j, LOG, funct::num(), printBitmap(), printVector(), edm::suffix(), GsfMatrixTools::trace(), and warning.
00723 { 00724 QString vector2EPS ("Vector EPS [Level 2] (*.eps)"); 00725 QString vector3EPS ("Vector EPS [Level 3] (*.eps)"); 00726 QString vectorPDF ("Portable Document Format (*.pdf)"); 00727 QStringList filters (vector2EPS); 00728 filters.append (vector3EPS); 00729 filters.append (vectorPDF); 00730 00731 SoOffscreenRenderer *renderer = 00732 new SoOffscreenRenderer (this->getViewportRegion ()); 00733 00734 int num =renderer->getNumWriteFiletypes(); 00735 00736 if (num == 0) 00737 { 00738 filters.append ("Encapsulated postscript (*.eps)"); 00739 filters.append ("Encapsulated postscript (*.ps)"); 00740 filters.append ("The SGI RGB file format (*.rgb)"); 00741 filters.append ("The SGI RGB file format (*.rgba)"); 00742 filters.append ("The SGI RGB file format (*.bw)"); 00743 filters.append ("The SGI RGB file format (*.inta)"); 00744 filters.append ("The SGI RGB file format (*.int)"); 00745 } 00746 else 00747 { 00748 for (int i=0; i < num; i++) 00749 { 00750 SbPList extlist; 00751 SbString fullname, description; 00752 renderer->getWriteFiletypeInfo(i, extlist, fullname, description); 00753 QString filter (fullname.getString()); 00754 filter+=" (*."; 00755 for (int j=0; j < extlist.getLength(); j++) 00756 filters.append (filter+(const char*)extlist[j]+")"); 00757 } 00758 } 00759 delete renderer; 00760 00761 // Pop up file dialog to as for the name. 00762 QFileDialog dialog (getShellWidget (), "Print To File", true); 00763 dialog.setFilters (filters); 00764 dialog.setMode (QFileDialog::AnyFile); 00765 bool tryagain = true; 00766 QString f; 00767 while (tryagain) 00768 { 00769 if (dialog.exec () != QDialog::Accepted) 00770 return; 00771 00772 f = dialog.selectedFile (); 00773 if (f.isEmpty ()) 00774 return; 00775 else 00776 { 00777 lat::Filename sealf (f.latin1()); 00778 QString dir (sealf.directory().name()); 00779 if (sealf.exists ()) 00780 { 00781 LOG(0, trace, LF3dbrowser, QString(f+": File already exists.\n").latin1()); 00782 int button = QMessageBox::warning (getShellWidget (), "File already exists", 00783 "File \""+f+"\" already exists.\n" 00784 "Do you want to overwrite it?", 00785 "Yes", "No"); 00786 if (button == 0) 00787 { 00788 if (!sealf.isWritable ()) 00789 { 00790 LOG(0, trace, LF3dbrowser, QString(f+": File not write able.\n").latin1()); 00791 int button = QMessageBox::warning (getShellWidget (), "Access denied", 00792 "File \""+f+"\" not write able.\n" 00793 "Do you want to select some other file?", 00794 "Yes", "No"); 00795 if (button == 1) 00796 return; 00797 } 00798 else 00799 tryagain = false; 00800 } 00801 } 00802 else if (!lat::Filename(dir.latin1()).isWritable ()) 00803 { 00804 LOG(0, trace, LF3dbrowser, QString(dir+": Directory not write able.\n").latin1()); 00805 int button = QMessageBox::warning (getShellWidget (), "Access denied", 00806 "You do not have permissions to write in \""+dir+"\" directory.\n" 00807 "Do you want to select some other file?", 00808 "Yes", "No"); 00809 if (button == 1) 00810 return; 00811 } 00812 else 00813 tryagain = false; 00814 } 00815 } 00816 // Pick format settings. 00817 float ppi = SoOffscreenRenderer::getScreenPixelsPerInch (); 00818 //float dpi = 300.; 00819 float dpi = ppi; 00820 QString format ("jpg"); 00821 00822 QString sfilter = dialog.selectedFilter (); 00823 int extIndexStart = sfilter.findRev(".")+1; 00824 int extIndexEnd = sfilter.findRev(")"); 00825 format = sfilter.mid (extIndexStart, extIndexEnd-extIndexStart); 00826 00827 // Add suffix. 00828 QString suffix ("." + format); 00829 if (f.find (suffix, -(format.length()+1)) == -1) 00830 f += suffix; 00831 00832 // FIXME: Use a state element to remeber all file operations(save, open) 00833 QDir::setCurrent (QFileInfo (f).dirPath ()); 00834 00835 QApplication::setOverrideCursor (Qt::waitCursor); 00836 if (sfilter == vector2EPS) 00837 printVector (f, format, 2); 00838 else if (sfilter == vector3EPS) 00839 printVector (f, format, 3); 00840 else if (sfilter == vectorPDF) 00841 printVector (f, format, 0); 00842 else 00843 printBitmap (f, ppi, dpi, format); 00844 QApplication::restoreOverrideCursor (); 00845 }
void Ig3DBaseBrowser::printBitmap | ( | QString | file, | |
float | ppi, | |||
float | dpi, | |||
QString | format | |||
) | [virtual] |
Definition at line 849 of file Ig3DBaseBrowser.cc.
References arg, b, g, LOG, origin, r, pydbsAccessor::root, size, GsfMatrixTools::trace(), TRUE, and warning.
Referenced by print(), and Ig3DWindow::printViews().
00851 { 00852 // This is mostly like the *Inventor Mentor* example. 00853 // Initialise off-screen renderer. 00854 float r, g, b; 00855 SbViewportRegion outvr = this->getViewportRegion (); 00856 00857 SbVec2s pixels (outvr.getViewportSizePixels ()); 00858 SbVec2s size ((short) (pixels [0] * dpi / ppi + 0.5), (short) (pixels [1] * dpi / ppi + 0.5)); 00859 SbVec2s origin = outvr.getViewportOriginPixels(); 00860 outvr.setViewportPixels (origin, size); 00861 00862 // Set up a custom GL render action for the offscreen rendered. 00863 // Do *not* use the one returned by `getGLRenderAction()': doing 00864 // so leaves the display in a confused state and doesn't produce 00865 // an output file. This way we also avoid issues with having to 00866 // mess and then later reset antialiasing and related parameters. 00867 SoGLRenderAction *ra = new SoGLRenderAction (outvr); 00868 SoOffscreenRenderer *renderer = new SoOffscreenRenderer (outvr); 00869 00870 // FIXME? renderer.setComponents (SoOffscreenRenderer::RGB_TRANSPARENCY); 00871 getSceneManager ()->getBackgroundColor ().getValue (r, g, b); 00872 renderer->setBackgroundColor (SbColor (r, g, b)); 00873 renderer->setGLRenderAction (ra); 00874 ra->setTransparencyType (SoGLRenderAction::SORTED_OBJECT_BLEND); 00875 ra->setSmoothing (TRUE); 00876 ra->setNumPasses (8); 00877 00878 // Want to render from above the SceneGraph so we get what the 00879 // camera sees; SoQtViewer uses the following code. (FIXME: 00880 // do we actually want to just render root, or look for camera?) 00881 SoNode *root = getSceneManager ()->getSceneGraph (); 00882 00883 SbBool ok = renderer->render (root); 00884 if (!ok) 00885 { 00886 QMessageBox::information (0, "IGUANA Print Info", 00887 tr ("Printing of the %1 format works only\n" 00888 "if you run locally installed software\n" 00889 "If iguana is running remotely, please,\n" 00890 "print as vector Postscript.").arg (file.right (3))); 00891 } 00892 else if (!renderer->writeToFile (file.latin1 (), format.latin1 ())) 00893 { 00894 LOG(0, trace, LF3dbrowser, 00895 QString(file + ": Failed to open file for writing.\n").latin1()); 00896 QMessageBox::warning (getShellWidget (), "System Error", 00897 "Failed to open file \""+file+"\" for writing.", 00898 "Ok"); 00899 } 00900 delete renderer; 00901 delete ra; 00902 }
Definition at line 905 of file Ig3DBaseBrowser.cc.
References ASSERT, getGL2PSOptions(), GL2PS_BSP_SORT, GL2PS_EPS, GL2PS_NO_PS3_SHADING, GL2PS_OVERFLOW, GL2PS_PDF, GL2PS_SILENT, GL2PS_USE_CURRENT_VIEWPORT, gl2psBeginPage(), gl2psEndPage(), LOG, m_gl2psFBBufferSize, NULL, output(), state(), GsfMatrixTools::trace(), and warning.
Referenced by print(), and Ig3DWindow::printViews().
00906 { 00907 // Use gl2ps to print vector graphics output. To be extended to 00908 // handle other vector graphics formats (SVG, WMF). 00909 static IgSoGL2PSAction *gl2psAction = 0; 00910 if (FILE *output = fopen (file.utf8 (), "wb+")) 00911 { 00912 int type = GL2PS_EPS; 00913 if (format == "pdf") 00914 type = GL2PS_PDF; 00915 else if (format == "eps") 00916 type = GL2PS_EPS; 00917 else 00918 ASSERT (0); 00919 00920 if (! gl2psAction ) 00921 gl2psAction = new IgSoGL2PSAction (this->getViewportRegion ()); 00922 00923 gl2psAction->setViewportRegion (this->getViewportRegion ()); 00924 SoGLRenderAction* prevAction = getGLRenderAction (); 00925 setGLRenderAction (gl2psAction); 00926 00927 int state = GL2PS_OVERFLOW; 00928 while (state == GL2PS_OVERFLOW) 00929 { 00930 int gl2psOptions = GL2PS_SILENT | GL2PS_USE_CURRENT_VIEWPORT 00931 | (level < 3 ? GL2PS_NO_PS3_SHADING : 0) 00932 | getGL2PSOptions (); 00933 gl2psBeginPage ("IGUANA Scene Graph", "IGUANA", NULL, 00934 type, GL2PS_BSP_SORT, 00935 gl2psOptions, 00936 GL_RGBA, 0, NULL,0, 0, 0, 00937 m_gl2psFBBufferSize, output, NULL); 00938 actualRedraw (); 00939 state = gl2psEndPage(); 00940 if (state == GL2PS_OVERFLOW) 00941 m_gl2psFBBufferSize += 1024*1024; 00942 } 00943 fclose (output); 00944 setGLRenderAction (prevAction); 00945 } 00946 else 00947 { 00948 LOG(0, trace, LF3dbrowser, QString(file +": Failed to open file for writing.\n").latin1()); 00949 QMessageBox::warning (getShellWidget (), "System Error", 00950 "Failed to open file \""+file+"\" for writing.", 00951 "Ok"); 00952 } 00953 }
void Ig3DBaseBrowser::repMenu | ( | IgQtObjectMenuMessage | message | ) |
Definition at line 965 of file Ig3DBaseBrowser.cc.
References IgQtObjectMenu::insertFromDefs(), IgRepSet::lookup(), m_menuRep, m_model, IgQtObjectMenuMessage::menu(), MENU_3D_OPS, MENU_SEEKTO, IgQtObjectMenuMessage::object(), IgQtObjectMenu::removeFromDefs(), and repSeekTo().
Referenced by Ig3DBaseWindow::focusIn(), and Ig3DBaseWindow::focusOut().
00966 { 00967 static const IgQtObjectMenu::ItemDef defs [] = { 00968 { -1, MENU_3D_OPS, 0, 0, -1 }, 00969 { -1, MENU_SEEKTO, "Seek To", SLOT(repSeekTo()), -1 }, 00970 }; 00971 static const int ndefs = sizeof (defs)/sizeof (defs [0]); 00972 IgRepresentable *object = message.object (); 00973 00974 m_menuRep = dynamic_cast<Ig3DBaseRep *> 00975 (IgRepSet::lookup (object, m_model, false)); 00976 00977 message.menu ()->removeFromDefs (defs, ndefs); 00978 if (m_menuRep) 00979 // Add our items if they aren't there yet. 00980 message.menu ()->insertFromDefs (this, defs, ndefs); 00981 00982 /* if (! m_menuRep) 00983 // An irrelevant object, remove our items. 00984 message.menu ()->removeFromDefs (defs, ndefs); 00985 else 00986 // Add our items if they aren't there yet. 00987 message.menu ()->insertFromDefs (this, defs, ndefs); 00988 */ 00989 }
Definition at line 992 of file Ig3DBaseBrowser.cc.
References ASSERT, dir, fd, m_menuRep, m_model, and Ig3DBaseModel::sceneGraph().
Referenced by repMenu().
00993 { 00994 ASSERT (m_menuRep); 00995 00996 // Locate the center point of the object 00997 SoGetBoundingBoxAction bbaction (getViewportRegion ()); 00998 SoSearchAction search; 00999 search.setNode (m_menuRep); 01000 search.apply (m_model->sceneGraph ()); 01001 ASSERT (search.getPath ()); 01002 bbaction.apply (search.getPath ()); 01003 01004 // Compute various points and directions; find a rotation that puts 01005 // the current camera direction into a new one 01006 SoCamera *camera = getCamera (); 01007 SbBox3f bbox = bbaction.getBoundingBox (); 01008 SbVec3f hitpoint = bbox.getCenter (); 01009 SbVec3f here = camera->position.getValue (); 01010 SbVec3f dir = hitpoint - here; 01011 SbVec3f olddir; 01012 float fd = (bbox.getMin () - bbox.getMax ()).length () / 2; 01013 01014 dir.normalize (); 01015 01016 camera->orientation.getValue ().multVec (SbVec3f (0, 0, -1), olddir); 01017 SbRotation diffrot (olddir, dir); 01018 01019 // Move the camera 01020 camera->focalDistance = fd; 01021 camera->orientation.setValue (camera->orientation.getValue () * diffrot); 01022 camera->position.setValue (hitpoint - fd * dir); 01023 }
Definition at line 718 of file Ig3DBaseBrowser.cc.
References m_model, saveNode(), and Ig3DBaseModel::sceneGraph().
00719 { saveNode (m_model->sceneGraph (), "Save Scene As...", getShellWidget ()); }
bool Ig3DBaseBrowser::saveNode | ( | SoNode * | node, | |
const QString & | title, | |||
QWidget * | parent = 0 , |
|||
const char * | file = 0 | |||
) | [static] |
Definition at line 1167 of file Ig3DBaseBrowser.cc.
References f, warning, and writeNode().
Referenced by Ig3DViewpointsCategory::save(), save(), Ig3DGridCategory::saveIVFile(), and Ig3DNodeCategory::saveNode().
01169 { 01170 QString f = ""; 01171 bool binaryfile = false; 01172 01173 if (file == 0) 01174 { 01175 QFileDialog dialog (QString::null, QString::null, parent, 01176 title, true); 01177 QString binary ("Binary OIV Files (*.iv)"); 01178 QString ascii ("ASCII OIV Files (*.iv)"); 01179 QStringList filters (ascii); 01180 filters.append (binary); 01181 dialog.setFilters (filters); 01182 dialog.setMode (QFileDialog::AnyFile); 01183 01184 bool tryagain = true; 01185 while (tryagain) 01186 { 01187 if (dialog.exec () != QDialog::Accepted) 01188 return false; 01189 01190 f = dialog.selectedFile (); 01191 if (f.isEmpty ()) 01192 return false; 01193 else 01194 { 01195 lat::Filename sealf (f.latin1()); 01196 if (sealf.exists ()) 01197 { 01198 int button = QMessageBox::warning (parent, "File already exists", 01199 "File \""+f+"\" already exists.\n" 01200 "Do you want to overwrite it?", 01201 "Yes", "No"); 01202 if (button == 0) 01203 { 01204 if (!sealf.isWritable ()) 01205 { 01206 int button = QMessageBox::warning (parent, "Access denied", 01207 "File \""+f+"\" not write able.\n" 01208 "Do you want to select some other file?", 01209 "Yes", "No"); 01210 if (button == 1) 01211 return false; 01212 } 01213 else 01214 tryagain = false; 01215 } 01216 } 01217 else if (!lat::Filename(dialog.dirPath ().latin1()).isWritable ()) 01218 { 01219 int button = QMessageBox::warning (parent, "Access denied", 01220 "You do not have permissions to write in \""+dialog.dirPath ()+"\" directory.\n" 01221 "Do you want to select some other file?", 01222 "Yes", "No"); 01223 if (button == 1) 01224 return false; 01225 } 01226 else 01227 tryagain = false; 01228 } 01229 } 01230 if (dialog.selectedFilter () == binary) 01231 binaryfile = true; 01232 } 01233 else 01234 f = file; 01235 01236 if (! (f.length () > 3 && f.find (".iv", -3) != -1)) 01237 f += ".iv"; 01238 01239 QDir::setCurrent (QFileInfo (f).dirPath ()); 01240 return writeNode (node, f.utf8 (), binaryfile); 01241 }
Definition at line 1062 of file Ig3DBaseBrowser.cc.
Referenced by setWhatsThisPicking().
01063 { 01064 if (SoQtViewer::isSeekMode()) 01065 { 01066 SoQtViewer::setSeekMode (false); 01067 setComponentCursor (SoQtCursor::getRotateCursor ()); 01068 } 01069 else 01070 { 01071 SoQtViewer::setSeekMode (true); 01072 if (isAnimating ()) { stopAnimating (); } 01073 setComponentCursor(SoQtCursor(SoQtCursor::CROSSHAIR)); 01074 } 01075 }
void Ig3DBaseBrowser::select | ( | Ig3DBaseRep * | rep | ) | [virtual] |
Definition at line 544 of file Ig3DBaseBrowser.cc.
References ASSERT, LOG, m_model, m_selection, prof2calltree::node, path(), Ig3DBaseModel::sceneGraph(), and GsfMatrixTools::trace().
Referenced by selectMessage().
00545 { 00546 // FIXME: handle multiple selection? 00547 if (m_selection != rep) 00548 { 00549 m_selection = rep; 00550 00551 LOG(0, trace, LF3dbrowser, "changing selection to " << rep << '\n'); 00552 ASSERT(m_model->sceneGraph()->isOfType(SoSelection::getClassTypeId())); 00553 SoSelection *top = static_cast<SoSelection *> 00554 (m_model->sceneGraph ()); 00555 SoNode *node = rep; 00556 SoPathList *selected = const_cast<SoPathList *> (top->getList ()); 00557 bool alreadySelected = false; 00558 int path = 0; 00559 00560 LOG(0, trace, LF3dbrowser, " -- looping over selected items\n"); 00561 // Check if the selected rep corresponds to an unselected node 00562 while (node && ! alreadySelected && path < selected->getLength ()) 00563 alreadySelected = (*selected) [path++]->containsNode (node); 00564 00565 if (! node) 00566 top->deselectAll (); 00567 else if (! alreadySelected) 00568 { 00569 // Find a path from the selection node to the selected node 00570 SoSearchAction finder; 00571 finder.setNode (node); 00572 finder.setFind (SoSearchAction::NODE); 00573 finder.apply (top); 00574 00575 if (finder.getPath ()) 00576 { 00577 LOG(0, trace, LF3dbrowser, " -- selecting object\n"); 00578 00579 // Set the node as selected. Selection callbacks will 00580 // fire on exit, which will result in a message on the 00581 // bus. `select' ignores the current selection policy 00582 // so clear that manually. 00583 LOG(0, trace, LF3dbrowser, " -- firing callback\n"); 00584 top->deselectAll (); 00585 top->select (finder.getPath ()); 00586 } 00587 } 00588 } 00589 }
void Ig3DBaseBrowser::selectMessage | ( | IgSelectionMessage | message | ) | [protected, virtual] |
Definition at line 699 of file Ig3DBaseBrowser.cc.
References IgSelectionMessage::context(), IgRepSet::lookup(), m_model, and select().
Referenced by initWidget(), and ~Ig3DBaseBrowser().
00700 { 00701 if (! message.context ()) 00702 select (0); 00703 else if (Ig3DBaseRep *rep = dynamic_cast<Ig3DBaseRep *> 00704 (IgRepSet::lookup (message.context (), m_model, true))) 00705 select (rep); 00706 }
void Ig3DBaseBrowser::setAutoClipping | ( | SbBool | enable | ) |
Definition at line 356 of file Ig3DBaseBrowser.cc.
Referenced by Ig3DViewpointsCategory::autoClipping(), and IgExaminerViewerCategory::setAutoClipping().
00357 { 00358 SoQtViewer::setAutoClipping (enable); 00359 if (enable) 00360 { 00361 SoCamera *camera = this->getCamera (); 00362 camera->farDistance.touch (); 00363 camera->nearDistance.touch (); 00364 } 00365 }
void Ig3DBaseBrowser::setCurrentPick | ( | Ig3DBaseRep * | rep | ) | [protected, virtual] |
Definition at line 604 of file Ig3DBaseBrowser.cc.
References m_selection.
00605 { 00606 // NB: do not fire any notifications; this method is an internal 00607 // means to change a state without getting into loops. 00608 m_selection = rep; 00609 // FIXME: tell the rep (w/detailed path + point information)? 00610 // FIXME: how can we pass that extra detail in the selection? 00611 }
void Ig3DBaseBrowser::setCurrentPickPoint | ( | const SoPickedPoint * | pick | ) | [protected, virtual] |
Definition at line 368 of file Ig3DBaseBrowser.cc.
References old.
00369 { 00370 bool old = isFeedbackVisible (); 00371 if (enable != old) 00372 SoQtExaminerViewer::setFeedbackVisibility (enable); 00373 }
Definition at line 960 of file Ig3DBaseBrowser.cc.
References m_gl2psOptions.
Referenced by IgGL2PSPrintCategory::setGL2PSOptions().
00961 { m_gl2psOptions = options; }
Reimplemented in IgRPhiBrowser, and IgSpareBrowser.
Definition at line 376 of file Ig3DBaseBrowser.cc.
References drawGrid().
00377 { 00378 Ig3DBaseBrowser::drawGrid (enable); 00379 }
Definition at line 1348 of file Ig3DBaseBrowser.cc.
References m_oldSeek, m_oldView, m_whatsThisPicking, pick(), seek(), and view().
01349 { 01350 if (m_whatsThisPicking != enable) 01351 { 01352 m_whatsThisPicking = enable; 01353 if (enable) 01354 { 01355 m_oldView = isViewing (); 01356 m_oldSeek = isSeekMode(); 01357 pick (); 01358 getGLWidget ()->setCursor (QCursor (Qt::WhatsThisCursor)); 01359 } 01360 else 01361 { 01362 if (m_oldView) 01363 { 01364 view (); 01365 if (m_oldSeek) 01366 seek (); 01367 } 01368 else 01369 { 01370 pick (); 01371 setComponentCursor(SoQtCursor(SoQtCursor::DEFAULT)); 01372 } 01373 } 01374 } 01375 }
Definition at line 348 of file Ig3DBaseBrowser.cc.
References m_state.
Referenced by printVector().
00349 { return m_state; }
Reimplemented in IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 478 of file Ig3DBaseBrowser.cc.
References cameraToggled(), m_farDistanceSensor, and m_nearDistanceSensor.
Referenced by Ig3DViewpointsCategory::setCamera(), IgLegoBrowser::toggleCameraType(), IgRPhiBrowser::toggleCameraType(), IgSpareBrowser::toggleCameraType(), and IgRZBrowser::toggleCameraType().
00479 { 00480 SoQtExaminerViewer::toggleCameraType (); 00481 SoCamera * const camera = this->getCamera (); 00482 camera->farDistance = SHRT_MAX; 00483 camera->nearDistance = 0.1; 00484 m_farDistanceSensor->attach (&camera->farDistance); 00485 m_nearDistanceSensor->attach (&camera->nearDistance); 00486 cameraToggled(); 00487 }
Definition at line 1078 of file Ig3DBaseBrowser.cc.
References m_whatsThisPicking.
Referenced by setWhatsThisPicking(), and Ig3DBaseWindow::view().
01079 { 01080 if (isViewing () != true) 01081 { 01082 m_whatsThisPicking = false; 01083 SoQtViewer::setViewing (true); 01084 setComponentCursor (SoQtCursor::getRotateCursor ()); 01085 } 01086 }
Definition at line 1056 of file Ig3DBaseBrowser.cc.
Referenced by browse(), and Ig2DBrowser::Ig2DBrowser().
Reimplemented in Ig2DBrowser, IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 1135 of file Ig3DBaseBrowser.cc.
References f.
Referenced by Ig3DViewpointsCategory::alignToAxis().
01136 { 01137 SoCamera * const camera = this->getCamera (); 01138 if (!camera) return; // probably a scene-less viewer 01139 01140 camera->position = SbVec3f(-1,0,0) * camera->position.getValue().length(); 01141 camera->orientation = SbRotation(SbVec3f(0,1,0),-M_PI/2.f); 01142 }
Reimplemented in Ig2DBrowser, IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 1145 of file Ig3DBaseBrowser.cc.
References f.
Referenced by Ig3DViewpointsCategory::alignToAxis().
01146 { 01147 SoCamera * const camera = this->getCamera (); 01148 if (!camera) return; // probably a scene-less viewer 01149 01150 SbVec3f norient = SbVec3f(0,-1,0); 01151 camera->position = -norient * camera->position.getValue().length(); 01152 camera->orientation = SbRotation(SbVec3f(0,0,1),-M_PI/2.f) * 01153 SbRotation(SbVec3f(0,0,-1),norient); 01154 }
Reimplemented in Ig2DBrowser, IgLegoBrowser, IgRPhiBrowser, IgRZBrowser, and IgSpareBrowser.
Definition at line 1157 of file Ig3DBaseBrowser.cc.
Referenced by Ig3DViewpointsCategory::alignToAxis().
01158 { 01159 SoCamera * const camera = this->getCamera (); 01160 if (!camera) return; // probably a scene-less viewer 01161 01162 camera->position = SbVec3f(0,0,1) * camera->position.getValue().length(); 01163 camera->orientation = SbRotation::identity(); 01164 }
bool Ig3DBaseBrowser::writeNode | ( | SoNode * | node, | |
const QString & | file, | |||
bool | binary, | |||
QWidget * | parent = 0 | |||
) | [static] |
Definition at line 1244 of file Ig3DBaseBrowser.cc.
Referenced by saveNode().
01246 { 01247 SoOutput out; 01248 QApplication::setOverrideCursor (Qt::waitCursor); 01249 bool ret = false; 01250 if (out.openFile (file.utf8 ())) 01251 { 01252 out.setBinary (binary); 01253 SoWriteAction writer (&out); 01254 writer.apply (node); 01255 ret = true; 01256 } 01257 else 01258 { 01259 QMessageBox::warning (parent, "System Error", 01260 "Failed to open file \""+file+"\" for writing." 01261 "Ok"); 01262 } 01263 QApplication::restoreOverrideCursor (); 01264 return ret; 01265 }
void Ig3DBaseBrowser::zoom | ( | const float | diffvalue | ) | [slot] |
Definition at line 435 of file Ig3DBaseBrowser.cc.
References direction, funct::exp(), FALSE, first, NULL, t, and TRUE.
Referenced by Ig3DViewpointsCategory::zoom(), zoomIn(), and zoomOut().
00436 { 00437 SoCamera *cam = this->getCamera (); 00438 if (cam == NULL) return; // can happen for empty scenegraph 00439 SoType t = cam->getTypeId (); 00440 00441 // This will be in the range of <0, ->>. 00442 float multiplicator = exp (diffvalue); 00443 00444 if (t.isDerivedFrom (SoOrthographicCamera::getClassTypeId ())) 00445 { 00446 // Since there's no perspective, "zooming" in the original sense 00447 // of the word won't have any visible effect. So we just increase 00448 // or decrease the field-of-view values of the camera instead, to 00449 // "shrink" the projection size of the model / scene. 00450 SoOrthographicCamera *oc = (SoOrthographicCamera *) cam; 00451 oc->height = oc->height.getValue () * multiplicator; 00452 } 00453 else if (t.isDerivedFrom (SoPerspectiveCamera::getClassTypeId ())) 00454 { 00455 float oldfocaldist = cam->focalDistance.getValue (); 00456 cam->focalDistance = oldfocaldist * multiplicator; 00457 00458 SbVec3f direction; 00459 cam->orientation.getValue ().multVec (SbVec3f (0, 0, -1), direction); 00460 cam->position = cam->position.getValue () + 00461 (cam->focalDistance.getValue () - oldfocaldist) * -direction; 00462 00463 } 00464 else 00465 { 00466 static SbBool first = TRUE; 00467 if (first) 00468 { 00469 SoDebugError::postWarning("Ig3DBaseBrowser::zoom", 00470 "unknown camera type, " 00471 "attempts to zoom will have no effect"); 00472 first = FALSE; 00473 } 00474 } 00475 }
Ig3DBaseRep* Ig3DBaseBrowser::m_currentPick [private] |
SoFieldSensor* Ig3DBaseBrowser::m_farDistanceSensor [private] |
Definition at line 203 of file Ig3DBaseBrowser.h.
Referenced by Ig3DBaseBrowser(), and toggleCameraType().
bool Ig3DBaseBrowser::m_first_time [private] |
int Ig3DBaseBrowser::m_gl2psFBBufferSize [private] |
int Ig3DBaseBrowser::m_gl2psOptions [private] |
Definition at line 194 of file Ig3DBaseBrowser.h.
Referenced by getGL2PSOptions(), and setGL2PSOptions().
bool Ig3DBaseBrowser::m_grid [private] |
Reimplemented in IgRPhiBrowser, and IgSpareBrowser.
Definition at line 193 of file Ig3DBaseBrowser.h.
Referenced by drawGrid(), Ig3DBaseBrowser(), and isGridVisible().
QPopupMenu* Ig3DBaseBrowser::m_menu [private] |
Definition at line 188 of file Ig3DBaseBrowser.h.
Ig3DBaseRep* Ig3DBaseBrowser::m_menuRep [private] |
Definition at line 190 of file Ig3DBaseBrowser.h.
Referenced by menuRep(), repMenu(), and repSeekTo().
Ig3DBaseModel* Ig3DBaseBrowser::m_model [private] |
Definition at line 187 of file Ig3DBaseBrowser.h.
Referenced by browse(), focusIn(), focusOut(), initWidget(), model(), repMenu(), repSeekTo(), save(), select(), selectMessage(), and ~Ig3DBaseBrowser().
SoFieldSensor* Ig3DBaseBrowser::m_nearDistanceSensor [private] |
Definition at line 204 of file Ig3DBaseBrowser.h.
Referenced by Ig3DBaseBrowser(), and toggleCameraType().
bool Ig3DBaseBrowser::m_oldSeek [private] |
bool Ig3DBaseBrowser::m_oldView [private] |
const SoPickedPoint* Ig3DBaseBrowser::m_pick [private] |
Definition at line 191 of file Ig3DBaseBrowser.h.
Referenced by getCurrentPickPoint(), and setCurrentPickPoint().
Ig3DBaseRep* Ig3DBaseBrowser::m_selection [private] |
Definition at line 189 of file Ig3DBaseBrowser.h.
Referenced by getSelection(), select(), and setCurrentPick().
IgSite* Ig3DBaseBrowser::m_site [private] |
Definition at line 186 of file Ig3DBaseBrowser.h.
IgState* Ig3DBaseBrowser::m_state [private] |
Definition at line 185 of file Ig3DBaseBrowser.h.
Referenced by initWidget(), state(), and ~Ig3DBaseBrowser().
bool Ig3DBaseBrowser::m_whatsThisPicking [private] |
Definition at line 196 of file Ig3DBaseBrowser.h.
Referenced by isWhatsThisPicking(), setWhatsThisPicking(), and view().
const int Ig3DBaseBrowser::MENU_3D_OPS = 100 [static] |
Definition at line 78 of file Ig3DBaseBrowser.h.
Referenced by repMenu(), IgSpareWindow::repMenu(), IgLegoWindow::repMenu(), IgRPhiWindow::repMenu(), Ig3DWindow::repMenu(), and IgRZWindow::repMenu().
const int Ig3DBaseBrowser::MENU_CLIP = 103 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D = 3000 [static] |
Definition at line 48 of file Ig3DBaseBrowser.h.
Referenced by Ig2DWindow::initMenu(), IgRZWindow::initMenu(), Ig3DWindow::initMenu(), IgLegoWindow::initMenu(), IgRPhiWindow::initMenu(), Ig3DBaseWindow::initMenu(), IgSpareWindow::initMenu(), Ig3DBaseWindow::showToolbar(), and Ig3DBaseWindow::toolbarVisibilityChanged().
const int Ig3DBaseBrowser::MENU_ID_3D_2D_VIEW_PROPERTIES = 3014 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_ANIMS = 3011 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_CLIPS = 3009 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_FIELDPLANES = 3015 [static] |
Definition at line 67 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_FILESEP = 3003 [static] |
Definition at line 49 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_GRIDS = 3017 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_LEGO_VIEW_PROPERTIES = 3112 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_BASE = 3113 [static] |
Definition at line 63 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_MANIP = 3101 [static] |
Definition at line 57 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_NEW = 3102 [static] |
Definition at line 58 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_NEW_DIR = 3103 [static] |
Definition at line 59 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_NEW_PNT = 3104 [static] |
Definition at line 60 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_NEW_SPT = 3105 [static] |
Definition at line 61 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LGHT_SEP = 3110 [static] |
Definition at line 62 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_LIGHTS = 3010 [static] |
Definition at line 56 of file Ig3DBaseBrowser.h.
Referenced by IgRZWindow::initMenu(), Ig3DWindow::initMenu(), IgLegoWindow::initMenu(), IgRPhiWindow::initMenu(), and IgSpareWindow::initMenu().
const int Ig3DBaseBrowser::MENU_ID_3D_MISCSEP = 3007 [static] |
Definition at line 53 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_NODEMANIP = 3016 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_RPHI_VIEW_PROPERTIES = 3114 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_RZ_VIEW_PROPERTIES = 3113 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_SPARE_VIEW_PROPERTIES = 3115 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_TOOLBAR = 3004 [static] |
Definition at line 50 of file Ig3DBaseBrowser.h.
Referenced by Ig3DBaseWindow::initMenu(), and Ig3DBaseWindow::toolbarVisibilityChanged().
const int Ig3DBaseBrowser::MENU_ID_3D_TOOLBAR_SEP = 3005 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_VIEW_PROPERTIES = 3006 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_VIEWPOINTS = 3012 [static] |
const int Ig3DBaseBrowser::MENU_ID_3D_VP_BASE = 3203 [static] |
Definition at line 72 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_VP_NEW = 3201 [static] |
Definition at line 70 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_VP_SEP = 3202 [static] |
Definition at line 71 of file Ig3DBaseBrowser.h.
const int Ig3DBaseBrowser::MENU_ID_3D_Z_SLICE = 3008 [static] |
Definition at line 54 of file Ig3DBaseBrowser.h.
Referenced by IgRZWindow::initMenu(), Ig3DWindow::initMenu(), IgLegoWindow::initMenu(), IgRPhiWindow::initMenu(), and IgSpareWindow::initMenu().
const int Ig3DBaseBrowser::MENU_SEEKTO = 101 [static] |
const int Ig3DBaseBrowser::MENU_SLICE = 102 [static] |