CMS 3D CMS Logo

IgSoG4Box.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "Iguana/Inventor/interface/IgSoG4Box.h"
00004 #include <Inventor/nodes/SoCube.h>
00005 #include <Inventor/nodes/SoScale.h>
00006 
00007 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00008 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00009 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00010 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00011 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00012 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00013 
00014 SO_KIT_SOURCE (IgSoG4Box);
00015 
00016 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00017 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00018 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00019 
00020 void
00021 IgSoG4Box::initClass (void)
00022 { SO_KIT_INIT_CLASS (IgSoG4Box, IgSoShapeKit, "IgSoShapeKit"); }
00023 
00024 IgSoG4Box::IgSoG4Box (void)
00025 {
00026     SO_KIT_CONSTRUCTOR (IgSoG4Box);
00027     SO_KIT_ADD_FIELD (dx, (1.0));
00028     SO_KIT_ADD_FIELD (dy, (1.0));
00029     SO_KIT_ADD_FIELD (dz, (1.0));
00030     SO_KIT_ADD_CATALOG_ENTRY (scale, SoScale, FALSE, separator,\x0, TRUE);
00031     SO_KIT_ADD_CATALOG_ENTRY (cube, SoCube, FALSE, separator,\x0, TRUE);
00032     SO_KIT_INIT_INSTANCE ();
00033     setUpConnections (true, true);
00034 }
00035 
00036 void
00037 IgSoG4Box::refresh (void)
00038 {
00039     SoScale *scale = new SoScale;
00040     SoCube  *cube = new SoCube;
00041 
00042     scale->scaleFactor.setValue (dx.getValue (), dy.getValue (), dz.getValue ());
00043 
00044     setPart ("scale", scale);
00045     setPart ("cube", cube);
00046 }

Generated on Tue Jun 9 17:38:45 2009 for CMSSW by  doxygen 1.5.4