CMS 3D CMS Logo

IgSoShapeKit Class Reference

#include <Iguana/Inventor/interface/IgSoShapeKit.h>

Inheritance diagram for IgSoShapeKit:

IgSo2DArrow IgSo3DErrorBar IgSoArrow IgSoAxis IgSoCalHit IgSoCircleArc IgSoCircularHist IgSoCoordinateAxis IgSoCrystalHit IgSoCube IgSoEllipsoid IgSoG4Box IgSoG4Torus IgSoG4Trap IgSoG4Trd IgSoGrid IgSoHits IgSoIdealTrack IgSoJet IgSoLegoPlot IgSoLegoTowers IgSoPcon IgSoPolyVol IgSoQuad IgSoRectColHist IgSoRectHist IgSoRotSolid IgSoRZHist IgSoSimpleTrajectory IgSoSiStrips IgSoSphereHit IgSoSplineTrack IgSoTower IgSoTowerRadii IgSoXYZGrid

List of all members.

Public Member Functions

 IgSoShapeKit (void)

Static Public Member Functions

static void initClass (void)

Protected Member Functions

virtual void callback (SoCallbackAction *action)
virtual void disableSensor (void)
virtual void doAction (SoAction *action)
virtual void enableSensor (void)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
virtual void GLRender (SoGLRenderAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void pick (SoPickAction *action)
virtual void preAction (void)
virtual void rayPick (SoRayPickAction *action)
virtual SbBool readInstance (SoInput *in, unsigned short flags)
virtual void refresh (void)
virtual void search (SoSearchAction *action)
virtual void setDefaultOnNonWritingFields (void)
virtual SbBool setUpConnections (SbBool onoff, SbBool doitalways=false)
virtual void write (SoWriteAction *action)
virtual ~IgSoShapeKit (void)

Private Member Functions

 SO_KIT_CATALOG_ENTRY_HEADER (separator)
 SO_KIT_HEADER (IgSoShapeKit)

Static Private Member Functions

static void selfMonitorCB (void *data, SoSensor *sensor)

Private Attributes

SoNodeSensor * m_sensor


Detailed Description

Definition at line 24 of file IgSoShapeKit.h.


Constructor & Destructor Documentation

IgSoShapeKit::IgSoShapeKit ( void   ) 

Definition at line 21 of file IgSoShapeKit.cc.

References FALSE, m_sensor, selfMonitorCB(), and TRUE.

00022 {
00023     SO_KIT_CONSTRUCTOR (IgSoShapeKit);
00024     SO_KIT_ADD_CATALOG_ENTRY (separator, SoSeparator, FALSE, this,\x0, TRUE);
00025     SO_KIT_INIT_INSTANCE ();
00026 
00027     m_sensor = new SoNodeSensor (selfMonitorCB, this);
00028     m_sensor->setPriority (1);
00029 }

IgSoShapeKit::~IgSoShapeKit ( void   )  [protected, virtual]

Definition at line 31 of file IgSoShapeKit.cc.

References m_sensor.

00032 { delete m_sensor; }


Member Function Documentation

void IgSoShapeKit::callback ( SoCallbackAction *  action  )  [protected, virtual]

Definition at line 86 of file IgSoShapeKit.cc.

References preAction().

00087 { preAction (); SoBaseKit::callback (action); }

void IgSoShapeKit::disableSensor ( void   )  [protected, virtual]

Definition at line 152 of file IgSoShapeKit.cc.

References m_sensor.

Referenced by selfMonitorCB(), and setUpConnections().

00153 { m_sensor->detach (); }

void IgSoShapeKit::doAction ( SoAction *  action  )  [protected, virtual]

Definition at line 82 of file IgSoShapeKit.cc.

References preAction().

00083 { preAction (); SoBaseKit::doAction (action); }

void IgSoShapeKit::enableSensor ( void   )  [protected, virtual]

Definition at line 145 of file IgSoShapeKit.cc.

References m_sensor.

Referenced by selfMonitorCB().

00146 {
00147     if (! m_sensor->getAttachedNode ())
00148         m_sensor->attach (this);
00149 }

void IgSoShapeKit::getBoundingBox ( SoGetBoundingBoxAction *  action  )  [protected, virtual]

Definition at line 94 of file IgSoShapeKit.cc.

References preAction().

00095 { preAction (); SoBaseKit::getBoundingBox (action); }

void IgSoShapeKit::getMatrix ( SoGetMatrixAction *  action  )  [protected, virtual]

Definition at line 98 of file IgSoShapeKit.cc.

References preAction().

00099 { preAction (); SoBaseKit::getMatrix (action); }

void IgSoShapeKit::getPrimitiveCount ( SoGetPrimitiveCountAction *  action  )  [protected, virtual]

Definition at line 122 of file IgSoShapeKit.cc.

References preAction().

00123 { preAction (); SoBaseKit::getPrimitiveCount (action); }

void IgSoShapeKit::GLRender ( SoGLRenderAction *  action  )  [protected, virtual]

Definition at line 90 of file IgSoShapeKit.cc.

References preAction().

00091 { preAction (); SoBaseKit::GLRender (action); }

void IgSoShapeKit::handleEvent ( SoHandleEventAction *  action  )  [protected, virtual]

Definition at line 102 of file IgSoShapeKit.cc.

References preAction().

00103 { preAction (); SoBaseKit::handleEvent (action); }

void IgSoShapeKit::initClass ( void   )  [static]

Reimplemented in IgSo2DArrow, IgSo3DErrorBar, IgSoArrow, IgSoAxis, IgSoCalHit, IgSoCircleArc, IgSoCircularHist, IgSoCoordinateAxis, IgSoCrystalHit, IgSoCube, IgSoEllipsoid, IgSoG4Box, IgSoG4Torus, IgSoG4Trap, IgSoG4Trd, IgSoGrid, IgSoHits, IgSoIdealTrack, IgSoJet, IgSoLegoPlot, IgSoLegoTowers, IgSoPcon, IgSoPolyVol, IgSoQuad, IgSoRectColHist, IgSoRectHist, IgSoRotSolid, IgSoRZHist, IgSoSimpleTrajectory, IgSoSiStrips, IgSoSphereHit, IgSoSplineTrack, IgSoTower, IgSoTowerRadii, and IgSoXYZGrid.

Definition at line 34 of file IgSoShapeKit.cc.

Referenced by initNodes(), and initShapes().

00035 { SO_KIT_INIT_CLASS (IgSoShapeKit, SoBaseKit, "BaseKit"); }

void IgSoShapeKit::pick ( SoPickAction *  action  )  [protected, virtual]

Definition at line 110 of file IgSoShapeKit.cc.

References preAction().

00111 { preAction (); SoBaseKit::pick (action); }

void IgSoShapeKit::preAction ( void   )  [protected, virtual]

Definition at line 70 of file IgSoShapeKit.cc.

References m_sensor, and refresh().

Referenced by callback(), doAction(), getBoundingBox(), getMatrix(), getPrimitiveCount(), GLRender(), handleEvent(), pick(), rayPick(), search(), and write().

00071 {
00072     // If we've been scheduled for refresh and an action is applied,
00073     // force the refresh update before applying the action.
00074     if (m_sensor->isScheduled ())
00075     {   
00076         m_sensor->unschedule ();
00077         refresh ();
00078     }
00079 }

void IgSoShapeKit::rayPick ( SoRayPickAction *  action  )  [protected, virtual]

Definition at line 106 of file IgSoShapeKit.cc.

References preAction().

00107 { preAction (); SoBaseKit::rayPick (action); }

SbBool IgSoShapeKit::readInstance ( SoInput *  in,
unsigned short  flags 
) [protected, virtual]

Definition at line 126 of file IgSoShapeKit.cc.

References refresh(), and HLT_VtxMuL3::result.

00127 { 
00128     bool result = SoBaseKit::readInstance (in, flags);  
00129     this->refresh ();    
00130     return result; 
00131 }

void IgSoShapeKit::refresh ( void   )  [protected, virtual]

Reimplemented in IgSo2DArrow, IgSo3DErrorBar, IgSoArrow, IgSoAxis, IgSoCalHit, IgSoCircleArc, IgSoCircularHist, IgSoCoordinateAxis, IgSoCrystalHit, IgSoCube, IgSoEllipsoid, IgSoG4Box, IgSoG4Torus, IgSoG4Trap, IgSoG4Trd, IgSoGrid, IgSoHits, IgSoIdealTrack, IgSoJet, IgSoLegoPlot, IgSoLegoTowers, IgSoPcon, IgSoPolyVol, IgSoQuad, IgSoRectColHist, IgSoRectHist, IgSoRotSolid, IgSoRZHist, IgSoSimpleTrajectory, IgSoSiStrips, IgSoSphereHit, IgSoSplineTrack, IgSoTower, IgSoTowerRadii, and IgSoXYZGrid.

Definition at line 156 of file IgSoShapeKit.cc.

Referenced by preAction(), readInstance(), and selfMonitorCB().

00157 {}

void IgSoShapeKit::search ( SoSearchAction *  action  )  [protected, virtual]

Definition at line 114 of file IgSoShapeKit.cc.

References preAction().

00115 { preAction (); SoBaseKit::search (action); }

void IgSoShapeKit::selfMonitorCB ( void data,
SoSensor *  sensor 
) [static, private]

Definition at line 134 of file IgSoShapeKit.cc.

References disableSensor(), enableSensor(), VarParsing::obj, and refresh().

Referenced by IgSoShapeKit(), and setUpConnections().

00135 {
00136     IgSoShapeKit *obj = (IgSoShapeKit *) data;
00137 
00138     // Force sensor on first, it allows "refresh" method to exit early
00139     obj->disableSensor ();
00140     obj->refresh ();
00141     obj->enableSensor ();
00142 }

void IgSoShapeKit::setDefaultOnNonWritingFields ( void   )  [protected, virtual]

Definition at line 57 of file IgSoShapeKit.cc.

References i, and TRUE.

00058 {
00059     // Mark all parts default so they won't be written out.
00060     // Normal fields will be written out, so don't touch them.
00061     // The first part seems to always be "this" and has no field.
00062     SoBaseKit::setDefaultOnNonWritingFields ();
00063     const SoNodekitCatalog *cat = getNodekitCatalog ();
00064     for (int i = 0; i < cat->getNumEntries (); ++i)
00065         if (SoField *field = getField (cat->getName (i)))
00066             field->setDefault (TRUE);
00067 }

SbBool IgSoShapeKit::setUpConnections ( SbBool  onoff,
SbBool  doitalways = false 
) [protected, virtual]

Definition at line 38 of file IgSoShapeKit.cc.

References disableSensor(), and selfMonitorCB().

Referenced by IgSo2DArrow::IgSo2DArrow(), IgSo3DErrorBar::IgSo3DErrorBar(), IgSoArrow::IgSoArrow(), IgSoAxis::IgSoAxis(), IgSoCalHit::IgSoCalHit(), IgSoCircleArc::IgSoCircleArc(), IgSoCircularHist::IgSoCircularHist(), IgSoCoordinateAxis::IgSoCoordinateAxis(), IgSoCrystalHit::IgSoCrystalHit(), IgSoCube::IgSoCube(), IgSoEllipsoid::IgSoEllipsoid(), IgSoG4Box::IgSoG4Box(), IgSoG4Torus::IgSoG4Torus(), IgSoG4Trap::IgSoG4Trap(), IgSoG4Trd::IgSoG4Trd(), IgSoGrid::IgSoGrid(), IgSoHits::IgSoHits(), IgSoIdealTrack::IgSoIdealTrack(), IgSoJet::IgSoJet(), IgSoLegoPlot::IgSoLegoPlot(), IgSoLegoTowers::IgSoLegoTowers(), IgSoPcon::IgSoPcon(), IgSoPolyVol::IgSoPolyVol(), IgSoQuad::IgSoQuad(), IgSoRectColHist::IgSoRectColHist(), IgSoRectHist::IgSoRectHist(), IgSoRotSolid::IgSoRotSolid(), IgSoRZHist::IgSoRZHist(), IgSoSimpleTrajectory::IgSoSimpleTrajectory(), IgSoSiStrips::IgSoSiStrips(), IgSoSphereHit::IgSoSphereHit(), IgSoSplineTrack::IgSoSplineTrack(), IgSoTower::IgSoTower(), IgSoTowerRadii::IgSoTowerRadii(), and IgSoXYZGrid::IgSoXYZGrid().

00039 {
00040     if (! doitalways && connectionsSetUp == onoff)
00041         return onoff;
00042 
00043     if (onoff)
00044     {
00045         SoBaseKit::setUpConnections (onoff, doitalways);
00046         selfMonitorCB (this, 0); // automatically attaches sensor
00047     }
00048     else
00049     {
00050         disableSensor ();
00051         SoBaseKit::setUpConnections (onoff, doitalways);
00052     }
00053     return connectionsSetUp != onoff;
00054 }

IgSoShapeKit::SO_KIT_CATALOG_ENTRY_HEADER ( separator   )  [private]

IgSoShapeKit::SO_KIT_HEADER ( IgSoShapeKit   )  [private]

void IgSoShapeKit::write ( SoWriteAction *  action  )  [protected, virtual]

Definition at line 118 of file IgSoShapeKit.cc.

References preAction().

00119 { preAction (); SoBaseKit::write (action); }


Member Data Documentation

SoNodeSensor* IgSoShapeKit::m_sensor [private]

Definition at line 60 of file IgSoShapeKit.h.

Referenced by disableSensor(), enableSensor(), IgSoShapeKit(), preAction(), and ~IgSoShapeKit().


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