Definition at line 22 of file IgMatEdViewer.cc.
References ASSERT, f, m_camera, m_light, m_model, m_parent, m_renderArea, m_root, and m_userSeparator.
00023 :m_parent(parent),
00024 m_renderArea (0),
00025 m_light (0),
00026 m_camera (0),
00027 m_root (0),
00028 m_userSeparator (0),
00029 m_model (model)
00030 {
00031 ASSERT (m_parent);
00032
00033 m_root = new SoSeparator ();
00034 m_root->ref ();
00035
00036 m_light = new SoDirectionalLight ();
00037 m_light->ref ();
00038
00039 m_camera = new SoOrthographicCamera ();
00040 m_camera->ref ();
00041
00042 m_userSeparator = new SoSeparator ();
00043 m_userSeparator->ref ();
00044
00045 m_userSeparator->addChild (m_model);
00046
00047 m_root->addChild (m_camera);
00048 m_root->addChild (m_light);
00049 m_root->addChild (m_userSeparator);
00050
00051 m_renderArea = new SoQtRenderArea (m_parent, "IgMatEdViewer", true, false, false);
00052
00053 m_camera->viewAll (m_userSeparator, m_renderArea->getViewportRegion());
00054 m_renderArea->setSceneGraph (m_root);
00055 m_renderArea->setBackgroundColor (SbColor(0.0f, 0.2f, 0.3f));
00056 m_renderArea->setTransparencyType (SoGLRenderAction::BLEND);
00057
00058 m_renderArea->show ();
00059 }