CMS 3D CMS Logo

IgLegoBrowser Class Reference

#include <Iguana/GLBrowsers/interface/IgLegoBrowser.h>

Inheritance diagram for IgLegoBrowser:

Ig3DBaseBrowser IgBrowser

List of all members.

Public Slots

virtual void invertCamera (void)
virtual void toggleCameraType (void)
virtual void viewPlaneX (void)
virtual void viewPlaneY (void)
virtual void viewPlaneZ (void)

Public Member Functions

 IgLegoBrowser (IgState *state, IgSite *site, IgLegoModel *model=0)

Static Public Member Functions

static const char * catalogLabel (void)

Protected Member Functions

virtual QWidget * buildBottomTrim (QWidget *parent)
virtual void buildDecoration (QWidget *parent)
virtual QWidget * buildLeftTrim (QWidget *parent)
virtual QWidget * buildRightTrim (QWidget *parent)

Private Member Functions

virtual void init (void)


Detailed Description

Definition at line 19 of file IgLegoBrowser.h.


Constructor & Destructor Documentation

IgLegoBrowser::IgLegoBrowser ( IgState state,
IgSite site,
IgLegoModel model = 0 
)

Definition at line 17 of file IgLegoBrowser.cc.

References init().

00020     : Ig3DBaseBrowser (state,
00021                        site,
00022                        model ? model : new IgLegoModel (state))
00023 {
00024     init ();
00025 }


Member Function Documentation

QWidget * IgLegoBrowser::buildBottomTrim ( QWidget *  parent  )  [protected, virtual]

Reimplemented from Ig3DBaseBrowser.

Definition at line 54 of file IgLegoBrowser.cc.

References HLT_VtxMuL3::result.

00055 {
00056     QWidget     *result = new QWidget (parent);
00057     result->setFixedHeight (0);
00058     return result;    
00059 }

void IgLegoBrowser::buildDecoration ( QWidget *  parent  )  [protected, virtual]

Definition at line 70 of file IgLegoBrowser.cc.

00071 {
00072     Ig3DBaseBrowser::buildDecoration (parent);    
00073     return;    
00074 }

QWidget * IgLegoBrowser::buildLeftTrim ( QWidget *  parent  )  [protected, virtual]

Reimplemented from Ig3DBaseBrowser.

Definition at line 46 of file IgLegoBrowser.cc.

References HLT_VtxMuL3::result.

00047 {
00048     QWidget     *result = new QWidget (parent);
00049     result->setFixedWidth (0);
00050     return result;    
00051 }

QWidget * IgLegoBrowser::buildRightTrim ( QWidget *  parent  )  [protected, virtual]

Reimplemented from Ig3DBaseBrowser.

Definition at line 62 of file IgLegoBrowser.cc.

References HLT_VtxMuL3::result.

00063 {
00064     QWidget     *result = new QWidget (parent);
00065     result->setFixedWidth (0);
00066     return result;    
00067 }

const char * IgLegoBrowser::catalogLabel ( void   )  [static]

Definition at line 14 of file IgLegoBrowser.cc.

00015 { return "Lego"; }

void IgLegoBrowser::init ( void   )  [private, virtual]

Definition at line 28 of file IgLegoBrowser.cc.

Referenced by IgLegoBrowser().

00029 {
00030     SoQtExaminerViewer::setCameraType (SoOrthographicCamera::getClassTypeId ());
00031     SoOrthographicCamera * const camera = dynamic_cast <SoOrthographicCamera *> (this->getCamera ());
00032     if (!camera) return; // probably a scene-less viewer
00033 
00034     camera->position.setValue (7.2122893, 4.4723949, 2.5151112);
00035     camera->orientation.setValue (-0.53453183, 0.81074113, 0.23869397, 1.1617218);
00036     camera->aspectRatio = 1.0;
00037     camera->focalDistance = 6.5153651;
00038     camera->height = 13.03073;
00039     camera->nearDistance = 0.1;
00040     camera->farDistance = 32767;
00041 
00042     setBackgroundColor (SbColor (1.0, 1.0, 1.0));
00043 }

void IgLegoBrowser::invertCamera ( void   )  [virtual, slot]

Reimplemented from Ig3DBaseBrowser.

Definition at line 84 of file IgLegoBrowser.cc.

00085 {
00086     SoCamera * const camera = this->getCamera ();
00087     if (!camera) return; // probably a scene-less viewer
00088 
00089     camera->position = camera->position.getValue () * -1.0F;    
00090 }

void IgLegoBrowser::toggleCameraType ( void   )  [virtual, slot]

Reimplemented from Ig3DBaseBrowser.

Definition at line 77 of file IgLegoBrowser.cc.

References Ig3DBaseBrowser::toggleCameraType().

00078 {
00079     SoQtExaminerViewer::toggleCameraType ();
00080     Ig3DBaseBrowser::toggleCameraType ();    
00081 }

void IgLegoBrowser::viewPlaneX ( void   )  [virtual, slot]

Reimplemented from Ig3DBaseBrowser.

Definition at line 93 of file IgLegoBrowser.cc.

References f.

Referenced by IgLegoViewPropertiesCategory::alignAxis().

00094 {
00095     SoCamera * const camera = this->getCamera ();
00096     if (!camera) return; // probably a scene-less viewer
00097     
00098     camera->position = SbVec3f (-1, 0, 0) * camera->position.getValue ().length ();
00099     camera->orientation = SbRotation (SbVec3f (0, 1, 0), -M_PI / 2.f);
00100 }

void IgLegoBrowser::viewPlaneY ( void   )  [virtual, slot]

Reimplemented from Ig3DBaseBrowser.

Definition at line 103 of file IgLegoBrowser.cc.

References f.

Referenced by IgLegoViewPropertiesCategory::alignAxis().

00104 {
00105     SoCamera * const camera = this->getCamera ();
00106     if (!camera) return; // probably a scene-less viewer
00107 
00108     SbVec3f norient = SbVec3f (0, -1, 0);
00109     camera->position = -norient * camera->position.getValue().length();
00110     camera->orientation = SbRotation (SbVec3f (0, 0, 1), -M_PI / 2.f) * 
00111                           SbRotation (SbVec3f (0, 0, -1), norient);
00112 }

void IgLegoBrowser::viewPlaneZ ( void   )  [virtual, slot]

Reimplemented from Ig3DBaseBrowser.

Definition at line 115 of file IgLegoBrowser.cc.

Referenced by IgLegoViewPropertiesCategory::alignAxis().

00116 {
00117     SoCamera * const camera = this->getCamera ();
00118     if (!camera) return; // probably a scene-less viewer
00119   
00120     camera->position = SbVec3f (0, 0, 1) * camera->position.getValue ().length ();
00121     camera->orientation = SbRotation::identity ();
00122 }


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