CMS 3D CMS Logo

IgMatEdViewer Class Reference

#include <Iguana/Controls/interface/IgMatEdViewer.h>

List of all members.

Public Member Functions

 IgMatEdViewer (QWidget *parent, SoNode *model)

Private Attributes

SoOrthographicCamera * m_camera
SoDirectionalLight * m_light
SoNode * m_model
QWidget * m_parent
SoQtRenderArea * m_renderArea
SoSeparator * m_root
SoSeparator * m_userSeparator


Detailed Description

Definition at line 23 of file IgMatEdViewer.h.


Constructor & Destructor Documentation

IgMatEdViewer::IgMatEdViewer ( QWidget *  parent,
SoNode *  model 
)

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 }


Member Data Documentation

SoOrthographicCamera* IgMatEdViewer::m_camera [private]

Definition at line 34 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().

SoDirectionalLight* IgMatEdViewer::m_light [private]

Definition at line 33 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().

SoNode* IgMatEdViewer::m_model [private]

Definition at line 37 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().

QWidget* IgMatEdViewer::m_parent [private]

Definition at line 31 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().

SoQtRenderArea* IgMatEdViewer::m_renderArea [private]

Definition at line 32 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().

SoSeparator* IgMatEdViewer::m_root [private]

Definition at line 35 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().

SoSeparator* IgMatEdViewer::m_userSeparator [private]

Definition at line 36 of file IgMatEdViewer.h.

Referenced by IgMatEdViewer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:13 2009 for CMSSW by  doxygen 1.5.4