00001
00002
00003 #include "Iguana/Inventor/interface/IgSoG4Box.h"
00004 #include <Inventor/nodes/SoCube.h>
00005 #include <Inventor/nodes/SoScale.h>
00006
00007
00008
00009
00010
00011
00012
00013
00014 SO_KIT_SOURCE (IgSoG4Box);
00015
00016
00017
00018
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 }