#include <Iguana/Inventor/interface/IgSoShapeKit.h>
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 |
Definition at line 24 of file IgSoShapeKit.h.
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] |
void IgSoShapeKit::callback | ( | SoCallbackAction * | action | ) | [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] |
void IgSoShapeKit::getBoundingBox | ( | SoGetBoundingBoxAction * | action | ) | [protected, virtual] |
void IgSoShapeKit::getMatrix | ( | SoGetMatrixAction * | action | ) | [protected, virtual] |
void IgSoShapeKit::getPrimitiveCount | ( | SoGetPrimitiveCountAction * | action | ) | [protected, virtual] |
void IgSoShapeKit::GLRender | ( | SoGLRenderAction * | action | ) | [protected, virtual] |
void IgSoShapeKit::handleEvent | ( | SoHandleEventAction * | action | ) | [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 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 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] |
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 }
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().
void IgSoShapeKit::search | ( | SoSearchAction * | action | ) | [protected, virtual] |
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 }
Definition at line 57 of file IgSoShapeKit.cc.
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] |
SoNodeSensor* IgSoShapeKit::m_sensor [private] |
Definition at line 60 of file IgSoShapeKit.h.
Referenced by disableSensor(), enableSensor(), IgSoShapeKit(), preAction(), and ~IgSoShapeKit().