26 #ifdef G4VIS_BUILD_OI_DRIVER 
   38 #include <Inventor/nodes/SoMaterial.h> 
   39 #include <Inventor/nodes/SoDrawStyle.h> 
   40 #include <Inventor/nodes/SoLightModel.h> 
   41 #include <Inventor/nodes/SoResetTransform.h> 
   53   fMaterials = 
new SoGroup;
 
   55   fLineStyles = 
new SoGroup;
 
   56   addChild(fLineStyles);
 
   57   fLightModels = 
new SoGroup;
 
   58   addChild(fLightModels);
 
   59   fResetTransform = 
new SoResetTransform;
 
   60   addChild(fResetTransform);
 
   77   int number = fMaterials->getNumChildren();
 
   78   for(
int index=0;index<number;index++) { 
 
   79     SoMaterial* material = (SoMaterial*)fMaterials->getChild(index);
 
   80     if( (material->diffuseColor[0]==aRGB) &&
 
   81         (material->transparency[0]==aTransparency) ) {
 
   85   SoMaterial* material = 
new SoMaterial;
 
   86   material->diffuseColor.setValue(aRGB);
 
   87   material->transparency.setValue(aTransparency);
 
   88   fMaterials->addChild(material);
 
  101   SbColor aRGB(aRed,aGreen,aBlue);
 
  102   int number = fMaterials->getNumChildren();
 
  103   for(
int index=0;index<number;index++) { 
 
  104     SoMaterial* material = (SoMaterial*)fMaterials->getChild(index);
 
  105     if( (material->diffuseColor[0]==aRGB) &&
 
  106         (material->transparency[0]==aTransparency) ) {
 
  110   SoMaterial* material = 
new SoMaterial;
 
  111   material->diffuseColor.setValue(aRGB);
 
  112   material->transparency.setValue(aTransparency);
 
  113   fMaterials->addChild(material);
 
  159  unsigned short aPattern
 
  165   int number = fLineStyles->getNumChildren();
 
  166   for(
int index=0;index<number;index++) { 
 
  167     SoDrawStyle* drawStyle = (SoDrawStyle*)fLineStyles->getChild(index);
 
  168     if( (drawStyle->style.getValue()==SoDrawStyle::LINES) &&
 
  169         (drawStyle->lineWidth.getValue()==aWidth) &&
 
  170         (drawStyle->linePattern.getValue()==aPattern) ) {
 
  174   SoDrawStyle* drawStyle = 
new SoDrawStyle;
 
  175   drawStyle->style.setValue(SoDrawStyle::LINES);
 
  176   drawStyle->lineWidth.setValue(aWidth);
 
  177   drawStyle->linePattern.setValue(aPattern);
 
  178   fLineStyles->addChild(drawStyle);
 
  187   SoLightModel* lightModel = 
new SoLightModel;
 
  188   lightModel->model.setValue(SoLightModel::PHONG);
 
  189   fLightModels->addChild(lightModel);
 
  198   SoLightModel* lightModel = 
new SoLightModel;
 
  199   lightModel->model.setValue(SoLightModel::BASE_COLOR);
 
  200   fLightModels->addChild(lightModel);
 
  209   return fResetTransform;
 
SoLightModel * getLightModelBaseColor()
 
SoResetTransform * getResetTransform()
 
SoMaterial * getMaterial(const SbColor &, float=0)
 
SoLightModel * getLightModelPhong()
 
SoDrawStyle * getLineStyle(unsigned short=0xFFFF, float=0)